Pause subscription BETA
Schedules a PAUSE
action to pause an active subscription.
Name | Description |
---|---|
subscription_
Required
|
The ID of the subscription to pause. |
Name | Description |
---|---|
pause_
|
The 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_
|
The number of billing cycles the subscription will be paused before it is reactivated. When this is set, a |
resume_
|
The date when the subscription is reactivated by a scheduled |
resume_
|
The timing whether the subscription is reactivated immediately or at the end of the billing cycle, relative to
|
pause_
|
The user-provided reason to pause the subscription. |
Response Fields
Name | Description |
---|---|
errors
|
Errors encountered during the request. |
subscription
|
The subscription to be paused by the scheduled |
actions
|
The list of a |
Examples
- 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: 2023-01-19' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{}'
{
"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_ The provided customer id can't be found in the merchant's customers list. |
> |
400 Bad request |
INVALID_ The subscription cannot be paused longer than the duration of the current phase. |
> |
400 Bad request |
INVALID_ The subscription cannot be paused/resumed on the given date. |
> |
403 Forbidden |
CARD_ The location provided in the API call is not enabled for credit card processing. |
> |
{
"errors": [
{
"code": "CARD_PROCESSING_NOT_ENABLED",
"category": "INVALID_REQUEST_ERROR"
}
]
}