<!-- tempo-docs-context -->
> Source: [/docs/guide/machine-payments](https://tempo.xyz/developers/docs/guide/machine-payments.md)
> Section: [Machine Payments](https://tempo.xyz/developers/docs/agents.md). Pay for APIs, accept API payments, find services, and use MPP (https://mpp.dev).
> [Documentation index](https://tempo.xyz/developers/llms.txt) · [Docs skill](https://tempo.xyz/developers/SKILL.md)

> Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation.
> If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.xyz/developers/llms.txt) and Markdown pages directly.

<span id="make-agentic-payments-with-the-machine-payments-protocol" />

# How MPP works

The [Machine Payments Protocol](https://mpp.dev/protocol) (MPP) lets a service request payment as part of an HTTP request. An application or agent handles the payment challenge and retries the request with payment authorization.

## MPP payment flow

```mermaid
sequenceDiagram
  participant Client
  participant Server
  Client->>Server: Request resource
  Server-->>Client: 402 Payment Required + Challenge
  Note over Client: Authorize payment
  Client->>Server: Retry request + Credential
  Note over Server: Verify payment
  Server-->>Client: Resource + Receipt
```

* **Challenge:** the server describes the payment terms in `WWW-Authenticate: Payment`.
* **Credential:** the client supplies the payment proof in `Authorization: Payment` when it retries.
* **Receipt:** the server acknowledges payment with `Payment-Receipt`.

The payment method defines the proof and settlement rules. On Tempo, a credential can carry a signed transaction, a transaction reference, or a payment-channel voucher, depending on the intent.

<span id="why-tempo-for-agentic-payments" />

## MPP payment intents on Tempo

These guides cover two payment patterns:

| Pattern | Use it for | Guide |
| --- | --- | --- |
| One-time payment (`charge`) | A fixed price for a request or resource. | [Accept one-time payments](https://tempo.xyz/developers/docs/guide/machine-payments/one-time-payments) |
| Payment session (`session`) | Metered usage, including streamed responses, using a funded channel and signed vouchers. | [Accept pay-as-you-go payments](https://tempo.xyz/developers/docs/guide/machine-payments/pay-as-you-go) |

See the [MPP intent reference](https://mpp.dev/protocol#payment-intents) for other patterns and their supported payment methods.

<span id="try-an-agentic-payment" />

<span id="try-a-test-payment" />

## See the payment flow

This simulation illustrates the challenge, payment, and retry sequence for a paid photo request. The account, funds, and transaction are simulated.

The interactive terminal simulates the challenge, payment, and retry sequence for a paid request.

<span id="agentic-payment-use-cases" />

<span id="get-started-with-mpp-on-tempo" />

<span id="mpp-sdks-and-tools" />

## Implement paid requests

Use [Pay for services](https://tempo.xyz/developers/docs/guide/machine-payments/client) for an application, [Pay with the CLI](https://tempo.xyz/developers/docs/guide/machine-payments/agent) for terminal requests, or [Accept payments for an API](https://tempo.xyz/developers/docs/guide/machine-payments/server) for a service. The [Machine Payments overview](https://tempo.xyz/developers/docs/agents) helps you choose an integration.

Payment authorization is separate from account access. Use [Give an agent access](https://tempo.xyz/developers/docs/accounts/agents) to control which account an agent can spend from.

## Learn more about MPP

Use the [MPP documentation](https://mpp.dev) for SDKs, transport details, and payment methods, and the [protocol specification](https://paymentauth.org/) for normative behavior.
