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

You are viewing an old version of the API
Cancel subscription BETA

POST /v2/subscriptions/{subscription_id}/cancel

Sets the canceled_date field to the end of the active billing period.

After this date, the status changes from ACTIVE to CANCELED.


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 [ ]

Information about errors encountered during the request.

subscription
Subscription

The canceled 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: 2021-01-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": "2020-04-24",
    "canceled_date": "2020-05-01",
    "paid_until_date": "2020-05-01",
    "status": "ACTIVE",
    "created_at": "2020-08-03T21:53:10Z",
    "version": 1594311617331,
    "timezone": "America/Los_Angeles"
  }
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?