diff --git a/payments/psps/headless-sdk/implementation.mdx b/payments/psps/headless-sdk/implementation.mdx index d660784..51eacdd 100644 --- a/payments/psps/headless-sdk/implementation.mdx +++ b/payments/psps/headless-sdk/implementation.mdx @@ -306,8 +306,8 @@ switch (snapshot.state) { return case 'InformationCapture': - // Render snapshot.collectData.fields, then: - return + // Identity capture — render from collectData.schema (see "Information capture" below). + return case 'OptionSelected': case 'RequiresApproval': @@ -337,6 +337,20 @@ switch (snapshot.state) { That's a full gateway. Connect → options → (optional KYC) → confirm → sign → settle, all driven by the runtime; you only render and call actions. Once a wallet is connected, `disconnectWallet(namespace?)` drops one namespace or all of them. +## Information capture + +Some payments require identity details (name, date of birth, country, terms acceptance) before they can settle — usually for regulatory reasons, often only on a buyer's first payment. When the selected option needs it, the runtime enters the `InformationCapture` state and describes what to collect on `snapshot.collectData`. + +Render the form from **`snapshot.collectData.schema`** — a JSON Schema (`properties`, `required`, `anyOf` for proof-of-birth / proof-of-residence, and a `tosConfirmed` checkbox) — and submit the collected values with `submitInfoCapture(data)`. The runtime sends them with the payment confirmation; the flow advances on its own. + +```tsx + +``` + + + `collectData.fields` (name + date of birth only) is **deprecated** — it under-collects. Drive your form from `collectData.schema`. + + ## Environment variables ```bash .env.local