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

# MPP

> Pay for an API with the Machine Payments Protocol — the open protocol for machine-to-machine payments.

The [Machine Payments Protocol](https://mpp.dev/overview) (MPP) is an open protocol for machine-to-machine payments, neutral to the underlying payment method. Tempo-enabled Proceeds paywalls expose an MPP endpoint alongside their x402 endpoint.

Use MPP when your callers are agents — code that needs to discover, pay for, and use third-party APIs without manual signup or API keys.

## Endpoint

```
https://myproceeds.xyz/api/mpp/pay/{serviceId}/{slug}
```

## Flow

MPP follows the same `402` shape as x402, with explicit primitives for credentials and receipts.

1. Client requests the MPP URL.
2. Proceeds responds with `402 Payment Required` and a `WWW-Authenticate: Payment` header advertising supported methods.
3. Client signs a payment using one of the advertised methods (Tempo today).
4. Client retries with `Authorization: Payment <credential>`.
5. Proceeds returns `200 OK` with a `Payment-Receipt` header.

## curl

<CodeGroup>
  ```bash Step 1 — request and receive a challenge theme={null}
  curl -i https://myproceeds.xyz/api/mpp/pay/{serviceId}/{slug}
  ```

  ```bash Step 2 — pay and retry with mppx theme={null}
  npx mppx https://myproceeds.xyz/api/mpp/pay/{serviceId}/{slug}
  ```
</CodeGroup>

## JavaScript

```javascript theme={null}
import { Mppx, tempo } from 'mppx/client'

const mppClient = Mppx.create({
  methods: [tempo.charge({ account })],
})

const response = await mppClient.fetch(
  'https://myproceeds.xyz/api/mpp/pay/{serviceId}/{slug}'
)

const data = await response.json()
```

## Use from an agent

To pay an MPP Proceeds URL from an agent in Claude Code, Cursor, or Codex, use a managed MPP client rather than wiring the flow by hand:

* [Tempo Wallet](/agents/tempo-wallet) — MPP-native with built-in spend controls.
* [AgentCash](/agents/agentcash) — one USDC balance across x402 and MPP.

See [Pay with an agent](/agents/overview) for setup.

## When to use MPP

* Your callers are AI agents or other autonomous code.
* You want explicit `Credential` and `Receipt` primitives for traceable machine payments.
* Your service is on Tempo or you want first-class Tempo support.

<Card title="More on MPP" icon="book" href="https://mpp.dev/overview">
  Read the protocol at mpp.dev.
</Card>
