Skip to main content
POST
Fetches an x402 resource, paying for it from the agent’s wallet if it demands payment. Returns the resource body plus a receipt.
Sensitive — this spends real USDC. Use Quote first to learn the price with zero side effects.

How it works

  1. Fetch the URL.
  2. Not a 402? Return the response — paid: false, no receipt, nothing spent.
  3. Decode the requirements and select one under policy: exact scheme, USDC, an allowed network, at or under the effective cap.
  4. Check balance and dailyBudget, then emit payment.requested.
  5. Sign a USDC payment in the custody plane, which re-enforces perTxMax at signing time.
  6. Retry the request once with the payment attached.
  7. Hard stop — persist the receipt and emit payment.settled. A failure after signing is never retried a second time.

Spend control — no approval workflow

There is deliberately no approval queue on this endpoint, unlike cards. What bounds a payment: The effective per-payment cap is min(max_amount, wallet perTxMax).

Request Body

A resource that isn’t paywalled returns paid: false and receipt: null — nothing was spent. The receipt’s amount is a decimal USDC string, and settleResponseB64 is the raw base64 PAYMENT-RESPONSE envelope: the onchain-verifiable audit artifact. Receipts are booked idempotently on (direction, origin, nonce), so a replay returns the existing row and books nothing twice.

Errors

payment_rejected reasons

CLI

MCP

Tool: naive_payments_pay