Use your sk_test_… key to follow this on Base Sepolia, where nothing can
cost you anything. The flow is identical in production — change the key and use
a production chain/token, not the URL. See Environments. No account yet?
Get one.
1. Create a session
Server-side, with your secret key. This bills the payer 10 USDC on Base Sepolia.
import { createCheckout } from "@hypermid/sdk";const session = await createCheckout( { chain: 84532, token: "0x036CbD53842c5426634e7929541eC2318f3dCF7e", amount: "10000000", // 10 USDC — base units, as a string recipient: "0xYourTreasuryAddress", orderId: "order_1029", // also the idempotency key }, { secretKey: process.env.HYPERMID_SECRET_KEY! },);
created: false means this was an idempotent replay — a session with that
orderId already existed, and you get a 200 instead of a 201. Branch on it
to avoid emailing a customer twice.
2. Send the payer to url
Redirect, or embed it. The payer picks any token they hold on any supported
chain; you still receive exactly the token and chain you asked for.
3. Learn the outcome
Poll the session from your server, or register a webhook:
Treat a webhook as a trigger, not as evidence. Read the session back before
releasing goods — that read is the authoritative answer, and it is the one that
survives a replayed or spoofed delivery.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Hypermid","description":"Accept crypto payments and move funds across chains. Checkout, deposit, withdrawal and swap orchestration through one API.","colors":{"primary":"#2157FF","light":"#5B8CFF","dark":"#2157FF"},"logo":{"light":"https://mintcdn.com/hypermid/ZgoQ9v7kwZNXAi8T/branding/wordmark-light.svg?fit=max\u0026auto=format\u0026n=ZgoQ9v7kwZNXAi8T\u0026q=85\u0026s=3d6e533d402b8e8877972a1e467eeb8b","dark":"https://mintcdn.com/hypermid/ZgoQ9v7kwZNXAi8T/branding/wordmark-dark.svg?fit=max\u0026auto=format\u0026n=ZgoQ9v7kwZNXAi8T\u0026q=85\u0026s=58f4c0b9df5610df24e8a9e6cb9793da","href":"https://hypermid.io"},"favicon":"https://mintcdn.com/hypermid/AmEN-tehvpi6yz0-/branding/favicon.svg?fit=max\u0026auto=format\u0026n=AmEN-tehvpi6yz0-\u0026q=85\u0026s=c22b526f09d8dde79ad633cb984d7ede","api":{"playground":{"display":"interactive"},"examples":{"languages":["curl","javascript","python"]}},"appearance":{"default":"system"},"background":{"color":{"light":"#f9f8f5","dark":"#0a0a0a"}},"navbar":{"links":[{"href":"mailto:support@hypermid.io","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://partner.hypermid.io"}},"footer":{"socials":{"website":"https://hypermid.io","x":"https://x.com/hypermid"}},"seo":{"indexing":"navigable"},"fonts":{"family":"Geist","weight":400,"source":"fonts/GeistVF.woff","format":"woff"},"styling":{"codeblocks":"system","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","grok","cursor","vscode","add-mcp","mcp","download-spec"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hypermid","hasAudioNarration":false,"actualSubdomain":"hypermid","customDomains":["docs.hypermid.io"],"gitSource":{"type":"github","owner":"hypermid-io","repo":"offchain-agents","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":"","_id":"6b10dd149ffae5051c40fdaf"},"entitlements":{},"buildId":"6b12eafe30343046f0ec4eb2","clientVersion":"0.0.4453","searchFilterCounts":[{"language":"default","tag":"API Reference","count":52},{"language":"default","tag":"Endpoints","count":42},{"language":"default","tag":"Documentation","count":18},{"language":"default","tag":"payments","count":14},{"language":"default","tag":"Webhooks","count":10},{"language":"default","tag":"catalog","count":8},{"language":"default","tag":"SDK","count":7},{"language":"default","tag":"@hypermid/sdk","count":7},{"language":"default","tag":"Payments","count":6},{"language":"default","tag":"onramp","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":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":"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":"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":"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":"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":"turbopuffer-dual-write","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":"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":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--hm-bg: #f9f8f5;--hm-surface: #ffffff;--hm-text: #0a0a0a;--hm-muted: #6b6b6b;--hm-hint: #5a5a58;--hm-border: rgba(0, 0, 0, 0.08);--hm-border-strong: rgba(0, 0, 0, 0.14);--hm-accent: #2157ff;--hm-accent-wash: rgba(33, 87, 255, 0.12)}.dark{--hm-bg: #0a0a0a;--hm-surface: #161616;--hm-text: #f0f0ee;--hm-muted: #a0a09e;--hm-hint: #aeaead;--hm-border: rgba(255, 255, 255, 0.08);--hm-border-strong: rgba(255, 255, 255, 0.14);--hm-accent: #5b8cff;--hm-accent-wash: rgba(91, 140, 255, 0.16)}:root,.dark{--radius: 0px;--radius-sm: 0px;--radius-md: 0px;--radius-lg: 0px;--radius-xl: 0px;--radius-2xl: 0px;--radius-3xl: 0px;--radius-full: 0px}*,*::before,*::after{border-radius:0!important}html,body,button,input,textarea,select,code,pre,kbd,samp{font-family:\"Geist\", system-ui, sans-serif}.prose p,.prose ul,.prose ol,.prose li,.prose table,.mdx-content p,.mdx-content ul,.mdx-content ol,.mdx-content li{font-size:14px;line-height:1.65}.prose h1,.mdx-content h1{font-size:1.875rem;letter-spacing:-0.02em}.prose h2,.mdx-content h2{font-size:1.5rem;letter-spacing:-0.015em}.prose h3,.mdx-content h3{font-size:1.125rem;letter-spacing:-0.01em}.prose pre code,.mdx-content pre code{font-size:13px;line-height:1.6}.prose code,.mdx-content code{font-size:0.875em}.prose :not(pre)>code,.mdx-content :not(pre)>code{background:var(--hm-accent-wash);border:1px solid var(--hm-border);padding:0.1em 0.35em}.prose table,.mdx-content table{border:1px solid var(--hm-border);overflow:hidden}.prose thead,.mdx-content thead{background:var(--hm-accent-wash)}.prose th,.mdx-content th{font-weight:600;letter-spacing:0.01em}.prose td,.prose th,.mdx-content td,.mdx-content th{border-color:var(--hm-border)}.param-field-description{font-size:13px;color:var(--hm-muted)}.eyebrow{font-size:0.75rem;font-weight:500;text-transform:uppercase;letter-spacing:0.1em;color:var(--hm-muted)}"}]}
{"page":{"pagePath":"quickstart","slug":"/quickstart","pageMetadata":{"title":"Quickstart","description":"Take your first payment.","href":"/quickstart"},"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: \"Take your first payment.\"\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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsxs(_components.p,{children:[`Use your `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`sk_test_…`})}),` key to follow this on Base Sepolia, where nothing can\ncost you anything. The flow is identical in production — change the key and use\na production chain/token, not the URL. See `,_jsx(_components.a,{href:`/environments`,children:`Environments`}),`. No account yet?\n`,_jsx(_components.a,{href:`/account`,children:`Get one`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`1-create-a-session`,children:`1. Create a session`}),`\n`,_jsx(_components.p,{children:`Server-side, with your secret key. This bills the payer 10 USDC on Base Sepolia.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createCheckout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@hypermid/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_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:` createCheckout`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` chain:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 84532`}),_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:` token:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"0x036CbD53842c5426634e7929541eC2318f3dCF7e\"`}),_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:` amount:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"10000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 10 USDC — base units, as a string`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` recipient:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"0xYourTreasuryAddress\"`}),_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:` orderId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order_1029\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// also the idempotency key`})]}),`\n`,_jsx(_components.span,{className:`line`,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:`secretKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`HYPERMID_SECRET_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_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`,_jsx(_components.p,{children:`The SDK returns the session directly:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"co_01J…\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://pay.hypermid.io/pay/co_01J…\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"checkout\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`created: false`}),` means this was an `,_jsx(_components.strong,{children:`idempotent replay`}),` — a session with that\n`,_jsx(_components.code,{children:`orderId`}),` already existed, and you get a `,_jsx(_components.code,{children:`200`}),` instead of a `,_jsx(_components.code,{children:`201`}),`. Branch on it\nto avoid emailing a customer twice.`]})}),`\n`,_jsxs(Heading,{level:`2`,id:`2-send-the-payer-to-url`,children:[`2. Send the payer to `,_jsx(_components.code,{children:`url`})]}),`\n`,_jsx(_components.p,{children:`Redirect, or embed it. The payer picks any token they hold on any supported\nchain; you still receive exactly the token and chain you asked for.`}),`\n`,_jsx(Heading,{level:`2`,id:`3-learn-the-outcome`,children:`3. Learn the outcome`}),`\n`,_jsxs(_components.p,{children:[`Poll the session from your server, or register a `,_jsx(_components.a,{href:`/guides/webhooks`,children:`webhook`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`getPayment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@hypermid/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_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:` getPayment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"co_01J…\"`}),_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:` secretKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`HYPERMID_SECRET_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_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`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Treat a webhook as a `,_jsx(_components.strong,{children:`trigger`}),`, not as evidence. Read the session back before\nreleasing goods — that read is the authoritative answer, and it is the one that\nsurvives a replayed or spoofed delivery.`]})})]})}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":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Quickstart","description":"Take your first payment.","href":"/quickstart"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Create a session","slug":"1-create-a-session","depth":2,"children":[]},{"title":"2. Send the payer to url","slug":"2-send-the-payer-to-url","depth":2,"children":[]},{"title":"3. Learn the outcome","slug":"3-learn-the-outcome","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"hypermid","siteName":"Hypermid","title":"Quickstart - Hypermid","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-21T17:15:27.821Z","originalFileLocation":"quickstart.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=\"Take your first payment.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Hypermid\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_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/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hypermid/qyyB5eOK2Rv0IBDo/_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/hypermid/qyyB5eOK2Rv0IBDo/_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/hypermid/qyyB5eOK2Rv0IBDo/_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/hypermid/qyyB5eOK2Rv0IBDo/_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/hypermid/qyyB5eOK2Rv0IBDo/_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/hypermid/qyyB5eOK2Rv0IBDo/_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/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Quickstart - Hypermid\">\u003cmeta data-mint-head property=\"og:description\" content=\"Take your first payment.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Hypermid\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hypermid.io/quickstart\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hypermid.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Quickstart\u0026amp;description=Take+your+first+payment.\u0026amp;theme=7f6a3e58a9c5ff5d60958e15\u0026amp;signature=dcf32a685cf8419de54e1794d461ccb0412e83b3b8e3368c9aea3d6d4483441c\">\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=\"Quickstart - Hypermid\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Take your first payment.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hypermid.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Quickstart\u0026amp;description=Take+your+first+payment.\u0026amp;theme=7f6a3e58a9c5ff5d60958e15\u0026amp;signature=dcf32a685cf8419de54e1794d461ccb0412e83b3b8e3368c9aea3d6d4483441c\">\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/hypermid/qyyB5eOK2Rv0IBDo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Hypermid\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2157FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hypermid.io/quickstart\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/quickstart.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.hypermid.io/#organization\",\"name\":\"Hypermid\",\"url\":\"https://docs.hypermid.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hypermid/ZgoQ9v7kwZNXAi8T/branding/wordmark-light.svg?fit=max\u0026auto=format\u0026n=ZgoQ9v7kwZNXAi8T\u0026q=85\u0026s=3d6e533d402b8e8877972a1e467eeb8b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hypermid.io#website\",\"name\":\"Hypermid\",\"url\":\"https://docs.hypermid.io\",\"publisher\":{\"@id\":\"https://docs.hypermid.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hypermid.io/quickstart#webpage\",\"url\":\"https://docs.hypermid.io/quickstart\",\"name\":\"Quickstart\",\"description\":\"Take your first payment.\",\"dateModified\":\"2026-09-21T17:15:27.821Z\",\"isPartOf\":{\"@id\":\"https://docs.hypermid.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hypermid.io/quickstart#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hypermid.io/quickstart#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://docs.hypermid.io\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Quickstart\",\"item\":\"https://docs.hypermid.io/quickstart\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.hypermid.io/quickstart#article\",\"headline\":\"Quickstart\",\"name\":\"Quickstart\",\"description\":\"Take your first payment.\",\"url\":\"https://docs.hypermid.io/quickstart\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hypermid.io/quickstart#webpage\"},\"dateModified\":\"2026-09-21T17:15:27.821Z\",\"publisher\":{\"@id\":\"https://docs.hypermid.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hypermid.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Hypermid\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Hypermid\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/quickstart.md","siteName":"Hypermid","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get started","pages":[{"title":"Hypermid","href":""},{"title":"Get an account","description":"How to get onboarded, and what you receive when you are.","href":"/account"},{"title":"Quickstart","href":"/quickstart"},{"title":"Authentication","description":"Two kinds of key, two environments, and one rule about where each may run.","href":"/authentication"},{"title":"Sandbox and production","href":"/environments"}]},{"group":"Payments","pages":[{"title":"Payments","href":"/guides/payments"},{"title":"Checkout","href":"/guides/checkout"},{"title":"Payment links","href":"/guides/payment-links"},{"title":"Deposit","href":"/guides/deposit"},{"title":"Withdrawal","href":"/guides/withdrawal"},{"title":"Swap orchestration","href":"/guides/swap"}]},{"group":"Concepts","pages":[{"title":"Payment modes","href":"/concepts/payment-modes"},{"title":"Execution flows","href":"/concepts/execution-flows"},{"title":"Session lifecycle","href":"/concepts/lifecycle"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","href":"/guides/webhooks"}]},{"group":"Resources","pages":[{"title":"Postman collection","href":"/resources/postman"},{"title":"Error codes","href":"/resources/errors"},{"title":"Support","href":"/resources/support"}]}]},{"tab":"API Reference","icon":"square-terminal","pages":[{"title":"API Reference","href":"/api-reference/overview"}]},{"tab":"SDK","icon":"code","pages":[{"title":"SDK","href":"/sdk/overview"}]}]},"basePath":"","title":"Quickstart - Hypermid","deploymentId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","buildId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","dynamics":[],"chunks":[]}