Sign in
An image of the Stripe logo
Create account
Sign in
Home
Payments
Business operations
Financial services
Developer tools
No-code
All products
Home
Payments
Business operations
Home
Payments
Business operations
Financial services
Developer tools
Support
Overview
Online payments
Products and prices
Invoicing
Subscriptions
    Overview
    How subscriptions work
    Recurring pricing models
    Get started
    Quickstart
    Integrate a SaaS business
    Embed a pricing table
    Design an integration
    Build a subscriptions integration
    Migrate subscriptions to Stripe
    Billing resources
    Coupons
    Customers
    Subscriptions
    Subscription invoices
    Manage subscriptions
    Change subscriptions
    Usage-based billing
    Use trial periods
    Set payment methods
      ACH Direct Debit
      Bacs Direct Debit in the UK
      Bank transfer
      BECS Direct Debit in Australia
      Cash App Pay
      Pre-authorized debit in Canada
      SEPA Direct Debit in the EU
      iDEAL with SEPA Direct Debit
      Bancontact with SEPA Direct Debit
      Sofort with SEPA Direct Debit
    Subscriptions with multiple products
    Set subscription quantities
    Subscription webhooks
    Schedule subscriptions
    Tax
    Sales-led B2B billing
    Integrate with Salesforce
    Manage recurring revenue
    Revenue recognition
    Revenue recovery
    Subscription metrics
    Customer management
    Overview
    Set up the the no-code customer portal
    Set up the customer portal with the API
    Configure the customer portal
    Testing
    Test your integration
    Test clocks
    Strong Customer Authentication (SCA)
    Invoices API updates
Quotes
In-person payments
Multiparty payments
After the payment
Add payment methods
Payment Links
Stripe Checkout
Stripe Elements
About the APIs
Regulation support
Implementation guides
Testing
Billing
·
HomePaymentsSubscriptionsSet payment methods

Set up a subscription with Cash App Pay

Learn how to create and charge for a subscription with Cash App Pay.

Use this guide to set up a subscription using Cash App Pay as a payment method.

Create and confirm a subscription using two API calls. The first API call uses the Setup Intents API to set Cash App Pay as a payment method. The second API call sends customer, product, and payment method information to the Subscriptions API to create a Subscription and confirm a payment in one call.

Create a product and price
Dashboard

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:

  1. Navigate to the Add a product page.
  2. Enter a Name for the product.
  3. Enter 15 for the price.
  4. Select USD as the currency.
  5. Click Save 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_G0FvDp6vZvdwRZ.

Create a SetupIntent
Server-side

Create a SetupIntent to save a customer’s payment method for future payments. The SetupIntent tracks the steps of this setup process.

Command Line
curl https://api.stripe.com/v1/setup_intents \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d confirm=true \ -d return_url="https://www.stripe.com" \ -d usage=off_session \ -d "payment_method_data[type]"=cashapp \ -d "payment_method_types[]"=cashapp \ -d "mandate_data[customer_acceptance][type]"=online \ -d "mandate_data[customer_acceptance][online][ip_address]"="127.0.0.0" \ -d "mandate_data[customer_acceptance][online][user_agent]"=device

The returned SetupIntent includes a client secret, which the client side uses to securely complete the setup instead of passing the entire SetupIntent object. You can use different approaches to pass the client secret to the client side. The SetupIntent response also includes a payment method ID that you need to use in the next step to confirm a PaymentIntent.

The SetupIntent response includes the status requires_action, which means your users must perform another action to complete the SetupIntent. Use the next_action.cashapp_handle_redirect_or_display_qr_code object from the SetupIntent response to redirect your users to a Stripe hosted page that displays the QR code, or render the QR code directly. To authenticate users, follow the instructions to confirm SetupIntent and save a payment method. After they authenticate, the Cash App mobile application redirects users to the return_url on their mobile device, and the SetupIntent moves to a succeeded state.

Create a subscription
Server-side

Create a subscription that has a price and customer. Set the value of the default_payment_method parameter to the PaymentMethod ID from the SetupIntent response.

Command Line
curl https://api.stripe.com/v1/subscriptions \ -u
sk_test_4eC39HqLyjWDarjtT1zdp7dc
: \ -d customer="{{CUSTOMER_ID}}" \ -d "items[0][price]"="{{PRICE_ID}}" \ -d default_payment_method="{{PAYMENT_METHOD_ID}}"

Included in the response is the subscription’s first PaymentIntent, containing the client secret, which you use on the client side to securely complete the payment process instead of passing the entire PaymentIntent object. Return the client_secret to the frontend to complete payment.

To create a subscription with a free trial period, see Subscription trials.

Was this page helpful?
Questions? Contact us.
Watch our developer tutorials.
Check out our product changelog.
Powered by Markdoc
You can unsubscribe at any time. Read our privacy policy.
On this page
Create a product and price
Create a SetupIntent
Create a subscription
Create a product and price
Create a subscription
Confirm a payment
Create a product and price
Create a Checkout Session
Test your integration
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Login to your Stripe account and press Control + Backtick on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g. )
The Stripe Shell is best experienced on desktop.
$