Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
Overview
Billing
OverviewAbout the Billing APIs
Subscriptions
    Overview
    How subscriptions work
    Quickstart
    Use cases
    Build your integration
    Subscription features
      Subscription invoices
      Subscription schedules
      Subscription pricing
      Recurring pricing models
      Embed a pricing table
      Start subscriptions
      Set quantities
      Set billing cycles
      Backdate subscriptions
      Subscribe to multiple items
      Set trial periods
      Apply coupons
      Migrate subscriptions to Stripe
      How credit prorations are calculated
      Subscription payments
      Subscription payment methods
        ACH Direct Debit
        Amazon Pay
        Bacs Direct Debit in the UK
        Bank transfer
        BECS Direct Debit in Australia
        Cash App Pay
        PayPal
        Revolut Pay
        Korean Cards
        Kakao Pay
        Naver Pay
        Pre-authorized debit in Canada
        SEPA Direct Debit in the EU
        iDEAL with SEPA Direct Debit
        Bancontact with SEPA Direct Debit
      Integrate with third-party payment processing
      Collection methods
      Strong Customer Authentication (SCA)
      Manage subscriptions
      Modify subscriptions
      Manage pending updates
    Entitlements
    Analytics
Invoicing
Usage-based billing
Quotes
Customer management
Billing with other products
Revenue recovery
Automations
Test your integration
Tax
Overview
Use Stripe tax
Manage compliance
Reporting
Overview
Select a report
Configure reports
Reports API
Reports for multiple accounts
Revenue recognition
Data
OverviewSchema
Custom reports
Data Pipeline
Data management
HomeRevenueSubscriptionsSubscription featuresSubscription 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 sends customer and product information to the Subscriptions API to create a Subscription and PaymentIntent in one call. The response includes a PaymentIntent ID that you must use in a Payment Intents API call to confirm a payment.

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 subscription
Server-side

Create a subscription that has a price and customer with status of incomplete by providing the payment_behavior parameter with a value of default_incomplete. Set the payment_settings.save_default_payment_method=on_subscription parameter to save a payment method when a subscription is activated.

Command Line
cURL
curl https://api.stripe.com/v1/subscriptions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer={{CUSTOMER_ID}} \ -d payment_behavior=default_incomplete \ -d "items[0][price]"={{PRICE_ID}} \ -d "payment_settings[save_default_payment_method]"=on_subscription \ -d "expand[0]"="latest_invoice.payments" \ -d "expand[1]"="latest_invoice.confirmation_secret"

The response includes the subscription’s first Invoice. This contains the invoice’s payments, which includes a default PaymentIntent that Stripe generated for this invoice and the confirmation secret which you can use on the client side to securely complete the payment process instead of passing the entire PaymentIntent object. Return the latest_invoice.confirmation_secret.client_secret to the front end to complete payment.

Get the PaymentIntent ID that you must use to confirm a payment from latest_invoice.payments.

Note

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

Confirm a payment
Server-side

Confirm a payment with PaymentIntents using the PaymentIntent ID from the Subscriptions response.

Add the PaymentIntent ID to the URL path and set the value of the payment_method_types parameter to cashapp.

Command Line
cURL
curl https://api.stripe.com/v1/payment_intents/:id/confirm \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "payment_method_data[type]"=cashapp \ --data-urlencode return_url="https://www.stripe.com" \ -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 \ -d "mandate_data[customer_acceptance][accepted_at]"=1660000000

The PaymentIntent response includes the status requires_action, which means your users must perform another action to complete the PaymentIntent. Use the next_action.cashapp_handle_redirect_or_display_qr_code object from the PaymentIntent 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 for redirect and authenticate transactions. After they authenticate, the Cash App mobile application redirects users to the return_url on their mobile device, and the PaymentIntent moves to a succeeded state.

After a successful payment, the subscription becomes active and saves the payment method as the default payment method.

Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc