Subscription Plan Checkout

Applies to: Checkout API | Subscriptions API | Cards API | Orders API

Learn how to create a quick pay checkout for a subscription plan.

Link to section

Overview

If a seller offers recurring subscriptions, applications can use the CreatePaymentLink endpoint to generate a Square-hosted checkout page for buyers to pay and subscribe to a subscription plan variation.

Link to section

Requirements and limitations

  • The Checkout API only supports subscription plan variations with one paid phase (or one free phase and one paid phase).
  • The Checkout API doesn't support app_fee_money as a checkout option when specifying the plan variation ID for recurring payments.
  • Cash App Pay and Afterpay aren't supported for subscription payments.
Link to section

Subscription plans and variations

A recurring subscription is represented by three parts in the Square API data model:

  • Subscription plan - Represents what is being sold. This can be a single item, a series of recurring services, or a category of items or services.
  • Subscription plan variation - Represents how the product is being sold; that is, how often and for what price.
  • Subscription - Represents who is buying the product or service. It's an agreement with a specific customer to purchase a subscription from the business.

For more information, see Subscription Plans and Variations.

The Checkout API's CreatePaymentLink endpoint creates a Square-hosted checkout page for buyers to subscribe to a specific subscription plan variation. Your CreatePaymentLink request requires the following:

  • price_money - The initial phase price as defined in the subscription plan variation. The price in your checkout request should match the price of the subscription plan variation. If it doesn't match, this acts as a price override.
  • subscription_plan_id - The ID of the subscription plan variation.
Link to section

Create a payment link for a Square subscription plan

Use the following steps to create a payment link for a Square subscription:

  1. Create a subscription plan to act as a category for various subscription tiers.
  2. Create a single-phase subscription plan variation. This example shows a weekly $15 subscription fee.
  3. Create a checkout page that you can send to a customer to pay and subscribe to the plan variation.
Link to section

1. Create a subscription plan

This request creates a new subscription plan called "Membership tiers".

Upsert catalog object

Link to section

2. Create a subscription plan variation

This request creates a subscription plan variation called "Silver Membership Tier" with one phase (a $15/week subscription fee). The subscription_plan_id value associates this variation with the plan created in step 1.

Upsert catalog object

Link to section

3. Create a payment link

Create a payment link using the Checkout API and the ID of the subscription plan variation you created previously. Put this ID value in the subscription_plan_id field.

Note

Customers subscribe to a subscription plan variation, not to a subscription plan. For this reason, the subscription_plan_id value in the CreatePaymentLink request must contain the ID value for a subscription plan variation.

Create payment link

Your application can send the url in the payment_link to the buyer. The buyer experience is similar to what is described in Quick Pay Checkout. When the buyer makes a payment on the checkout page, Square does the following:

  • Searches the seller's Customer Directory for a customer with the phone number provided by the buyer. If no customer exists, a new one is created.
  • Adds the card on file to the customer's profile. To view cards on file, you can call the ListCards endpoint (Cards API) and specify the customer ID.
  • Updates the order by adding a fulfillment (see Order.fulfillments). You can use the RetrieveOrder endpoint (Orders API) to verify the order.
  • Creates a new subscription. You can call the SearchSubscriptions endpoint (Subscriptions API) and provide the customer ID to retrieve the subscription.
  • Charges the buyer's card on file for the first priced subscription phase. If the plan offers a free initial phase, the card is charged after the free phase.
  • Continues to charge the card on file as specified by the cadence of the subscription plan variation. In this example, the buyer's card is charged weekly.