Runnable Node.js examples for shared-token and hosted KYC sandbox flows
These two Node.js examples exercise the KYC sandbox. The shared-token script submits an applicant and token. The hosted script creates a session and receives a dummy verification link. Both explicitly move the applicant to a simulated result, then read it back.The status GET is read-only in both flows. The scripts check that polling does not advance the profile. Applicant email does not select the result.
1. Shared token
The shared-token script submits a Sumsub applicant and share token to Pods. With SCENARIO=rejected_retryable, it resubmits the same applicant with a fresh token and sets the second attempt to approved.
Requirements
Node.js 18 or newer, with built-in fetch.
Your staging Pods API URL and staging customer API key. Send the key from your backend as x-api-key.
Optional: Sumsub sandbox credentials, a level name, and the Pods recipient ID. If all four SUMSUB_* values are omitted, the script uses unique placeholder applicant IDs and tokens. Pods requires these fields but does not inspect their contents in the sandbox.
export PODS_API_BASE_URL=https://staging-api.deframe.ioexport PODS_API_KEY=your-staging-api-keyexport SCENARIO=rejected_retryable# Optional: set a unique wallet for this applicant. Otherwise the script generates one.# export WALLET_ADDRESS=0x0000000000000000000000000000000000000001# Optional: set all four to exercise your real Sumsub sandbox token generation.export SUMSUB_APP_TOKEN=sbx:...export SUMSUB_SECRET_KEY=...export SUMSUB_LEVEL_NAME=...export SUMSUB_FOR_CLIENT_ID=...
SCENARIO accepts approved, rejected, or rejected_retryable. The default is approved. Each run generates a new valid CPF, applicant ID, and wallet unless you provide WALLET_ADDRESS, so previous test results do not affect it. If you save the script outside a project configured for ES modules, save it as kyc-sandbox.mjs and run node kyc-sandbox.mjs.
How the example calls Pods
The script submits the normal production request shape. The sandbox returns a kycUserId in provider_pending:
The submission is already pending, but the script also calls the optional pending route. This returns the current status without starting another attempt:
A subsequent GET reads the same status. For rejected_retryable, the script requests a new token for the same Sumsub applicant (or makes a new placeholder token), resubmits the same CPF, email, wallet, and applicant ID, then explicitly sets approved. It checks that the retry keeps the original kycUserId and returns to provider_pending first.
Submit: provider_pending <kycUserId>Explicit pending: provider_pendingRead before transition: provider_pendingSet outcome: rejected_retryableRead after transition: rejected_retryable { code: 'VERIFICATION_RETRY_REQUIRED', ... }Resubmit fresh token: provider_pendingRead after retry: approved
The full script signs Sumsub sandbox requests when credentials are supplied. It creates an applicant, simulates a GREEN review, and mints its first share token. On retry it mints a second token for that existing applicant, which is necessary to keep the Pods profile binding intact.
The transition routes exist only outside production. Sandbox outcomes simulate responses; no real Sumsub or Avenia verification occurs inside Pods. Keep both Pods and Sumsub credentials on your backend.
2. Hosted
The hosted script creates a Pods-hosted session. It checks that the returned link is clearly dummy, reads created twice, starts the simulated review, sets an outcome, and reads the result. With SCENARIO=rejected_retryable, it calls the hosted reset endpoint and then approves a second attempt.
Requirements
Node.js 18 or newer, with built-in fetch.
Your staging Pods API URL and staging customer API key. Pods Hosted KYC must be enabled for that customer.
A redirect URL configured on the customer. Set REDIRECT_URL only when you want to override the customer default with another allowlisted URL.
No Sumsub credentials, applicant ID, or share token are needed for this flow. The script creates a fresh valid CPF, email, and wallet for each run unless you provide WALLET_ADDRESS.
export PODS_API_BASE_URL=https://staging-api.deframe.ioexport PODS_API_KEY=your-staging-api-keyexport SCENARIO=rejected_retryable# Optional: override the customer default with an allowlisted callback.# export REDIRECT_URL=https://app.example.com/kyc/return
Save kyc-hosted-sandbox.js as kyc-hosted-sandbox.mjs outside an ES-module project, then run:
node kyc-hosted-sandbox.mjs
SCENARIO accepts approved, rejected, or rejected_retryable; its default is approved.
How the example calls Pods
First, the script creates a hosted session. The sandbox response has status: "created" and a verificationLink under .invalid. The link is a placeholder and cannot collect documents or change status:
For a retryable result, the script calls the hosted reset route. It keeps the same kycUserId, returns to created, and then explicitly transitions to provider_pending and approved:
The hosted reset applies only to an eligible Sumsub-side rejected_retryable profile. It cannot restart a retryable rejection after an Avenia account link exists. See the hosted sandbox steps for the guard and state rules.
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Pods API","colors":{"primary":"#5B7FED","light":"#8BA3F7","dark":"#3D5DD9"},"logo":{"light":"https://mintcdn.com/pods-322144f0/vnzMke2rrNTQCMXG/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=vnzMke2rrNTQCMXG\u0026q=85\u0026s=a645b7f9d04b61c6098fc0b2ee6eeec3","dark":"https://mintcdn.com/pods-322144f0/vnzMke2rrNTQCMXG/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=vnzMke2rrNTQCMXG\u0026q=85\u0026s=94d134e58dbd6bd70ea0cbfefd50771d","href":"/"},"favicon":"https://mintcdn.com/pods-322144f0/lH1bzVKPtwruVjIT/favicon.ico?fit=max\u0026auto=format\u0026n=lH1bzVKPtwruVjIT\u0026q=85\u0026s=17f0dfe277095cc02b1242bb4f6024fb","api":{"playground":{}},"navbar":{"primary":{"type":"button","label":"Get API Key","href":"https://www.pods.finance/plg/select-plan"}},"footer":{"socials":{"x":"https://x.com/PodsFinance"},"links":[{"header":"Resources","items":[{"label":"API Status","href":"https://pods.betteruptime.com/"}]}]},"search":{"prompt":"Search Pods documentation..."},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Support","icon":"envelope","href":"mailto:[email protected]"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pods-322144f0","hasAudioNarration":false,"actualSubdomain":"pods-322144f0","customDomains":["docs.pods.finance"],"gitSource":{"type":"github","owner":"pods-finance","repo":"deframe-api","deployBranch":"main","contentDirectory":"docs/mintlify-docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6af7e07167854186343e6c2c","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"Documentation","count":58},{"language":"default","tag":"API Reference","count":37},{"language":"default","tag":"Guides","count":30},{"language":"default","tag":"Integrations","count":15},{"language":"default","tag":"Ramp","count":15},{"language":"default","tag":"Overview","count":10},{"language":"default","tag":"Code Examples","count":10},{"language":"default","tag":"Strategies","count":10},{"language":"default","tag":"Widgets","count":7},{"language":"default","tag":"Yield","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"examples/javascript/kyc-sandbox","slug":"/examples/javascript/kyc-sandbox","pageMetadata":{"title":"KYC sandbox example","description":"Runnable Node.js examples for shared-token and hosted KYC sandbox flows","href":"/examples/javascript/kyc-sandbox"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Runnable Node.js examples for shared-token and hosted KYC sandbox flows\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`These two Node.js examples exercise the `,_jsx(_components.a,{href:`/guides/kyc/sandbox`,children:`KYC sandbox`}),`. The shared-token script submits an applicant and token. The hosted script creates a session and receives a dummy verification link. Both explicitly move the applicant to a simulated result, then read it back.`]}),`\n`,_jsx(_components.p,{children:`The status GET is read-only in both flows. The scripts check that polling does not advance the profile. Applicant email does not select the result.`}),`\n`,_jsx(Heading,{level:`2`,id:`1-shared-token`,children:`1. Shared token`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/examples/javascript/kyc-sandbox.js`,children:`shared-token script`}),` submits a Sumsub applicant and share token to Pods. With `,_jsx(_components.code,{children:`SCENARIO=rejected_retryable`}),`, it resubmits the same applicant with a fresh token and sets the second attempt to `,_jsx(_components.code,{children:`approved`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`requirements`,children:`Requirements`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Node.js 18 or newer, with built-in `,_jsx(_components.code,{children:`fetch`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Your staging Pods API URL and staging customer API key. Send the key from your backend as `,_jsx(_components.code,{children:`x-api-key`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Optional: Sumsub sandbox credentials, a level name, and the Pods recipient ID. If all four `,_jsx(_components.code,{children:`SUMSUB_*`}),` values are omitted, the script uses unique placeholder applicant IDs and tokens. Pods requires these fields but does not inspect their contents in the sandbox.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PODS_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`https`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`://`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`staging-api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`deframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`io`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PODS_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`your-staging-api-key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SCENARIO`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`rejected_retryable`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Optional: set a unique wallet for this applicant. Otherwise the script generates one.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# export WALLET_ADDRESS=0x0000000000000000000000000000000000000001`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Optional: set all four to exercise your real Sumsub sandbox token generation.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SUMSUB_APP_TOKEN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sbx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:...`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SUMSUB_SECRET_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`...`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SUMSUB_LEVEL_NAME`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`...`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SUMSUB_FOR_CLIENT_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`...`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Download or copy `,_jsx(_components.a,{href:`/examples/javascript/kyc-sandbox.js`,children:_jsx(_components.code,{children:`kyc-sandbox.js`})}),`, then run:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`node`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` kyc-sandbox.js`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`SCENARIO`}),` accepts `,_jsx(_components.code,{children:`approved`}),`, `,_jsx(_components.code,{children:`rejected`}),`, or `,_jsx(_components.code,{children:`rejected_retryable`}),`. The default is `,_jsx(_components.code,{children:`approved`}),`. Each run generates a new valid CPF, applicant ID, and wallet unless you provide `,_jsx(_components.code,{children:`WALLET_ADDRESS`}),`, so previous test results do not affect it. If you save the script outside a project configured for ES modules, save it as `,_jsx(_components.code,{children:`kyc-sandbox.mjs`}),` and run `,_jsx(_components.code,{children:`node kyc-sandbox.mjs`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`how-the-example-calls-pods`,children:`How the example calls Pods`}),`\n`,_jsxs(_components.p,{children:[`The script submits the normal production request shape. The sandbox returns a `,_jsx(_components.code,{children:`kycUserId`}),` in `,_jsx(_components.code,{children:`provider_pending`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` submission`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` pods`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/api/v1/kyc/sumsub-share-token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` cpf`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`walletAddress:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` WALLET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sumsubApplicantId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` applicantId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`shareToken`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The submission is already pending, but the script also calls the optional pending route. This returns the current status without starting another attempt:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` pods`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/api/v1/kyc/status/sandbox/provider_pending'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` kycUserId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` submission`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kycUserId`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`It reads the status before setting an outcome and asserts that it is still `,_jsx(_components.code,{children:`provider_pending`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` pending`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` pods`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'GET'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`/api/v1/kyc/status?kycUserId=\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`submission`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kycUserId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pending`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'provider_pending'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Polling changed the status'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Next it calls the route for the chosen outcome. Every sandbox transition takes `,_jsx(_components.code,{children:`{ \"kycUserId\": \"…\" }`}),` and returns the full KYC status response:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` pods`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `/api/v1/kyc/status/sandbox/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`SCENARIO`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kycUserId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` submission`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kycUserId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A subsequent GET reads the same status. For `,_jsx(_components.code,{children:`rejected_retryable`}),`, the script requests a `,_jsx(_components.strong,{children:`new token for the same Sumsub applicant`}),` (or makes a new placeholder token), resubmits the same CPF, email, wallet, and applicant ID, then explicitly sets `,_jsx(_components.code,{children:`approved`}),`. It checks that the retry keeps the original `,_jsx(_components.code,{children:`kycUserId`}),` and returns to `,_jsx(_components.code,{children:`provider_pending`}),` first.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Submit: provider_pending \u003ckycUserId>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Explicit pending: provider_pending`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Read before transition: provider_pending`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Set outcome: rejected_retryable`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Read after transition: rejected_retryable { code: 'VERIFICATION_RETRY_REQUIRED', ... }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Resubmit fresh token: provider_pending`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Read after retry: approved`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The full script signs Sumsub sandbox requests when credentials are supplied. It creates an applicant, simulates a GREEN review, and mints its first share token. On retry it mints a second token `,_jsx(_components.strong,{children:`for that existing applicant`}),`, which is necessary to keep the Pods profile binding intact.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The transition routes exist only outside production. Sandbox outcomes simulate responses; no real Sumsub or Avenia verification occurs inside Pods. Keep both Pods and Sumsub credentials on your backend.`})}),`\n`,_jsx(Heading,{level:`2`,id:`2-hosted`,children:`2. Hosted`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/examples/javascript/kyc-hosted-sandbox.js`,children:`hosted script`}),` creates a Pods-hosted session. It checks that the returned link is clearly dummy, reads `,_jsx(_components.code,{children:`created`}),` twice, starts the simulated review, sets an outcome, and reads the result. With `,_jsx(_components.code,{children:`SCENARIO=rejected_retryable`}),`, it calls the hosted reset endpoint and then approves a second attempt.`]}),`\n`,_jsx(Heading,{level:`3`,id:`requirements-2`,children:`Requirements`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Node.js 18 or newer, with built-in `,_jsx(_components.code,{children:`fetch`}),`.`]}),`\n`,_jsx(_components.li,{children:`Your staging Pods API URL and staging customer API key. Pods Hosted KYC must be enabled for that customer.`}),`\n`,_jsxs(_components.li,{children:[`A redirect URL configured on the customer. Set `,_jsx(_components.code,{children:`REDIRECT_URL`}),` only when you want to override the customer default with another allowlisted URL.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`No Sumsub credentials, applicant ID, or share token are needed for this flow. The script creates a fresh valid CPF, email, and wallet for each run unless you provide `,_jsx(_components.code,{children:`WALLET_ADDRESS`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PODS_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`https`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`://`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`staging-api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`deframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`io`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PODS_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`your-staging-api-key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SCENARIO`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`rejected_retryable`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Optional: override the customer default with an allowlisted callback.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# export REDIRECT_URL=https://app.example.com/kyc/return`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Save `,_jsx(_components.a,{href:`/examples/javascript/kyc-hosted-sandbox.js`,children:_jsx(_components.code,{children:`kyc-hosted-sandbox.js`})}),` as `,_jsx(_components.code,{children:`kyc-hosted-sandbox.mjs`}),` outside an ES-module project, then run:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`node`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` kyc-hosted-sandbox.mjs`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`SCENARIO`}),` accepts `,_jsx(_components.code,{children:`approved`}),`, `,_jsx(_components.code,{children:`rejected`}),`, or `,_jsx(_components.code,{children:`rejected_retryable`}),`; its default is `,_jsx(_components.code,{children:`approved`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`how-the-example-calls-pods-2`,children:`How the example calls Pods`}),`\n`,_jsxs(_components.p,{children:[`First, the script creates a hosted session. The sandbox response has `,_jsx(_components.code,{children:`status: \"created\"`}),` and a `,_jsx(_components.code,{children:`verificationLink`}),` under `,_jsx(_components.code,{children:`.invalid`}),`. The link is a placeholder and cannot collect documents or change status:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` session`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` pods`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/api/v1/kyc/hosted/sessions'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` cpf`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` walletAddress:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` WALLET`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`After two GET calls confirm the profile is still `,_jsx(_components.code,{children:`created`}),`, the script starts the simulated review:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` pods`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/api/v1/kyc/status/sandbox/provider_pending'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` kycUserId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kycUserId`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`It reads `,_jsx(_components.code,{children:`provider_pending`}),` without changing it, then selects the outcome:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` pods`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`/api/v1/kyc/status/sandbox/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`SCENARIO`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` kycUserId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kycUserId`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For a retryable result, the script calls the `,_jsx(_components.strong,{children:`hosted`}),` reset route. It keeps the same `,_jsx(_components.code,{children:`kycUserId`}),`, returns to `,_jsx(_components.code,{children:`created`}),`, and then explicitly transitions to `,_jsx(_components.code,{children:`provider_pending`}),` and `,_jsx(_components.code,{children:`approved`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` pods`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/api/v1/kyc/hosted/reset'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` kycUserId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kycUserId`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Create hosted session: created \u003ckycUserId>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Read twice: created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Start review: provider_pending`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Set outcome: rejected_retryable { code: 'VERIFICATION_RETRY_REQUIRED', ... }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Reset hosted session: created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Read after retry: approved`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The hosted reset applies only to an eligible Sumsub-side `,_jsx(_components.code,{children:`rejected_retryable`}),` profile. It cannot restart a retryable rejection after an Avenia account link exists. See the `,_jsx(_components.a,{href:`/guides/kyc/sandbox#2-hosted`,children:`hosted sandbox steps`}),` for the guard and state rules.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"KYC sandbox example","description":"Runnable Node.js examples for shared-token and hosted KYC sandbox flows","href":"/examples/javascript/kyc-sandbox"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Shared token","slug":"1-shared-token","depth":2,"children":[{"title":"Requirements","slug":"requirements","depth":3,"children":[]},{"title":"How the example calls Pods","slug":"how-the-example-calls-pods","depth":3,"children":[]}]},{"title":"2. Hosted","slug":"2-hosted","depth":2,"children":[{"title":"Requirements","slug":"requirements-2","depth":3,"children":[]},{"title":"How the example calls Pods","slug":"how-the-example-calls-pods-2","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/pods-322144f0/6acc137f1bd2fe19/examples/javascript/cross-chain-swap.js","/_mintlify/custom/pods-322144f0/bca8d74df984c114/examples/javascript/same-chain-swap.js","/_mintlify/custom/pods-322144f0/56f6e46723f41a98/examples/javascript/strategy-deposit.js","/_mintlify/custom/pods-322144f0/b22c78d22c00d349/examples/javascript/strategy-deposit-eip7702.js","/_mintlify/custom/pods-322144f0/2e512e7c1dcaf2cb/examples/javascript/strategy-withdraw.js","/_mintlify/custom/pods-322144f0/530f77f544b3673d/examples/javascript/eip7702-batch.js","/_mintlify/custom/pods-322144f0/a9d9305513905a9b/examples/javascript/kyc-backend.js","/_mintlify/custom/pods-322144f0/ff1c69e6edae68ea/examples/javascript/ondo.js","/_mintlify/custom/pods-322144f0/18e6c6d13ca62d19/examples/javascript/ramp.js","/_mintlify/custom/pods-322144f0/a1167016d929a22f/examples/javascript/track-and-positions.js","/_mintlify/custom/pods-322144f0/cd730ef2c74d8337/examples/javascript/kyc-hosted-sandbox.js","/_mintlify/custom/pods-322144f0/1bb2712593f8a618/examples/javascript/kyc-sandbox.js"],"subdomain":"pods-322144f0","siteName":"Pods API","title":"KYC sandbox example - Pods API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-14T04:15:52.517Z","originalFileLocation":"examples/javascript/kyc-sandbox.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Runnable Node.js examples for shared-token and hosted KYC sandbox flows\">\u003cmeta data-mint-head name=\"application-name\" content=\"Pods API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pods-322144f0/C5TzlXyBUMrZYDjy/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/pods-322144f0/C5TzlXyBUMrZYDjy/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pods-322144f0/C5TzlXyBUMrZYDjy/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/pods-322144f0/C5TzlXyBUMrZYDjy/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/pods-322144f0/C5TzlXyBUMrZYDjy/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pods-322144f0/C5TzlXyBUMrZYDjy/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pods-322144f0/C5TzlXyBUMrZYDjy/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/pods-322144f0/C5TzlXyBUMrZYDjy/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/pods-322144f0/C5TzlXyBUMrZYDjy/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"KYC sandbox example - Pods API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Runnable Node.js examples for shared-token and hosted KYC sandbox flows\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Pods API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.pods.finance/examples/javascript/kyc-sandbox\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pods-322144f0.mintlify.site/_mintlify/api/og/v2?division=Code+Examples\u0026amp;title=KYC+sandbox+example\u0026amp;description=Runnable+Node.js+examples+for+shared-token+and+hosted+KYC+sandbox+flows\u0026amp;theme=394994c4c43dbf422407fda9\u0026amp;signature=ed5228ce9f273f6f6fc2280829e2bd0d619cb9ac883da21f426d58db632ab0f3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"KYC sandbox example - Pods API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Runnable Node.js examples for shared-token and hosted KYC sandbox flows\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pods-322144f0.mintlify.site/_mintlify/api/og/v2?division=Code+Examples\u0026amp;title=KYC+sandbox+example\u0026amp;description=Runnable+Node.js+examples+for+shared-token+and+hosted+KYC+sandbox+flows\u0026amp;theme=394994c4c43dbf422407fda9\u0026amp;signature=ed5228ce9f273f6f6fc2280829e2bd0d619cb9ac883da21f426d58db632ab0f3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/pods-322144f0/C5TzlXyBUMrZYDjy/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Pods API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5B7FED\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.pods.finance/examples/javascript/kyc-sandbox\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/examples/javascript/kyc-sandbox.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.pods.finance/#organization\",\"name\":\"Pods API\",\"url\":\"https://docs.pods.finance\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pods-322144f0/vnzMke2rrNTQCMXG/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=vnzMke2rrNTQCMXG\u0026q=85\u0026s=a645b7f9d04b61c6098fc0b2ee6eeec3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.pods.finance#website\",\"name\":\"Pods API\",\"url\":\"https://docs.pods.finance\",\"publisher\":{\"@id\":\"https://docs.pods.finance/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.pods.finance/examples/javascript/kyc-sandbox#webpage\",\"url\":\"https://docs.pods.finance/examples/javascript/kyc-sandbox\",\"name\":\"KYC sandbox example\",\"description\":\"Runnable Node.js examples for shared-token and hosted KYC sandbox flows\",\"dateModified\":\"2026-11-14T04:15:52.517Z\",\"isPartOf\":{\"@id\":\"https://docs.pods.finance#website\"},\"breadcrumb\":{\"@id\":\"https://docs.pods.finance/examples/javascript/kyc-sandbox#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.pods.finance/examples/javascript/kyc-sandbox#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.pods.finance/guides/kyc/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Code Examples\",\"item\":\"https://docs.pods.finance/examples/javascript/ramp\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"KYC sandbox example\",\"item\":\"https://docs.pods.finance/examples/javascript/kyc-sandbox\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.pods.finance/examples/javascript/kyc-sandbox#article\",\"headline\":\"KYC sandbox example\",\"name\":\"KYC sandbox example\",\"description\":\"Runnable Node.js examples for shared-token and hosted KYC sandbox flows\",\"url\":\"https://docs.pods.finance/examples/javascript/kyc-sandbox\",\"mainEntityOfPage\":{\"@id\":\"https://docs.pods.finance/examples/javascript/kyc-sandbox#webpage\"},\"dateModified\":\"2026-11-14T04:15:52.517Z\",\"publisher\":{\"@id\":\"https://docs.pods.finance/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.pods.finance#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Pods API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Pods API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/examples/javascript/kyc-sandbox.md","siteName":"Pods API","nav":{"global":{"anchors":[{"anchor":"Support","icon":"envelope","href":"mailto:[email protected]"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Overview","pages":[{"title":"Introduction","href":""},{"title":"Why Pods","href":"/getting-started/why-pods"},{"title":"Add Yield to Your App in 5 Minutes","href":"/getting-started/quickstart"},{"title":"Executing Bytecode","href":"/getting-started/executing-bytecode"},{"title":"Architecture Overview","href":"/getting-started/architecture"},{"title":"Authentication","href":"/getting-started/authentication"},{"title":"Fees","href":"/getting-started/fees"},{"title":"Error Codes","href":"/error-codes"},{"title":"Changelog","href":"/changelog"}]},{"group":"Guides","pages":[{"group":"KYC","pages":[{"title":"Overview","href":"/guides/kyc/overview"},{"title":"Sumsub Reusable KYC","href":"/guides/kyc/setup"},{"title":"Pods Hosted KYC","href":"/guides/kyc/pods-hosted"},{"title":"External Evidence KYC","hidden":false,"href":"/guides/kyc/external-evidence"},{"title":"Sandbox KYC","href":"/guides/kyc/sandbox"},{"title":"UnblockPay KYC (hosted link or documents)","hidden":true,"href":"/guides/kyc/unblockpay-documents"},{"title":"Foreign USD KYC","hidden":true,"href":"/guides/kyc/usd-foreign-ramp"}]},{"group":"Ramp","pages":[{"title":"Pods Ramp Overview","href":"/guides/ramp/overview"},{"title":"Move Money with Pods Ramp","href":"/guides/ramp/quotes"},{"title":"Track Pods Ramp Status","href":"/guides/ramp/status"}]},{"group":"Yield","pages":[{"title":"Protocol Information","href":"/guides/yield/check-protocol-info"},{"title":"Get available protocols","href":"/guides/yield/get-available-protocols"},{"title":"Deposit to Yield","href":"/guides/yield/deposit"},{"title":"Check Open Positions","href":"/guides/yield/check-positions"},{"title":"Withdraw from Yield","href":"/guides/yield/withdraw"},{"title":"Testnet: Aave (Base Sepolia)","href":"/guides/yield/testnet-aave-base-sepolia"}]},{"group":"RWA","pages":[{"title":"Ondo Global Markets","href":"/guides/ondoglobal-markets"}]},{"group":"Swaps","pages":[{"title":"Overview","href":"/guides/swaps/overview"},{"title":"Get a Quote","href":"/guides/swaps/get-quote"},{"title":"Execute Swap","href":"/guides/swaps/execute-swap"},{"title":"Track a Swap","href":"/guides/swaps/track-status"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","href":"/guides/webhooks"}]},{"group":"Code Examples","pages":[{"title":"Pods Ramp (Fiat On/Off-Ramp)","href":"/examples/javascript/ramp"},{"title":"KYC (Backend)","description":"Server-to-server KYC: hosted link, Sumsub share token or external evidence, then poll status","href":"/examples/javascript/kyc-backend"},{"title":"KYC sandbox example","href":"/examples/javascript/kyc-sandbox"},{"title":"Ondo Global Markets (RWA)","description":"Buy and sell tokenized stocks \u0026 ETFs on BSC, with cross-chain funding and async order tracking","href":"/examples/javascript/ondo"},{"title":"Track \u0026 Positions","href":"/examples/javascript/track-and-positions"},{"title":"Strategy Deposit","href":"/examples/javascript/strategy-deposit"},{"title":"EOA Integration","hidden":true,"href":"/examples/javascript/smart-account-deposit"},{"title":"Strategy Withdrawal","href":"/examples/javascript/strategy-withdraw"},{"title":"Same-Chain Swap","href":"/examples/javascript/same-chain-swap"},{"title":"Cross-Chain Swap","href":"/examples/javascript/cross-chain-swap"},{"title":"EIP-7702","href":"/examples/javascript/using-eip7702"}]}]},{"group":"Integrations","pages":[{"title":"Protocols","href":"/protocols"},{"group":"Widgets","pages":[{"title":"Integration Options","href":"/widget-integration"},{"title":"RampWidget Integration","icon":"money-bill-transfer","href":"/widgets/ramp-widget"},{"title":"KycWidget Integration","icon":"id-card","href":"/widgets/kyc-widget"},{"title":"EarnWidget Integration","icon":"vault","href":"/widgets/earn-widget"},{"title":"SwapWidget Integration","icon":"arrows-rotate","href":"/widgets/swap-widget"},{"title":"processBytecode Contract","icon":"code","href":"/widgets/process-bytecode"},{"title":"LLM Integration Playbook","icon":"terminal","href":"/widgets/llm-playbook"}]},{"group":"Iframe","pages":[{"title":"Iframe Integration","href":"/iframe/overview"},{"title":"Privy Wrapper","icon":"shield-halved","href":"/iframe/privy"},{"title":"wagmi + viem Wrapper","icon":"wallet","href":"/iframe/wagmi-viem"}]},{"group":"External Integrations","pages":[{"title":"Privy Integration","icon":"key","href":"/external-integrations/privy-integration"},{"title":"Fireblocks Integration","icon":"vault","href":"/external-integrations/fireblocks-integration"},{"title":"Dynamic Integration","icon":"link","href":"/external-integrations/dynamic-integration"},{"title":"Notus Integration","icon":"wallet","href":"/external-integrations/notus-integration"}]}]},{"group":"Agents","pages":[{"title":"Pods MCP Server","icon":"plug","href":"/ai-tools/mcp-server"},{"title":"Skills","icon":"wand-magic-sparkles","href":"/ai-tools/mcp-skills"},{"title":"MCP Server Setup","icon":"gear","href":"/ai-tools/mcp-setup"},{"title":"MCP Tools Reference","icon":"list","href":"/ai-tools/mcp-tools-reference"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"Wire","hidden":true,"pages":[{"title":"Wire","href":"/guides/wire"}]},{"tab":"PIX to Stellar","hidden":true,"pages":[{"title":"PIX to Stellar","href":"/guides/pix-to-stellar"}]},{"tab":"BRLA to BRS Base","hidden":true,"pages":[{"title":"BRLA to BRS Base","href":"/guides/brla-to-brs-base"}]}]},"basePath":"","title":"KYC sandbox example - Pods API","buildId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","deploymentId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","dynamics":[],"chunks":[]}