Subscriptions API is Generally Available

Embed subscriptions functionality on any third-party platform

Reddit
LinkedIn

We’re thrilled to announce the general availability of Subscriptions API. Plus, after hearing from our developers, we learned there was a strong need to be able to manage subscriptions on the backend–this is now available through the Subscriptions applet right in the seller dashboard.

Subscriptions help businesses handle no-contact commerce, and lately, it seems there’s a subscription for everything: beauty, meal kits, webinars, gym classes, clothes and even pet toys. In fact, even with recent impacts to the global economy, subscription models continue to grow in popularity–subscription-based companies have even seen accelerated growth rates. Subscriptions empower sellers to build sticky relationships with customers through recurring revenue, billing, payment collection, and status tracking. With the Subscriptions API, developers can build subscription management solutions for sellers on any third-party platform with the capability to automatically create, retrieve, and update subscription plans. From enrolling customers in personalized subscription plans to generating billing on a recurring basis with Square Invoices, the Subscriptions API enables developers to create complex subscription plans that fit sellers’ unique needs.

See Subscriptions API in action

To get started, you’ll first call UpsertCatalogObject to create a subscription plan.

curl https://connect.squareupsandbox.com/v2/catalog/object \
  -X POST \
  -H 'Square-Version: 2021-07-21' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{
    "idempotency_key": "{UNIQUE_KEY}",
    "object": {
      "type": "SUBSCRIPTION_PLAN",
      "id": "#plan",
      "subscription_plan_data": {
        "name": "Multiphase Gym Membership",
        "phases": [
          {
            "cadence": "WEEKLY",
            "periods": 6,
            "recurring_price_money": {
              "amount": 0,
              "currency": "USD"
            }
          },
          {
            "cadence": "MONTHLY",
            "recurring_price_money": {
              "amount": 6000,
              "currency": "USD"
            }
          }
        ]
      }
    }
  }'

Next, you’ll call CreateCustomer to create a customer:

curl https://connect.squareupsandbox.com/v2/customers \
  -X POST \
  -H 'Square-Version: 2021-07-21' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{
    "family_name": "Doe",
    "idempotency_key": "{UNIQUE_KEY}",
    "email_address": "user@email.com",
    "given_name": "John"
  }'

Then, you’ll call CreateSubscription to create a subscription:

curl https://connect.squareupsandbox.com/v2/subscriptions \
  -X POST \
  -H 'Square-Version: 2021-07-21' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{
    "idempotency_key": "{UNIQUE_KEY}",
    "location_id": "{LOCATION_ID}",
    "plan_id": "{SUBSCRIPTION_PLAN_ID}",
    "customer_id": "{CUSTOMER_ID}"
  }'

Check out the Subscriptions dashboard

A primary point of feedback from our developers has been around dashboard UI to enable easier subscription management. Our team quickly worked to implement this on our side, and we’re pleased to announce the availability of a Subscriptions applet in the seller dashboard.

Subscriptions Dashboard Detail

We’re excited to hear what you think! Drop by our Slack community or the Square Developer Forums.

Start building

Subscriptions API is generally available to developers and sellers in the U.S., Canada, U.K., Ireland, Australia and Japan.

Getting started is easy; check out the documentation and create a test program in Sandbox.

Start building with Subscriptions API