Agentic payments with x402

Let AI agents pay your business, straight to your own wallet.

AI agents now buy data, API access and services on their own, but checkouts built for people stop them at forms and card prompts. Every Payclave checkout that settles in USDC also answers x402, the open standard for payments over HTTP: an agent asks for the checkout, gets the exact amount, signs a USDC payment from its own wallet, and the money lands in yours. Payclave never holds it, and it verifies the payment onchain before the invoice is paid.

PayclaveAI agentAI agent's walletYour settlement walletPayclave verifies, never holds funds
AI agent's walletPayclave verifies, never holds fundsYour settlement wallet

Agents can pay you today

Each checkout session includes an x402Url. An agent with a USDC wallet pays it directly, with no new integration on your side.

Your wallet, not ours

Payments go from the agent's wallet straight to your settlement wallet. Payclave never holds funds or keys.

The same back office

Agent payments appear in the same payment records, reconciliation and signed webhooks as every other payment, marked paymentMethod x402.

Assistants can run your billing

The @payclave/mcp server lets an AI assistant create checkouts and check invoices, payments and refunds, using an agent key limited to exactly those actions.

How x402 works

Four steps from an agent's request to a paid invoice.

  1. 1

    The agent asks for the checkout

    It requests the checkout's x402Url, the same way it would request any web resource.

  2. 2

    Payclave answers 402 Payment Required

    The response names the exact amount, the token (USDC), the network and your wallet. Payclave computes all of them; the agent cannot change them.

  3. 3

    The agent signs a USDC payment

    It signs a short-lived USDC transfer authorization from its own wallet and sends it back. The payment settles straight to your wallet, and the agent needs no gas.

  4. 4

    Payclave verifies, then notifies you

    Payclave confirms the transfer onchain, marks the invoice paid and sends your signed webhook. The agent gets the transaction hash.

What are agentic payments?

Agentic payments are payments an AI agent makes on its own, within limits a person set: buying a report, topping up API credits, paying a supplier invoice. The agent holds its own spending wallet, and nobody types in card details.

Most agent payment products settle into a balance the provider holds. Payclave takes the other path: the agent pays your wallet directly, and Payclave adds the records, webhooks, refund checks and independent verification a business needs to run on it.

How does x402 work with a Payclave checkout?

x402 turns the HTTP status code 402 Payment Required into a real payment step. Create a checkout session as you do today; its response now includes x402Url. Any x402 v2 client can pay that URL.

If the agent's first attempt times out, it can resend the same signed payment and gets the same result, never a second charge. A checkout accepts one x402 payment at a time, and a signed payment can never be reused on another checkout.

An agent paying a checkout over x402bash
# 1. Ask for the checkout: Payclave answers 402 with the payment terms
curl -i https://api.payclave.com/v1/checkout-sessions/chk_123/x402
# HTTP/2 402
# payment-required: <base64: USDC amount, network, your wallet>

# 2. Retry with the signed USDC authorization from the agent's wallet
curl -i https://api.payclave.com/v1/checkout-sessions/chk_123/x402 \
  -H 'PAYMENT-SIGNATURE: <base64 signed payment>'
# HTTP/2 200
# payment-response: <base64: success, transaction hash, network>

Where does the money go?

Where funds sit decides your risk and your operations. This is how Payclave's x402 compares with the two common alternatives.

FeaturePayclave x402CustodialBare facilitator
Where the money landsYour own walletA balance the provider holdsYour own wallet
Payment records and invoicesYesYesNo
Signed webhooksYesYesNo
Refund checksYesProvider-dependentNo
Independent onchain verificationYes, before an invoice is paidNot applicableNo
AI agent
Payclave x402: wallet to wallet
AI agentProviderProvider
Custodial: held by the provider first

Which networks and tokens can agents pay with?

Agents pay in USDC on Base, Polygon or Arc Network, matching the network and token your settlement wallet receives. Payclave credits a payment on Polygon and Arc once its block is finalized, and on Base once it is 10 blocks deep.

x402 needs USDC's signed transfers, so a checkout that settles in USDT cannot be paid over x402; its x402Url is empty. Test checkouts take USDC on Base Sepolia, which you can get free from a public faucet, so you can try the whole flow before going live.

Let an AI assistant run your billing

The open-source @payclave/mcp server gives AI assistants six tools: create and read checkout sessions, list and read invoices, read payments and check refunds. Run it with an agent key (rk_test_ or rk_live_), which can reach those actions and nothing else.

No tool moves funds, and the assistant is told when it holds a live key. Start with a test key while you try it out.

Frequently asked questions

Agentic payments: common questions.

Test the flow

Create a checkout session before you change your production stack.

Use test keys, the API playground, and signed webhook examples to validate the complete order-to-payment flow.