Announcing Subscriptions API Beta

Announcing Subscriptions API Beta

Create subscription plans and enroll customers from any platform

From monthly wine deliveries to virtual fitness memberships, subscriptions have become a popular way for businesses to handle no-contact commerce. Despite the recent impact to our global economy, the subscriptions market has stayed relatively stable. According to a recent Subscriptions Impact Report released by Zuora, 50% of global subscription-based companies continue to grow without any significant impact to their growth rate, and 18% of companies are experiencing accelerated growth rate. However, for sellers using multiple platforms to run their business, managing subscription plans and billing is not a simple task.

Today, we’re excited to release the Subscriptions API in beta to enable developers to automatically create, retrieve, and update subscription plans from any application or solution. This includes enrolling customers in personalized subscription plans and generating billing on a recurring basis with Square Invoices. The API offers key features like multiple billing cadences (e.g., weekly, monthly, or yearly billing) and billing phases (e.g., free trials or discount periods), so developers can create complex subscription plans that fit sellers’ unique needs.

The API also enables centralized data management, so sellers can view and manage their subscriptions in Square Dashboard. By enabling subscription-based commerce on any platform, developers can unlock growth opportunities for sellers, drive predictable revenue, and strengthen customer loyalty.

How Subscriptions API Works

Let’s say you’re building an online booking platform for virtual dance classes in New York City. You’ll need to create a subscription plan using the Catalog API, then enroll customers using the Subscriptions API.

To get started, call the UpsertCatalogObject endpoint to create a subscription plan. Define the phase by setting the cadence to monthly and the price to 200 USD.

curl -X POST \
-H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
   "idempotency_key":"{{UNIQUE_KEY}}",
   "object":{
      "type":"MONTHLY_SUBSCRIPTION",
      "id":"#plan",
      "subscription_plan_data":{
         "name":"Virtual Dance Class",
         "phases":[
            {
               "cadence":"MONTHLY",
               "recurring_price_money":{
                  "amount":200,
                  "currency":"USD"
               }
            },
         ]
      }
   }
}'

Then, call the CreateSubscription endpoint to enroll a customer in a subscription plan.

curl -X POST \
-H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
  "idempotency_key": "{{UNIQUE_KEY}}",
  "location_id": "{{NEW_YORK_CITY}}",
  "plan_id": "{{SUBSCRIPTION_PLAN_ID}}",
  "customer_id": "{{CUSTOMER_ID}}"
}'

Once the customer is enrolled in a subscription, Square sends an invoice to the customer's email address to be paid. The seller also receives a similar email indicating the invoice was sent. And you’re all set — let the dancing begin!

Get Started

The Subscriptions API is available in beta to developers in the U.S., Canada, UK, Australia, and Japan. Developers can access all endpoints and features of the API in Sandbox and in production. Sellers pay to process subscription payments via Square Invoices (2.9% + 30¢ per transaction).

Check out the Subscriptions API documentation to learn how to get started and access the API reference docs. We encourage developers to share their feedback on our community Slack channel or Square Developer Forums.

If you want to keep up to date with the rest of our content, be sure to follow this blog and our Twitter account, and sign up for our developer newsletter!

Table Of Contents
View More Articles ›