Back to blog home

Stripe Machine Payments and Shared Payment Tokens, Explained for Agent Builders

Most services still sell through a signup page and a card form. An agent can't get through that without a person. Stripe's machine payments replace those steps: the server returns a payment challenge, the agent presents a credential, and Stripe settles the money to the seller's balance.

Two ideas do the work. The Machine Payments Protocol (MPP) is how the request is priced and paid over HTTP. A Shared Payment Token (SPT) is how a customer's card gets used without the agent or the seller holding the card number.

MPP in one exchange

Stripe describes MPP as an open protocol co-authored by Stripe and Tempo. The wire format is written up as an Internet-Draft, the "Payment" HTTP Authentication Scheme. It is a draft, not a finished standard.

The exchange has three parts:

You can see a live challenge without paying. This is one of our endpoints:

curl -si -X POST "https://pageverified.com/api/v1/credits/buy?pack=19"

The request value is base64url-encoded JSON. Decoded, ours reads:

{
  "amount": "1900",
  "currency": "usd",
  "methodDetails": {
    "networkId": "profile_61ViP8lVHPzHYH53xA6ViP8kN18SRAmZCD2EgpBD6TYW",
    "paymentMethodTypes": ["card"]
  }
}

amount is in the smallest currency unit, so 1900 is US$19.00. The Stripe charge method draft defines these fields. networkId is the seller's Stripe profile, and that profile is what an SPT gets issued to.

What a Shared Payment Token is

From the SPT documentation: SPTs "grant sellers scoped access to customers' payment methods for agent-initiated purchases". The agent never hands over the card. It gets a token that one named seller can charge, inside limits.

The agent side of the API looks like this. The profile shown is the test seller from Stripe's docs, so this works in a sandbox. Use the real seller's profile in live mode.

curl https://api.stripe.com/v1/shared_payment/issued_tokens \
  -u "$STRIPE_SECRET_KEY:" \
  -H "Stripe-Version: 2026-09-30.preview" \
  -d "payment_method={{PAYMENTMETHOD_ID}}" \
  -d "seller_details[network_business_profile]=profile_test_61TU90nIeGjU7NNVXA6TU90m7ISQWsBxpcx9lASWWXTk" \
  -d "usage_limits[currency]=usd" \
  -d "usage_limits[expires_at]=1798761600" \
  -d "usage_limits[max_amount]=1900" \
  --data-urlencode "return_url=https://example.com/agent-checkout/return"

The three limits are the point of the design. max_amount caps the charge, expires_at ends it, and currency fixes the unit. seller_details says who may use it. Note the preview API version in the header. This surface is still moving, so check the docs before you depend on a shape.

An SPT is a small state machine, and it can loop:

The requires_action state matters most to agent builders. Stripe may trigger 3D Secure because an issuer asks for it or a rule requires it. Then a person has to act, so your agent needs a way to reach one or to stop cleanly. Listen for the shared_payment.issued_token.requires_action webhook rather than assuming every charge goes through. You can also call the revoke endpoint at any time, which stops a seller from creating a payment with that token.

Paying with the SPT

The token goes into the MPP credential. The Stripe charge method draft puts it in the payload as spt, a value starting with spt_. The seller's server then:

The auth draft requires single-use proofs, and the MPP challenge docs bind the challenge id to its parameters so a client can't change the amount and reuse the ID.

Stripe also ships a command-line wallet for testing. npx @stripe/link-cli mpp pay <url> issues a test SPT from a Link account. Link's agent wallet lets a person approve each purchase or set a budget.

Limits to design around

These come from Stripe's machine payments page and are worth checking again before launch:

Stripe also supports stablecoin payments over x402 on Base, recorded as PaymentIntents after a facilitator settles them. That means one Stripe account can receive both, and reconciliation stays in one place.

What we run

Our credit-pack endpoint accepts MPP with SPTs and x402 with USDC on Base, and a pack query parameter picks 19, 49 or 149 dollars. The offers are listed in our OpenAPI document. We describe this as what the endpoint accepts. It doesn't say anything about how many agents use it.

Scoped tokens are a real safety improvement over a card number in an environment variable, but they cap money, not judgment. An SPT will not tell you whether the seller was the right one to pay. That decision stays with your agent.

Sources