> ## 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 and MPP: Overview

> Pay for or gate agent-facing resources using the Machine Payments Protocol (MPP) and Atum.

## What is MPP?

[The Machine Payments Protocol (MPP)](https://mpp.dev/) enables agentic payments over HTTP, built on the same `402 Payment Required` status code as [x402](/payment-protocols/x402/overview).

```mermaid theme={null}
sequenceDiagram
    participant Client
    participant Server as Your server
    participant Gateway as Atum Payment Gateway

    Client->>Server: Request resource
    Server->>Client: 402 Payment Required
    Client->>Server: Signed credential
    Server->>Server: Verify credential
    Server->>Gateway: Submit payment
    Gateway->>Server: Settlement confirmation
    Server->>Client: 200 OK + resource
```

Unlike x402, MPP has no facilitator. Only the client holds signing keys — the server verifies the credential and settles it in-process by submitting to Atum's Payment Gateway, with no separate facilitator service in between.

These docs guide you through Atum's payment method for [MPP](https://mpp.dev/) — how to pay for, and charge for, MPP-gated resources.

<Accordion title="Technical details: how Atum implements MPP">
  MPP supports interchangeable **payment methods**, each with its own rules for how the credential is built, signed, verified, and settled.

  Atum lets the payer fund payments from a supported source, while the merchant configures the destination asset, network, address, and exact amount it receives.

  The server registers the method with the MPP SDK. It verifies the credential and submits the payment to Atum's Payment Gateway, which coordinates settlement between the source and destination.

  For the protocol itself — the challenge, credential, and receipt wire format — see the [MPP specification](https://mpp.dev/).
</Accordion>

## What Atum adds

| A typical MPP method                                         | Atum's MPP method                                                                                    |
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- |
| ❌ Payer and merchant must be on the same chain               | ✅ Cross-chain: any supported source → the merchant's chosen destination                              |
| ❌ Payer must hold the exact asset the merchant accepts       | ✅ Merchant pins the asset, chain, and exact amount it receives; the payer funds from a different one |
| ❌ Payer needs a direct on-chain path to the merchant's asset | ✅ Atum's settlement network bridges the two — neither side holds the other's asset                   |

## How it works

<Steps>
  <Step title="Client requests a resource">
    A client hits the endpoint without a payment credential. The server returns `402` with a challenge listing the payment methods it accepts.
  </Step>

  <Step title="Client signs and retries">
    The client reads the challenge, signs an authorization for the source-chain deposit it specifies, and retries the request with an `Authorization: Payment` header.
  </Step>

  <Step title="The server verifies">
    The server checks the credential in-process — recovering the signature and checking every term against the challenge. No funds move yet, and there is no facilitator to call.
  </Step>

  <Step title="The server settles">
    The server submits the signed request to Atum's Payment Gateway, which moves funds from the payer's source chain to the merchant's destination chain.
  </Step>

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

<Warning>
  **Cross-chain settlement can outrun the gateway's \~30s synchronous window — that is pending, not failed.** Your submitter should submit and return what the gateway said — do **not** poll inside `verify()`. When settlement is still in flight, raise `SettlementPendingError` with the payment id and let the payer re-attempt the **same purchase**. The gateway resolves onto the original payment, so the re-attempt cannot charge twice. 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/mpp/make-payments/overview">
    Pay for an MPP-gated resource as an agent or a script, in under five minutes.
  </Card>

  <Card title="Accept payments" icon="code" href="/payment-protocols/mpp/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="Payment Gateway API reference" icon="book" href="/api-reference/payment-gateway/introduction">
    Full reference for submitting payments and reading status.
  </Card>
</CardGroup>
