Quickstart for Sellers
This guide shows how to verify and settle x402 payment authorizations using Paratro as your Facilitator.
Prerequisites
- A Paratro API key and secret
- A receiving account on a supported chain
Accept a Payment
Receive payment from buyer
The buyer sends a signed x402 payment payload (ERC-3009, Permit2, or Solana format).
Verify the signature
Call POST /x402/verify to validate the payment authorization:curl -X POST https://api.paratro.com/api/v1/x402/verify \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"x402Version": 2,
"paymentPayload": {
"payload": {
"signature": "0x...",
"authorization": {
"from": "0xPayerAddress",
"to": "0xYourAddress",
"value": "1000000",
"validAfter": "0",
"validBefore": "1774601102",
"nonce": "0x..."
}
},
"accepted": {
"scheme": "exact",
"network": "eip155:84532",
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"amount": "1000000",
"payTo": "0xYourAddress"
}
}
}'
Response:{
"isValid": true,
"payer": "0xPayerAddress"
}
Settle on-chain
Call POST /x402/settle with the same payload to execute the transfer:curl -X POST https://api.paratro.com/api/v1/x402/settle \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... same payload as verify ... }'
Response:{
"success": true,
"transaction": "0xabc123...",
"payer": "0xPayerAddress",
"network": "eip155:84532"
}
Check settlement status
curl https://api.paratro.com/api/v1/x402/settle/TX_ID \
-H "Authorization: Bearer $TOKEN"
Settling with upto Scheme
For variable-amount payments, include extra.settlementAmount in the payment requirements:
{
"x402Version": 2,
"paymentPayload": {
"payload": { "signature": "0x...", "permit2Authorization": { ... } },
"accepted": {
"scheme": "upto",
"network": "eip155:84532",
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"amount": "5000000",
"payTo": "0xYourAddress",
"extra": {
"assetTransferMethod": "permit2",
"settlementAmount": "300000"
}
}
}
}
| Field | Description |
|---|
amount | Maximum authorized by the buyer (5 USDC) |
extra.settlementAmount | Actual amount to settle (0.30 USDC) |
settlementAmount must be less than or equal to amount. If set to "0", no on-chain transaction is executed.