v6.5.0 · Multi-Rail Payments

Machine Payments Protocol

HTTP 402 payments with Stripe, Tempo, Lightning, and Card rails. Let AI agents pay for APIs using the best available payment method — fiat or crypto.

How It Works

402

Challenge Issued

Server returns WWW-Authenticate: Payment with pricing, rails, and HMAC-bound challenge.

Payment Sent

Client selects rail (Stripe, Tempo, Lightning, Card), pays off-band, retries with Authorization: Payment.

Resource Delivered

Server verifies, settles, returns resource with Payment-Receipt header. RFC 9457 errors for failures.

Payment Rails

Rail Type Currencies Settlement Best For
Stripe SPTFiatUSD, EUR, GBPInstant (PaymentIntents)SaaS, API monetization
TempoStablecoinUSDC, USDT~500ms on-chainDeFi, cross-border
LightningBitcoinBTCInstant (preimage)Micropayments
CardFiatUSD, EUR, GBPStandard card networksTraditional commerce

Native MCP Binding

MPP defines error code -32042 as the MCP equivalent of HTTP 402. AI agents using MCP tool calls can pay for tools and resources without HTTP round-trips.

  • mpp.payment — Handle 402 challenges and generate credentials
  • mpp.discovery — Discover MPP-enabled resources
  • Spending limits — Per-agent daily and per-transaction budgets
  • Auto-pay — Agents pay autonomously within budget
// MCP error -32042 (Payment Required)
{
  "error": {
    "code": -32042,
    "message": "Payment Required",
    "data": {
      "challenge": "Payment eyJ...",
      "rails": ["stripe", "tempo"],
      "amount_cents": 50,
      "currency": "USD"
    }
  }
}

MPP vs x402 vs AP2

x402

Coinbase

  • USDC on EVM chains + Solana
  • Custom payment headers
  • Facilitator-based settlement
  • Crypto-native

MPP

Stripe + Tempo Labs

  • Stripe, Tempo, Lightning, Card
  • Standard HTTP auth headers
  • HMAC-SHA256 challenge binding
  • Fiat + crypto multi-rail

AP2

Google

  • Cart, Intent, Payment Mandates
  • Verifiable Digital Credentials
  • Wraps x402 + MPP as methods
  • Authorization + accountability

Try It Now

Three steps from discovery to paid API response.

1

Discover MPP capabilities

$ curl https://api.zelta.app/.well-known/mpp-configuration | jq

{
  "mpp_version": 1,
  "supported_rails": ["stripe", "tempo", "lightning", "card", "x402"],
  "endpoints": { ... }
}
2

Make a request to a monetized endpoint

$ curl -i https://api.zelta.app/v1/premium/data \
  -H "Authorization: Bearer YOUR_TOKEN"

HTTP/1.1 402 Payment Required
WWW-Authenticate: Payment eyJpZC...
Content-Type: application/json

{"error":"PAYMENT_REQUIRED","pricing":{"amount_cents":50,"currency":"USD","rails":["stripe","x402"]}}
3

Pay and receive data

$ curl https://api.zelta.app/v1/premium/data \
  -H "Authorization: Payment eyJjaGFsbG..." \
  -H "Accept: application/json"

HTTP/1.1 200 OK
Payment-Receipt: eyJzdGF0dXMi...

{"data": {"market_cap": "2.1T", "volume_24h": "89.4B"}}

Error Handling

RFC 9457 problem details for every failure mode. Your agents always know what went wrong.

Spending Limit Exceeded

Returned when an agent's daily or per-transaction budget has been exhausted.

{
  "type": "spending-limit-exceeded",
  "title": "Daily budget exceeded",
  "detail": "Agent agent-123 has spent $48.50 of $50.00 daily limit",
  "status": 402
}

Settlement Failed

Returned when the selected payment rail rejects the transaction.

{
  "type": "settlement-failed",
  "title": "Payment settlement failed",
  "detail": "Rail 'stripe' returned error: card_declined",
  "status": 402
}

Three Protocols, One Platform

FinAegis supports x402, MPP, and AP2 mandates. Your AI agents choose the best payment method for each transaction.