Mandates
A Mandate is the cardholder's recorded authorization to charge a saved Payment Method in the future — either a single time, or repeatedly. Mandates are created automatically when a customer consents during a SetupIntent or a PaymentIntent with setup_future_usage: "off_session"; you read them back when you need evidence of consent or when revoking. A card with no active Mandate cannot be charged off-session.
Each Mandate captures when the cardholder agreed and how: on the hosted page, the IP address and user-agent of the payer's own request; on a server-side SetupIntent confirm, what you stated in mandate_data, or offline when you stated nothing. It also holds the network transaction id of the saving transaction, which anchors every later merchant-initiated charge on the card.
The Mandate object
idstring- Unique identifier, prefixed
mdt_. objectstring- Always
"mandate". payment_methodstring- ID of the Payment Method this mandate authorizes.
customerstring- ID of the Customer that accepted.
typeenummulti_useorsingle_use. Multi-use mandates authorize an unbounded series of merchant-initiated charges.statusenumactive,pending, orinactive. Charges fail if status is notactive.customer_acceptanceobject- Evidence of consent. Includes
type("online"for hosted checkout;"offline"for out-of-band consent, and for a server-side confirm that stated none),accepted_at, and anonlinesub-object withip_addressanduser_agent, or null when offline. payment_method_detailsobject- Network metadata captured from the original cardholder-initiated charge. The
card.network_transaction_idis replayed on subsequent off-session charges to satisfy network rules for stored credentials. single_useobject- Always present;
nullunlesstypeissingle_use. When set, carries the maximumamountandcurrencythe mandate authorizes for one charge. livemodeboolean- Test or live mode.
1{2 "id": "mdt_01JQX...",3 "object": "mandate",4 "payment_method": "pm_01JQX...",5 "customer": "cus_01JQX...",6 "type": "multi_use",7 "status": "active",8 "customer_acceptance": {9 "type": "online",10 "accepted_at": "2026-04-07T18:30:00.000Z",11 "online": {12 "ip_address": "203.0.113.42",13 "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"14 }15 },16 "payment_method_details": {17 "card": {18 "network_transaction_id": "024PPGFD75NYZ",19 "eci": "05",20 "ds_transaction_id": "f25084f0-5b16-4c0a-ae5d-b24808a95e4b"21 }22 },23 "single_use": null,24 "livemode": false25}
- active
- Authorizes chargesUse this mandate when calling Payment Intents off-session.
- pending
- Awaiting first useCreated but no charge has used it yet.
- inactive
- Revoked or exhaustedSingle-use mandate consumed, or explicitly revoked. Will not authorize more charges.
Was this section helpful?
Retrieve a mandate
/v1/mandates/:idReturns a single mandate by id. Use this to confirm a customer's consent state before initiating an off-session charge.
Path parameters
idstringRequired- The mandate id, prefixed
mdt_.
Errors
401unauthorized- Bad signature, expired timestamp, or unknown key.
404not_found- Mandate doesn't exist or belongs to a different account.
1curl https://api.cxpay.net/v1/mandates/mdt_01JQX... \2 -H "X-Key-Id: ak_test_..." \3 -H "X-Signature: <base64-hmac>" \4 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \5 -H "X-Nonce: 550e8400-e29b-41d4-a716-446655440000" \6 -H "X-Body-Hash: <sha256-of-empty>"
1{2 "data": {3 "id": "mdt_01JQX...",4 "object": "mandate",5 "payment_method": "pm_01JQX...",6 "customer": "cus_01JQX...",7 "type": "multi_use",8 "status": "active",9 "customer_acceptance": {10 "type": "online",11 "accepted_at": "2026-04-07T18:30:00.000Z",12 "online": {13 "ip_address": "203.0.113.42",14 "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"15 }16 },17 "payment_method_details": {18 "card": {19 "network_transaction_id": "024PPGFD75NYZ",20 "eci": "05",21 "ds_transaction_id": "f25084f0-5b16-4c0a-ae5d-b24808a95e4b"22 }23 },24 "single_use": null,25 "livemode": false26 }27}
Was this section helpful?
List mandates
/v1/mandatesReturns mandates filtered by customer or payment method, newest first. Use this to audit which active authorizations exist before charging a saved card.
Query parameters
customerstring- Restrict the list to mandates accepted by a single customer.
payment_methodstring- Restrict the list to mandates that authorize a single saved card. Useful when you want to see if a PM still has any active authorization before reusing it.
limitinteger- 1–100, default 10.
cursorstring- Pagination cursor returned in the previous response.
1curl "https://api.cxpay.net/v1/mandates?customer=cus_01JQX...&limit=10" \2 -H "X-Key-Id: ak_test_..." \3 -H "X-Signature: <base64-hmac>" \4 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \5 -H "X-Nonce: 550e8400-..." \6 -H "X-Body-Hash: <sha256-of-empty>"
1{2 "data": [3 {4 "id": "mdt_01JQX...",5 "object": "mandate",6 "payment_method": "pm_01JQX...",7 "customer": "cus_01JQX...",8 "type": "multi_use",9 "status": "active",10 "customer_acceptance": {11 "type": "online",12 "accepted_at": "2026-04-07T18:30:00.000Z",13 "online": {14 "ip_address": "203.0.113.42",15 "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"16 }17 },18 "payment_method_details": {19 "card": {20 "network_transaction_id": "024PPGFD75NYZ",21 "eci": "05",22 "ds_transaction_id": "f25084f0-5b16-4c0a-ae5d-b24808a95e4b"23 }24 },25 "single_use": null,26 "livemode": false27 }28 ],29 "has_more": false,30 "next_cursor": null31}
Was this section helpful?
Revoke a mandate
/v1/mandates/:id/revokeMarks the mandate inactive. Revocation is terminal and cannot be reversed, and the request needs an Idempotency-Key header. Subsequent off-session charges that reference this mandate (directly, or via the payment method's most recent active mandate) are rejected. Use this when a customer cancels their subscription, requests to delete their card, or files a chargeback dispute that requires you to stop billing.
Not idempotent — revoking an already-inactive mandate returns an error (mandate already revoked).
Path parameters
idstringRequired- The mandate id.
Body parameters
reasonstring- Optional. Free-form note (max 200 chars) stored alongside the revocation for your audit trail. Not surfaced to the cardholder.
Errors
404not_found- Mandate doesn't exist.
409conflict- Mandate is already revoked or otherwise inactive — there is nothing to revoke.
1curl -X POST https://api.cxpay.net/v1/mandates/mdt_01JQX.../revoke \2 -H "X-Key-Id: ak_test_..." \3 -H "Idempotency-Key: 550e8400-..." \4 -H "X-Signature: <base64-hmac>" \5 -H "X-Timestamp: 2026-04-07T18:30:00.000Z" \6 -H "X-Nonce: 550e8400-..." \7 -H "X-Body-Hash: <sha256-of-body>" \8 -H "Content-Type: application/json" \9 -d '{ "reason": "Customer canceled subscription" }'
1{2 "data": {3 "id": "mdt_01JQX...",4 "object": "mandate",5 "payment_method": "pm_01JQX...",6 "customer": "cus_01JQX...",7 "type": "multi_use",8 "status": "inactive",9 "customer_acceptance": {10 "type": "online",11 "accepted_at": "2026-04-07T18:30:00.000Z",12 "online": {13 "ip_address": "203.0.113.42",14 "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"15 }16 },17 "payment_method_details": {18 "card": {19 "network_transaction_id": "024PPGFD75NYZ",20 "eci": "05",21 "ds_transaction_id": "f25084f0-5b16-4c0a-ae5d-b24808a95e4b"22 }23 },24 "single_use": null,25 "livemode": false26 }27}
Was this section helpful?
- Need help? Contact Support.
- Check out our changelog.
- Questions? Contact Sales.
- LLM? Read llms.txt.
Powered by CX Pay