What is SPT?
SPT (Shared Payment Token) lets AI agents pay for API calls with Stripe — using real card payments instead of crypto. A user pre-authorizes a token with spending limits, and the agent uses it to pay services autonomously.
How it works
WWW-Authenticate: Payment method="stripe", intent="charge", request="" request field to learn the price (amount, currency)Authorization: Payment containing the SPTKey concepts
- Shared Payment Token: A scoped, limited-use Stripe token (prefixed
spt_) that grants an agent permission to spend - Usage limits: Each token has max amount, currency, and expiration — the user controls how much the agent can spend
- mppx middleware: The same middleware that handles MPP (Tempo) payments also handles SPT — a server can accept both
- Multiple challenges: A 402 response can include multiple
WWW-Authenticate: Paymentheaders for different methods (tempo, stripe), letting agents choose how to pay
How agents discover SPT
SPT uses two discovery channels:
method="stripe" in the WWW-Authenticate: Payment challengex-payment-info extension on operations that require paymentThe 402 response is always authoritative — OpenAPI metadata is advisory only.
How to add SPT to your service
npm install mppxLearn more
- Stripe SPT docs — Token creation and usage
- mppx on npm — Middleware that handles both MPP and SPT
- paymentauth.org — Payment discovery spec