Skip to main content
The Machine Payments Protocol (MPP) is an open standard for machine-to-machine payments via HTTP 402, developed by Tempo and Stripe. Zinc supports MPP on the /agent/orders endpoint, allowing AI agents to place orders and pay in a single request flow — no Zinc account or API key required.

Why MPP?

Traditional API integrations require account setup, API keys, and a pre-funded balance. MPP removes these steps by embedding payment directly into the HTTP request cycle:
  • No account needed — Agents pay per-request using standard HTTP headers
  • Multiple payment methods — Stripe cards/wallets, Tempo stablecoins, and more
  • Built for agents — Designed for automated, machine-to-machine payment flows

How It Works

MPP uses an HTTP 402 challenge-credential-receipt flow:
1

Request without payment

The agent sends a POST /agent/orders request without payment credentials.
2

Receive payment challenge

Zinc responds with HTTP 402 Payment Required and WWW-Authenticate headers describing available payment methods and the amount due.
3

Complete payment

The MPP client completes payment through the chosen method (e.g., Stripe checkout, Tempo transfer) and receives a credential.
4

Resubmit with credential

The agent resubmits the original request with the payment credential in the Authorization header.
5

Order confirmed

Zinc validates the payment receipt and processes the order, returning a 201 response with order details and two important headers:
  • X-Api-Key — A temporary API key the agent can use to check order status via GET /orders/{id} without repeating the payment flow.
  • Payment-Receipt — The MPP payment receipt confirming the charge.

Checking Order Status

The 201 response includes an X-Api-Key header containing a temporary API key. Use this key to poll the order status without going through the 402 payment flow again:
curl https://api.zinc.com/orders/{order_id} \
  -H "Authorization: Bearer <X-Api-Key value>"
The X-Api-Key is scoped to the order it was issued for. Store it after placing the order so your agent can track fulfillment progress.

Quick Start

Install an MPP Client

MPP client libraries handle the 402 flow automatically. Official SDKs are available in TypeScript, Python, and Rust.
npm install mppx viem

Place an Order

The easiest way to test is with the mppx CLI, which handles the 402 payment flow automatically:
npx mppx https://api.zinc.com/agent/orders \
  --method POST \
  --body '{
    "products": [{"url": "https://www.amazon.com/dp/B0EXAMPLE"}],
    "shipping_address": {
      "name": "Jane Smith",
      "address_line1": "123 Main St",
      "city": "Seattle",
      "state": "WA",
      "postal_code": "98101",
      "country": "US",
      "phone": "2065551234"
    }
  }'
To integrate programmatically, use the client SDKs:
import { Mppx, tempo } from "mppx/client";
import { privateKeyToAccount } from "viem/accounts";

const mppx = Mppx.create({
  methods: [
    tempo({
      account: privateKeyToAccount("0x..."),
      maxDeposit: "1",
    }),
  ],
});

// The MPP client handles the 402 challenge flow automatically
const response = await mppx.fetch(
  "https://api.zinc.com/agent/orders",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      products: [
        { url: "https://www.amazon.com/dp/B0EXAMPLE" }
      ],
      shipping_address: {
        name: "Jane Smith",
        address_line1: "123 Main St",
        city: "Seattle",
        state: "WA",
        postal_code: "98101",
        country: "US",
        phone: "2065551234",
      },
    }),
  }
);

console.log(await response.json());

Supported Payment Methods

MethodDescription
StripeCards and wallets via Stripe
TempoStablecoin payments via Tempo
The available payment methods are returned in the WWW-Authenticate headers of the 402 response. Your MPP client will automatically select a compatible method.

Next Steps

MPP Playground

Try placing an MPP order in our interactive playground.

API Reference

See the full API spec for the MPP order endpoint.

MPP Specification

Read the full MPP protocol specification.