Skip to main content
POST
x402 Pay
Negotiate and complete one x402 payment for a target URL. AgentWallex evaluates the agent’s policies, signs the payment via MPC, and returns the payment info needed to access the paid resource.

Request Body

string
required
The agent whose wallet will fund the payment.
string
required
The x402-enabled URL to pay for (e.g., https://paid-api.example.com/v1/data).
string
Optional session ID to deduct from an existing session budget. See x402 Sessions.
string
CAIP-2 chain identifier for payment settlement (e.g., eip155:84532). If omitted, the agent’s default chain is used.

Response

Example

Response

Authorizations

X-API-Key
string
header
required

API key authentication. Keys are prefixed with awx_.

Body

application/json
agent_id
string
required

The agent whose wallet will fund the payment.

target_url
string<uri>
required

The x402-enabled URL to pay for (e.g., https://paid-api.example.com/v1/data).

session_id
string

Optional session ID to deduct from an existing session budget.

chain
string

CAIP-2 chain identifier for payment settlement (e.g., eip155:84532). If omitted, the agent's default chain is used.

Response

Payment completed successfully.

Result of an x402 payment negotiation.

ledger_id
string

Internal ledger entry ID for this payment.

amount
string

Payment amount.

fee_amount
string

Platform fee deducted.

fee_rate
string

Fee percentage applied (based on tiered pricing).

token
string

Token used for payment (e.g., USDC).

chain
string

Chain used for settlement.

status
enum<string>

Payment status.

Available options:
completed,
pending,
failed
payment_signature
string

The PAYMENT-SIGNATURE value to include in the retry request to the target URL.