plan-kyc-api-design#700
Draft
akanter wants to merge 1 commit into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Design sketch for the API-based KYC flow — an extension of Victor's existing KYB verification surface rather than a new resource. Requested by @aaron in Slack.
Core observation: the direct-API KYC flow already technically works today (
POST /customersINDIVIDUAL →POST /documents→POST /verificationsreturns structurederrors[]). What's missing is the polish around it — the individual-customer schema is too thin to hold identity numbers, requirements are only discoverable reactively, country/nationality nuances aren't first-class, and there's no clean bulk-JSON migration path.Approach
Keep KYC on the same
Verificationlifecycle as KYB. All extensions are additive — no breaking changes toCustomer,Verification, orVerificationError. Explicitly reject per-countryAddresspolymorphism in favor of a universal wire format plus per-country validation rules surfaced through a newGET /kyc/requirementsdiscovery endpoint and existingVerificationErrors.Changes: 1 doc
docs/plans/2026-07-18-kyc-api-design.md— design proposal covering:IndividualCustomerFieldsgaps (identification[], residential + mailing address, employer/source-of-funds)severity(BLOCKING/EVENTUALLY_DUE/PENDING_REVIEW) +code+ machine-readableconstraintonVerificationErrorGET /kyc/requirements?customerType®ion&nationality¤ciesfor upfront discoveryAddress+ optionallocalizedAddressmap for JP/CN/KR dual-scriptPOST /customers/bulk(JSON) for programmatic migration, with per-rowverificationErrors[]POST /verificationsthat atomically creates customer + docs + submits, for one-shot UXThe doc is a sketch, not a spec — inline comments welcome on individual sections. Nothing has been implemented; nothing under
openapi/has been touched.Reply with a comment (e.g. LGTM) to approve — emoji reactions don't notify me here.