Capped spending envelopes for pay-per-call commerce. Both prerequisites are off by default: mandates need a provider, on-chain dispatch must be enabled.
x402 is a pattern for machine-to-machine payments: a service answers 402 Payment Required, the agent pays, the service delivers. Charging per call makes per-action human approval impractical, so SouthPay uses session mandates. A human authorizes a capped envelope once, and the agent draws against it call by call under local, deterministic enforcement.Both resources are REST-only, under the x402:read and x402:write scopes. Neither is exposed as an MCP tool.
Two things are off by default
Read this before building against x402. On a store with no configuration, the flow does not run at all, and even with it running the money does not leave the chain-side.Mandate issuance requires an authorization provider.POST /agentic/mandates returns 403 mandate_required unless a provider is configured for the store. There is no API to configure one and no dashboard toggle. SouthPay support sets it per store. Because a settlement needs a usable mandate, POST /agentic/x402/settlements is blocked by the same wall. On a default store, every x402 write returns 403.On-chain dispatch is off by default. Settlements are a ledger accrual, not a transfer. SouthPay broadcasts a settlement on-chain only when all of the following hold:
on-chain dispatch is enabled for the store, which is off unless SouthPay staff turn it on;
the settlement is in live mode, since test-mode settlements are never dispatched;
amount_atomic is non-zero;
pay_to is set, since a settlement without one is failed with reason missing_pay_to.
With dispatch off, a settlement stays submitted indefinitely and tx_ref stays null. The spend is real on SouthPay’s internal ledger, reducing the store balance and the mandate envelope, but no on-chain transfer exists. Do not treat submitted as settlement finality, and do not release goods against it.
Polling a submitted settlement for confirmed on a store without on-chain dispatch is an infinite loop. Confirm dispatch is enabled with your SouthPay contact before you build a state machine that waits on it.
How the flow runs
Issuance is verified once through the store’s authorization provider. Every subsequent draw is enforced locally against the envelope’s caps and the store balance, with no per-call round trip to the provider.
Required. Your reference for the session; settlements name the mandate by this
total_cap_atomic
Required, must be positive. Envelope total in atomic units
per_call_cap_atomic
Optional per-settlement cap
expires_in_seconds
Defaults to 3600
scope
Defaults to x402
mandate_ref is unique per credential and issuance is idempotent on it: posting the same mandate_ref again returns the existing mandate rather than creating a second one or raising a conflict.Failures: 403 mandate_required with no provider, 403 authorization_denied when a provider evaluates and refuses, 404 asset_not_found, 422 invalid_cap for a non-positive total, 422 mandate_ref_required.A mandate is usable while status is active, it has not expired, and remaining_atomic is positive.
Status
Meaning
active
Usable
revoked
Withdrawn before expiry
expired
Past expires_at
exhausted
A draw consumed the last of the envelope
GET /agentic/mandates lists the credential’s mandates, capped at the 100 most recent. GET /agentic/mandates/:id fetches one.
Settle a charge
Each paid call becomes one settlement drawing on the mandate.
Idempotency-Key is required; without it the request is refused with 422 idempotency_key_required. Retrying with the same key returns the original settlement, with the normal 201.nonce defaults to a random 32-character hex value. payer and requirements, the service’s own 402 payment requirements stored for audit, are optional.amount_atomic must not be negative, and zero is accepted. A zero-amount settlement records the call against the mandate without drawing on the envelope, and is never dispatched on-chain.Under a row lock on the mandate, each settlement:
confirms the mandate is usable, otherwise 403 mandate_required;
enforces the per-call cap and the remaining envelope, otherwise 403 spend_cap_exceeded;
confirms the store balance covers the amount, otherwise 422 insufficient_balance;
records the debit on the double-entry ledger and increments spent_atomic, flipping the mandate to exhausted if that consumes the envelope.
GET /agentic/x402/settlements lists settlements with a pagination envelope (page, per_page default 25 max 100, total, total_pages). GET /agentic/x402/settlements/:id fetches one.
Settlement status
Status
Meaning
pending
Created but not yet enforced
submitted
Enforced against the envelope and recorded on the ledger. Not an on-chain transfer
confirmed
On-chain transfer confirmed. Only reachable with on-chain dispatch enabled, in live mode
failed
Dispatch failed; failure_reason is set. Same preconditions
confirmed and failed are terminal. Without on-chain dispatch a settlement finishes its life as submitted, which is the state most integrations will see today.If dispatch is enabled for your store, tx_ref carries the provider transaction reference once broadcast. Dispatch is keyed deterministically per settlement, so a retry cannot double-send.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SouthPay","description":"SouthPay is a crypto payment gateway. Accept crypto payments, settle in local currency, and automate payouts, refunds, subscriptions, and reconciliation through a single REST API.","colors":{"primary":"#4253FE","light":"#7C88FF","dark":"#2E3BC7"},"logo":{"light":"https://mintcdn.com/southpay/siqj39Y58OcrXGmq/logo/light.png?fit=max\u0026auto=format\u0026n=siqj39Y58OcrXGmq\u0026q=85\u0026s=2f89e17f5621667c01d2acac4db40a29","dark":"https://mintcdn.com/southpay/siqj39Y58OcrXGmq/logo/dark.png?fit=max\u0026auto=format\u0026n=siqj39Y58OcrXGmq\u0026q=85\u0026s=d1256efd147a0bb2d609e0f9154b9224","href":"https://docs.southpay.io"},"favicon":"https://mintcdn.com/southpay/KxWIxXC1x5XnT64O/favicon.png?fit=max\u0026auto=format\u0026n=KxWIxXC1x5XnT64O\u0026q=85\u0026s=ee66035ef69eea99bd714e36bd2895e5","appearance":{"default":"system","strict":false},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"/changelog","label":"Changelog"},{"icon":"life-ring","href":"mailto:[email protected]","label":"Support"},{"href":"https://github.com/southpay","type":"github"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.southpay.io"}},"footer":{"socials":{"website":"https://southpay.io","github":"https://github.com/southpay","linkedin":"https://linkedin.com/company/southpay"},"links":[{"header":"Get started","items":[{"label":"Quickstart","href":"/quickstart"},{"label":"Authentication","href":"/authentication"},{"label":"Environments","href":"/environments"},{"label":"Errors","href":"/errors"}]},{"header":"API reference","items":[{"label":"Payments","href":"/api-reference/payments"},{"label":"Payouts","href":"/api-reference/payouts"},{"label":"Balances","href":"/api-reference/balances"},{"label":"Webhook endpoints","href":"/api-reference/webhook-endpoints"}]},{"header":"SouthPay","items":[{"label":"Dashboard","href":"https://app.southpay.io"},{"label":"Changelog","href":"/changelog"},{"label":"Support","href":"mailto:[email protected]"}]}]},"search":{"prompt":"Search payments, webhooks, payouts, and API reference"},"seo":{"metatags":{"og:type":"website","og:site_name":"SouthPay Documentation","twitter:card":"summary_large_image"},"organization":{"name":"SouthPay","url":"https://southpay.io","sameAs":["https://github.com/southpay","https://linkedin.com/company/southpay"]},"indexing":"navigable"},"fonts":{"heading":{"family":"Inter Tight","weight":600},"body":{"family":"Inter","weight":400}},"icons":{"library":"fontawesome"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"github-light-default","dark":"github-dark-default"}},"latex":false},"errors":{"404":{"redirect":false,"title":"Page not found","description":"This page moved or never existed. Start from the [quickstart](/quickstart), browse the [API reference](/api-reference/payments), or search from the top of the page."}},"contextual":{"options":["copy","view","assistant","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"thumbnails":{"appearance":"dark","fonts":{"family":"Inter Tight"}},"metadata":{"timestamp":true},"markdown":{"instructions":["The SouthPay REST API is served from https://api.southpay.io/api/v2. Always keep the /api/v2 prefix on request paths.","SouthPay has separate test and live modes. API keys are scoped to one mode and are prefixed test_ or live_. Use test mode unless the user explicitly asks for live.","Send an Idempotency-Key header on every request that creates or moves money so retries cannot double-charge."]},"navigation":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://docs.southpay.io"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"southpay","hasAudioNarration":false,"actualSubdomain":"southpay","customDomains":["docs.southpay.io"],"gitSource":{"type":"github","owner":"southpay","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"edits":true,"thumbs":true,"agentFeedback":true},"entitlements":{},"buildId":"6aaaf6b9ce044cc021e16c6e","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"Guides","count":28},{"language":"default","tag":"API Reference","count":13},{"language":"default","tag":"Agentic commerce","count":6},{"language":"default","tag":"Getting started","count":5},{"language":"default","tag":"Building reliably","count":4},{"language":"default","tag":"Core resources","count":4},{"language":"default","tag":"Payments","count":3},{"language":"default","tag":"Checkout","count":3},{"language":"default","tag":"Balances","count":2},{"language":"default","tag":"Billing","count":2}]},"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":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"mdx-content pre{line-height:1.55}mdx-content pre code{font-size:0.8125rem;font-variant-ligatures:none;font-variant-numeric:tabular-nums lining-nums;tab-size:2}mdx-content :not(pre)>code{font-size:0.875em;overflow-wrap:anywhere}code-block+code-block,code-group+code-group{margin-top:1.25rem}mdx-content table{width:100%;font-variant-numeric:tabular-nums lining-nums}mdx-content th,mdx-content td{padding-top:0.5rem;padding-bottom:0.5rem;vertical-align:top}mdx-content th{font-weight:600;white-space:nowrap}mdx-content th code,mdx-content td:first-child code{white-space:nowrap}callout{display:block;margin-top:1.25rem;margin-bottom:1.25rem}callout p:first-child{margin-top:0}callout p:last-child,step p:last-child,field p:last-child{margin-bottom:0}callout pre{margin-top:0.75rem;margin-bottom:0}field{font-variant-numeric:tabular-nums lining-nums}expandable field{margin-top:0.25rem}#page-title,mdx-content h2,mdx-content h3{letter-spacing:-0.015em}"}]}
{"page":{"pagePath":"agentic/x402","slug":"/agentic/x402","pageMetadata":{"title":"x402 and session mandates","description":"Capped spending envelopes for pay-per-call commerce. Both prerequisites are off by default: mandates need a provider, on-chain dispatch must be enabled.","sidebarTitle":"x402 mandates","href":"/agentic/x402"},"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: \"Capped spending envelopes for pay-per-call commerce. Both prerequisites are off by default: mandates need a provider, on-chain dispatch must be enabled.\"\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`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Mermaid,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`x402 is a pattern for machine-to-machine payments: a service answers `,_jsx(_components.code,{children:`402 Payment Required`}),`, the agent pays, the service delivers. Charging per call makes per-action human approval impractical, so SouthPay uses `,_jsx(_components.strong,{children:`session mandates`}),`. A human authorizes a capped envelope once, and the agent draws against it call by call under local, deterministic enforcement.`]}),`\n`,_jsxs(_components.p,{children:[`Both resources are REST-only, under the `,_jsx(_components.code,{children:`x402:read`}),` and `,_jsx(_components.code,{children:`x402:write`}),` scopes. Neither is exposed as an MCP tool.`]}),`\n`,_jsx(Heading,{level:`2`,id:`two-things-are-off-by-default`,children:`Two things are off by default`}),`\n`,_jsx(_components.p,{children:`Read this before building against x402. On a store with no configuration, the flow does not run at all, and even with it running the money does not leave the chain-side.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Mandate issuance requires an authorization provider.`}),` `,_jsx(_components.code,{children:`POST /agentic/mandates`}),` returns `,_jsx(_components.code,{children:`403 mandate_required`}),` unless a provider is configured for the store. There is no API to configure one and no dashboard toggle. SouthPay support sets it per store. Because a settlement needs a usable mandate, `,_jsx(_components.code,{children:`POST /agentic/x402/settlements`}),` is blocked by the same wall. On a default store, every x402 write returns `,_jsx(_components.code,{children:`403`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`On-chain dispatch is off by default.`}),` Settlements are a ledger accrual, not a transfer. SouthPay broadcasts a settlement on-chain only when all of the following hold:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`on-chain dispatch is enabled for the store, which is off unless SouthPay staff turn it on;`}),`\n`,_jsxs(_components.li,{children:[`the settlement is in `,_jsx(_components.strong,{children:`live mode`}),`, since test-mode settlements are never dispatched;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`amount_atomic`}),` is non-zero;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`pay_to`}),` is set, since a settlement without one is failed with reason `,_jsx(_components.code,{children:`missing_pay_to`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`With dispatch off, a settlement stays `,_jsx(_components.code,{children:`submitted`}),` indefinitely and `,_jsx(_components.code,{children:`tx_ref`}),` stays `,_jsx(_components.code,{children:`null`}),`. The spend is real on SouthPay’s internal ledger, reducing the store balance and the mandate envelope, but no on-chain transfer exists. Do not treat `,_jsx(_components.code,{children:`submitted`}),` as settlement finality, and do not release goods against it.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Polling a `,_jsx(_components.code,{children:`submitted`}),` settlement for `,_jsx(_components.code,{children:`confirmed`}),` on a store without on-chain dispatch is an infinite loop. Confirm dispatch is enabled with your SouthPay contact before you build a state machine that waits on it.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`how-the-flow-runs`,children:`How the flow runs`}),`\n`,_jsx(Mermaid,{chart:`sequenceDiagram\n participant Principal as Human principal\n participant Agent\n participant SouthPay\n participant Service as Paid service\n\n Principal->>Agent: Authorizes a mandate (via the provider)\n Agent->>SouthPay: POST /agentic/mandates (X-Mandate, caps)\n SouthPay-->>Agent: Session mandate (active, envelope)\n loop Per paid call\n Service-->>Agent: 402 Payment Required\n Agent->>SouthPay: POST /agentic/x402/settlements (mandate_ref)\n SouthPay->>SouthPay: Enforce caps, debit the ledger\n SouthPay-->>Agent: Settlement (submitted)\n Agent->>Service: Retry with payment proof\n end`}),`\n`,_jsxs(_components.p,{children:[`Issuance is verified once through the store’s `,_jsx(_components.a,{href:`/agentic/authorization`,children:`authorization provider`}),`. Every subsequent draw is enforced locally against the envelope’s caps and the store balance, with no per-call round trip to the provider.`]}),`\n`,_jsx(Heading,{level:`2`,id:`issue-a-session-mandate`,children:`Issue a session mandate`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Request`,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default github-dark-default`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0d1117`,color:`#1f2328`,\"--shiki-dark\":`#e6edf3`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#FFA657`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` https://api.southpay.io/api/v2/agentic/mandates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"Authorization: Bearer spa_live_...\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"X-Mandate: \u003cbase64 presentation>\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"asset_id\": \"ETH_USDC\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"mandate_ref\": \"research-session-42\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"total_cap_atomic\": \"5000000\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"per_call_cap_atomic\": \"250000\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"expires_in_seconds\": 3600`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Response 201`,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default github-dark-default`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0d1117`,color:`#1f2328`,\"--shiki-dark\":`#e6edf3`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"a3e91c47-08bd-4f52-9b17-6c2ad4e0f831\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"scope\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"x402\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"mandate_ref\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"research-session-42\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"asset_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"ETH_USDC\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"total_cap_atomic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"5000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"per_call_cap_atomic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"250000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"spent_atomic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"remaining_atomic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"5000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"authorization_provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"humanos\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"2026-07-12T13:00:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"revoked_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"livemode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"2026-07-12T12:00:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"updated_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"2026-07-12T12:00:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`}`})}),`\n`]})})})]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`asset_id`})}),_jsx(_components.td,{children:`Required. The asset the envelope spends`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mandate_ref`})}),_jsx(_components.td,{children:`Required. Your reference for the session; settlements name the mandate by this`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`total_cap_atomic`})}),_jsx(_components.td,{children:`Required, must be positive. Envelope total in atomic units`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`per_call_cap_atomic`})}),_jsx(_components.td,{children:`Optional per-settlement cap`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`expires_in_seconds`})}),_jsx(_components.td,{children:`Defaults to 3600`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scope`})}),_jsxs(_components.td,{children:[`Defaults to `,_jsx(_components.code,{children:`x402`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`mandate_ref`}),` is unique per credential and issuance is idempotent on it: posting the same `,_jsx(_components.code,{children:`mandate_ref`}),` again returns the existing mandate rather than creating a second one or raising a conflict.`]}),`\n`,_jsxs(_components.p,{children:[`Failures: `,_jsx(_components.code,{children:`403 mandate_required`}),` with no provider, `,_jsx(_components.code,{children:`403 authorization_denied`}),` when a provider evaluates and refuses, `,_jsx(_components.code,{children:`404 asset_not_found`}),`, `,_jsx(_components.code,{children:`422 invalid_cap`}),` for a non-positive total, `,_jsx(_components.code,{children:`422 mandate_ref_required`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`A mandate is usable while `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`active`}),`, it has not expired, and `,_jsx(_components.code,{children:`remaining_atomic`}),` is positive.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`active`})}),_jsx(_components.td,{children:`Usable`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`revoked`})}),_jsx(_components.td,{children:`Withdrawn before expiry`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`expired`})}),_jsxs(_components.td,{children:[`Past `,_jsx(_components.code,{children:`expires_at`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`exhausted`})}),_jsx(_components.td,{children:`A draw consumed the last of the envelope`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GET /agentic/mandates`}),` lists the credential’s mandates, capped at the 100 most recent. `,_jsx(_components.code,{children:`GET /agentic/mandates/:id`}),` fetches one.`]}),`\n`,_jsx(Heading,{level:`2`,id:`settle-a-charge`,children:`Settle a charge`}),`\n`,_jsx(_components.p,{children:`Each paid call becomes one settlement drawing on the mandate.`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Request`,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default github-dark-default`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0d1117`,color:`#1f2328`,\"--shiki-dark\":`#e6edf3`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#FFA657`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` https://api.southpay.io/api/v2/agentic/x402/settlements`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"Authorization: Bearer spa_live_...\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"Idempotency-Key: research-session-42-call-007\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#FF7B72`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"asset_id\": \"ETH_USDC\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"mandate_ref\": \"research-session-42\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"amount_atomic\": \"120000\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"pay_to\": \"0x9aB4c17E3f8025dA61b7C4e09fD3a5528b1c0E67\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` \"nonce\": \"a1b2c3d4e5f6a7b8\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Response 201`,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default github-dark-default`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0d1117`,color:`#1f2328`,\"--shiki-dark\":`#e6edf3`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"6c84b0d2-95f1-4a37-8e5b-1d70c9a4f2e8\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"submitted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"amount_atomic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"120000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"asset_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"ETH_USDC\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"mandate_ref\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"research-session-42\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"nonce\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"a1b2c3d4e5f6a7b8\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"pay_to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"0x9aB4c17E3f8025dA61b7C4e09fD3a5528b1c0E67\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"payer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"tx_ref\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"failure_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"livemode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#79C0FF`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"2026-07-12T12:04:11.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#7EE787`},children:` \"updated_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#A5D6FF`},children:`\"2026-07-12T12:04:11.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#E6EDF3`},children:`}`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Idempotency-Key`}),` is required; without it the request is refused with `,_jsx(_components.code,{children:`422 idempotency_key_required`}),`. Retrying with the same key returns the original settlement, with the normal `,_jsx(_components.code,{children:`201`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`nonce`}),` defaults to a random 32-character hex value. `,_jsx(_components.code,{children:`payer`}),` and `,_jsx(_components.code,{children:`requirements`}),`, the service’s own 402 payment requirements stored for audit, are optional.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`amount_atomic`}),` must not be negative, and `,_jsx(_components.strong,{children:`zero is accepted`}),`. A zero-amount settlement records the call against the mandate without drawing on the envelope, and is never dispatched on-chain.`]}),`\n`,_jsx(_components.p,{children:`Under a row lock on the mandate, each settlement:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`confirms the mandate is usable, otherwise `,_jsx(_components.code,{children:`403 mandate_required`}),`;`]}),`\n`,_jsxs(_components.li,{children:[`enforces the per-call cap and the remaining envelope, otherwise `,_jsx(_components.code,{children:`403 spend_cap_exceeded`}),`;`]}),`\n`,_jsxs(_components.li,{children:[`confirms the store balance covers the amount, otherwise `,_jsx(_components.code,{children:`422 insufficient_balance`}),`;`]}),`\n`,_jsxs(_components.li,{children:[`records the debit on the double-entry ledger and increments `,_jsx(_components.code,{children:`spent_atomic`}),`, flipping the mandate to `,_jsx(_components.code,{children:`exhausted`}),` if that consumes the envelope.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GET /agentic/x402/settlements`}),` lists settlements with a `,_jsx(_components.code,{children:`pagination`}),` envelope (`,_jsx(_components.code,{children:`page`}),`, `,_jsx(_components.code,{children:`per_page`}),` default 25 max 100, `,_jsx(_components.code,{children:`total`}),`, `,_jsx(_components.code,{children:`total_pages`}),`). `,_jsx(_components.code,{children:`GET /agentic/x402/settlements/:id`}),` fetches one.`]}),`\n`,_jsx(Heading,{level:`2`,id:`settlement-status`,children:`Settlement status`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pending`})}),_jsx(_components.td,{children:`Created but not yet enforced`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`submitted`})}),_jsxs(_components.td,{children:[`Enforced against the envelope and recorded on the ledger. `,_jsx(_components.strong,{children:`Not an on-chain transfer`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`confirmed`})}),_jsx(_components.td,{children:`On-chain transfer confirmed. Only reachable with on-chain dispatch enabled, in live mode`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failed`})}),_jsxs(_components.td,{children:[`Dispatch failed; `,_jsx(_components.code,{children:`failure_reason`}),` is set. Same preconditions`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`confirmed`}),` and `,_jsx(_components.code,{children:`failed`}),` are terminal. Without on-chain dispatch a settlement finishes its life as `,_jsx(_components.code,{children:`submitted`}),`, which is the state most integrations will see today.`]}),`\n`,_jsxs(_components.p,{children:[`If dispatch is enabled for your store, `,_jsx(_components.code,{children:`tx_ref`}),` carries the provider transaction reference once broadcast. Dispatch is keyed deterministically per settlement, so a retry cannot double-send.`]})]})}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-default","dark":"github-dark-default"}},"config":{},"pageMetadata":{"title":"x402 and session mandates","description":"Capped spending envelopes for pay-per-call commerce. Both prerequisites are off by default: mandates need a provider, on-chain dispatch must be enabled.","sidebarTitle":"x402 mandates","href":"/agentic/x402"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Two things are off by default","slug":"two-things-are-off-by-default","depth":2,"children":[]},{"title":"How the flow runs","slug":"how-the-flow-runs","depth":2,"children":[]},{"title":"Issue a session mandate","slug":"issue-a-session-mandate","depth":2,"children":[]},{"title":"Settle a charge","slug":"settle-a-charge","depth":2,"children":[]},{"title":"Settlement status","slug":"settlement-status","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"southpay","siteName":"SouthPay","title":"x402 and session mandates - SouthPay","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-21T06:53:31.138Z","gitLastModified":"2026-08-21T06:51:35.000Z","originalFileLocation":"agentic/x402.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=\"Capped spending envelopes for pay-per-call commerce. Both prerequisites are off by default: mandates need a provider, on-chain dispatch must be enabled.\">\u003cmeta data-mint-head name=\"application-name\" content=\"SouthPay\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/southpay/sd5RGNiL-OnsFgk-/_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/southpay/sd5RGNiL-OnsFgk-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/southpay/sd5RGNiL-OnsFgk-/_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/southpay/sd5RGNiL-OnsFgk-/_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/southpay/sd5RGNiL-OnsFgk-/_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/southpay/sd5RGNiL-OnsFgk-/_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/southpay/sd5RGNiL-OnsFgk-/_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/southpay/sd5RGNiL-OnsFgk-/_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/southpay/sd5RGNiL-OnsFgk-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"x402 and session mandates - SouthPay\">\u003cmeta data-mint-head property=\"og:description\" content=\"Capped spending envelopes for pay-per-call commerce. Both prerequisites are off by default: mandates need a provider, on-chain dispatch must be enabled.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SouthPay Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.southpay.io/agentic/x402\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://southpay.mintlify.site/_mintlify/api/og/v2?division=Agentic+commerce\u0026amp;title=x402+and+session+mandates\u0026amp;description=Capped+spending+envelopes+for+pay-per-call+commerce.+Both+prerequisites+are+off+by+default%3A+mandates+need+a+provider%2C+on-chain+dispatch+must+be+enabled.\u0026amp;theme=d1352f396f68b98399002a50\u0026amp;signature=54225882c86a5ac2e79f8254d14ed8f86726ff70b6c66b8c46b6a75682969528\">\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=\"x402 and session mandates - SouthPay\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Capped spending envelopes for pay-per-call commerce. Both prerequisites are off by default: mandates need a provider, on-chain dispatch must be enabled.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://southpay.mintlify.site/_mintlify/api/og/v2?division=Agentic+commerce\u0026amp;title=x402+and+session+mandates\u0026amp;description=Capped+spending+envelopes+for+pay-per-call+commerce.+Both+prerequisites+are+off+by+default%3A+mandates+need+a+provider%2C+on-chain+dispatch+must+be+enabled.\u0026amp;theme=d1352f396f68b98399002a50\u0026amp;signature=54225882c86a5ac2e79f8254d14ed8f86726ff70b6c66b8c46b6a75682969528\">\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/southpay/sd5RGNiL-OnsFgk-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SouthPay\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4253FE\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.southpay.io/agentic/x402\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/agentic/x402.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://southpay.io/#organization\",\"name\":\"SouthPay\",\"url\":\"https://southpay.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/southpay/siqj39Y58OcrXGmq/logo/light.png?fit=max\u0026auto=format\u0026n=siqj39Y58OcrXGmq\u0026q=85\u0026s=2f89e17f5621667c01d2acac4db40a29\"},\"sameAs\":[\"https://github.com/southpay\",\"https://linkedin.com/company/southpay\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.southpay.io#website\",\"name\":\"SouthPay\",\"url\":\"https://docs.southpay.io\",\"publisher\":{\"@id\":\"https://southpay.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.southpay.io/agentic/x402#webpage\",\"url\":\"https://docs.southpay.io/agentic/x402\",\"name\":\"x402 and session mandates\",\"description\":\"Capped spending envelopes for pay-per-call commerce. Both prerequisites are off by default: mandates need a provider, on-chain dispatch must be enabled.\",\"dateModified\":\"2026-08-21T06:51:35.000Z\",\"isPartOf\":{\"@id\":\"https://docs.southpay.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.southpay.io/agentic/x402#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.southpay.io/agentic/x402#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Agentic commerce\",\"item\":\"https://docs.southpay.io/agentic\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"x402 and session mandates\",\"item\":\"https://docs.southpay.io/agentic/x402\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.southpay.io/agentic/x402#article\",\"headline\":\"x402 and session mandates\",\"name\":\"x402 and session mandates\",\"description\":\"Capped spending envelopes for pay-per-call commerce. Both prerequisites are off by default: mandates need a provider, on-chain dispatch must be enabled.\",\"url\":\"https://docs.southpay.io/agentic/x402\",\"mainEntityOfPage\":{\"@id\":\"https://docs.southpay.io/agentic/x402#webpage\"},\"dateModified\":\"2026-08-21T06:51:35.000Z\",\"publisher\":{\"@id\":\"https://southpay.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.southpay.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SouthPay\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"SouthPay\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/agentic/x402.md","siteName":"SouthPay","nav":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://docs.southpay.io"}]},"tabs":[{"tab":"Guides","pages":[{"group":"Getting started","pages":[{"title":"SouthPay","sidebarTitle":"Introduction","href":""},{"title":"Quickstart","href":"/quickstart"},{"title":"Environments","href":"/environments"},{"title":"Sepolia test wallet","href":"/sepolia-wallet"},{"title":"Supported currencies and assets","href":"/currencies"}]},{"group":"Authentication","pages":[{"title":"Authentication","href":"/authentication"},{"title":"Registering an OAuth app","sidebarTitle":"OAuth apps","href":"/oauth-apps"}]},{"group":"Core resources","pages":[{"title":"Payment intents","href":"/payment-intents"},{"title":"Payment lifecycle","href":"/payment-lifecycle"},{"title":"Webhooks","href":"/webhooks"},{"title":"Payout destinations","href":"/payout-destinations"}]},{"group":"Recurring","pages":[{"title":"Subscriptions","href":"/subscriptions"}]},{"group":"Checkout","pages":[{"title":"Checkout widget","href":"/checkout-widget"},{"title":"Custom checkout","href":"/custom-checkout"},{"title":"Card payments","href":"/card-payments"}]},{"group":"Agentic commerce","pages":[{"title":"Agentic commerce","sidebarTitle":"Overview","href":"/agentic/index"},{"title":"Agentic quickstart","sidebarTitle":"Quickstart","href":"/agentic/quickstart"},{"title":"Agent credentials","href":"/agentic/agent-credentials"},{"title":"Agent authorization","href":"/agentic/authorization"},{"title":"MCP server","description":"Connect an MCP client to mcp.southpay.io: bearer keys, browser login, error handling, and the 19 tools with their parameters and defaults.","href":"/agentic/mcp-server"},{"title":"x402 and session mandates","sidebarTitle":"x402 mandates","href":"/agentic/x402"}]},{"group":"Platform","pages":[{"title":"Platform accounts","description":"Onboard your own merchants onto SouthPay, take a fee on everything they process, and manage them from one integration.","sidebarTitle":"Platform accounts","href":"/platform-accounts"}]},{"group":"Integrations","pages":[{"title":"SouthPay for n8n","sidebarTitle":"n8n","href":"/integrations/n8n"}]},{"group":"Building reliably","pages":[{"title":"Idempotency","href":"/idempotency"},{"title":"Errors","href":"/errors"},{"title":"Rate limits","href":"/rate-limits"},{"title":"Best practices","href":"/best-practices"}]},{"group":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/payments"}]}]},"basePath":"","title":"x402 and session mandates - SouthPay","deploymentId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","buildId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","dynamics":[],"chunks":[]}