Usually you don’t need this call. Every payable session already carries continue_url, the standard checkout handoff: send that to the buyer and it opens this same payment page with no credential. Use this endpoint when you want the payment page’s own URL and expiry.
Returns a hosted payment page for a priced checkout session. Send its URL to the buyer: they pay with a card, Apple Pay or Google Pay, with no Gomry account and no sign-in code, and the tickets are issued when they pay.Use it when your agent cannot mint a Stripe Shared Payment Token for Complete Checkout Session. It is a Gomry extension to the Agentic Commerce Protocol: a strict ACP client never sees it unless it asks for it.
Requires checkout: write, with the same credentials as every other checkout endpoint: an organization API key, a self-registered agent token, a Personal Agent Protocol session, or a signed-in person’s OAuth token granted checkout:write, or none at all for a session created without one. Only the credential that created the session can make its link.
The session must be ready_for_payment with a total above zero. A free order needs no payment: call complete with no payment_data.
Fills or replaces the session’s buyer. The payment page is prefilled with this email, and the receipt and tickets are sent to it. Required here if the session has no buyer yet (a signed-in person’s token defaults to their verified email).
open (payable now), paid (tickets issued), refunded (paid or held, but the order could no longer be honoured, so the money was given back), or expired.
Poll Get Checkout Session (every few seconds while the buyer is paying is fine):
What you read
What happened
status: "completed" and an order
Paid and issued. Show the buyer order.permalink_url; the tickets are emailed too.
payment_link.status: "refunded"
The buyer paid, but the cart could not be sold (sold out, the price moved while they paid, or the organizer requires 3D Secure and the bank did not confirm the payment). Nothing was issued, and the buyer was refunded in full or never charged. refund_reason says which, and why.
payment_link.status: "expired"
Nobody paid in time. Ask for a new link.
Nothing is held while the buyer is on the page, so price, availability and the organizer’s required answers are checked again when they pay.When the organizer requires 3D Secure, the page only holds the buyer’s card. The money is taken after the bank’s answer and the cart are checked; otherwise the hold is released and the buyer is never charged. A virtual card (for example one a personal agent gets from a Link wallet) may not pass 3D Secure, so send the buyer continue_url to pay with their own card.
Asking again while the link is open and the total is unchanged returns the same link. If the cart changed, you get a new link and the old one stops accepting payment. Updating the session to a different total also closes an open link, so a buyer can never pay a stale amount.Canceling the session closes its link. A payment that lands at the same instant is refunded.
Already paid, canceled, expired, free, or not ready (a required answer or address is missing). Read the session.
amount_mismatch
409
The total changed since your last read. Re-read the session, confirm it with your buyer, then ask again.
sold_out
409
Inventory went while the session was open.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Gomry API","colors":{"primary":"#000000","light":"#FFFFFF","dark":"#FFFFFF"},"logo":{"light":"https://mintcdn.com/gomry/jDJp3Wqzn5wDGgQC/images/logo-light.png?fit=max\u0026auto=format\u0026n=jDJp3Wqzn5wDGgQC\u0026q=85\u0026s=f219d76acf24de2d111ed934cfcb6606","dark":"https://mintcdn.com/gomry/jDJp3Wqzn5wDGgQC/images/logo-dark.png?fit=max\u0026auto=format\u0026n=jDJp3Wqzn5wDGgQC\u0026q=85\u0026s=72b9aee24c65cf76a8c0f17f88337855"},"favicon":"https://mintcdn.com/gomry/jDJp3Wqzn5wDGgQC/favicon.ico?fit=max\u0026auto=format\u0026n=jDJp3Wqzn5wDGgQC\u0026q=85\u0026s=a81575b3950229a1b14b4260130ce0bf","api":{"mdx":{"auth":{"method":"key","name":"X-API-KEY"},"server":"https://www.gomry.com/api/v1"}},"navbar":{"links":[{"href":"https://www.gomry.com","label":"Dashboard"}]},"footer":{"socials":{"website":"https://gomry.com","linkedin":"https://www.linkedin.com/company/gomry"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gomry","hasAudioNarration":false,"actualSubdomain":"gomry","customDomains":["docs.gomry.com"],"gitSource":{"type":"github","owner":"gomryhq","repo":"gomry","deployBranch":"master","contentDirectory":"docs/api-reference","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af244c4aca47732df184a7c","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Documentation","count":93},{"language":"default","tag":"Platform API","count":65},{"language":"default","tag":"Commerce API","count":16},{"language":"default","tag":"Retail Vendor API","count":12},{"language":"default","tag":"Getting Started","count":8},{"language":"default","tag":"Checkout Sessions","count":7},{"language":"default","tag":"Contacts","count":6},{"language":"default","tag":"Webhooks","count":6},{"language":"default","tag":"Attendees","count":5},{"language":"default","tag":"Events","count":5}]},"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":"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":"llms-txt-v2","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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/checkout-sessions/create-payment-link","slug":"/api-reference/checkout-sessions/create-payment-link","pageMetadata":{"title":"Create Payment Link","api":"POST /checkout_sessions/{checkout_session_id}/payment_link","description":"A hosted page the buyer pays on, for agents that cannot mint a payment token","href":"/api-reference/checkout-sessions/create-payment-link"},"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: \"A hosted page the buyer pays on, for agents that cannot mint a payment token\"\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`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseField,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`create-payment-link`,children:`Create Payment Link`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Usually you don’t need this call.`}),` Every payable session already carries `,_jsx(_components.code,{children:`continue_url`}),`, the standard checkout handoff: send that to the buyer and it opens this same payment page with no credential. Use this endpoint when you want the payment page’s own URL and expiry.`]})}),`\n`,_jsxs(_components.p,{children:[`Returns a hosted payment page for a priced checkout session. Send its URL to the buyer: they pay with a card, Apple Pay or Google Pay, with `,_jsx(_components.strong,{children:`no Gomry account and no sign-in code`}),`, and the tickets are issued when they pay.`]}),`\n`,_jsxs(_components.p,{children:[`Use it when your agent cannot mint a Stripe Shared Payment Token for `,_jsx(_components.a,{href:`/api-reference/checkout-sessions/complete-checkout-session`,children:`Complete Checkout Session`}),`. It is a Gomry extension to the Agentic Commerce Protocol: a strict ACP client never sees it unless it asks for it.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Requires `,_jsx(_components.code,{children:`checkout: write`}),`, with the same credentials as every other checkout endpoint: an organization API key, a self-registered agent token, a Personal Agent Protocol session, or a signed-in person’s OAuth token granted `,_jsx(_components.code,{children:`checkout:write`}),`, or none at all for a session created without one. Only the credential that created the session can make its link.`]})}),`\n`,_jsxs(_components.p,{children:[`The session must be `,_jsx(_components.code,{children:`ready_for_payment`}),` with a total above zero. A free order needs no payment: call `,_jsx(_components.code,{children:`complete`}),` with no `,_jsx(_components.code,{children:`payment_data`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`checkout_session_id`,type:`string`,required:true,id:`param-checkout-session-id`,children:_jsx(_components.p,{children:`The session to pay.`})}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(_components.p,{children:`The body is optional.`}),`\n`,_jsx(ParamField,{body:`buyer`,type:`object`,id:`param-buyer`,children:_jsx(_components.p,{children:`Fills or replaces the session’s buyer. The payment page is prefilled with this email, and the receipt and tickets are sent to it. Required here if the session has no buyer yet (a signed-in person’s token defaults to their verified email).`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`200`}),` with the `,_jsx(_components.a,{href:`/api-reference/checkout-sessions/get-checkout-session#response`,children:`session`}),`, carrying `,_jsx(_components.code,{children:`payment_link`}),`:`]}),`\n`,_jsx(ResponseField,{name:`payment_link`,type:`object`,id:`param-payment-link`,children:_jsxs(Expandable,{title:`Payment link`,children:[_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`open`}),` (payable now), `,_jsx(_components.code,{children:`paid`}),` (tickets issued), `,_jsx(_components.code,{children:`refunded`}),` (paid or held, but the order could no longer be honoured, so the money was given back), or `,_jsx(_components.code,{children:`expired`}),`.`]})}),_jsx(ResponseField,{name:`url`,type:`string`,id:`param-url`,children:_jsxs(_components.p,{children:[`The page to send the buyer. Present only while `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`open`}),`.`]})}),_jsx(ResponseField,{name:`amount`,type:`integer`,id:`param-amount`,children:_jsx(_components.p,{children:`Minor units: exactly the session total, fees included.`})}),_jsx(ResponseField,{name:`currency`,type:`string`,id:`param-currency`,children:_jsx(_components.p,{children:`The session currency.`})}),_jsx(ResponseField,{name:`expires_at`,type:`string`,id:`param-expires-at`,children:_jsx(_components.p,{children:`When the link stops accepting payment. Links are open for one hour.`})}),_jsx(ResponseField,{name:`refund_reason`,type:`string`,id:`param-refund-reason`,children:_jsxs(_components.p,{children:[`What happened to the buyer’s money (refunded in full, or never charged) and why. Present only when `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`refunded`}),`.`]})})]})}),`\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:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"payment_link\"`}),_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:`\"open\"`}),_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://checkout.stripe.com/c/pay/cs_live_...\"`}),_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:` \"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1465`}),_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:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"usd\"`}),_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:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-14T18:00:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`after-the-buyer-pays`,children:`After the buyer pays`}),`\n`,_jsxs(_components.p,{children:[`Poll `,_jsx(_components.a,{href:`/api-reference/checkout-sessions/get-checkout-session`,children:`Get Checkout Session`}),` (every few seconds while the buyer is paying is fine):`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`What you read`}),_jsx(_components.th,{children:`What happened`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`status: \"completed\"`}),` and an `,_jsx(_components.code,{children:`order`})]}),_jsxs(_components.td,{children:[`Paid and issued. Show the buyer `,_jsx(_components.code,{children:`order.permalink_url`}),`; the tickets are emailed too.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`payment_link.status: \"refunded\"`})}),_jsxs(_components.td,{children:[`The buyer paid, but the cart could not be sold (sold out, the price moved while they paid, or the organizer requires 3D Secure and the bank did not confirm the payment). Nothing was issued, and the buyer was refunded in full or never charged. `,_jsx(_components.code,{children:`refund_reason`}),` says which, and why.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`payment_link.status: \"expired\"`})}),_jsx(_components.td,{children:`Nobody paid in time. Ask for a new link.`})]})]})]}),`\n`,_jsx(_components.p,{children:`Nothing is held while the buyer is on the page, so price, availability and the organizer’s required answers are checked again when they pay.`}),`\n`,_jsxs(_components.p,{children:[`When the organizer requires 3D Secure, the page only holds the buyer’s card. The money is taken after the bank’s answer and the cart are checked; otherwise the hold is released and the buyer is never charged. A virtual card (for example one a personal agent gets from a Link wallet) may not pass 3D Secure, so send the buyer `,_jsx(_components.code,{children:`continue_url`}),` to pay with their own card.`]}),`\n`,_jsx(Heading,{level:`2`,id:`calling-it-again`,children:`Calling it again`}),`\n`,_jsxs(_components.p,{children:[`Asking again while the link is open and the total is unchanged returns `,_jsx(_components.strong,{children:`the same link`}),`. If the cart changed, you get a new link and the old one stops accepting payment. Updating the session to a different total also closes an open link, so a buyer can never pay a stale amount.`]}),`\n`,_jsx(_components.p,{children:`Canceling the session closes its link. A payment that lands at the same instant is refunded.`}),`\n`,_jsx(Heading,{level:`2`,id:`failures`,children:`Failures`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_body`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[`No buyer email (`,_jsx(_components.code,{children:`$.buyer.email`}),`). Send `,_jsx(_components.code,{children:`buyer`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`invalid_session_state`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:`Already paid, canceled, expired, free, or not ready (a required answer or address is missing). Read the session.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount_mismatch`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:`The total changed since your last read. Re-read the session, confirm it with your buyer, then ask again.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sold_out`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:`Inventory went while the session was open.`})]})]})]})]})}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":"Create Payment Link","api":"POST /checkout_sessions/{checkout_session_id}/payment_link","description":"A hosted page the buyer pays on, for agents that cannot mint a payment token","href":"/api-reference/checkout-sessions/create-payment-link"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Create Payment Link","slug":"create-payment-link","depth":1,"children":[]},{"title":"Path Parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Body","slug":"body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"After the buyer pays","slug":"after-the-buyer-pays","depth":2,"children":[]},{"title":"Calling it again","slug":"calling-it-again","depth":2,"children":[]},{"title":"Failures","slug":"failures","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Create Payment Link","path":"/checkout_sessions/{checkout_session_id}/payment_link","servers":[{"url":"https://www.gomry.com/api/v1"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"X-API-KEY":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{"checkout_session_id":{"schema":[{"type":"string","description":"The session to pay.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"buyer":[{"type":"object","properties":{},"description":"Fills or replaces the session’s buyer. The payment page is prefilled with this email, and the receipt and tickets are sent to it. Required here if the session has no buyer yet (a signed-in person’s token defaults to their verified email)."}]}}],"examples":{"example":{"value":{"buyer":{}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"payment_link":[{"type":"object","properties":{"status":[{"type":"string","description":"`open` (payable now), `paid` (tickets issued), `refunded` (paid or held, but the order could no longer be honoured, so the money was given back), or `expired` ."}],"url":[{"type":"string","description":"The page to send the buyer. Present only while `status` is `open` ."}],"amount":[{"type":"integer","description":"Minor units: exactly the session total, fees included."}],"currency":[{"type":"string","description":"The session currency."}],"expires_at":[{"type":"string","description":"When the link stops accepting payment. Links are open for one hour."}],"refund_reason":[{"type":"string","description":"What happened to the buyer’s money (refunded in full, or never charged) and why. Present only when `status` is `refunded` ."}]}}]}}],"examples":{"example":{"value":{"payment_link":{"status":"\u003cstring>","url":"\u003cstring>","amount":123,"currency":"\u003cstring>","expires_at":"\u003cstring>","refund_reason":"\u003cstring>"}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"gomry","siteName":"Gomry API","title":"Create Payment Link - Gomry API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T23:41:01.495Z","originalFileLocation":"api-reference/checkout-sessions/create-payment-link.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=\"A hosted page the buyer pays on, for agents that cannot mint a payment token\">\u003cmeta data-mint-head name=\"application-name\" content=\"Gomry 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/gomry/bqp84X4_mSd9jp4X/_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/gomry/bqp84X4_mSd9jp4X/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gomry/bqp84X4_mSd9jp4X/_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/gomry/bqp84X4_mSd9jp4X/_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/gomry/bqp84X4_mSd9jp4X/_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/gomry/bqp84X4_mSd9jp4X/_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/gomry/bqp84X4_mSd9jp4X/_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/gomry/bqp84X4_mSd9jp4X/_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/gomry/bqp84X4_mSd9jp4X/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Payment Link - Gomry API\">\u003cmeta data-mint-head property=\"og:description\" content=\"A hosted page the buyer pays on, for agents that cannot mint a payment token\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Gomry API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gomry.com/api-reference/checkout-sessions/create-payment-link\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gomry.mintlify.site/_mintlify/api/og/v2?division=Checkout+Sessions\u0026amp;title=Create+Payment+Link\u0026amp;description=A+hosted+page+the+buyer+pays+on%2C+for+agents+that+cannot+mint+a+payment+token\u0026amp;theme=ca1b6992667328742845d162\u0026amp;signature=1d961357ccd60b5d4d5a5896603fff147884e197970b76f9f75c20a218205ef4\">\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=\"Create Payment Link - Gomry API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"A hosted page the buyer pays on, for agents that cannot mint a payment token\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gomry.mintlify.site/_mintlify/api/og/v2?division=Checkout+Sessions\u0026amp;title=Create+Payment+Link\u0026amp;description=A+hosted+page+the+buyer+pays+on%2C+for+agents+that+cannot+mint+a+payment+token\u0026amp;theme=ca1b6992667328742845d162\u0026amp;signature=1d961357ccd60b5d4d5a5896603fff147884e197970b76f9f75c20a218205ef4\">\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/gomry/bqp84X4_mSd9jp4X/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Gomry API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gomry.com/api-reference/checkout-sessions/create-payment-link\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/checkout-sessions/create-payment-link.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gomry.com/#organization\",\"name\":\"Gomry API\",\"url\":\"https://docs.gomry.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gomry/jDJp3Wqzn5wDGgQC/images/logo-light.png?fit=max\u0026auto=format\u0026n=jDJp3Wqzn5wDGgQC\u0026q=85\u0026s=f219d76acf24de2d111ed934cfcb6606\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gomry.com#website\",\"name\":\"Gomry API\",\"url\":\"https://docs.gomry.com\",\"publisher\":{\"@id\":\"https://docs.gomry.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gomry.com/api-reference/checkout-sessions/create-payment-link#webpage\",\"url\":\"https://docs.gomry.com/api-reference/checkout-sessions/create-payment-link\",\"name\":\"Create Payment Link\",\"description\":\"A hosted page the buyer pays on, for agents that cannot mint a payment token\",\"dateModified\":\"2026-10-23T23:41:01.495Z\",\"isPartOf\":{\"@id\":\"https://docs.gomry.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gomry.com/api-reference/checkout-sessions/create-payment-link#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gomry.com/api-reference/checkout-sessions/create-payment-link#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Checkout Sessions\",\"item\":\"https://docs.gomry.com/api-reference/checkout-sessions/create-checkout-session\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Payment Link\",\"item\":\"https://docs.gomry.com/api-reference/checkout-sessions/create-payment-link\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.gomry.com/api-reference/checkout-sessions/create-payment-link#apireference\",\"headline\":\"Create Payment Link\",\"name\":\"Create Payment Link\",\"description\":\"A hosted page the buyer pays on, for agents that cannot mint a payment token\",\"url\":\"https://docs.gomry.com/api-reference/checkout-sessions/create-payment-link\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gomry.com/api-reference/checkout-sessions/create-payment-link#webpage\"},\"dateModified\":\"2026-10-23T23:41:01.495Z\",\"publisher\":{\"@id\":\"https://docs.gomry.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gomry.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Gomry API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Gomry API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/checkout-sessions/create-payment-link.md","siteName":"Gomry API","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","tabs":[{"tab":"Platform API","pages":[{"title":"Platform API","href":"/introduction"}]},{"tab":"Commerce API","groups":[{"group":"Getting Started","pages":[{"title":"Agentic Commerce","href":"/commerce/introduction"},{"title":"Checkout Errors","href":"/commerce/errors"}]},{"group":"Catalog","pages":[{"title":"List Catalog Events","api":"GET /catalog/events","href":"/api-reference/catalog/list-catalog-events"},{"title":"Get Catalog Event","api":"GET /catalog/events/{event_id}","href":"/api-reference/catalog/get-catalog-event"},{"title":"Get Product Feed","api":"GET /catalog/feed","href":"/api-reference/catalog/get-product-feed"}]},{"group":"Checkout Sessions","pages":[{"title":"Create Checkout Session","api":"POST /checkout_sessions","href":"/api-reference/checkout-sessions/create-checkout-session"},{"title":"Get Checkout Session","api":"GET /checkout_sessions/{checkout_session_id}","href":"/api-reference/checkout-sessions/get-checkout-session"},{"title":"Update Checkout Session","api":"POST /checkout_sessions/{checkout_session_id}","href":"/api-reference/checkout-sessions/update-checkout-session"},{"title":"Complete Checkout Session","api":"POST /checkout_sessions/{checkout_session_id}/complete","description":"Charge the delegated payment token and issue tickets","href":"/api-reference/checkout-sessions/complete-checkout-session"},{"title":"Create Payment Link","api":"POST /checkout_sessions/{checkout_session_id}/payment_link","href":"/api-reference/checkout-sessions/create-payment-link"},{"title":"Continue Checkout (buyer)","api":"GET /checkout_sessions/{checkout_session_id}/payment_link","description":"What a session's continue_url opens: the buyer's way to pay, with no credential","href":"/api-reference/checkout-sessions/continue-checkout"},{"title":"Cancel Checkout Session","api":"POST /checkout_sessions/{checkout_session_id}/cancel","href":"/api-reference/checkout-sessions/cancel-checkout-session"}]},{"group":"Personal agents: my account","pages":[{"title":"List My Tickets","api":"GET /me/tickets","href":"/api-reference/me/list-my-tickets"},{"title":"List My Orders","api":"GET /me/orders","href":"/api-reference/me/list-my-orders"},{"title":"Transfer My Ticket","api":"POST /me/tickets/{ticket_id}/transfer","href":"/api-reference/me/transfer-my-ticket"},{"title":"Cancel My Ticket Transfer","api":"DELETE /me/tickets/{ticket_id}/transfer","href":"/api-reference/me/cancel-my-ticket-transfer"}]}]},{"tab":"Retail Vendor API","pages":[{"title":"Retail Vendor API","href":"/vendor-api/introduction"}]}]},{"anchor":"Support","icon":"envelope","href":"mailto:support@gomry.com"}]},"basePath":"","title":"Create Payment Link - Gomry API","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js"]}