Skip to content

docs(kyc): add a KYC/KYB verification page covering both onboarding paths - #831

Open
JasonCWang wants to merge 1 commit into
mainfrom
docs/kyc-kyb-verification-options
Open

docs(kyc): add a KYC/KYB verification page covering both onboarding paths#831
JasonCWang wants to merge 1 commit into
mainfrom
docs/kyc-kyb-verification-options

Conversation

@JasonCWang

Copy link
Copy Markdown
Contributor

What

Adds a KYC & KYB verification page to the API reference, under Using the API.

The hosted verification link was only documented in passing, and only for individual customers. Nothing told integrators that the same endpoint runs KYB for business customers, or how to pick between the hosted flow and submitting verification data through the API — so that choice had to be explained by hand.

The page leads with the choice and then covers what each path needs:

  • Your options — hosted link vs. direct API, noting both cover KYC and KYB, produce the same status transitions and webhooks, and can be mixed.
  • Hosted link — link generation, and that POST /customers/{customerId}/kyc-link serves both customer types with customerType selecting the flow. There is no dedicated KYB link endpoint.
  • Direct API — the endpoint sequence and the resolve-and-resubmit loop, pointing at Configuring customers for the walkthrough.
  • Creating a business customer — required vs. optional fields, plus the three groups that are optional to the schema but required in practice (contact channels, currency-driven via providerRequiredCustomerFields, and everything the review needs).
  • Status transitions and webhookskycStatus / kybStatus values and the CUSTOMER.KYC_* / CUSTOMER.KYB_* events.
  • Sandbox — the registration-number suffixes.

The sandbox suffix table moved into a shared snippet so this page and the sandbox testing page can't drift apart.

The 003 suffix

Called out explicitly, because not knowing it is genuinely misleading: a business registration number not ending in 001, 002, or 003 is auto-approved on the spot in sandbox. The hosted flow then has nothing left to verify, so it asks for no documents and no beneficial owners — which looks exactly like a broken KYB flow. 003 is what avoids the auto-decision so document and UBO collection actually run.

Also

Broadens the kyc-link endpoint description to cover the KYB case and to name the direct API alternative, rather than describing only individual identity verification.

Verification

  • make build + make lint — spec valid, 0 errors. Bundle diff is scoped to this one endpoint.
  • Rendered locally against Mintlify 4.2.284; every section and both nested snippets resolve.
  • mint broken-links reports no broken links from any new or changed file.

Docs-only — no schema or behavior changes.

🤖 Generated with Claude Code

…aths

The API reference documented the hosted link flow only in passing, and
only for individual customers. Integrators had no way to discover that
the same link endpoint runs KYB for business customers, or how to choose
between the hosted flow and submitting verification data through the API.

Add an "KYC & KYB verification" page to the API reference that leads with
the choice between the two paths and then covers what each one needs:

- A comparison of the hosted link and direct API paths, noting that both
  cover KYC and KYB, produce the same status transitions and webhooks,
  and can be mixed.
- Hosted link generation, including that POST /customers/{id}/kyc-link
  serves both customer types and that customerType selects the flow.
- Required versus optional fields for creating a business customer, and
  the three groups (contact channels, currency-driven, review-driven)
  that are optional to the schema but required in practice.
- kycStatus/kybStatus transitions and the CUSTOMER.KYC_* / CUSTOMER.KYB_*
  webhooks.
- The sandbox registration-number suffixes, extracted into a shared
  snippet so the sandbox testing page and the new page stay in sync.

Document the 003 suffix explicitly: any other suffix auto-approves a
business customer on the spot, leaving the hosted flow with nothing to
verify, so it requests no documents and no beneficial owners. That reads
as a broken KYB flow but isn't, and 003 is what avoids it.

Also broaden the kyc-link endpoint description to cover the KYB case and
point at the direct API alternative.

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

mintlify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Grid 🟢 Ready View Preview Aug 13, 2026, 10:55 PM

@vercel

vercel Bot commented Aug 13, 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 Preview Aug 14, 2026 12:39am
grid-wallet-demo Ignored Ignored Preview Aug 14, 2026 12:39am

Request Review

@github-actions

github-actions Bot commented Aug 13, 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

go

docs(api): expand customer verification flow documentation

kotlin

docs(api): update createKycLink documentation in customers

openapi

docs(api): update customer KYC link endpoint description for KYB support

php

docs(api): update createKYCLink documentation for customers

python

docs(api): expand customers verification link documentation

ruby

docs(api): expand customers verification link documentation

typescript

docs(api): update create_kyc_link documentation to include KYB support

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

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/b2bd30c076a752227f41314da673e9a8cb4a0d8c/dist.tar.gz
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@b4d4a293f2e0a5854d2fcb42cfa12a1dff4bf34b
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-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/c3caea06c30fb77a82f2702447f0046a6ca06f71/grid-0.0.1-py3-none-any.whl
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-08-14 00:50:24 UTC

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

⚠️ Breaking OpenAPI changes detected

oasdiff reports 16 error / 0 warning changes to openapi.yaml.
This PR will need approval from an API reviewer before merge.

Errors (16)

  • POST /customers/external-accounts/{externalAccountId}/challenge — api path removed without deprecation [api-path-removed-without-deprecation].
  • POST /customers/external-accounts/{externalAccountId}/verify — api path removed without deprecation [api-path-removed-without-deprecation].
  • POST /platform/external-accounts/{externalAccountId}/challenge — api path removed without deprecation [api-path-removed-without-deprecation].
  • POST /platform/external-accounts/{externalAccountId}/verify — api path removed without deprecation [api-path-removed-without-deprecation].
  • POST webhook:agent-action — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:bulk-upload — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:card-funding-source-change — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:card-state-change — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:card-transaction — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:customer-update — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:incoming-payment — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:internal-account-status — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:invitation-claimed — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:outgoing-payment — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:test-webhook — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].
  • POST webhook:verification-update — removed the enum value EXTERNAL_ACCOUNT.STATUS_UPDATED of the request property allOf[#/components/schemas/BaseWebhook]/type [request-property-enum-value-removed].

Detected by oasdiff. Full report: job summary or the oasdiff-report artifact.

@greptile-apps

greptile-apps Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a shared KYC/KYB verification guide covering hosted and direct onboarding, expands the hosted-link endpoint description for business verification, and centralizes sandbox KYB suffix guidance.

  • Adds the new verification page to the API-reference navigation.
  • Documents hosted-link generation, direct API submission, required business data, statuses, and webhooks.
  • Reuses a shared sandbox suffix snippet across both verification pages.
  • Regenerates the root and Mintlify OpenAPI bundles from the updated endpoint source.

Confidence Score: 4/5

The documentation should be corrected before merging because it tells unregulated platforms that verification approval alone unlocks money movement, although End User Terms consent remains a separate prerequisite.

The new status table can lead an otherwise correctly verified customer into rejected transaction attempts by omitting an additional required onboarding gate.

Files Needing Attention: mintlify/snippets/kyc/verification-options.mdx

Important Files Changed

Filename Overview
mintlify/snippets/kyc/verification-options.mdx Adds the principal hosted/direct verification guide, but overstates APPROVED as sufficient to unlock customer money movement.
mintlify/snippets/kyc/kyb-sandbox-suffixes.mdx Centralizes business sandbox suffix outcomes and highlights the suffix needed to exercise document and beneficial-owner collection.
mintlify/api-reference/kyc-kyb-verification.mdx Adds a correctly structured API-reference page that renders the shared verification guide.
mintlify/docs.json Adds the new verification page to the Using the API navigation group.
openapi/paths/customers/customers_{customerId}_kyc-link.yaml Expands the hosted-link description to cover both individual KYC and business KYB paths.
mintlify/snippets/sandbox-verification.mdx Replaces duplicated business suffix content with the shared snippet and retains direct-API-specific guidance.
openapi.yaml Keeps the committed generated OpenAPI bundle synchronized with the source endpoint description.
mintlify/openapi.yaml Keeps the Mintlify OpenAPI build output synchronized with the source endpoint description.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Create customer] --> B{Verification path}
  B -->|Hosted| C[POST customer kyc-link]
  C --> D[Customer completes hosted KYC or KYB]
  B -->|Direct API| E[Submit customer, owner, and document data]
  E --> F[POST verifications]
  F -->|RESOLVE_ERRORS| E
  D --> G[Customer verification status]
  F --> G
  G --> H[Customer KYC or KYB webhooks]
Loading
Prompt To Fix All With AI
### Issue 1
mintlify/snippets/kyc/verification-options.mdx:90
**Approval omits the consent gate**

When an unregulated platform has not recorded End User Terms consent, this row incorrectly presents KYC/KYB approval as sufficient to unlock funding and money movement, causing customer-scoped transactions to be rejected despite the documented guidance.

```suggestion
| `APPROVED` | Passed verification. For unregulated platforms, record End User Terms consent before enabling funding and money movement |
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "docs(kyc): add a KYC/KYB verification pa..." | Re-trigger Greptile

|--------|---------|
| `UNVERIFIED` | Created, not yet submitted. Generating a link does not move it off this value |
| `PENDING` | Submitted; review under way |
| `APPROVED` | Passed — unlock funding and money movement |

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.

P1 Approval omits the consent gate

When an unregulated platform has not recorded End User Terms consent, this row incorrectly presents KYC/KYB approval as sufficient to unlock funding and money movement, causing customer-scoped transactions to be rejected despite the documented guidance.

Suggested change
| `APPROVED` | Passed — unlock funding and money movement |
| `APPROVED` | Passed verification. For unregulated platforms, record End User Terms consent before enabling funding and money movement |

Knowledge Base Used: Customers and KYC

Prompt To Fix With AI
This is a comment left during a code review.
Path: mintlify/snippets/kyc/verification-options.mdx
Line: 90

Comment:
**Approval omits the consent gate**

When an unregulated platform has not recorded End User Terms consent, this row incorrectly presents KYC/KYB approval as sufficient to unlock funding and money movement, causing customer-scoped transactions to be rejected despite the documented guidance.

```suggestion
| `APPROVED` | Passed verification. For unregulated platforms, record End User Terms consent before enabling funding and money movement |
```

**Knowledge Base Used:** [Customers and KYC](https://app.greptile.com/lightspark/-/custom-context/knowledge-base/lightsparkdev/grid-api/-/docs/customers-and-kyc.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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

Labels

breaking-change Introduces a breaking change to the OpenAPI spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant