Skip to main content
POST
Sign an x402 payment authorization (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

Body

application/json
payment_requirements
object
required

One payment option from a seller's 402 response, forwarded verbatim. Field names are the x402 protocol's own, not Dakota's. Both protocol versions are accepted: v1 terms carry maxAmountRequired, v2 terms carry amount and a CAIP-2 network.

resource_url
string

The 402-metered URL being paid for. Required when the mandate restricts payees by domain.

x402_version
enum<integer>

The x402 version the seller spoke — x402Version in its 402 response. Decides how the signed payment is packaged: v1 as the X-PAYMENT header, v2 as PAYMENT-SIGNATURE. Defaults to 1.

Available options:
1,
2

Response

The signed payment authorization

payment_header
string
required

The payment header's value — base64 of the payment payload — to send in the header named by payment_header_name.

payment_header_name
enum<string>
required

The request header the seller expects the payment in: X-PAYMENT for x402 v1, PAYMENT-SIGNATURE for v2.

Available options:
X-PAYMENT,
PAYMENT-SIGNATURE
signature
string
required
authorization_id
string
required

The hold this authorization is recorded against.

mandate_id
string
required
payer
string
required
pay_to
string
required
value
string
required
nonce
string
required
valid_before
string<date-time>
required
window_committed
string
required

Committed spend in the mandate's window after this authorization.