> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atum.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Atum x402: Overview

> Coordinate programmatic payments using Atum

## What is x402?

[x402](https://x402.org) enables agentic payments using a standard HTTP status code, `402 Payment Required`, instead of a custom paywall.

```mermaid theme={null}
sequenceDiagram
    participant Client
    participant Server as Your server
    participant Facilitator as Atum facilitator

    Client->>Server: Request resource
    Server->>Client: 402 Payment Required
    Client->>Server: Signed payment authorization
    Server->>Facilitator: Verify & settle
    Facilitator->>Server: Settled
    Server->>Client: 200 OK + resource
```

Only the client ever holds signing keys in this flow — your server and the facilitator only ever see the proof of payment, never funds or private keys.

These docs guide you through Atum's [x402 facilitator](https://github.com/x402-foundation/x402#terms) — three operations (`/verify`, `/settle`, `/supported`) served by the Payment Gateway under the `/x402/v1` prefix, not a separate service you point at.

<Accordion title="Technical details: how Atum implements x402">
  x402 supports plug and play **schemes**, each configurable to a different payment method with its own rules for how the proof is built, signed, and settled.

  The most common scheme moves funds on a single network. Atum contributes its own scheme, built for multi-rail money movement:

  1. The payer funds a source in whatever asset they hold
  2. The merchant receives on their own chosen destination
  3. Atum's network handles the conversion between the two
</Accordion>

## What Atum adds

| Standard x402                       | Atum x402                                                                   |
| ----------------------------------- | --------------------------------------------------------------------------- |
| ❌ Confined to same blockchain       | ✅ Cross-chain payments (any source → any destination)                       |
| ❌ Merchant chooses one asset        | ✅ Merchant gates what they receive; payer picks their source                |
| ❌ Facilitator holds settlement keys | ✅ Settlement runs through Atum's network but facilitator does not hold keys |

## How it works

<Steps>
  <Step title="Client requests a resource">
    A client hits your endpoint without a payment credential. Your server returns `402` with the payment options you accept.
  </Step>

  <Step title="Client signs and retries">
    The client picks a payment option, signs a credential authorizing the settlement vault deposit, and retries the request with a `PAYMENT-SIGNATURE` header.
  </Step>

  <Step title="Your server verifies">
    Your server sends the credential to the facilitator's `/verify` endpoint on the Payment Gateway. No funds move.
  </Step>

  <Step title="Your server settles">
    After a valid response, your server calls `/settle`. The Atum network moves funds from the payer's source chain to your destination chain.
  </Step>

  <Step title="Resource is returned">
    With settlement confirmed, your server returns `200 OK` with the protected content and a `PAYMENT-RESPONSE` header carrying the receipt.
  </Step>
</Steps>

<Warning>
  **Cross-chain settlement can outrun the gateway's \~30s synchronous window — that is pending, not failed.** When it does, the facilitator reports `settlement_pending` with the payment id. Re-attempt the **same purchase** (same purchase identifier, freshly signed credential from a new `402`) until you get a terminal outcome — the gateway resolves onto the original payment, so you cannot be charged twice. Do not poll inside the request, and do not start a new purchase. Use [MPP](/payment-protocols/mpp/overview) if you'd rather the server poll the gateway for the result. Some testnet corridors — notably those bridging to slower chains like Tempo — routinely exceed this window. See [Idempotency](/payment-protocols/idempotency).
</Warning>

## Next steps

Whether your agent needs to pay for a resource or your platform needs to charge agents for one, start with the guide for your side of the payment.

<CardGroup cols={2}>
  <Card title="Make payments" icon="wallet" href="/payment-protocols/x402/make-payments/overview">
    Pay for an x402-gated resource as an agent or a script, in under five minutes.
  </Card>

  <Card title="Accept payments" icon="code" href="/payment-protocols/x402/accept-payments/overview">
    Gate an HTTP route or agent-facing tool behind payment, in under five minutes.
  </Card>

  <Card title="Idempotency" icon="rotate" href="/payment-protocols/idempotency">
    What to do when a payment is still settling.
  </Card>

  <Card title="Facilitator API reference" icon="book" href="/api-reference/x402/introduction">
    Full reference for `/verify`, `/settle`, and `/supported`.
  </Card>
</CardGroup>
