Skip to main content
POST
/
api
/
settle
Execute payment settlement
curl --request POST \
  --url https://facilitator.agentokratia.com/api/settle \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "paymentPayload": {
    "x402Version": 2,
    "accepted": {
      "scheme": "escrow",
      "network": "eip155:8453",
      "amount": "10000",
      "payTo": "0x1234567890123456789012345678901234567890"
    },
    "payload": {
      "signature": "<string>"
    }
  },
  "paymentRequirements": {
    "scheme": "escrow",
    "network": "eip155:8453",
    "amount": "10000",
    "payTo": "0x1234567890123456789012345678901234567890"
  }
}
'
{
  "success": true,
  "payer": "0xAbCdEf1234567890AbCdEf1234567890AbCdEf12",
  "transaction": "abc123-session-id",
  "network": "eip155:8453",
  "session": {
    "id": "abc123-session-id",
    "token": "secret-token-store-this",
    "balance": "9990000",
    "expiresAt": 1735686000
  }
}

Authorizations

Authorization
string
header
required

API key (x402_xxx) from the dashboard

Body

application/json
paymentPayload
object
required
paymentRequirements
object
required
Example:
{
"scheme": "escrow",
"network": "eip155:8453",
"amount": "10000",
"payTo": "0x1234567890123456789012345678901234567890"
}

Response

Settlement result

success
boolean
required
transaction
string
required

Transaction hash or session ID

network
string
required

CAIP-2 network identifier

payer
string

Payer wallet address

session
object

Session info (for escrow scheme)