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.
Send a Payment
ThePOST /v1/pay endpoint is Unwall’s unified payment interface. It accepts three types of recipients and automatically routes to the correct payment rail — no rail selection logic needed in your agent code.
| Recipient | Rail | Use Case |
|---|---|---|
| URL | x402 Protocol | Pay for API calls in USDC |
0x... address | USDC Transfer | Send USDC on-chain |
| Bank details object | Fiat ACH | Convert USDC to USD and send via bank transfer |
x402 Payment
When the recipient is a URL, Unwall proxies the request and handles the x402 payment protocol automatically.Response
The
max_amount_usdc field is in micro-USDC (1 USDC = 1,000,000). Setting it to 1000000 means the agent will pay up to 1 USDC for this call. If the API charges more, the payment is rejected.USDC Transfer
When the recipient is an Ethereum address (0x...), Unwall sends USDC on Base chain via Bridge.xyz.
Response
Fiat ACH Payment
When the recipient is an object with bank details, Unwall converts USDC to USD and sends via ACH bank transfer.Response
Idempotency
Include anidempotency_key to prevent duplicate payments. If a request is retried with the same key, the original transaction is returned without creating a new one.
Error Handling
| Status Code | Meaning | Example |
|---|---|---|
400 | Validation error | Missing required fields, insufficient balance, invalid recipient format |
403 | Permission denied | Token lacks pay or x402 permission, project is paused |
429 | Rate limit exceeded | More than 100 requests per minute |
502 | Upstream failure | Bridge.xyz or x402 facilitator returned an error |
Example error response
Required Permissions
| Rail | Required Permission |
|---|---|
| x402 Protocol | x402 |
| USDC Transfer | pay |
| Fiat ACH | pay |