Skip to main content
POST
Cancel an x402 spend mandate (BETA)

Authorizations

x-api-key
string
header
required

Headers

x-idempotency-key
string<uuid>
required

Unique key to ensure request idempotency. If the same key is used within a certain time window, the original response will be returned instead of executing the request again.

Path Parameters

payment_agent_id
string
required
mandate_id
string
required

Response

The mandate, cancelled

id
string
required
agent_id
string
required
wallet_id
string
required
asset
string
required
network
string
required
max_per_call
string
required
window_seconds
integer
required
payee_policy
object
required

What an x402 mandate may pay for, beyond its budget. Omit the whole object to leave the budget as the only control. mode is required when the object is present, and the list must match it: address_allowlist needs addresses and reads no domains, domain_allowlist needs domains and reads no addresses, and any_screened enforces neither, so it carries no list. A policy that breaks those rules is refused with a 400 rather than stored as a restriction nothing applies. any_screened accepts any payee that passes address screening. address_allowlist pins the payee address itself. domain_allowlist pins the RESOURCE host the caller names when it asks for a signature - the readable form, since an operator approves "any metered API under this vendor's domain" rather than a hex address. Note that it bounds the resource, not the payee: a seller who prices one resource can be paid for it whatever address it nominates.

valid_from
string<date-time>
required
valid_until
string<date-time>
required
max_per_window
string
max_calls_per_window
integer
revoked_at
string<date-time>

When the mandate was cancelled, or replaced by a newer mandate for the same asset and network. A revoked mandate authorizes nothing.

window_committed
string

Spend already committed on this mandate's budget in the window ending now, in atomic units: every authorization from the agent's x402 wallet in this asset and network over this mandate's window_seconds, whichever mandate issued it, counting outstanding holds as well as settled ones. It is the budget's figure, not this mandate's own: a replaced or cancelled mandate shows the same spend as the mandate in force, so never add it up across mandates.

window_calls
integer

Authorizations already issued in the current window, counted the same way as window_committed.