Skip to main content
POST
/
v1
/
pay
Send Payment
curl --request POST \
  --url https://api.example.com/v1/pay \
  --header 'Content-Type: application/json' \
  --data '
{
  "recipient": {
    "recipient.name": "<string>",
    "recipient.account_number": "<string>",
    "recipient.routing_number": "<string>",
    "recipient.email": "<string>"
  },
  "amount_usd": 123,
  "max_amount_usdc": 123,
  "description": "<string>",
  "idempotency_key": "<string>",
  "method": "<string>",
  "headers": {},
  "body": "<string>"
}
'
{
  "id": "<string>",
  "status": "<string>",
  "rail": "<string>",
  "amount_charged": 123,
  "fee": 123,
  "currency": "<string>",
  "recipient": "<string>",
  "tx_hash": {},
  "created_at": "<string>",
  "estimated_arrival": {},
  "response": {
    "response.status_code": 123,
    "response.headers": {},
    "response.body": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.unwall.xyz/llms.txt

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

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

recipient
string | object
required
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
amount_usd
number
Payment amount in USD. Required for USDC transfer and fiat rails. Not used for x402 (the target API sets the price).
max_amount_usdc
integer
Maximum micro-USDC to pay for x402 requests (safety cap). 1 USDC = 1,000,000 micro-USDC. Only used when recipient is a URL.
description
string
Payment description for record-keeping. Max 500 characters.
idempotency_key
string
Unique key to prevent duplicate payments. Alphanumeric plus _, -, :, .. Max 255 characters.
method
string
default:"GET"
HTTP method for x402 requests. One of GET, POST, PUT, DELETE. Only used when recipient is a URL.
headers
object
Additional HTTP headers for x402 requests. Only used when recipient is a URL.
body
string
Request body for x402 POST or PUT requests. Only used when recipient is a URL.

Response

id
string
required
Unique transaction identifier.
status
string
required
Transaction status: pending, processing, completed, or failed.
rail
string
required
Payment rail used: x402, usdc_transfer, or fiat.
amount_charged
integer
required
Amount charged in rail-native units. Micro-USDC for x402 and usdc_transfer rails, cents for fiat rail.
fee
integer
required
Platform fee charged in rail-native units.
currency
string
required
Currency of the amount: usdc or usd.
recipient
string
required
Recipient identifier (URL, EVM address, or recipient name).
tx_hash
string | null
required
On-chain transaction hash for USDC and x402 payments. null for fiat payments.
created_at
string
required
ISO 8601 timestamp of when the payment was created.
estimated_arrival
string | null
required
Estimated delivery time for fiat payments (e.g., “2-3 business days”). null for crypto rails.
response
object | null
required
For x402 payments only — contains the proxied API response. null for other rails.

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"
  }'
Response (200 OK)
{
  "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"
  }'
Response (201 Created)
{
  "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"
  }'
Response (201 Created)
{
  "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
}