The unified pay endpoint is the recommended way to send any payment through Unwall. It automatically detects the recipient type and routes to the appropriate rail:
URL (e.g., https://api.example.com/...) — routes to the x402 protocol
EVM address (e.g., 0x742d...) — routes to on-chain USDC transfer
Bank details object — routes to fiat ACH off-ramp
Requires a bearer token with the pay permission. If the recipient is a URL, the token must also have the x402 permission.
Request Body
The payment recipient. Accepts one of three formats:
URL (string): An HTTPS URL for x402 protocol payments (e.g., "https://api.example.com/v1/data")
EVM address (string): A 0x-prefixed Ethereum address for USDC transfers (e.g., "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28")
Bank details (object): An object with name, account_number, routing_number, and email for fiat ACH payments
Recipient name. 1-200 characters.
Bank account number. 4-34 characters.
ABA routing number. Exactly 9 digits.
Recipient email address. Up to 254 characters.
Payment amount in USD. Required for USDC transfer and fiat rails. Not used for x402 (the target API sets the price).
Maximum micro-USDC to pay for x402 requests (safety cap). 1 USDC = 1,000,000 micro-USDC. Only used when recipient is a URL.
Payment description for record-keeping. Max 500 characters.
Unique key to prevent duplicate payments. Alphanumeric plus _, -, :, .. Max 255 characters.
HTTP method for x402 requests. One of GET, POST, PUT, DELETE. Only used when recipient is a URL.
Additional HTTP headers for x402 requests. Only used when recipient is a URL.
Request body for x402 POST or PUT requests. Only used when recipient is a URL.
Response
Unique transaction identifier.
Transaction status: pending, processing, completed, or failed.
Payment rail used: x402, usdc_transfer, or fiat.
Amount charged in rail-native units. Micro-USDC for x402 and usdc_transfer rails, cents for fiat rail.
Platform fee charged in rail-native units.
Currency of the amount: usdc or usd.
Recipient identifier (URL, EVM address, or recipient name).
On-chain transaction hash for USDC and x402 payments. null for fiat payments.
ISO 8601 timestamp of when the payment was created.
Estimated delivery time for fiat payments (e.g., “2-3 business days”). null for crypto rails.
For x402 payments only — contains the proxied API response. null for other rails. HTTP status code from the target API.
Response headers from the target API.
Response body from the target API.
Examples
x402 Payment (URL recipient)
curl -X POST https://api.unwall.xyz/v1/pay \
-H "Authorization: Bearer aw_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"recipient": "https://api.example.com/v1/data",
"max_amount_usdc": 1000000,
"description": "Fetch market data"
}'
{
"id" : "tx_x402_abc123" ,
"status" : "completed" ,
"rail" : "x402" ,
"amount_charged" : 500000 ,
"fee" : 7500 ,
"currency" : "usdc" ,
"recipient" : "https://api.example.com/v1/data" ,
"tx_hash" : "0x1a2b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef1234567890" ,
"created_at" : "2026-03-11T14:30:00Z" ,
"estimated_arrival" : null ,
"response" : {
"status_code" : 200 ,
"headers" : {
"content-type" : "application/json"
},
"body" : "{ \" data \" : [{ \" id \" : 1, \" value \" : \" premium result \" }]}"
}
}
USDC Transfer (EVM address recipient)
curl -X POST https://api.unwall.xyz/v1/pay \
-H "Authorization: Bearer aw_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"recipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28",
"amount_usd": 50.00,
"description": "Vendor payment"
}'
{
"id" : "tx_usdc_def456" ,
"status" : "processing" ,
"rail" : "usdc_transfer" ,
"amount_charged" : 50000000 ,
"fee" : 750000 ,
"currency" : "usdc" ,
"recipient" : "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28" ,
"tx_hash" : "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890" ,
"created_at" : "2026-03-11T14:35:00Z" ,
"estimated_arrival" : null ,
"response" : null
}
Fiat ACH Payment (Bank details recipient)
curl -X POST https://api.unwall.xyz/v1/pay \
-H "Authorization: Bearer aw_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"recipient": {
"name": "Acme Supplies Inc",
"account_number": "9876543210",
"routing_number": "021000021",
"email": "billing@acme.com"
},
"amount_usd": 2500.00,
"description": "Monthly supply order #47"
}'
{
"id" : "tx_fiat_ghi789" ,
"status" : "processing" ,
"rail" : "fiat" ,
"amount_charged" : 250000 ,
"fee" : 3750 ,
"currency" : "usd" ,
"recipient" : "Acme Supplies Inc" ,
"tx_hash" : null ,
"created_at" : "2026-03-11T14:40:00Z" ,
"estimated_arrival" : "2-3 business days" ,
"response" : null
}