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

# MPP / Tempo

> Pay per request in USDC.e on Tempo via the Machine Payments Protocol.

The Machine Payments Protocol (MPP) is the second way to pay. The payment is a USDC.e transfer on the [Tempo](https://tempo.xyz) chain. The `mppx` client library reads the challenge and builds the credential you send on the retry.

## How it works

A valid unpaid request to a paid route also returns an MPP challenge beside the x402 one, in a `www-authenticate: Payment` header. The challenge names the method (`tempo`), the intent (`charge`), the amount and the address to pay. A client signs a Tempo charge, retries with the credential, and the server settles it on-chain.

```mermaid theme={null}
sequenceDiagram
    participant Agent
    participant API as Syntalic API
    participant Chain as Tempo

    Agent->>API: GET /v1/measures/offers?subject=...
    API-->>Agent: 402 + www-authenticate: Payment
    Agent->>Agent: Sign a Tempo charge
    Agent->>API: Same request + Authorization: Payment ...
    API->>Chain: Settle the charge
    API-->>Agent: 200 OK + data
```

## Use `mppx`

```bash theme={null}
npm install mppx@0.5.12 viem@2.47.17
```

```ts theme={null}
import { Mppx, tempo } from "mppx/client";
import { privateKeyToAccount } from "viem/accounts";

const mpp = Mppx.create({
  methods: [tempo({ account: privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`) })],
  polyfill: false,
});

const url = "https://api.syntalic.com/v1/measures/offers?subject=airpods+pro";
let res = await fetch(url);
if (res.status === 402) {
  const credential = await mpp.createCredential(res.clone());
  res = await fetch(url, { headers: { Authorization: credential } });
}
if (!res.ok) throw new Error(`Syntalic request failed: ${res.status}`);
const data = await res.json();
```

The same EVM address holds your Base USDC and your Tempo USDC.e, so one key covers both.

## When to pick MPP over x402

Use whichever rail your funds are on. Hold USDC.e on Tempo, or already pay other MPP APIs? Use MPP. Hold USDC on Solana or Base? Use [x402](https://syntalic.com/docs/payments/x402.md).

## Pricing

The price is the same on every rail. See [Pricing](https://syntalic.com/docs/reference/pricing.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.