Skip to content

Add HOLD KYB/KYC status and FAILED internal account status#658

Open
wuvictor-95 wants to merge 1 commit into
mainfrom
add-hold-and-failed-statuses
Open

Add HOLD KYB/KYC status and FAILED internal account status#658
wuvictor-95 wants to merge 1 commit into
mainfrom
add-hold-and-failed-statuses

Conversation

@wuvictor-95

Copy link
Copy Markdown
Contributor

Summary

  • Adds FAILED to InternalAccountStatus for internal accounts whose provisioning failed and require remediation.
  • Adds HOLD to KybStatus and KycStatus. HOLD means the customer is placed on hold and may be required to update or provide more information.

Notes

Consumed by webdev via grid-api/update_schema.sh to regenerate the vendored Python client. Supports two stacked webdev PRs: internal-account failure handling (FAILED) and the KYC/KYB HOLD flow.

🤖 Generated with Claude Code

Adds a FAILED value to InternalAccountStatus for accounts whose
provisioning failed, and a HOLD value to KybStatus/KycStatus. HOLD is a
state where a customer's information can be updated but cannot be
resubmitted for verification until Grid releases the hold.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Jul 7, 2026 1:16am
grid-wallet-demo Ignored Ignored Jul 7, 2026 1:16am

Request Review

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

chore(internal): regenerate SDK with no functional changes

csharp

feat(api): add Hold to KYC/KYB status, Failed to InternalAccount status

go

feat(api): add HOLD status to KYC/KYB fields, FAILED status to internal accounts

kotlin

feat(api): add HOLD to customer status enums, FAILED to internal account status

openapi

feat(api): add HOLD to KYC/KYB status, FAILED to account status

php

feat(api): add HOLD to KYC/KYB status, FAILED to InternalAccount status

python

feat(api): add HOLD status to customer/beneficial_owner, FAILED to internal_account

ruby

feat(api): add HOLD to customer KYC/KYB status, FAILED to sandbox account status

typescript

feat(types): add HOLD to kyc/kyb status, FAILED to internal account status

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-openapi studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️

grid-ruby studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

grid-go studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@b6ec88a8e6251d4f9eccdd3d8fd4632323a3585a
grid-kotlin studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ✅lint ✅test ❗

grid-typescript studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/grid-typescript/d29697b5cdbadde642d214ba1337ef013104ad1c/dist.tar.gz
grid-python studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

pip install https://pkg.stainless.com/s/grid-python/cbb8b51b237f8363ff5aa309bc976fbfb0471922/grid-0.0.1-py3-none-any.whl
grid-csharp studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ❗lint ✅test ❗

grid-php studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅lint ✅test ✅

grid-cli studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ❗lint ❗test ❗


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-07-07 01:21:32 UTC

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

(◕‿◕✿) ✨ New enum values, delivered with care! ✨
    /|、
   (゜ω゜✿)/
   /  |
  (_ノ \\_)

This PR extends three OpenAPI schemas to support new compliance and provisioning states: HOLD for KycStatus and KybStatus (a customer placed on hold pending more information), and FAILED for InternalAccountStatus (an account whose underlying provisioning could not complete). The source schemas in openapi/components/ are the authoritative edit, and the bundled openapi.yaml / mintlify/openapi.yaml files are correctly regenerated.

  • InternalAccountStatus gains FAILED with a thorough per-value bullet description matching the existing documentation style for that schema.
  • KycStatus and KybStatus each gain HOLD described inline; the other four enum values (UNVERIFIED, PENDING, APPROVED, REJECTED) remain undocumented — consider adding per-value bullets to match the richer pattern used by InternalAccountStatus.

Confidence Score: 4/5

Straightforward additive enum changes with no breaking modifications to existing values; the bundled files match the source changes.

All three source schemas are correctly updated, and the two bundled files faithfully reflect those updates. The only rough edge is that KycStatus and KybStatus describe HOLD inline without documenting the four pre-existing enum values, while InternalAccountStatus in this same PR sets the stronger pattern of per-value bullet descriptions for every enum member.

openapi/components/schemas/customers/KycStatus.yaml and KybStatus.yaml — the description section could be expanded to cover all enum values, not just HOLD.

Important Files Changed

Filename Overview
openapi/components/schemas/customers/KycStatus.yaml Adds HOLD enum value; description documents HOLD inline but doesn't enumerate UNVERIFIED/PENDING/APPROVED/REJECTED the way InternalAccountStatus does
openapi/components/schemas/customers/KybStatus.yaml Adds HOLD enum value; same documentation pattern as KycStatus — HOLD described inline, other values not enumerated
openapi/components/schemas/customers/InternalAccountStatus.yaml Adds FAILED enum value with a well-formed per-value bullet description, consistent with the existing documentation style for this schema
openapi.yaml Generated bundle — reflects all three enum additions correctly; appears regenerated via make build rather than hand-edited
mintlify/openapi.yaml Mintlify copy of the generated bundle — identical changes to openapi.yaml, correctly reflecting all three new enum values

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph KYC/KYB Status
        KV[UNVERIFIED] --> KP[PENDING]
        KP --> KH[HOLD 🆕]
        KP --> KA[APPROVED]
        KP --> KR[REJECTED]
        KH --> KP
        KH --> KA
        KH --> KR
    end

    subgraph Internal Account Status
        IP[PENDING] --> IA[ACTIVE]
        IP --> IF[FAILED 🆕]
        IA --> IC[CLOSED]
        IA --> IFZ[FROZEN]
        IFZ --> IA
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    subgraph KYC/KYB Status
        KV[UNVERIFIED] --> KP[PENDING]
        KP --> KH[HOLD 🆕]
        KP --> KA[APPROVED]
        KP --> KR[REJECTED]
        KH --> KP
        KH --> KA
        KH --> KR
    end

    subgraph Internal Account Status
        IP[PENDING] --> IA[ACTIVE]
        IP --> IF[FAILED 🆕]
        IA --> IC[CLOSED]
        IA --> IFZ[FROZEN]
        IFZ --> IA
    end
Loading
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
openapi/components/schemas/customers/KycStatus.yaml:8-11
The description explains `HOLD` inline but leaves `UNVERIFIED`, `PENDING`, `APPROVED`, and `REJECTED` undocumented. `InternalAccountStatus` in the same PR uses a per-value bullet list for all values — applying the same pattern here makes the schema equally self-contained for API consumers who read only the KYC/KYB status field docs.

```suggestion
description: >-
  The current KYC status of a customer.

  - `UNVERIFIED`: The customer has not yet started the KYC process.

  - `PENDING`: The customer's identity is under review.

  - `APPROVED`: The customer has successfully passed KYC verification.

  - `REJECTED`: The customer's KYC application was rejected.

  - `HOLD`: The customer is placed on hold and may be required to update or
  provide more information.
example: APPROVED
```

### Issue 2 of 2
openapi/components/schemas/customers/KybStatus.yaml:8-11
Same documentation gap as `KycStatus.yaml` — only `HOLD` is described inline while `UNVERIFIED`, `PENDING`, `APPROVED`, and `REJECTED` remain undocumented. `InternalAccountStatus` in this same PR demonstrates the preferred pattern of enumerating every value.

```suggestion
description: >-
  The current KYB status of a business customer.

  - `UNVERIFIED`: The business has not yet started the KYB process.

  - `PENDING`: The business's identity is under review.

  - `APPROVED`: The business has successfully passed KYB verification.

  - `REJECTED`: The business's KYB application was rejected.

  - `HOLD`: The customer is placed on hold and may be required to update or
  provide more information.
example: APPROVED
```

Reviews (1): Last reviewed commit: "Add HOLD KYB/KYC status and FAILED inter..." | Re-trigger Greptile

Comment on lines +8 to 11
description: >-
The current KYC status of a customer. `HOLD` means the customer is placed on
hold and may be required to update or provide more information.
example: APPROVED

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The description explains HOLD inline but leaves UNVERIFIED, PENDING, APPROVED, and REJECTED undocumented. InternalAccountStatus in the same PR uses a per-value bullet list for all values — applying the same pattern here makes the schema equally self-contained for API consumers who read only the KYC/KYB status field docs.

Suggested change
description: >-
The current KYC status of a customer. `HOLD` means the customer is placed on
hold and may be required to update or provide more information.
example: APPROVED
description: >-
The current KYC status of a customer.
- `UNVERIFIED`: The customer has not yet started the KYC process.
- `PENDING`: The customer's identity is under review.
- `APPROVED`: The customer has successfully passed KYC verification.
- `REJECTED`: The customer's KYC application was rejected.
- `HOLD`: The customer is placed on hold and may be required to update or
provide more information.
example: APPROVED
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/customers/KycStatus.yaml
Line: 8-11

Comment:
The description explains `HOLD` inline but leaves `UNVERIFIED`, `PENDING`, `APPROVED`, and `REJECTED` undocumented. `InternalAccountStatus` in the same PR uses a per-value bullet list for all values — applying the same pattern here makes the schema equally self-contained for API consumers who read only the KYC/KYB status field docs.

```suggestion
description: >-
  The current KYC status of a customer.

  - `UNVERIFIED`: The customer has not yet started the KYC process.

  - `PENDING`: The customer's identity is under review.

  - `APPROVED`: The customer has successfully passed KYC verification.

  - `REJECTED`: The customer's KYC application was rejected.

  - `HOLD`: The customer is placed on hold and may be required to update or
  provide more information.
example: APPROVED
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +8 to 11
description: >-
The current KYB status of a business customer. `HOLD` means the customer is
placed on hold and may be required to update or provide more information.
example: APPROVED

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Same documentation gap as KycStatus.yaml — only HOLD is described inline while UNVERIFIED, PENDING, APPROVED, and REJECTED remain undocumented. InternalAccountStatus in this same PR demonstrates the preferred pattern of enumerating every value.

Suggested change
description: >-
The current KYB status of a business customer. `HOLD` means the customer is
placed on hold and may be required to update or provide more information.
example: APPROVED
description: >-
The current KYB status of a business customer.
- `UNVERIFIED`: The business has not yet started the KYB process.
- `PENDING`: The business's identity is under review.
- `APPROVED`: The business has successfully passed KYB verification.
- `REJECTED`: The business's KYB application was rejected.
- `HOLD`: The customer is placed on hold and may be required to update or
provide more information.
example: APPROVED
Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/customers/KybStatus.yaml
Line: 8-11

Comment:
Same documentation gap as `KycStatus.yaml` — only `HOLD` is described inline while `UNVERIFIED`, `PENDING`, `APPROVED`, and `REJECTED` remain undocumented. `InternalAccountStatus` in this same PR demonstrates the preferred pattern of enumerating every value.

```suggestion
description: >-
  The current KYB status of a business customer.

  - `UNVERIFIED`: The business has not yet started the KYB process.

  - `PENDING`: The business's identity is under review.

  - `APPROVED`: The business has successfully passed KYB verification.

  - `REJECTED`: The business's KYB application was rejected.

  - `HOLD`: The customer is placed on hold and may be required to update or
  provide more information.
example: APPROVED
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with greptile here. Just a bit weird to have HOLD explicitly called out on its own.

@jklein24 jklein24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of nits

account in response to compliance or fraud signals; payments are blocked
while the account remains frozen.

- `FAILED`: The account could not be provisioned. Grid was unable to create

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth also adding a failureReason or errorMessage or something?

Comment on lines +8 to 11
description: >-
The current KYB status of a business customer. `HOLD` means the customer is
placed on hold and may be required to update or provide more information.
example: APPROVED

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with greptile here. Just a bit weird to have HOLD explicitly called out on its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants