Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.subscription_idstringRequired within parent
bodyModelRequired within parentExpand Pause Subscription — request body — body

Referenced models: Pause Subscription — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Pause Subscription — response body

Referenced models: Pause Subscription — response body

5 more schemas are linked from the tables above, on the schema pages.

Pause Subscription — response body
FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a response from the
[PauseSubscription](api-endpoint:Subscriptions-PauseSubscription) endpoint.
actionsarrayOptionalThe list of a `PAUSE` action and a possible `RESUME` action created by the request.
actions[]ModelEach itemExpand Swap Plan — response body — actions item
errorsarrayOptionalErrors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
subscriptionModelOptionalExpand 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
FieldTypePresenceDescription and constraints
$objectRootDefines input parameters in a request to the
[PauseSubscription](api-endpoint:Subscriptions-PauseSubscription) endpoint.
pause_cycle_durationJSONOptional
pause_cycle_duration (anyOf 1)JSONAlternative
pause_cycle_duration (anyOf 1) (anyOf 1)integerAlternativeThe 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)stringAlternativePattern: ^(?:-(?: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)nullAlternative
pause_effective_dateJSONOptional
pause_effective_date (anyOf 1)stringAlternativeThe `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)nullAlternative
pause_reasonJSONOptional
pause_reason (anyOf 1)stringAlternativeThe user-provided reason to pause the subscription.
Maximum length: 255
pause_reason (anyOf 2)nullAlternative
resume_change_timingJSONOptional
resume_change_timing (anyOf 1)stringAlternativeSupported 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)nullAlternative
resume_effective_dateJSONOptional
resume_effective_date (anyOf 1)stringAlternativeThe 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)nullAlternative
Get Shift — response body — errors item
FieldTypePresenceDescription and constraints
$objectRootRepresents 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.
categorystringRequired within parentIndicates 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
codeModelRequired within parentExpand Get Shift — response body — errors item code
The specific code of the error.
See [ErrorCode](#type-errorcode) for possible values
detailstringOptionalA human-readable description of the error for debugging purposes.
fieldstringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRootRepresents an action as a pending change to a subscription.
effective_dateJSONOptional
effective_date (anyOf 1)stringAlternativeThe `YYYY-MM-DD`-formatted date when the action occurs on the subscription.
effective_date (anyOf 2)nullAlternative
idstringOptionalThe ID of an action scoped to a subscription.
monthly_billing_anchor_dateJSONOptional
monthly_billing_anchor_date (anyOf 1)JSONAlternative
monthly_billing_anchor_date (anyOf 1) (anyOf 1)integerAlternativeThe new billing anchor day value, for a `CHANGE_BILLING_ANCHOR_DATE` action.
monthly_billing_anchor_date (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
monthly_billing_anchor_date (anyOf 2)nullAlternative
new_plan_variation_idJSONOptional
new_plan_variation_id (anyOf 1)stringAlternativeThe target subscription plan variation that a subscription switches to, for a `SWAP_PLAN` action.
new_plan_variation_id (anyOf 2)nullAlternative
phasesJSONOptional
phases (anyOf 1)arrayAlternativeA list of Phases, to pass phase-specific information used in the swap.
phases (anyOf 1)[]ModelEach itemExpand Swap Plan — response body — subscription phases item
phases (anyOf 2)nullAlternative
typeJSONOptional
type (anyOf 1)stringAlternativeSupported 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)nullAlternative

Referenced models: Swap Plan — response body — subscription phases item

Swap Plan — response body — subscription phases item
FieldTypePresenceDescription and constraints
$objectRootRepresents a phase, which can override subscription phases as defined by plan_id
order_template_idJSONOptional
order_template_id (anyOf 1)stringAlternativeid of order to be used in billing
order_template_id (anyOf 2)nullAlternative
ordinalJSONOptional
ordinal (anyOf 1)JSONAlternative
ordinal (anyOf 1) (anyOf 1)integerAlternativeindex of phase in total subscription plan
Format: int64
ordinal (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
ordinal (anyOf 2)nullAlternative
plan_phase_uidJSONOptional
plan_phase_uid (anyOf 1)stringAlternativethe uid from the plan's phase in catalog
plan_phase_uid (anyOf 2)nullAlternative
uidJSONOptional
uid (anyOf 1)stringAlternativeid of subscription phase
uid (anyOf 2)nullAlternative

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"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.