Skip to content

docs: surface KYC/KYB sections in the ToC, add data requirements and verification-issue webhooks - #864

Open
ls-bolt[bot] wants to merge 1 commit into
mainfrom
08-25-plan-kyb-docs-toc-verification-webhooks
Open

docs: surface KYC/KYB sections in the ToC, add data requirements and verification-issue webhooks#864
ls-bolt[bot] wants to merge 1 commit into
mainfrom
08-25-plan-kyb-docs-toc-verification-webhooks

Conversation

@ls-bolt

@ls-boltls-boltBot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Two changes to the KYC/KYB onboarding docs, plus the customer data requirements.

1. Regulated / Unregulated are now real sections. Both blocks were wrapped in an <AccordionGroup> on all four configuring-customers pages, so their content was collapsed by default and never reached the right-hand table of contents. They are now regular ## sections, and the shared snippets' own headings nest beneath them as ToC children.

2. Verification-issue webhooks are documented. The guides covered only the terminal CUSTOMER.KYC_* / CUSTOMER.KYB_* decisions — which tell an integrator that a customer was rejected, but not what to send to fix it. The VERIFICATION.* events carry the errors array naming each unmet requirement, and none of that was documented. A new snippet covers the events, how to read a VerificationError (resourceId, type, field, acceptedDocumentTypes, reason), how to resolve all 22 error types, and which ones are compliance outcomes that re-submitting will never clear.

3. What to collect for KYC and KYB. A new snippet listing the customer information required for each customer type, with the KYB half reusing the existing requirements snippet that mirrors the POST /verifications description.

Screenshot

The table of contents on payouts-and-b2b, with the previously-collapsed sections now listed:

Right-hand table of contents showing Regulated Platforms and Unregulated Platforms as regular sections

Changes: 7 files

  • mintlify/snippets/kyc/verification-webhooks.mdx (new) — the VERIFICATION.* events, reading an error, resolving each error type, re-submitting, and a handler example
  • mintlify/snippets/kyc/customer-data-requirements.mdx (new) — KYC and KYB collection requirements
  • mintlify/snippets/kyc/kyc-regulated.mdx — one heading demoted ####### (see note below)
  • The four configuring-customers pages (global-p2p, payouts-and-b2b, ramps, rewards) — accordions replaced with ## sections; new snippets rendered at the end of the KYC/KYB section

payouts-and-b2b previously rendered no webhook snippet at all, so its KYC/KYB section now gains the existing KycWebhooks content as well.

Test plan

No OpenAPI files were touched, so there is no rebundle in this diff.

  • Rendered locally with mint dev and extracted the actual ToC from the DOM on all four pages — "Regulated Platforms" and "Unregulated Platforms" appear as entries, with the snippet subheadings nested beneath. Screenshot above.
  • Heading hierarchy checked programmatically with snippets expanded inline: all four pages are monotonic, no h2 → h4 jumps.
  • Every API identifier verified against the OpenAPI source rather than written from memory — all 22 VerificationErrorType values are covered, the event list exactly matches the VerificationWebhook payload enum, and the document types, EDD fields, and individual-customer fields all resolve to real schema entries.
  • npx @redocly/cli lint openapi.yaml passes (unchanged, as expected).
  • Imports and renders match on every page.

Notes on the Greptile review of the plan

All three P1s were valid and are fixed:

  1. VERIFICATION.READY_FOR_VERIFICATION is not deliverable. Correct, and a genuinely easy trap: the value is in the WebhookType enum, but the VerificationWebhook payload schema omits it. Documenting it would have had integrators writing a handler branch that can never fire. The snippet documents only the five events the payload schema can actually carry.
  2. Heading jump under Regulated Platforms. Correct — kyc-regulated.mdx opened with a ####, which would have left an h2 → h4 jump on all four pages. That heading is demoted to ###; verified monotonic above.
  3. make lint-markdown is unavailable. Correct. The Make target calls npm run lint:markdown, which package.json doesn't define — it fails on main too. That's a pre-existing repo bug rather than something this PR introduces, so I've left it alone and used the OpenAPI lint plus the render check as the gates instead. Worth a separate fix if markdown linting is meant to be running in this repo.

Public

Documents the customer information required for KYC and KYB, and how to handle the verification webhooks Grid sends when a verification is blocked.

@vercel

vercelBot commented Aug 25, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
grid-flow-builderBuildingBuildingPreviewAug 27, 2026 11:06pm
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
grid-wallet-demoIgnoredIgnoredPreviewAug 27, 2026 11:06pm

Request Review

@ls-boltls-boltBot added the bolt label Aug 25, 2026
@lightspark-botGraphite App

Copy link
Copy Markdown

@pengying
pengying marked this pull request as ready for review August 27, 2026 22:51
@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds an implementation plan for exposing regulated and unregulated KYB content in Mintlify tables of contents and documenting actionable verification webhooks.

  • Plans heading and content restructuring across four onboarding pages.
  • Specifies a shared verification-webhook snippet and remediation guidance.
  • Defines static, lint, and visual verification steps.

Confidence Score: 2/5

The plan should not be merged until its webhook event vocabulary, regulated-snippet heading hierarchy, and unusable markdown-lint verification step are corrected.

Following the plan as written would document a webhook event excluded by the verification webhook schema, preserve an invalid heading jump across all four target pages, and leave a required verification command unable to run.

Files Needing Attention: docs/plans/2026-08-25-kyb-docs-toc-and-verification-webhooks.md

Important Files Changed

FilenameOverview
docs/plans/2026-08-25-kyb-docs-toc-and-verification-webhooks.mdThe plan is detailed, but it includes a webhook type excluded by the payload schema, creates a heading-level jump it explicitly prohibits, and requires an unavailable lint command.
Prompt To Fix All With AI
### Issue 1
docs/plans/2026-08-25-kyb-docs-toc-and-verification-webhooks.md:66
**Invalid verification webhook event**
When an integrator follows this event table, they implement `VERIFICATION.READY_FOR_VERIFICATION`, but the verification webhook schema does not include that event type, causing documentation and handlers to advertise a delivery that cannot occur.
### Issue 2
docs/plans/2026-08-25-kyb-docs-toc-and-verification-webhooks.md:14-19
**Regulated heading hierarchy skips**
When `<KycRegulated />` is placed directly below the proposed `## Regulated Platforms` heading, its first heading is `#### Creating Customers via Direct API`, preserving the `##` to `####` jump that this plan explicitly requires the implementation to eliminate across all four pages.
### Issue 3
docs/plans/2026-08-25-kyb-docs-toc-and-verification-webhooks.md:145
**Markdown lint command is unavailable**
When the required `make lint-markdown` check runs, the Make target invokes `npm run lint:markdown`, but `package.json` defines no such script, causing the plan's prescribed validation to fail before linting the changed documentation.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "plan: un-collapse KYB regulated/unregula..." | Re-trigger Greptile

@ls-bolt

ls-boltBot commented Aug 27, 2026

Copy link
Copy Markdown
ContributorAuthor

📌 Bolt Status

2026-08-27 22:54:23 UTC — ⚡ Agent minted-parsec-2(#2) started


Feedback

|---|---|---|
| `VERIFICATION.RESOLVE_ERRORS` | Blocked on missing or rejected data | Resolve every entry in `errors`, then re-submit |
| `VERIFICATION.PENDING_MANUAL_REVIEW` | A reviewer is looking at it | None — wait |
| `VERIFICATION.READY_FOR_VERIFICATION` / `IN_PROGRESS` | Accepted, provider is running checks | None — wait |

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.

P1Invalid verification webhook event

When an integrator follows this event table, they implement VERIFICATION.READY_FOR_VERIFICATION, but the verification webhook schema does not include that event type, causing documentation and handlers to advertise a delivery that cannot occur.

Knowledge Base Used:Webhooks and event delivery

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/plans/2026-08-25-kyb-docs-toc-and-verification-webhooks.md
Line: 66
Comment:
**Invalid verification webhook event**
When an integrator follows this event table, they implement `VERIFICATION.READY_FOR_VERIFICATION`, but the verification webhook schema does not include that event type, causing documentation and handlers to advertise a delivery that cannot occur.
**Knowledge Base Used:**[Webhooks and event delivery](https://app.greptile.com/lightspark/-/custom-context/knowledge-base/lightsparkdev/grid-api/-/docs/webhooks-api.md)---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Good catch, and a subtle one — fixed. VERIFICATION.READY_FOR_VERIFICATION is in the WebhookType enum, which is what made it look deliverable, but VerificationWebhook.yaml omits it from the payload schema. Documenting it would have had integrators writing a handler branch that can never fire. The snippet now lists only the five events the payload schema can actually carry: RESOLVE_ERRORS, PENDING_MANUAL_REVIEW, IN_PROGRESS, APPROVED, REJECTED. I check the event list against that enum programmatically now, so the two can't drift.


🤖 minted-parsec-2(#2) | Feedback

Comment on lines +14 to +19
`###`/`####`) because the shared snippets already carry their own `###` (`Hosted KYC and KYB Link
Flow`, `Direct API Onboarding`) and `####` headings — putting the new section headings at `##`
makes those snippet headings nest as proper ToC children on every page without editing the shared
snippets or introducing per-page heading levels the snippets can't satisfy. Two pages
(`global-p2p`, `rewards`) need small local reshuffles so the new `##` sections don't swallow
sibling `###` content that isn't about regulated/unregulated platforms.

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.

P1Regulated heading hierarchy skips

When <KycRegulated /> is placed directly below the proposed ## Regulated Platforms heading, its first heading is #### Creating Customers via Direct API, preserving the ## to #### jump that this plan explicitly requires the implementation to eliminate across all four pages.

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/plans/2026-08-25-kyb-docs-toc-and-verification-webhooks.md
Line: 14-19
Comment:
**Regulated heading hierarchy skips**
When `<KycRegulated />` is placed directly below the proposed `## Regulated Platforms` heading, its first heading is `#### Creating Customers via Direct API`, preserving the `##` to `####` jump that this plan explicitly requires the implementation to eliminate across all four pages.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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
ContributorAuthor

Choose a reason for hiding this comment

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

Right, and I'd missed it — fixed. kyc-regulated.mdx opened with #### Creating Customers via Direct API, so anchoring the section at ## would have left an h2 → h4 jump on all four pages. Demoted that heading to ###, which is the level its siblings in kyc-unregulated.mdx already use. I verified the hierarchy programmatically with the snippets expanded inline: all four pages are now monotonic with zero jumps.


🤖 minted-parsec-2(#2) | Feedback

- [ ] Every page still imports exactly the snippets it renders, and renders every snippet it imports
- [ ] Heading hierarchy is monotonic on each page (no `##` → `####` jumps); snippet `###`/`####`
headings sit under the new `##` sections
- [ ] `make lint-markdown` passes

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.

P1Markdown lint command is unavailable

When the required make lint-markdown check runs, the Make target invokes npm run lint:markdown, but package.json defines no such script, causing the plan's prescribed validation to fail before linting the changed documentation.

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/plans/2026-08-25-kyb-docs-toc-and-verification-webhooks.md
Line: 145
Comment:
**Markdown lint command is unavailable**
When the required `make lint-markdown` check runs, the Make target invokes `npm run lint:markdown`, but `package.json` defines no such script, causing the plan's prescribed validation to fail before linting the changed documentation.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Confirmed — I ran it and it fails: the Make target calls npm run lint:markdown, which package.json doesn't define. Worth noting it fails the same way on main, so it's a pre-existing repo bug rather than something this PR introduces, and fixing the build config felt out of scope for a docs change. I've dropped it as a gate here and used npx @redocly/cli lint openapi.yaml (passes, spec untouched) plus a real mint dev render with a DOM-level ToC check instead. Probably worth a separate fix if markdown linting is meant to be running in this repo.


🤖 minted-parsec-2(#2) | Feedback

@ls-bolt

ls-boltBot commented Aug 27, 2026

Copy link
Copy Markdown
ContributorAuthor

Revision log — updated in place, latest first.

Revision 1

Implemented the approved plan, plus the KYC/KYB data requirements @pengying asked for.

  • Replaced the Regulated/Unregulated <AccordionGroup> with regular ## sections on all four configuring-customers pages — verified in the live mint dev render that both now appear in the right-hand ToC with the snippet subheadings nested (screenshot in the PR description)
  • Added snippets/kyc/verification-webhooks.mdx — the VERIFICATION.* events, how to read a VerificationError, remediation for all 22 error types, and which ones are compliance outcomes that re-submitting can't clear
  • Added snippets/kyc/customer-data-requirements.mdx — what to collect for KYC and KYB, reusing the existing KYB requirements snippet
  • payouts-and-b2b rendered no webhook snippet at all before; its KYC/KYB section now carries both
  • Fixed all three Greptile P1s (details in each thread) — the READY_FOR_VERIFICATION one was a real catch

@ls-bolt
ls-boltBotforce-pushed the 08-25-plan-kyb-docs-toc-verification-webhooks branch from 1af5fff to 7875e56CompareAugust 27, 2026 23:05
@mintlify

mintlifyBot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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

ProjectStatusPreviewUpdated (UTC)
Grid🟢 ReadyView PreviewAug 27, 2026, 11:06 PM

…verification-issue webhooks
Replace the Regulated/Unregulated AccordionGroup with regular sections on all
four configuring-customers pages so they appear in the right-hand table of
contents, with the shared snippets' own headings nested beneath.
Add two shared snippets: the customer information to collect for KYC and KYB,
and how to handle the VERIFICATION.* webhooks that fire when a verification is
blocked, including how to read each error and resolve it.
Co-Authored-By: pengying <pengying@users.noreply.github.com>
@ls-bolt
ls-boltBotforce-pushed the 08-25-plan-kyb-docs-toc-verification-webhooks branch from 7875e56 to 9b17d18CompareAugust 27, 2026 23:06
@ls-boltls-boltBot changed the title plan: un-collapse KYB regulated/unregulated sections and document verification-issue webhooksdocs: surface KYC/KYB sections in the ToC, add data requirements and verification-issue webhooksAug 27, 2026
@ls-bolt

ls-boltBot commented Aug 27, 2026

Copy link
Copy Markdown
ContributorAuthor

⚡ Review ledger

Round 1 — Greptile (3 × P1, all valid)

  1. Invalid verification webhook event — VERIFICATION.READY_FOR_VERIFICATIONFIXED: the value is in WebhookType but absent from the VerificationWebhook payload schema, so it can never be delivered. Event table in mintlify/snippets/kyc/verification-webhooks.mdx now lists only the five deliverable events; the list is checked against the payload enum programmatically.
  2. Regulated heading hierarchy skips (h2 → h4)FIXED: demoted #### Creating Customers via Direct API to ### in mintlify/snippets/kyc/kyc-regulated.mdx. Hierarchy verified monotonic on all four pages with snippets expanded inline — zero jumps.
  3. make lint-markdown is unavailableCONFIRMED, NOT FIXED HERE: reproduced — the target calls npm run lint:markdown, which package.json does not define. Fails identically on main, so it's a pre-existing repo bug rather than a regression from this PR, and fixing the build config is out of scope for a docs change. Removed as a gate; replaced with npx @redocly/cli lint openapi.yaml (passes) and a live mint dev render with a DOM-level ToC assertion. Worth a separate fix.

🤖 minted-parsec-2(#2) | Feedback

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@lightspark-bot@pengying