API reference

April 18, 2026 · View on GitHub

MPP (Machine Payments Protocol) is Stripe and Tempo's push-mode payment protocol. On Stellar, the buyer broadcasts a Soroban SAC transfer directly — the Facilitator verifies and acknowledges. No CCTP bridge, no workflow — the Facilitator acts as a payment verifier only.

Both endpoints are scoped to a single seller via the :merchantId path parameter. The seller must be registered on stellar:pubnet or stellar:testnet.

GET /merchants/:merchantId/mpp/config

Returns the MPP method spec for a seller. An agent uses this to know what currency, recipient, and network to sign over.

Rate limit: 100 requests per minute per IP.

Path params

ParamDescription
merchantIdThe merchantId from POST /register.

Response 200 OK

{
  "merchantId": "hb-a1b2c3",
  "protocol": "mpp",
  "methods": [
    {
      "name": "stellar",
      "intent": "charge",
      "recipient": "GSELLER...",
      "currency": "CAS3FL6SZ57...",
      "network": "STELLAR_PUBNET"
    }
  ]
}
FieldTypeDescription
merchantIdstringEchoed.
protocolstringAlways "mpp".
methods[].namestringAlways "stellar" for now.
methods[].intentstringAlways "charge".
methods[].recipientstringSeller's Stellar address (payments go directly, no bridge).
methods[].currencystringStellar USDC contract address on the active network.
methods[].networkstring"STELLAR_PUBNET" or "STELLAR_TESTNET" depending on NETWORK_ENV.

Errors

StatuserrorCause
404SELLER_NOT_FOUNDUnknown merchantId.
429RATE_LIMIT

* /merchants/:merchantId/mpp/charge

Charge mode endpoint. Accepts any HTTP method (GET, POST, PUT, PATCH, DELETE) because MPP negotiates the method during the challenge. The relay delegates to the official @stellar/mpp server.

Rate limit: 500 requests per minute per IP.

Path params

ParamDescription
merchantIdThe seller's merchantId.

Query parameters

ParamRequiredDefaultDescription
amountno"0"Charge amount in Stellar USDC base units (7 decimals).

Request body

Shape depends on the MPP protocol state:

  • First request (no payment): no body required. Relay issues a 402 Payment Required challenge.
  • Second request (with payment): MPP credential object, as produced by the @stellar/mpp client after signing the challenge.

Response

402 Payment Required — initial challenge:

Response headers include the MPP WWW-Authenticate challenge. The @stellar/mpp client reads this and signs a Soroban SAC transfer from the buyer to the seller's recipient.

200 OK — after successful payment:

{
  "paid": true,
  "merchantId": "hb-a1b2c3"
}

Headers include Payment-Receipt with proof of the on-chain transfer.

Errors

StatuserrorCause
404SELLER_NOT_FOUNDUnknown merchantId.
429RATE_LIMIT

Flow diagram

sequenceDiagram
    participant Agent as AI Agent (Stellar)
    participant Seller as Seller API (Stellar)
    participant Relay as Relay

    Agent->>Seller: GET /search?q=stellar
    Seller->>Relay: GET /merchants/:id/mpp/charge?amount=1000000
    Relay-->>Seller: 402 + WWW-Authenticate (MPP challenge)
    Seller-->>Agent: 402 + MPP challenge

    Note over Agent: Signs Soroban SAC transfer<br/>via @stellar/mpp client

    Agent->>Seller: GET /search + Payment credential
    Seller->>Relay: GET /merchants/:id/mpp/charge + credential
    Note over Relay: @stellar/mpp SDK verifies<br/>tx on-chain
    Relay-->>Seller: 200 + Payment-Receipt
    Seller-->>Agent: 200 OK + results

When to use MPP vs x402

SituationProtocol
Buyer and seller both on Stellar and you want the simplest push modelMPP
Buyer on any chain, need cross-chain settlementx402 (CCTP)
Buyer wants to delegate gas to the Facilitatorx402 (buyer signs an authorization; Facilitator broadcasts)
Seller wants an existing Stellar wallet and push-mode txMPP

See the dual-protocol explanation for the full trade-off.