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

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

POST /v2/subscriptions/{subscription_id}/pause

Schedules a PAUSE action to pause an active subscription.


Permissions
CUSTOMERS_READ
PAYMENTS_WRITE
SUBSCRIPTIONS_WRITE
ITEMS_READ
ORDERS_WRITE
INVOICES_WRITE
Guide
Pause Subscriptions
Try in API Explorer
Name Description
subscription_id
string

Required

The ID of the subscription to pause.

Name Description
pause_effective_date
string

The YYYY-MM-DD-formatted date when the scheduled PAUSE action takes place on the subscription.

When this date is unspecified or falls within the current billing cycle, the subscription is paused on the starting date of the next billing cycle.

pause_cycle_duration
integer (64-bit)

The number of billing cycles the subscription will be paused before it is reactivated.

When this is set, a RESUME action is also scheduled to take place on the subscription at the end of the specified pause cycle duration. In this case, neither resume_effective_date nor resume_change_timing may be specified.

resume_effective_date
string

The date when the subscription is reactivated by a scheduled RESUME action. This date must be at least one billing cycle ahead of pause_effective_date.

resume_change_timing
string

The timing whether the subscription is reactivated immediately or at the end of the billing cycle, relative to resume_effective_date.

pause_reason
string

The user-provided reason to pause the subscription.

Max Length 255

Response Fields

Name Description
errors
Error [ ]

Errors encountered during the request.

subscription
Subscription

The subscription to be paused by the scheduled PAUSE action.

actions
SubscriptionAction [ ]

The list of a PAUSE action and a possible RESUME action created by the request.

Examples

You are viewing an old version of the API
POST /v2/subscriptions/{subscription_id}/pause
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/subscriptions/9ba40961-995a-4a3d-8c53-048c40cafc13/pause \
  -X POST \
  -H 'Square-Version: 2022-09-21' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'
Response JSON
{
  "subscription": {
    "id": "9ba40961-995a-4a3d-8c53-048c40cafc13",
    "location_id": "S8GWD5R9QB376",
    "plan_id": "6JHXF3B2CW3YKHDV4XEM674H",
    "customer_id": "CHFGVKYY8RSV93M5KCYTG4PN0G",
    "status": "ACTIVE",
    "price_override_money": {
      "amount": 2000,
      "currency": "USD"
    },
    "version": 1594311617331,
    "created_at": "2021-10-20T21:53:10Z",
    "timezone": "America/Los_Angeles",
    "source": {
      "name": "My App"
    }
  },
  "actions": [
    {
      "id": "99b2439e-63f7-3ad5-95f7-ab2447a80673",
      "type": "PAUSE",
      "effective_date": "2021-11-17"
    }
  ]
}

Error Descriptions

400 Bad request CUSTOMER_NOT_FOUND

The provided customer id can't be found in the merchant's customers list.

>
400 Bad request INVALID_PAUSE_LENGTH

The subscription cannot be paused longer than the duration of the current phase.

>
400 Bad request INVALID_DATE

The subscription cannot be paused/resumed on the given date.

>
403 Forbidden CARD_PROCESSING_NOT_ENABLED

The location provided in the API call is not enabled for credit card processing.

>
403 Forbidden
{
  "errors": [
    {
      "code": "CARD_PROCESSING_NOT_ENABLED",
      "category": "INVALID_REQUEST_ERROR"
    }
  ]
}