Skip to main content
POST
/
v1
/
credit
/
authorize
curl --request POST \
  --url https://sequencer.example.com/v1/credit/authorize \
  --header 'Content-Type: application/json' \
  --data '{
  "intent": {
    "version": 1,
    "agentId": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "agentPubKey": "0xabcdef1234567890abcdef1234567890abcdef12",
    "signatureScheme": "eip712-secp256k1",
    "agentNonce": "0",
    "amountMicros": "1000000",
    "merchantId": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
    "requiredChainRef": "eip155:8453",
    "expiresAt": "1735689600",
    "requestId": "0x9999888877776666555544443333222211110000aaaabbbbccccddddeeeeffff"
  },
  "agentSig": "0x123456789abcdef..."
}'
{
  "authorization": {
    "version": 1,
    "intentId": "0xaabbccdd11223344556677889900aabbccdd11223344556677889900aabbccdd",
    "authId": "0x1122334455667788990011223344556677889900112233445566778899001122",
    "authorizedAmountMicros": "1000000",
    "agentId": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "agentNonce": "0",
    "merchantId": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
    "chainRef": "eip155:8453",
    "issuedAt": "1735689000",
    "expiresAt": "1735689600",
    "sequencerEpochHint": "1",
    "logSeqNo": "42",
    "sequencerKeyId": "seq-key-1"
  },
  "sequencerSig": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
  "idempotent": false
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/nhestrompia/shielded-x402/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint validates and authorizes a payment intent, creating an authorization that can be executed by a relayer. The sequencer verifies the agent’s signature, checks their balance, and returns a signed authorization if successful.

Request body

intent
object
required
The payment intent to authorize.
agentSig
string
required
Hex-encoded signature of the intent by the agent’s private key.

Response

authorization
object
required
The signed authorization object.
sequencerSig
string
required
Hex-encoded Ed25519 signature of the authorization by the sequencer.
idempotent
boolean
required
Whether this response is idempotent (true if requestId was previously used with the same intent).

Error codes

CodeDescription
INVALID_REQUESTMalformed request payload or validation error
intent expiredIntent’s expiresAt timestamp has passed
unsupported requiredChainRefChain reference not supported by sequencer
invalid agent signatureAgent signature verification failed
agentId does not match agentPubKeyAgent ID doesn’t match the derived ID from public key
requestId already used for a different intentIdempotency key reused with different intent
invalid agent nonceNonce doesn’t match expected value
insufficient sequencer balanceAgent’s balance is insufficient for the payment
curl --request POST \
  --url https://sequencer.example.com/v1/credit/authorize \
  --header 'Content-Type: application/json' \
  --data '{
  "intent": {
    "version": 1,
    "agentId": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "agentPubKey": "0xabcdef1234567890abcdef1234567890abcdef12",
    "signatureScheme": "eip712-secp256k1",
    "agentNonce": "0",
    "amountMicros": "1000000",
    "merchantId": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
    "requiredChainRef": "eip155:8453",
    "expiresAt": "1735689600",
    "requestId": "0x9999888877776666555544443333222211110000aaaabbbbccccddddeeeeffff"
  },
  "agentSig": "0x123456789abcdef..."
}'
{
  "authorization": {
    "version": 1,
    "intentId": "0xaabbccdd11223344556677889900aabbccdd11223344556677889900aabbccdd",
    "authId": "0x1122334455667788990011223344556677889900112233445566778899001122",
    "authorizedAmountMicros": "1000000",
    "agentId": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "agentNonce": "0",
    "merchantId": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
    "chainRef": "eip155:8453",
    "issuedAt": "1735689000",
    "expiresAt": "1735689600",
    "sequencerEpochHint": "1",
    "logSeqNo": "42",
    "sequencerKeyId": "seq-key-1"
  },
  "sequencerSig": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
  "idempotent": false
}

Build docs developers (and LLMs) love