Frontier
MPP Frontier
Use MPP (Machine Payments Protocol) to accept payments from agents.
MPP, the Machine Payments Protocol, is an open protocol that lets agents pay for your APIs and services programmatically without a checkout UI, co-authored by Stripe and Tempo.
When an agent requests your API or service, your server returns an HTTP 402 response with payment details. The agent authorizes the payment, retries the request, and gets access to the paid resource along with a receipt.
Before you begin
- Create a Stripe profile in the Stripe Dashboard.
- Store your profile’s profile _ ID. You use this value as the networkId to create your endpoint .
You can retrieve your profile ID using Business Profiles.
Command Line
For card payments through Shared Payment Tokens (SPTs), the minimum amount is 0.50 USD. For stablecoin payments, the minimum amount is 0.01 the related setting.
Use a coding agent
You can build an API that uses MPP with a single prompt to your coding agent:
Command Line
To build the integration yourself, follow the steps in this guide to install the dependencies, create an endpoint that returns an HTTP 402 challenge and verifies payments, add payment methods such as cards or stablecoins, and test the full flow.
Use this approach if you want more control over your server implementation or want to understand each part of the integration.
You can also review the app’s complete source code on GitHub.
Install dependencies
Install the required dependencies:
Command Line
npm install mppx stripe
Create your endpoint
Create an endpoint that checks for a 0.50 USD payment on each request and returns an HTTP 402 challenge if no payment is present. If it verifies a payment, it returns a receipt.
Node.js
Start accepting payments
Use MPP to accept payments from agents with a variety of payment methods, including cards through Shared Payment Tokens (SPTs) and stablecoin payments.
See availability requirements for SPTs and stablecoin payments to learn more.
By default, the endpoint you create supports SPTs. Make sure that you also add support for stablecoin payments to support agents with crypto wallets and charge for payments as low as 0.01 the related setting.
Create a deposit address
Agents with stablecoins send payments to this onchain address on supported blockchains, such as Tempo. Stripe automatically offramps these payments and settles them into your Stripe balance.
You can manage addresses using Crypto Deposit Addresses.
Command Line
Store the returned address as the related setting in your server’s environment variables.
You can also fetch an existing deposit address that your account created previously:
Command Line
Choose a deposit address from the data array and store its address field as the related setting in your server’s environment variables.
You can create deposit addresses as often as you want, but we recommend that you keep these calls off your core request path.
Update your endpoint
Add the deposit address to your stripeMachinePayments configuration:
Node.js
const stripeMachinePayments = stripe.create({
client: stripeClient,
networkId: process.env.STRIPE_PROFILE_ID!,
livemode: !process.env.STRIPE_SECRET_KEY!.includes('_test_'),
depositAddresses: {
tempo: process.env.TEMPO_DEPOSIT_ADDRESS!
},
});
The existing code works without other changes. defaultMethods() adds Tempo, and the existing mppx.charge() handler offers both SPT and Tempo payments at the same 0.50 USD amount. You can charge different amounts by payment method by using mppx.compose().
Enable fee sponsorship
Stripe can sponsor your customers’ Tempo network fees, so you don’t need to operate or fund a fee-payer wallet. Customers still sign and authorize their payments for transactions.
Private preview
This feature is in private preview. To request access, email with your Stripe account ID.
Test your endpoint
Test with mppx validate
Run mppx validate to automatically verify your implementation end-to-end. The command tests discovery, challenge formats, error handling, and the full payment flow.
Command Line
npx mppx@latest validate http://localhost:4242
We recommend running validate against both a sandbox and live mode version of your server. In a sandbox, the CLI automatically completes roundtrip test transactions against your server. In live mode, the CLI can also complete roundtrip transactions with real funds.
Test manually
You can also test each step individually. First, verify your server returns a 402 with the payment requirements:
Use the link-cli to issue a test SPT for your account. The link-cli is a tool that can provision one-time shared payment token credentials using your Link account. Follow the instructions at link.com/agents to install the link-cli skills or register it as an MCP server in your preferred agent.
To test with the link-cli manually, directly invoke its commands:
Command Line
npx @stripe/link-cli auth login
Command Line
npx @stripe/link-cli mpp pay http://localhost:4242/paid \
-X POST \
-d '{}' \
--context "Testing machine payments integration on Stripe MPP using the link-cli on http://localhost:4242/paid."
In the Dashboard, go to Payments to see the transaction.
Test with a Stripe sandbox
To test in a sandbox:
- Configure your server to use your sandbox Stripe API key.
- Create a Stripe profile for your sandbox and use the profile _ test _ ID.
- Create a Tempo deposit address in your sandbox account:
Command Line
Store the returned address as your the related setting environment variable. The configuration above detects your sandbox API key and sets livemode to false. mppx’s stripe.create automatically configures Tempo testnet.
