Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseUse Managed Payments
Use Payment Links
Use a prebuilt checkout page
Build a custom integration with Elements
Build an in-app integration
Payment methods
Add payment methods
    Overview
    Payment method integration options
    Manage default payment methods in the Dashboard
    Payment method types
    Cards
    Pay with Stripe balance
    Stablecoin payments
      Accept stablecoin payments
    Bank debits
    Bank redirects
    Bank transfers
    Credit transfers (Sources)
    Buy now, pay later
    Real-time payments
    Vouchers
    Wallets
    Enable local payment methods by country
    Custom payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
In-app Payments
Payment scenarios
Handle multiple currencies
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Beyond payments
Incorporate your company
Crypto
Agentic commerce
Financial Connections
Climate
Understand fraud
Radar fraud protection
Manage disputes
Verify identities
United States
English (United States)
HomePaymentsAdd payment methodsStablecoin payments

Accept stablecoin payments

Start accepting stablecoins by enabling the Crypto payment method.

You can accept stablecoin payments through Payment Links, Checkout, Elements, or the Payment Intents API. When paying with stablecoins such as USDC, customers get redirected to crypto.stripe.com to connect their crypto wallet and complete the transaction. Funds settle in your Stripe balance in USD.

Before you begin

Regional considerations
United States

Customers can use stablecoins as payment globally, but currently only US businesses can accept stablecoin payments.

To start accepting stablecoin payments, activate the Crypto payment method:

  1. Make sure your Stripe account is Active.
  2. Go to Settings > Payments > Payment methods and request the Crypto payment method.
  3. Stripe reviews your access request, and might contact you for more details if necessary. In this case, the payment method appears as Pending while we review your request.
  4. After you’re approved, Crypto becomes active in the Dashboard.

Use with dynamic payment methods Recommended

If you use Stripe’s default dynamic payment methods with Payment Links, Hosted Checkout, Embedded Checkout Forms, or Elements, then you don’t need to make any further updates. Stripe automatically displays stablecoin payment options to eligible customers.

Use with a custom integration

If necessary, you can add the crypto payment method to your payment integration manually.

Integrate Pay with Crypto directly through the Payment Intents API.

Set up Stripe
Server-side

First, create a Stripe account or sign in.

Use our official libraries to access the Stripe API from your application:

Command Line
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
# Available as a gem sudo gem install stripe
Gemfile
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
# If you use bundler, you can add this line to your Gemfile gem 'stripe'

Create a PaymentIntent and retrieve the client secret
Server-side

The PaymentIntent object represents your intent to collect payment from your customer and tracks the lifecycle of the payment process. Create a PaymentIntent on your server and specify the amount to collect and a supported currency. If you have an existing PaymentIntents integration, add crypto to the list of payment_method_types.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/payment_intents \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d amount=1099 \ -d currency=usd \ -d "payment_method_types[]"=crypto

Retrieve the client secret

The PaymentIntent includes a client secret that the client side uses to securely complete the payment process. You can use different approaches to pass the client secret to the client side.

Retrieve the client secret from an endpoint on your server, using the browser’s fetch function. This approach is best if your client side is a single-page application, particularly one built with a modern frontend framework like React. Create the server endpoint that serves the client secret:

main.rb
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
get '/secret' do intent = # ... Create or retrieve the PaymentIntent {client_secret: intent.client_secret}.to_json end

And then fetch the client secret with JavaScript on the client side:

(async () => { const response = await fetch('/secret'); const {client_secret: clientSecret} = await response.json(); // Render the form using the clientSecret })();

Redirect to the stablecoin payments page

Use Stripe.js to submit the payment to Stripe when a customer chooses Crypto as a payment method. Stripe.js is the foundational JavaScript library for building payment flows. It automatically handles complexities like the redirect described below, and lets you extend your integration to other payment methods. Include the Stripe.js script on your checkout page by adding it to the <head> of your HTML file.

<head> <title>Checkout</title> <script src="https://js.stripe.com/clover/stripe.js"></script> </head>

Create an instance of Stripe.js with the following JavaScript on your checkout page:

// Set your publishable key. Remember to change this to your live publishable key in production! // See your keys here: https://dashboard.stripe.com/apikeys const stripe = Stripe(
'pk_test_TYooMQauvdEDq54NiTphI7jx'
);

Use the PaymentIntent client secret and call stripe.confirmPayment to handle the Pay with Crypto redirect. Add a return_url to determine where Stripe redirects the customer after they complete the payment:

const form = document.getElementById('payment-form'); form.addEventListener('submit', async function(event) { event.preventDefault(); // Set the clientSecret of the PaymentIntent const { error } = await stripe.confirmPayment({ clientSecret: clientSecret, confirmParams: { payment_method_data: { type: 'crypto', }, // Return URL where the customer should be redirected after the authorization return_url: `${window.location.href}`, }, }); if (error) { // Inform the customer that there was an error. const errorElement = document.getElementById('error-message'); errorElement.textContent = result.error.message; } });

The return_url corresponds to a page on your website that displays the result of the payment. You can determine what to display by verifying the status of the PaymentIntent. To verify the status, the Stripe redirect to the return_url includes the following URL query parameters. You can also append your own query parameters to the return_url. They persist throughout the redirect process.

payment_intentThe unique identifier for the PaymentIntent.
payment_intent_client_secretThe client secret of the PaymentIntent object.

OptionalHandle post-payment events

Stripe sends a payment_intent.succeeded event when the payment completes. Use the Dashboard, a custom webhook, or a partner solution to receive these events and run actions, like sending an order confirmation email to your customer, logging the sale in a database, or starting a shipping workflow.

Listen for these events rather than waiting on a callback from the client. On the client, the customer might close the browser window or quit the app before the callback executes, and malicious clients could manipulate the response. Setting up your integration to listen for asynchronous events can also help you accept more payment methods in the future. To see the differences between all supported payment methods, see our payment methods guide.

Receive events and run business actions

There are a few options for receiving and running business actions:

  • Manually: Use the Stripe Dashboard to view all your Stripe payments, send email receipts, handle payouts, or retry failed payments.
  • Custom code: Build a webhook handler to listen for events and build custom asynchronous payment flows. Test and debug your webhook integration locally with the Stripe CLI.
  • Prebuilt apps: Handle common business events, like automation or marketing and sales, by integrating a partner application.

Supported currencies

You can create crypto payments in the currencies that map to your country. The default local currency for crypto is USD, with customers also seeing their purchase amount in this currency.

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.

  1. In a sandbox, create a new transaction using your chosen integration method, and open its redirect URL.
  2. Connect your preferred wallet and payment network.
  3. 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

  1. Download the MetaMask extension for your web browser.
  2. Create a new wallet or import an existing one.

Enable a testnet

  1. In your MetaMask wallet, select Networks from the main menu.
  2. Click Add custom network.
  3. Enter the following details:
    • Network name: Polygon Amoy
    • Default RPC URL: https://rpc-amoy.polygon.technology/
    • Chain ID: 80002
    • Currency symbol: POL
    • Block explorer URL: https://amoy.polygonscan.com/
  4. Click Save.

Import a token

  1. In your MetaMask wallet, under Tokens, select Polygon Amoy from the network dropdown.
  2. Click the overflow menu (), and select Import tokens.
  3. Click Select a network > Polygon Amoy.
  4. Under Token contract address, paste the Polygon Amoy testnet contract address:
    0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582
    The Token symbol field automatically updates with USDC and the Decimals field with 6.
  5. Click Next.
  6. Verify that you’re importing the USDC token, and then click Import.

Your MetaMask wallet now shows Polygon Amoy and USDC in the tokens list.

Get testnet assets

  1. Open faucet.circle.com
  2. Click USDC.
  3. Under Network, select Polygon PoS Amoy.
  4. Under Send to, paste your wallet address.
  5. Click Send 10 USDC.

In addition to USDC for making payments, you need POL to pay transaction costs:

  1. Open faucet.polygon.technology.
  2. Under Select Chain & Token, select Polygon Amoy and POL.
  3. Under Verify your identity, click the third-party platform you want to authenticate with, and complete the login process.
  4. Under Enter Wallet Address, paste your wallet address.
  5. Click Claim.

Testnet transactions can take a few minutes to complete. Check your wallet to confirm that the USDC and POL has transferred.

More testnet faucets

Check these faucet services for more testing token options:

  • Paxos USDP
  • Devnet SOL
  • Sepolia ETH
  • Amoy POL
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc
Related Guides
Stablecoin subscriptions