Set up a subscription with stablecoin paymentsPrivate preview
Learn how to create and charge for a subscription with stablecoins.
Use this guide to set up a subscription that withdraws recurring stablecoin payments from a customer’s crypto wallet.
Interested in accepting subscription payments in stablecoins?
Enter your email to request access.
Create a product and priceDashboard
Products represent the item or service you’re selling. Prices define how much and how frequently you charge for a product. This includes how much the product costs, what currency you accept, and whether it’s a one-time or recurring charge. If you only have a few products and prices, create and manage them in the Dashboard.
This guide uses a stock photo service as an example and charges customers a 15 USD monthly subscription. To model this:
- Go to the Products page and click Create product.
- Enter a Name for the product. You can optionally add a Description and upload an image of the product.
- Select a Product tax code. Learn more about product tax codes.
- Select Recurring. Then enter 15 for the price and select USD as the currency.
- Choose whether to Include tax in price. You can either use the default value from your tax settings or set the value manually. In this example, select Auto.
- Select Monthly for the Billing period.
- Click More pricing options. Then select Flat rate as the pricing model for this example. Learn more about flat rate and other pricing models.
- Add an internal Price description and Lookup key to organize, query, and update specific prices in the future.
- Click Next. Then click Add product.
After you create the product and the price, record the price ID so you can use it in subsequent steps. The pricing page displays the ID and it looks similar to this: price_.
Create a Checkout SessionServer-side
Your customer must authorize you to use their crypto wallet for future payments through Stripe.
Add a checkout button to your website that calls a server-side endpoint to create a Checkout Session.
<html> <head> <title>Checkout</title> </head> <body> <form action="/create-checkout-session" method="POST"> <button type="submit">Checkout</button> </form> </body> </html>
Create a Checkout Session in subscription mode to collect the required information. After creating the Checkout Session, redirect your customer to the URL that the response returns.
curl https://api.stripe.com/v1/checkout/sessions \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ --data-urlencode "success_url=https://example.com/success" \ -d "line_items[0][price]={{RECURRING_PRICE_ID}}" \ -d "line_items[0][quantity]=1" \ -d mode=subscription
Confirm the payment is successful
When your customer completes a payment, Stripe redirects them to the URL that you specified in the success_ parameter. Typically, this is a page on your website that informs your customer that their payment was successful.
After the payment succeeds, the underlying PaymentIntent status changes from processing to succeeded.
You can confirm the payment is successful in several ways:
Successful payments display in the Dashboard’s list of payments. When you click a payment, it takes you to the payment details page. The Checkout summary section contains billing information and the list of items purchased, which you can use to manually fulfill the order.

Note
Stripe can help you keep up with incoming payments by sending you email notifications whenever a customer successfully completes one. Use the Dashboard to configure email notifications.
Test your integration
Test your crypto payment integration by opening the payment redirect page using your test API keys. You can test a successful payment flow at no cost using testnet assets.
- In a sandbox, create a new transaction using your chosen integration method, and open its redirect URL.
- Connect your preferred wallet and payment network.
- Complete the payment, and validate that you’re redirected to the expected URL.
Test payments with testnet assets
Most cryptocurrencies offer testnet assets, or tokens that have no monetary value, that you can use to test blockchain transactions. Stripe recommends the MetaMask wallet, Polygon Amoy testnet, and Circle faucet for testing, but you can use your own preferred services.
Install a wallet
- Download the MetaMask extension for your web browser.
- Create a new wallet or import an existing one.
Enable a testnet
- In your MetaMask wallet, select Networks from the main menu.
- Click Add custom network.
- Enter the following details:
- Network name:
Amoy - Default RPC URL:
https://rpc-amoy.polygon. technology/ - Chain ID:
80002 - Currency symbol:
POL - Block explorer URL:
https://amoy.polygonscan. com/
- Network name:
- Click Save.
Import a token
- In your MetaMask wallet, under Tokens, select Amoy from the network dropdown.
- Click the overflow menu (), and select Import tokens.
- Click Select a network > Amoy.
- Under Token contract address, paste the Polygon Amoy testnet contract address:The Token symbol field automatically updates with
0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582USDCand the Decimals field with6. - Click Next.
- Verify that you’re importing the
USDCtoken, and then click Import.
Your MetaMask wallet now shows POL and USDC in the tokens list.
When testing refunds, the token sent to your wallet might have a different contract than the one used for payment. We recommend reviewing the transaction_hash of your refund on block explorer, and adding that token’s contract to your wallet. For example, you might see a 0x58277ebcabbe2a6694fbca8daf9e23163dbacf3e token contract address for Sepolia ETH USDC refunds.
Get testnet assets
Note
To use some testnet faucets, you might need to hold a small amount of mainnet tokens.
- Open faucet.circle.com
- Click USDC.
- Under Network, select Polygon PoS Amoy.
- Under Send to, paste your wallet address.
- Click Send 20 USDC.
In addition to USDC for making payments, you need POL to pay transaction costs:
- Open faucet.polygon.technology.
- Under Select Chain & Token, select Polygon Amoy and POL.
- Under Verify your identity, click the third-party platform you want to authenticate with, and complete the login process.
- Under Enter Wallet Address, paste your wallet address.
- Click Claim.
Testnet transactions can take a few minutes to complete. Check your wallet to confirm that the USDC and POL has transferred.