Square: Pause Subscription
Square subscriptions.pauseSubscription: arguments, response, policy and SDK examples.
← Subscriptions operations · Get started
Operation square.pausesubscription
Provider route: POST /v2/subscriptions/{subscription_id}/pause. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/square with npm, or alter-sdk-square with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { SquareIntegration } from "@alter-ai/square";
async function execute(input: Parameters<SquareIntegration["subscriptions"]["pauseSubscription"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new SquareIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.subscriptions.pauseSubscription(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_square import SquareIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = SquareIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.subscriptions.pause_subscription(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.subscription_id | string | Required within parent | |
body | Model | Required within parent | Expand Pause Subscription — request body — body |
Referenced models: Pause Subscription — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Pause Subscription — response body |
Referenced models: Pause Subscription — response body
Schemas
Section titled “Schemas”5 more schemas are linked from the tables above, on the schema pages.
Pause Subscription — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Defines output parameters in a response from the [PauseSubscription](api-endpoint:Subscriptions-PauseSubscription) endpoint. |
actions | array | Optional | The list of a `PAUSE` action and a possible `RESUME` action created by the request. |
actions[] | Model | Each item | Expand Swap Plan — response body — actions item |
errors | array | Optional | Errors encountered during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
subscription | Model | Optional | Expand Swap Plan — response body — subscription The subscription to be paused by the scheduled `PAUSE` action. |
Referenced models: Get Shift — response body — errors item, Swap Plan — response body — subscription, Swap Plan — response body — actions item
Pause Subscription — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Defines input parameters in a request to the [PauseSubscription](api-endpoint:Subscriptions-PauseSubscription) endpoint. |
pause_cycle_duration | JSON | Optional | |
pause_cycle_duration (anyOf 1) | JSON | Alternative | |
pause_cycle_duration (anyOf 1) (anyOf 1) | integer | Alternative | 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. Format: int64 Minimum: -9223372036854775808 Maximum: 9223372036854775807 |
pause_cycle_duration (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^(?:-(?:1[0-9]{18}|[2-8][0-9]{18}|9(?:0[0-9]{17}|1[0-9]{17}|2(?:0[0-9]{16}|1[0-9]{16}|2(?:0[0-9]{15}|[1-2][0-9]{15}|3(?:0[0-9]{14}|[1-2][0-9]{14}|3(?:0[0-9]{13}|[1-6][0-9]{13}|7(?:0[0-9]{12}|1[0-9]{12}|20(?:0[0-9]{10}|[1-2][0-9]{10}|3(?:0[0-9]{9}|[1-5][0-9]{9}|6(?:0[0-9]{8}|[1-7][0-9]{8}|8(?:0[0-9]{7}|[1-4][0-9]{7}|5(?:0[0-9]{6}|[1-3][0-9]{6}|4(?:0[0-9]{5}|[1-6][0-9]{5}|7(?:0[0-9]{4}|[1-6][0-9]{4}|7(?:0[0-9]{3}|[1-4][0-9]{3}|5(?:0[0-9]{2}|[1-7][0-9]{2}|80[0-8]))))))))))))))))|-[1-9][0-9]{0,17}|0|(?:1[0-9]{18}|[2-8][0-9]{18}|9(?:0[0-9]{17}|1[0-9]{17}|2(?:0[0-9]{16}|1[0-9]{16}|2(?:0[0-9]{15}|[1-2][0-9]{15}|3(?:0[0-9]{14}|[1-2][0-9]{14}|3(?:0[0-9]{13}|[1-6][0-9]{13}|7(?:0[0-9]{12}|1[0-9]{12}|20(?:0[0-9]{10}|[1-2][0-9]{10}|3(?:0[0-9]{9}|[1-5][0-9]{9}|6(?:0[0-9]{8}|[1-7][0-9]{8}|8(?:0[0-9]{7}|[1-4][0-9]{7}|5(?:0[0-9]{6}|[1-3][0-9]{6}|4(?:0[0-9]{5}|[1-6][0-9]{5}|7(?:0[0-9]{4}|[1-6][0-9]{4}|7(?:0[0-9]{3}|[1-4][0-9]{3}|5(?:0[0-9]{2}|[1-7][0-9]{2}|80[0-7]))))))))))))))))|[1-9][0-9]{0,17})$(?!\n) |
pause_cycle_duration (anyOf 2) | null | Alternative | |
pause_effective_date | JSON | Optional | |
pause_effective_date (anyOf 1) | string | Alternative | 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_effective_date (anyOf 2) | null | Alternative | |
pause_reason | JSON | Optional | |
pause_reason (anyOf 1) | string | Alternative | The user-provided reason to pause the subscription. Maximum length: 255 |
pause_reason (anyOf 2) | null | Alternative | |
resume_change_timing | JSON | Optional | |
resume_change_timing (anyOf 1) | string | Alternative | Supported timings when a pending change, as an action, takes place to a subscription. The timing whether the subscription is reactivated immediately or at the end of the billing cycle, relative to `resume_effective_date`. See [ChangeTiming](#type-changetiming) for possible values One of: IMMEDIATE, END_OF_BILLING_CYCLE |
resume_change_timing (anyOf 2) | null | Alternative | |
resume_effective_date | JSON | Optional | |
resume_effective_date (anyOf 1) | string | Alternative | 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_effective_date (anyOf 2) | null | Alternative |
Get Shift — response body — errors item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an error encountered during a request to the Connect API. See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information. |
category | string | Required within parent | Indicates which high-level category of error has occurred during a request to the Connect API. The high-level category for the error. See [ErrorCategory](#type-errorcategory) for possible values Known values: API_ERROR, AUTHENTICATION_ERROR, INVALID_REQUEST_ERROR, RATE_LIMIT_ERROR, PAYMENT_METHOD_ERROR, REFUND_ERROR, MERCHANT_SUBSCRIPTION_ERROR, EXTERNAL_VENDOR_ERROR |
code | Model | Required within parent | Expand Get Shift — response body — errors item code The specific code of the error. See [ErrorCode](#type-errorcode) for possible values |
detail | string | Optional | A human-readable description of the error for debugging purposes. |
field | string | Optional | The name of the field provided in the original request (if any) that the error pertains to. |
Referenced models: Get Shift — response body — errors item code
Swap Plan — response body — actions item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an action as a pending change to a subscription. |
effective_date | JSON | Optional | |
effective_date (anyOf 1) | string | Alternative | The `YYYY-MM-DD`-formatted date when the action occurs on the subscription. |
effective_date (anyOf 2) | null | Alternative | |
id | string | Optional | The ID of an action scoped to a subscription. |
monthly_billing_anchor_date | JSON | Optional | |
monthly_billing_anchor_date (anyOf 1) | JSON | Alternative | |
monthly_billing_anchor_date (anyOf 1) (anyOf 1) | integer | Alternative | The new billing anchor day value, for a `CHANGE_BILLING_ANCHOR_DATE` action. |
monthly_billing_anchor_date (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
monthly_billing_anchor_date (anyOf 2) | null | Alternative | |
new_plan_variation_id | JSON | Optional | |
new_plan_variation_id (anyOf 1) | string | Alternative | The target subscription plan variation that a subscription switches to, for a `SWAP_PLAN` action. |
new_plan_variation_id (anyOf 2) | null | Alternative | |
phases | JSON | Optional | |
phases (anyOf 1) | array | Alternative | A list of Phases, to pass phase-specific information used in the swap. |
phases (anyOf 1)[] | Model | Each item | Expand Swap Plan — response body — subscription phases item |
phases (anyOf 2) | null | Alternative | |
type | JSON | Optional | |
type (anyOf 1) | string | Alternative | Supported types of an action as a pending change to a subscription. The type of the action. See [SubscriptionActionType](#type-subscriptionactiontype) for possible values Known values: CANCEL, PAUSE, RESUME, SWAP_PLAN, CHANGE_BILLING_ANCHOR_DATE, COMPLETE |
type (anyOf 2) | null | Alternative |
Referenced models: Swap Plan — response body — subscription phases item
Swap Plan — response body — subscription phases item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a phase, which can override subscription phases as defined by plan_id |
order_template_id | JSON | Optional | |
order_template_id (anyOf 1) | string | Alternative | id of order to be used in billing |
order_template_id (anyOf 2) | null | Alternative | |
ordinal | JSON | Optional | |
ordinal (anyOf 1) | JSON | Alternative | |
ordinal (anyOf 1) (anyOf 1) | integer | Alternative | index of phase in total subscription plan Format: int64 |
ordinal (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
ordinal (anyOf 2) | null | Alternative | |
plan_phase_uid | JSON | Optional | |
plan_phase_uid (anyOf 1) | string | Alternative | the uid from the plan's phase in catalog |
plan_phase_uid (anyOf 2) | null | Alternative | |
uid | JSON | Optional | |
uid (anyOf 1) | string | Alternative | id of subscription phase |
uid (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: square.pausesubscription. Catalog operation: PauseSubscription. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["CUSTOMERS_READ", "INVOICES_WRITE", "ITEMS_READ", "ORDERS_WRITE", "PAYMENTS_WRITE", "SUBSCRIPTIONS_WRITE"]
Pinned headers: {"Square-Version": "2026-11-18"}