plan-kyc-api-design#700
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
📌 Bolt Status 2026-07-20 23:55:16 UTC — ⚡ Agent |
|
⚡ On it — working through all 14 threads. Firing off research on the industry-standard questions (HNWI fields, CSV array conventions, Sumsub requirements API + doc limits, Stripe's |
f40742a to
579a58f
Compare
Revision 2Addressed all 14 threads. Replies inline; here's the diff at a glance: Applied Aaron's direct guidance:
Applied research findings:
Open questions now 8, mostly re-scoped:
Diff: +228 / −120 lines. Full doc is a single-commit revision on the branch; scan the file diff for anything I missed. |
|
⚡ On it — 7 new inline replies to work through. Kicking off research on the empirical questions (how the existing |
579a58f to
d3c64b0
Compare
Revision 3Addressed all 7 new threads. Replies inline; here's the diff at a glance. Applied Aaron's direct guidance:
Applied backend research findings (dug into
Applied Sumsub API research (thread #10):
Open questions now 5 (down from 8):
Diff: +50 / −107 lines. Doc is now 474 lines (down from 531), which is a good sign given how much research I folded in. |
|
⚡ On it — 5 new replies. Substantive design points I'll be addressing:
Firing research on #3 and #4 in parallel, doing #1, #2, #5 in the doc immediately. |
d3c64b0 to
f8d2128
Compare
Revision 4Addressed all 5 new threads. Replies inline; here's the diff at a glance. Applied direct guidance:
Applied backend research findings (added to "Current-state facts" recap):
Applied git-history finding:
Open questions now 5 (unchanged count, but re-scoped by R4):
Doc grew by +65/-19 lines net vs R3 (up to 520 lines total). |
akanter
left a comment
There was a problem hiding this comment.
let's really clean up the doc and make it nice and easy to read with the questions clearly called out. Also, as far as implementation goes we'll definitely want to get the single customer flow working first and then we'll layer on bulk.
Probably update the PR description too
|
⚡ On it — reading you loud and clear. Doing a full cleanup pass on the doc:
Rewriting rather than surgical-editing since the meta-ask is "make it clean for Victor to review". Will push and reply on each thread. |
f8d2128 to
94ae43e
Compare
|
Full doc rewrite — clean review document, ready for Victor and team. Down from 520 to 301 lines. Removed all revision annotations, historical decision context, and per-reviewer callouts. No "sketch" framing. Structural changes:
Substantive additions:
Threads with new activity all replied to inline. Ready for Victor's review whenever you want to hand off. |
94ae43e to
d88cc21
Compare
|
Started Phase 1 implementation on a separate stack per your ask — plan up as grid-api#726. Focus: Full plan and LexisNexis findings on that PR. This design doc PR stays as-is. |
d88cc21 to
df5f38e
Compare
|
Added sandbox to the design doc. Three additions:
+44 lines net (301 → 345). Once you sign off on the sandbox design, I'll come back to the plan PR (#726) and rework Phase 1 to include the sandbox implementation alongside |
df5f38e to
7daf744
Compare
|
Reworked the "Implementation phasing" section for the new API + sandbox first, production wire-up progressively strategy. New phasing:
Key point I made explicit in the intro to the section: the API contract is locked once Phase 1 ships, so Phase 2 production wire-up doesn't change what platforms see — their existing sandbox integrations just start working against real vendors. +19 / -3 lines net. Doc now 361 lines total. |
7daf744 to
8745715
Compare
c59c0e9 to
514734d
Compare
514734d to
2fdc8b6
Compare
8f7fd92 to
32b3d72
Compare
|
Applied all 6 changes. R13 pushed (343 lines, +101/-137 net — significant simplification). Changes:
Also touched (for consistency):
Doc structure otherwise stable. R14 will follow on grid-api#726 with the implementation changes to match: revert |
1dc9983 to
6730a58
Compare
6730a58 to
d7cc081
Compare
R16 — meta-reference auditFollowing up on Aaron's line-104 thread about format-level constraint guidance belonging on 400 responses (not on Structural:
Prose:
Result: 337 lines (down 15). Reads without needing prior-revision context. Also did the same audit pass on the plan doc in #726 — cleaned the one remaining meta on §2's line 14. |
1042fb8 to
b34e79f
Compare
b34e79f to
637cf7c
Compare
R19 — applied @akanter's 07-21 reviewFour asks, four responses: 1. Clean up the doc / nice and easy to read. Rewrote the structure to be singleton-first:
2. Questions clearly called out. New "Open questions for Phase 1" section right after "Design goals" (line 21), with each question carrying a proposed default so silence = proceed:
Bulk-only open questions stay in Appendix A under "Open questions for the bulk workstream." 3. Single customer flow first, layer bulk on later. Main body (§1–§4 + Walkthrough + Implementation phasing) covers only the interactive singleton flow. Everything bulk-shaped lives in Appendix A, marked "deferred; future work." Phase 1 items in the phasing section are all singleton; Phase 2 is production wire-up of the same singleton API. 4. PR description updated. Now leads with a "Reading guide" that points readers at the sections top-down and calls out where the open questions live. Doc line count: 345 (up 5 from R18 despite adding the Open Questions section — Appendix A + reading structure netted out). |

Summary
Design proposal for the API-based KYC flow — an additive extension of the existing KYB verification surface. Full doc:
docs/plans/2026-07-18-kyc-api-design.mdin this PR's diff.The direct-API KYC flow already technically works today (
POST /customersINDIVIDUAL →POST /documents→POST /verificationsreturns structurederrors[]). This document proposes the additions to make that flow production-ready for interactive in-app onboarding. Bulk migration is documented in Appendix A for continuity but is explicit future work — not on this workstream.Reading guide
The doc is structured to be read top-to-bottom for the singleton flow (Phase 1). Bulk migration is at the end (Appendix A), skippable.
taxIdentification, §1a EDD endpoint, §2 400-level validation, §3 Document upload strategy, §4 Sandbox mode.Open questions calling for input
Three decisions the doc surfaces near the top (each with a proposed default so silence = proceed):
/customers/eddvs/customers/endorsements(Bridge-style)? Jeremy raised this via Aaron. Bridge uses endorsement-per-rail (base/sepa/spei/pix/faster_payments/cop) with independent lifecycles; Stripe uses a single per-customer requirements bag. Current doc uses/customers/edd(single bag). Default: keep for Phase 1, pivot before the second compliance regime lands.PurposeOfAccount— need an individual variant? Existing enum values are business-flow oriented. Default: addIndividualPurposeOfAccount, matching the pattern applied toIndividualSourceOfFundsCategory.EntUmaaasCustomerEddent.Approach
Keep KYC on the same
Verificationlifecycle as KYB. All extensions are additive — no breaking changes toCustomer,Verification, orVerificationError. Universal wire format for addresses; per-jurisdiction / per-currency requirements are documented in Mintlify and surfaced reactively viaPOST /verificationserrors (no runtime discovery endpoint). Sandbox is first-class — platforms drive the full KYC lifecycle (create → verify → APPROVED / REJECTED / PENDING / EDD-required) via deterministicfullName-suffix magic values that mirror the existing KYB and BO KYC patterns.Implementation strategy: ship the API surface + sandbox behavior first (customers can integrate immediately); production wire-up follows behind the same API.
Proposed changes (Phase 1)
taxIdentificationonIndividualCustomerFields— single optional object of{idType, identifier, countryOfIssuance}, using existingIdentificationTypeenum.POST/GET/PATCH /customers/edd(customerId in body on POST, query param on GET/PATCH), matching the flat-linked-resource pattern fromopenapi/README.md. Schema: 8 primary EDD fields + 3 conditional*OtherDescriptionfreeform fields.FieldConstraint.yamlundererrors/, documents theError400.details.constraintshape (regex / format / enum / min-max length). Applies toPOST /customers,PATCH /customers/{id},POST /customers/edd,PATCH /customers/edd.fullNamesuffix:001PENDING,002REJECTED,003EDD-required, else APPROVED. Documented alongside the existing business KYB and BO KYC sandbox inmintlify/snippets/sandbox-verification.mdx.Not in this workstream
Bulk migration + Grid-side document caching (Appendix A). OFAC / LexisNexis handling is a separate work item.
Reply with a comment (e.g. LGTM) to approve the design direction — emoji reactions don't notify me here.