Understand the proposed Stellar upto scheme, Soroban contract, callbacks, and release boundary.
upto lets a buyer authorize a maximum while the facilitator settles the
actual amount. It is intended for metered APIs. Stellar’s implementation ships
a Soroban settlement contract because a bare SEP-41 allowance cannot provide
the required recipient binding and terminal single-settlement behavior.
The Stellar upto scheme is implemented in this repository and has testnet
evidence, but it is not yet a released upstream @x402/stellar scheme. Do
not describe it as canonical upstream support until the x402 TSC merge lands.
verifies terminal allowance and balance/event invariants.
actual may be zero, partial, or equal to the maximum. Zero settlement still
submits a contract transaction so the host nonce is consumed and the
authorization cannot later be reused for a non-zero amount.
The signed authorization binds payer, recipient, token, maximum, network,
settlement contract, facilitator, settlement identifier, optional hook, and the
ledger validity window. Stellar validity uses ledgers rather than wall-clock
timestamps. The allowance expiration must cover the contract deadline, and the
contract deadline must cover settlement execution; the signature expiration is
derived from the seller’s maximum timeout.
The optional versioned settlement hook receives a structured settlement notice.
It fires for zero settlement too. A hook failure reverts the payer’s own
transaction; the payer chose the hook and accepts that availability risk. The
facilitator’s enforcing simulation includes hook execution in the fee gate, so
an expensive hook is rejected before sponsorship. The contract rechecks balance
and allowance invariants after the callback. The settlement contract and token
contract cannot be selected as hooks.For an OpenZeppelin smart account, use two context rules: one for the outer
settlement call and one for the nested SEP-41 approve call. A reconciling
spending policy can reserve max_amount during authorization and release the
unused amount when the contract reports actual. The process budget, signed
maximum, and on-chain policy remain independent ceilings.
Testnet evidence covers zero, partial, maximum, replay, concurrency, custom
accounts, hooks, and real OpenZeppelin policy authorization. The remaining
release gates are SDF/TSC review, upstream reusable client merge, audited
contract deployment, issued-USDC coverage, and pubnet transaction evidence.See upto conformance for hashes and the precise
release boundary.
Last modified on August 10, 2026
{"docsConfig":{"theme":"palm","$schema":"https://mintlify.com/docs.json","name":"openx402","description":"Build and operate x402 payments on Stellar with openx402.","colors":{"primary":"#704E00","light":"#FFD21C","dark":"#8A6500"},"logo":{"light":"https://mintcdn.com/stellarx402/7Fu7E6ptb1jAnw5D/logo/light.svg?fit=max\u0026auto=format\u0026n=7Fu7E6ptb1jAnw5D\u0026q=85\u0026s=5e70d719c997dd2939361bea077b5415","dark":"https://mintcdn.com/stellarx402/7Fu7E6ptb1jAnw5D/logo/dark.svg?fit=max\u0026auto=format\u0026n=7Fu7E6ptb1jAnw5D\u0026q=85\u0026s=89d8126be76c1c6ee75593fc8bfd3428","href":"/"},"favicon":"https://mintcdn.com/stellarx402/7Fu7E6ptb1jAnw5D/favicon.svg?fit=max\u0026auto=format\u0026n=7Fu7E6ptb1jAnw5D\u0026q=85\u0026s=9267f87dd56954f32090c402ae44f270","api":{"playground":{"display":"interactive","proxy":true},"examples":{"defaults":"required","languages":["curl","javascript","python"]}},"appearance":{"default":"system","strict":false},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"https://github.com/Ithaca-Labs/openx402","type":"github"}],"primary":{"type":"button","label":"Start building","href":"/quickstart"}},"footer":{"socials":{"github":"https://github.com/Ithaca-Labs/openx402"}},"search":{"prompt":"Search openx402 docs..."},"seo":{"indexing":"navigable"},"fonts":{"family":"Archivo"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":false},"banner":{"content":"Testnet preview: Stellar `exact` is live; `upto` remains proposed and pubnet is gated. [Review release status](/operations/security#pubnet).","dismissible":true,"type":"warning"},"errors":{"404":{"redirect":false,"title":"Page not found","description":"This openx402 documentation page does not exist."}},"contextual":{"options":["copy","view","chatgpt","claude","cursor","vscode"],"display":"header"},"interaction":{"drilldown":false},"metadata":{"timestamp":true},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/Ithaca-Labs/openx402"},{"anchor":"Bazaar SDK","icon":"package","href":"https://www.npmjs.com/package/@openx402/bazaar-sdk"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"stellarx402","hasAudioNarration":false,"actualSubdomain":"stellarx402","customDomains":["docs.stellarx402.xyz"],"gitSource":{"type":"github","owner":"ithaca-labs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a8948e110d98b516f3d7cd5","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Documentation","count":22},{"language":"default","tag":"API Reference","count":13},{"language":"default","tag":"Reference","count":7},{"language":"default","tag":"Discover","count":5},{"language":"default","tag":"SDK","count":5},{"language":"default","tag":"Upto (proposed)","count":4},{"language":"default","tag":"Analytics","count":4},{"language":"default","tag":"Integrate","count":3},{"language":"default","tag":"Operate","count":3},{"language":"default","tag":"Bazaar discovery","count":3}]},"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":"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},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"concepts/upto","slug":"/concepts/upto","pageMetadata":{"title":"Upto payments","description":"Understand the proposed Stellar upto scheme, Soroban contract, callbacks, and release boundary.","sidebarTitle":"Upto","keywords":["upto Stellar","Soroban settlement contract","metered payments","settlement hook"],"href":"/concepts/upto"},"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: \"Understand the proposed Stellar upto scheme, Soroban contract, callbacks, and release boundary.\"\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`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,..._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:[_jsx(_components.code,{children:`upto`}),` lets a buyer authorize a maximum while the facilitator settles the\nactual amount. It is intended for metered APIs. Stellar’s implementation ships\na Soroban settlement contract because a bare SEP-41 allowance cannot provide\nthe required recipient binding and terminal single-settlement behavior.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The Stellar `,_jsx(_components.code,{children:`upto`}),` scheme is implemented in this repository and has testnet\nevidence, but it is not yet a released upstream `,_jsx(_components.code,{children:`@x402/stellar`}),` scheme. Do\nnot describe it as canonical upstream support until the x402 TSC merge lands.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`atomic-settlement`,children:`Atomic settlement`}),`\n`,_jsx(_components.p,{children:`The contract atomically:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`consumes an approval for exactly `,_jsx(_components.code,{children:`max_amount`}),`;`]}),`\n`,_jsx(_components.li,{children:`pulls the maximum from the payer;`}),`\n`,_jsxs(_components.li,{children:[`transfers `,_jsx(_components.code,{children:`actual`}),` to `,_jsx(_components.code,{children:`payTo`}),`;`]}),`\n`,_jsxs(_components.li,{children:[`refunds `,_jsx(_components.code,{children:`max_amount - actual`}),`; and`]}),`\n`,_jsx(_components.li,{children:`verifies terminal allowance and balance/event invariants.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`actual`}),` may be zero, partial, or equal to the maximum. Zero settlement still\nsubmits a contract transaction so the host nonce is consumed and the\nauthorization cannot later be reused for a non-zero amount.`]}),`\n`,_jsx(Heading,{level:`2`,id:`binding-and-validity`,children:`Binding and validity`}),`\n`,_jsx(_components.p,{children:`The signed authorization binds payer, recipient, token, maximum, network,\nsettlement contract, facilitator, settlement identifier, optional hook, and the\nledger validity window. Stellar validity uses ledgers rather than wall-clock\ntimestamps. The allowance expiration must cover the contract deadline, and the\ncontract deadline must cover settlement execution; the signature expiration is\nderived from the seller’s maximum timeout.`}),`\n`,_jsx(Heading,{level:`2`,id:`client-usage`,children:`Client usage`}),`\n`,_jsx(_components.p,{children:`The temporary reusable package has the upstream-shaped interfaces:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { x402Client } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"@x402/core/client\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { HTTPFacilitatorClient } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"@x402/core/http\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { createEd25519Signer } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"@x402/stellar\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { UptoStellarScheme } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"@openx402/stellar-upto/client\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` facilitator`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` HTTPFacilitatorClient`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` url: process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`FACILITATOR_URL`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`!`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` client`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` x402Client`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`().`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`register`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"stellar:testnet\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` UptoStellarScheme`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` createEd25519Signer`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`BUYER_SECRET_KEY`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`!`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"stellar:testnet\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { facilitatorClient: facilitator },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The wire payload remains `,_jsx(_components.code,{children:`{ transaction }`}),`. No new x402 JSON field is added.`]}),`\n`,_jsx(Heading,{level:`2`,id:`hooks-and-smart-account-budgets`,children:`Hooks and smart-account budgets`}),`\n`,_jsx(_components.p,{children:`The optional versioned settlement hook receives a structured settlement notice.\nIt fires for zero settlement too. A hook failure reverts the payer’s own\ntransaction; the payer chose the hook and accepts that availability risk. The\nfacilitator’s enforcing simulation includes hook execution in the fee gate, so\nan expensive hook is rejected before sponsorship. The contract rechecks balance\nand allowance invariants after the callback. The settlement contract and token\ncontract cannot be selected as hooks.`}),`\n`,_jsxs(_components.p,{children:[`For an OpenZeppelin smart account, use two context rules: one for the outer\nsettlement call and one for the nested SEP-41 `,_jsx(_components.code,{children:`approve`}),` call. A reconciling\nspending policy can reserve `,_jsx(_components.code,{children:`max_amount`}),` during authorization and release the\nunused amount when the contract reports `,_jsx(_components.code,{children:`actual`}),`. The process budget, signed\nmaximum, and on-chain policy remain independent ceilings.`]}),`\n`,_jsx(Heading,{level:`2`,id:`current-evidence-and-gaps`,children:`Current evidence and gaps`}),`\n`,_jsx(_components.p,{children:`Testnet evidence covers zero, partial, maximum, replay, concurrency, custom\naccounts, hooks, and real OpenZeppelin policy authorization. The remaining\nrelease gates are SDF/TSC review, upstream reusable client merge, audited\ncontract deployment, issued-USDC coverage, and pubnet transaction evidence.`}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/reference/upto-conformance`,children:`upto conformance`}),` for hashes and the precise\nrelease boundary.`]})]})}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":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Upto payments","description":"Understand the proposed Stellar upto scheme, Soroban contract, callbacks, and release boundary.","sidebarTitle":"Upto","keywords":["upto Stellar","Soroban settlement contract","metered payments","settlement hook"],"href":"/concepts/upto"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Atomic settlement","slug":"atomic-settlement","depth":2,"children":[]},{"title":"Binding and validity","slug":"binding-and-validity","depth":2,"children":[]},{"title":"Client usage","slug":"client-usage","depth":2,"children":[]},{"title":"Hooks and smart-account budgets","slug":"hooks-and-smart-account-budgets","depth":2,"children":[]},{"title":"Current evidence and gaps","slug":"current-evidence-and-gaps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"stellarx402","siteName":"openx402","title":"Upto payments - openx402","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-10T21:10:31.113Z","gitLastModified":"2026-08-10T21:09:06.000Z","originalFileLocation":"concepts/upto.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=\"Understand the proposed Stellar upto scheme, Soroban contract, callbacks, and release boundary.\">\u003cmeta data-mint-head name=\"application-name\" content=\"openx402\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/stellarx402/mIQ_ptPDfOgNwzVV/_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/stellarx402/mIQ_ptPDfOgNwzVV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/stellarx402/mIQ_ptPDfOgNwzVV/_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/stellarx402/mIQ_ptPDfOgNwzVV/_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/stellarx402/mIQ_ptPDfOgNwzVV/_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/stellarx402/mIQ_ptPDfOgNwzVV/_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/stellarx402/mIQ_ptPDfOgNwzVV/_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/stellarx402/mIQ_ptPDfOgNwzVV/_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/stellarx402/mIQ_ptPDfOgNwzVV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upto payments - openx402\">\u003cmeta data-mint-head property=\"og:description\" content=\"Understand the proposed Stellar upto scheme, Soroban contract, callbacks, and release boundary.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"openx402\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.stellarx402.xyz/concepts/upto\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://stellarx402.mintlify.site/_mintlify/api/og/v2?division=Upto+%28proposed%29\u0026amp;title=Upto+payments\u0026amp;description=Understand+the+proposed+Stellar+upto+scheme%2C+Soroban+contract%2C+callbacks%2C+and+release+boundary.\u0026amp;theme=992c395eb32dbfd7c99fc350\u0026amp;signature=8ca3261268b8b2f2f53acb2341c24a1fd54672ef2e6d3ac15e0b6ae7b86e466b\">\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=\"Upto payments - openx402\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Understand the proposed Stellar upto scheme, Soroban contract, callbacks, and release boundary.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://stellarx402.mintlify.site/_mintlify/api/og/v2?division=Upto+%28proposed%29\u0026amp;title=Upto+payments\u0026amp;description=Understand+the+proposed+Stellar+upto+scheme%2C+Soroban+contract%2C+callbacks%2C+and+release+boundary.\u0026amp;theme=992c395eb32dbfd7c99fc350\u0026amp;signature=8ca3261268b8b2f2f53acb2341c24a1fd54672ef2e6d3ac15e0b6ae7b86e466b\">\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/stellarx402/mIQ_ptPDfOgNwzVV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"openx402\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#704E00\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.stellarx402.xyz/concepts/upto\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/concepts/upto.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.stellarx402.xyz/#organization\",\"name\":\"openx402\",\"url\":\"https://docs.stellarx402.xyz\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/stellarx402/7Fu7E6ptb1jAnw5D/logo/light.svg?fit=max\u0026auto=format\u0026n=7Fu7E6ptb1jAnw5D\u0026q=85\u0026s=5e70d719c997dd2939361bea077b5415\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.stellarx402.xyz#website\",\"name\":\"openx402\",\"url\":\"https://docs.stellarx402.xyz\",\"publisher\":{\"@id\":\"https://docs.stellarx402.xyz/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.stellarx402.xyz/concepts/upto#webpage\",\"url\":\"https://docs.stellarx402.xyz/concepts/upto\",\"name\":\"Upto payments\",\"description\":\"Understand the proposed Stellar upto scheme, Soroban contract, callbacks, and release boundary.\",\"dateModified\":\"2026-08-10T21:09:06.000Z\",\"isPartOf\":{\"@id\":\"https://docs.stellarx402.xyz#website\"},\"breadcrumb\":{\"@id\":\"https://docs.stellarx402.xyz/concepts/upto#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.stellarx402.xyz/concepts/upto#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Upto (proposed)\",\"item\":\"https://docs.stellarx402.xyz/guides/upto\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upto payments\",\"item\":\"https://docs.stellarx402.xyz/concepts/upto\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.stellarx402.xyz/concepts/upto#article\",\"headline\":\"Upto payments\",\"name\":\"Upto payments\",\"description\":\"Understand the proposed Stellar upto scheme, Soroban contract, callbacks, and release boundary.\",\"url\":\"https://docs.stellarx402.xyz/concepts/upto\",\"mainEntityOfPage\":{\"@id\":\"https://docs.stellarx402.xyz/concepts/upto#webpage\"},\"dateModified\":\"2026-08-10T21:09:06.000Z\",\"keywords\":\"upto Stellar, Soroban settlement contract, metered payments, settlement hook\",\"publisher\":{\"@id\":\"https://docs.stellarx402.xyz/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.stellarx402.xyz#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"openx402\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"openx402","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/Ithaca-Labs/openx402"},{"anchor":"Bazaar SDK","icon":"package","href":"https://www.npmjs.com/package/@openx402/bazaar-sdk"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Getting started","pages":[{"title":"Stellar payments for the open web","href":""},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/quickstart"}]},{"group":"Build","pages":[{"title":"Build a paid HTTP seller","sidebarTitle":"HTTP seller","href":"/guides/http-seller"},{"title":"Seller SDK","sidebarTitle":"Seller SDK","href":"/guides/seller-sdk"},{"title":"Pay a Stellar x402 resource","sidebarTitle":"Buyer client","href":"/guides/buyer-client"},{"title":"Embedded facilitator","sidebarTitle":"Embedded facilitator","href":"/guides/embedded-facilitator"},{"title":"MCP sellers and agents","sidebarTitle":"MCP sellers and agents","href":"/guides/mcp"}]},{"group":"Discover","pages":[{"title":"Bazaar metadata and discovery","sidebarTitle":"Bazaar discovery","href":"/concepts/bazaar"},{"title":"Catalog lifecycle","sidebarTitle":"Catalog lifecycle","href":"/concepts/catalog-lifecycle"},{"title":"Search and indexing","sidebarTitle":"Search and indexing","href":"/concepts/search"},{"title":"Search evaluation","sidebarTitle":"Evaluation","href":"/concepts/evaluation"},{"title":"Evaluation workflow","sidebarTitle":"Evaluation workflow","href":"/concepts/evaluation-workflow"}]},{"group":"Protocol","pages":[{"title":"Exact payments","sidebarTitle":"Exact","href":"/concepts/exact"}]},{"group":"Upto (proposed)","pages":[{"title":"Build with Stellar upto","description":"Authorize a maximum, settle actual usage, and reconcile the remainder through the proposed Soroban-backed Stellar scheme.","sidebarTitle":"Build with upto","href":"/guides/upto"},{"title":"Upto payments","sidebarTitle":"Upto","href":"/concepts/upto"},{"title":"Smart accounts and spending policies","description":"Compose Stellar x402 payments with OpenZeppelin C-account context rules and reconciling policies.","sidebarTitle":"Smart accounts","href":"/concepts/smart-accounts"},{"title":"Upto conformance","sidebarTitle":"Upto conformance","href":"/reference/upto-conformance"}]},{"group":"Operate","pages":[{"title":"Self-host openx402","sidebarTitle":"Self-hosting","href":"/operations/self-hosting"},{"title":"Security","href":"/operations/security"},{"title":"Troubleshooting","href":"/operations/troubleshooting"}]},{"group":"Reference","pages":[{"title":"HTTP API reference","sidebarTitle":"HTTP API","href":"/reference/api"},{"title":"Analytics API","sidebarTitle":"Analytics API","href":"/reference/analytics"},{"title":"Configuration reference","sidebarTitle":"Configuration","href":"/reference/configuration"},{"title":"MCP tool reference","sidebarTitle":"MCP tools","href":"/reference/mcp-tools"},{"title":"Seller SDK reference","sidebarTitle":"SDK surface","href":"/reference/sdk-surface"},{"title":"Storage and recovery","sidebarTitle":"Storage","href":"/reference/storage"},{"title":"CLI and maintenance commands","sidebarTitle":"CLI","href":"/reference/cli"}]}]},{"tab":"Architecture","pages":[{"title":"Architecture","href":"/architecture/overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/health/check-liveness"}]},{"tab":"SDK","pages":[{"title":"SDK","href":"/guides/seller-sdk"}]}]},"basePath":"","title":"Upto payments - openx402","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["10e4515597"],"chunks":["BannerMarkdown-DV-WToSZ.js","dist-CBUH0-zX.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-CR-RHrVC.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}