• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Cancel subscription

POST /v2/subscriptions/{subscription_id}/cancel

Schedules a CANCEL action to cancel an active subscription by setting the canceled_date field to the end of the active billing period and changing the subscription status from ACTIVE to CANCELED after this date.


Permissions
SUBSCRIPTIONS_WRITE
Guide
Subscriptions Guide
Try in API Explorer
Name Description
subscription_id
string

Required

The ID of the subscription to cancel.

Response Fields

Name Description
errors
Error [ ]

Errors encountered during the request.

subscription
Subscription

The specified subscription scheduled for cancellation according to the action created by the request.

actions
SubscriptionAction [ ]

Beta

A list of a single CANCEL action scheduled for the subscription.

Examples

You are viewing an old version of the API
POST /v2/subscriptions/{subscription_id}/cancel
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/subscriptions/910afd30-464a-4e00-a8d8-2296eEXAMPLE/cancel \
  -X POST \
  -H 'Square-Version: 2022-09-21' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
Response JSON
{
  "subscription": {
    "id": "910afd30-464a-4e00-a8d8-2296eEXAMPLE",
    "location_id": "S8GWD5R9QB376",
    "plan_id": "6JHXF3B2CW3YKHDV4XEM674H",
    "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G",
    "card_id": "ccof:qy5x8hHGYsgLrp4Q4GB",
    "start_date": "2021-10-20",
    "canceled_date": "2021-10-20",
    "paid_until_date": "2021-11-20",
    "status": "ACTIVE",
    "created_at": "2021-10-20T21:53:10Z",
    "version": 1594311617331,
    "timezone": "America/Los_Angeles",
    "source": {
      "name": "My App"
    }
  }
}