Skip to content

Square: Subscriptions schemas

32 Square schemas with complete fields and constraints.

← Subscriptions operations · All schemas

Bulk Swap Plan — request body — body

FieldTypePresenceDescription and constraints
$objectRootDefines input parameters in a call to the
[BulkSwapPlan](api-endpoint:Subscriptions-BulkSwapPlan) endpoint.
location_idstringRequired within parentThe ID of the location to associate with the swapped subscriptions.
Minimum length: 1
new_plan_variation_idstringRequired within parentThe ID of the new subscription plan variation.

This field is required.
Minimum length: 1
old_plan_variation_idstringRequired within parentThe ID of the plan variation whose subscriptions should be swapped. Active subscriptions
using this plan variation will be subscribed to the new plan variation on their next billing
day.
Minimum length: 1

Bulk Swap Plan — response body

FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a response of the
[BulkSwapPlan](api-endpoint:Subscriptions-BulkSwapPlan) endpoint.
affected_subscriptionsJSONOptional
affected_subscriptions (anyOf 1)integerAlternativeThe number of affected subscriptions.
affected_subscriptions (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
errorsarrayOptionalErrors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Get Shift — response body — errors item

Cancel Subscription — response body

FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a response from the
[CancelSubscription](api-endpoint:Subscriptions-CancelSubscription) endpoint.
actionsarrayOptionalA list of a single `CANCEL` action scheduled for the subscription.
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 specified subscription scheduled for cancellation according to the action created by the request.

Referenced models: Get Shift — response body — errors item, Swap Plan — response body — subscription, Swap Plan — response body — actions item

Change Billing Anchor Date — request body — body

FieldTypePresenceDescription and constraints
$objectRootDefines input parameters in a request to the
[ChangeBillingAnchorDate](api-endpoint:Subscriptions-ChangeBillingAnchorDate) endpoint.
effective_dateJSONOptional
effective_date (anyOf 1)stringAlternativeThe `YYYY-MM-DD`-formatted date when the scheduled `BILLING_ANCHOR_CHANGE` action takes
place on the subscription.

When this date is unspecified or falls within the current billing cycle, the billing anchor date
is changed immediately.
effective_date (anyOf 2)nullAlternative
monthly_billing_anchor_dateJSONOptional
monthly_billing_anchor_date (anyOf 1)integerAlternativeThe anchor day for the billing cycle.
Maximum: 31
Minimum: 1
monthly_billing_anchor_date (anyOf 2)nullAlternative

Change Billing Anchor Date — response body

FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a request to the
[ChangeBillingAnchorDate](api-endpoint:Subscriptions-ChangeBillingAnchorDate) endpoint.
actionsarrayOptionalA list of a single billing anchor date change for the subscription.
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 specified subscription for updating billing anchor date.

Referenced models: Get Shift — response body — errors item, Swap Plan — response body — subscription, Swap Plan — response body — actions item

Create Subscription — request body — body

FieldTypePresenceDescription and constraints
$objectRootDefines input parameters in a request to the
[CreateSubscription](api-endpoint:Subscriptions-CreateSubscription) endpoint.
canceled_datestringOptionalThe `YYYY-MM-DD`-formatted date when the newly created subscription is scheduled for cancellation.

This date overrides the cancellation date set in the plan variation configuration.
If the cancellation date is earlier than the end date of a subscription cycle, the subscription stops
at the canceled date and the subscriber is sent a prorated invoice at the beginning of the canceled cycle.

When the subscription plan of the newly created subscription has a fixed number of cycles and the `canceled_date`
occurs before the subscription plan completes, the specified `canceled_date` sets the date when the subscription
stops through the end of the last cycle.
card_idstringOptionalThe ID of the [subscriber's](entity:Customer) [card](entity:Card) to charge.
If it is not specified, the subscriber receives an invoice via email with a link to pay for their subscription.
customer_idstringRequired within parentThe ID of the [customer](entity:Customer) subscribing to the subscription plan variation.
Minimum length: 1
idempotency_keystringOptionalA unique string that identifies this `CreateSubscription` request.
If you do not provide a unique string (or provide an empty string as the value),
the endpoint treats each request as independent.

For more information, see [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).
location_idstringRequired within parentThe ID of the location the subscription is associated with.
Minimum length: 1
monthly_billing_anchor_dateintegerOptionalThe day-of-the-month to change the billing date to.
Maximum: 31
Minimum: 1
phasesarrayOptionalarray of phases for this subscription
phases[]ModelEach itemExpand Create Subscription — request body — body phases item
plan_variation_idstringOptionalThe ID of the [subscription plan variation](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations#plan-variations) created using the Catalog API.
price_override_moneyModelOptionalExpand Create Payment — request body — body tip money
A custom price which overrides the cost of a subscription plan variation with `STATIC` pricing.
This field does not affect itemized subscriptions with `RELATIVE` pricing. Instead,
you should edit the Subscription's [order template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#phases-and-order-templates).
sourceModelOptionalExpand Create Subscription — request body — body source
The origination details of the subscription.
start_datestringOptionalThe `YYYY-MM-DD`-formatted date to start the subscription.
If it is unspecified, the subscription starts immediately.
tax_percentagestringOptionalThe tax to add when billing the subscription.
The percentage is expressed in decimal form, using a `'.'` as the decimal
separator and without a `'%'` sign. For example, a value of 7.5
corresponds to 7.5%.
Maximum length: 10
timezonestringOptionalThe timezone that is used in date calculations for the subscription. If unset, defaults to
the location timezone. If a timezone is not configured for the location, defaults to "America/New_York".
Format: the IANA Timezone Database identifier for the location timezone. For
a list of time zones, see [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

Referenced models: Create Payment — request body — body tip money, Create Subscription — request body — body source, Create Subscription — request body — body phases item

Create Subscription — request body — body 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
Minimum: -9223372036854775808
Maximum: 9223372036854775807
ordinal (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)
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

Create Subscription — request body — body source

FieldTypePresenceDescription and constraints
$objectRootThe origination details of the subscription.
nameJSONOptional
name (anyOf 1)stringAlternativeThe name used to identify the place (physical or digital) that
a subscription originates. If unset, the name defaults to the name
of the application that created the subscription.
Maximum length: 255
name (anyOf 2)nullAlternative

Create Subscription — response body

FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a response from the
[CreateSubscription](api-endpoint:Subscriptions-CreateSubscription) endpoint.
errorsarrayOptionalErrors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
subscriptionModelOptionalExpand Swap Plan — response body — subscription
The newly created subscription.

For more information, see
[Subscription object](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#subscription-object).

Referenced models: Get Shift — response body — errors item, Swap Plan — response body — subscription

Delete Subscription Action — response body

FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a response of the [DeleteSubscriptionAction](api-endpoint:Subscriptions-DeleteSubscriptionAction)
endpoint.
errorsarrayOptionalErrors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
subscriptionModelOptionalExpand Swap Plan — response body — subscription
The subscription that has the specified action deleted.

Referenced models: Get Shift — response body — errors item, Swap Plan — response body — subscription

List Subscription Events — response body

FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a response from the
[ListSubscriptionEvents](api-endpoint:Subscriptions-ListSubscriptionEvents).
cursorstringOptionalWhen the total number of resulting subscription events exceeds the limit of a paged response,
the response includes a cursor for you to use in a subsequent request to fetch the next set of events.
If the cursor is unset, the response contains the last page of the results.

For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
errorsarrayOptionalErrors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
subscription_eventsarrayOptionalThe retrieved subscription events.
subscription_events[]ModelEach itemExpand List Subscription Events — response body — subscription events item

Referenced models: Get Shift — response body — errors item, List Subscription Events — response body — subscription events item

List Subscription Events — response body — subscription events item

FieldTypePresenceDescription and constraints
$objectRootDescribes changes to a subscription and the subscription status.
effective_datestringRequired within parentThe `YYYY-MM-DD`-formatted date (for example, 2013-01-15) when the subscription event occurred.
idstringRequired within parentThe ID of the subscription event.
infoJSONOptional
info (anyOf 1)ModelAlternativeExpand List Subscription Events — response body — subscription events item info Provides information about the subscription event
Additional information about the subscription event.
info (anyOf 2)nullAlternative
monthly_billing_anchor_dateJSONOptional
monthly_billing_anchor_date (anyOf 1)integerAlternativeThe day-of-the-month the billing anchor date was changed to, if applicable.
Read only: true
monthly_billing_anchor_date (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
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
plan_variation_idstringRequired within parentThe ID of the subscription plan variation associated with the subscription.
subscription_event_typestringRequired within parentSupported types of an event occurred to a subscription.
Type of the subscription event.
See [SubscriptionEventSubscriptionEventType](#type-subscriptioneventsubscriptioneventtype) for possible values
Known values: START_SUBSCRIPTION, PLAN_CHANGE, STOP_SUBSCRIPTION, DEACTIVATE_SUBSCRIPTION, RESUME_SUBSCRIPTION, PAUSE_SUBSCRIPTION, BILLING_ANCHOR_DATE_CHANGED

Referenced models: Swap Plan — response body — subscription phases item, List Subscription Events — response body — subscription events item info Provides information about the subscription event

List Subscription Events — response body — subscription events item info Provides information about the subscription event

FieldTypePresenceDescription and constraints
$objectRootProvides information about the subscription event.
codeJSONOptional
code (anyOf 1)stringAlternativeSupported info codes of a subscription event.
An info code indicating the subscription event that occurred.
See [InfoCode](#type-infocode) for possible values
Known values: LOCATION_NOT_ACTIVE, LOCATION_CANNOT_ACCEPT_PAYMENT, CUSTOMER_DELETED, CUSTOMER_NO_EMAIL, CUSTOMER_NO_NAME, USER_PROVIDED
code (anyOf 2)nullAlternative
detailJSONOptional
detail (anyOf 1)stringAlternativeA human-readable explanation for the event.
detail (anyOf 2)nullAlternative

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

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

Resume Subscription — request body — body

FieldTypePresenceDescription and constraints
$objectRootDefines input parameters in a request to the
[ResumeSubscription](api-endpoint:Subscriptions-ResumeSubscription) endpoint.
resume_change_timingJSONOptional
resume_change_timing (anyOf 1)stringAlternativeSupported timings when a pending change, as an action, takes place to a subscription.
The timing to resume a subscription, relative to the specified
`resume_effective_date` attribute value.
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 `YYYY-MM-DD`-formatted date when the subscription reactivated.
resume_effective_date (anyOf 2)nullAlternative

Resume Subscription — response body

FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a response from the
[ResumeSubscription](api-endpoint:Subscriptions-ResumeSubscription) endpoint.
actionsarrayOptionalA list of `RESUME` actions created by the request and scheduled for the subscription.
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 resumed subscription.

Referenced models: Get Shift — response body — errors item, Swap Plan — response body — subscription, Swap Plan — response body — actions item

Retrieve Subscription — response body

FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a response from the
[RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) endpoint.
errorsarrayOptionalErrors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
subscriptionModelOptionalExpand Swap Plan — response body — subscription
The subscription retrieved.

Referenced models: Get Shift — response body — errors item, Swap Plan — response body — subscription

Search Subscriptions — request body — body

FieldTypePresenceDescription and constraints
$objectRootDefines input parameters in a request to the
[SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) endpoint.
cursorstringOptionalWhen the total number of resulting subscriptions exceeds the limit of a paged response,
specify the cursor returned from a preceding response here to fetch the next set of results.
If the cursor is unset, the response contains the last page of the results.

For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
includearrayOptionalAn option to include related information in the response.

The supported values are:

- `actions`: to include scheduled actions on the targeted subscriptions.
include[]stringEach item
limitintegerOptionalThe upper limit on the number of subscriptions to return
in a paged response.
Minimum: 1
queryModelOptionalExpand Search Subscriptions — request body — body query
A subscription query consisting of specified filtering conditions.

If this `query` field is unspecified, the `SearchSubscriptions` call will return all subscriptions.

Referenced models: Search Subscriptions — request body — body query

Search Subscriptions — request body — body query

FieldTypePresenceDescription and constraints
$objectRootRepresents a query, consisting of specified query expressions, used to search for subscriptions.
filterJSONOptional
filter (anyOf 1)ModelAlternativeExpand Search Subscriptions — request body — body query filter customer ids, location ids, source names
A list of query expressions.
filter (anyOf 2)nullAlternative

Referenced models: Search Subscriptions — request body — body query filter customer ids, location ids, source names

Search Subscriptions — request body — body query filter customer ids, location ids, source names

FieldTypePresenceDescription and constraints
$objectRootRepresents a set of query expressions (filters) to narrow the scope of targeted subscriptions returned by
the [SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) endpoint.
customer_idsJSONOptional
customer_ids (anyOf 1)arrayAlternativeA filter to select subscriptions based on the subscribing customer IDs.
customer_ids (anyOf 1)[]stringEach item
customer_ids (anyOf 2)nullAlternative
location_idsJSONOptional
location_ids (anyOf 1)arrayAlternativeA filter to select subscriptions based on the location.
location_ids (anyOf 1)[]stringEach item
location_ids (anyOf 2)nullAlternative
source_namesJSONOptional
source_names (anyOf 1)arrayAlternativeA filter to select subscriptions based on the source application.
source_names (anyOf 1)[]stringEach item
source_names (anyOf 2)nullAlternative

Search Subscriptions — response body

FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a response from the
[SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) endpoint.
cursorstringOptionalWhen the total number of resulting subscription exceeds the limit of a paged response,
the response includes a cursor for you to use in a subsequent request to fetch the next set of results.
If the cursor is unset, the response contains the last page of the results.

For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
errorsarrayOptionalErrors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
subscriptionsarrayOptionalThe subscriptions matching the specified query expressions.
subscriptions[]ModelEach itemExpand Swap Plan — response body — subscription

Referenced models: Get Shift — response body — errors item, Swap Plan — response body — subscription

Swap Plan — request body — body

FieldTypePresenceDescription and constraints
$objectRootDefines input parameters in a call to the
[SwapPlan](api-endpoint:Subscriptions-SwapPlan) endpoint.
new_plan_variation_idJSONOptional
new_plan_variation_id (anyOf 1)stringAlternativeThe ID of the new subscription plan variation.

This field is required.
new_plan_variation_id (anyOf 2)nullAlternative
phasesJSONOptional
phases (anyOf 1)arrayAlternativeA list of PhaseInputs, to pass phase-specific information used in the swap.
phases (anyOf 1)[]ModelEach itemExpand Swap Plan — request body — body phases array item
phases (anyOf 2)nullAlternative

Referenced models: Swap Plan — request body — body phases array item

Swap Plan — request body — body phases array item

FieldTypePresenceDescription and constraints
$objectRootRepresents the arguments used to construct a new phase.
order_template_idJSONOptional
order_template_id (anyOf 1)stringAlternativeid of order to be used in billing
order_template_id (anyOf 2)nullAlternative
ordinalJSONRequired within parent
ordinal (anyOf 1)integerAlternativeindex of phase in total subscription plan
Format: int64
Minimum: -9223372036854775808
Maximum: 9223372036854775807
ordinal (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)

Swap Plan — response body

FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a response of the
[SwapPlan](api-endpoint:Subscriptions-SwapPlan) endpoint.
actionsarrayOptionalA list of a `SWAP_PLAN` 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 with the updated subscription plan.

Referenced models: Get Shift — response body — errors item, Swap Plan — response body — subscription, Swap Plan — response body — actions item

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

FieldTypePresenceDescription and constraints
$objectRootRepresents a subscription purchased by a customer.

For more information, see
[Manage Subscriptions](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions).
actionsJSONOptional
actions (anyOf 1)arrayAlternativeThe list of scheduled actions on this subscription. It is set only in the response from
[RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) with the query parameter
of `include=actions` or from
[SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) with the input parameter
of `include:["actions"]`.
actions (anyOf 1)[]ModelEach itemExpand Swap Plan — response body — actions item
actions (anyOf 2)nullAlternative
canceled_dateJSONOptional
canceled_date (anyOf 1)stringAlternativeThe `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to cancel the subscription,
when the subscription status changes to `CANCELED` and the subscription billing stops.

If this field is not set, the subscription ends according its subscription plan.

This field cannot be updated, other than being cleared.
canceled_date (anyOf 2)nullAlternative
card_idJSONOptional
card_id (anyOf 1)stringAlternativeThe ID of the [subscriber's](entity:Customer) [card](entity:Card)
used to charge for the subscription.
card_id (anyOf 2)nullAlternative
charged_through_datestringOptionalThe `YYYY-MM-DD`-formatted date up to when the subscriber is invoiced for the
subscription.

After the invoice is sent for a given billing period,
this date will be the last day of the billing period.
For example,
suppose for the month of May a subscriber gets an invoice
(or charged the card) on May 1. For the monthly billing scenario,
this date is then set to May 31.
Read only: true
completed_dateJSONOptional
completed_date (anyOf 1)stringAlternativeThe `YYYY-MM-DD`-formatted date when the subscription enters a terminal state.
completed_date (anyOf 2)nullAlternative
created_atstringOptionalThe timestamp when the subscription was created, in RFC 3339 format.
Read only: true
customer_idstringOptionalThe ID of the subscribing [customer](entity:Customer) profile.
Read only: true
idstringOptionalThe Square-assigned ID of the subscription.
Maximum length: 255
Read only: true
invoice_idsarrayOptionalThe IDs of the [invoices](entity:Invoice) created for the
subscription, listed in order when the invoices were created
(newest invoices appear first).
Read only: true
invoice_ids[]stringEach item
location_idstringOptionalThe ID of the location associated with the subscription.
Read only: true
monthly_billing_anchor_dateJSONOptional
monthly_billing_anchor_date (anyOf 1)integerAlternativeThe day of the month on which the subscription will issue invoices and publish orders.
Read only: true
monthly_billing_anchor_date (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
phasesarrayOptionalarray of phases for this subscription
Read only: true
phases[]ModelEach itemExpand Swap Plan — response body — subscription phases item
plan_variation_idstringOptionalThe ID of the subscribed-to [subscription plan variation](entity:CatalogSubscriptionPlanVariation).
Read only: true
price_override_moneyJSONOptional
price_override_money (anyOf 1)ModelAlternativeExpand Pay Order — response body — order total money
A custom price which overrides the cost of a subscription plan variation with `STATIC` pricing.
This field does not affect itemized subscriptions with `RELATIVE` pricing. Instead,
you should edit the Subscription's [order template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#phases-and-order-templates).
price_override_money (anyOf 2)nullAlternative
sourceJSONOptional
source (anyOf 1)ModelAlternativeExpand Create Subscription — request body — body source
The origination details of the subscription.
source (anyOf 2)nullAlternative
start_datestringOptionalThe `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to start the subscription.
Read only: true
statusstringOptionalSupported subscription statuses.
The current status of the subscription.
See [SubscriptionStatus](#type-subscriptionstatus) for possible values
Known values: PENDING, ACTIVE, CANCELED, DEACTIVATED, PAUSED, COMPLETED
Read only: true
tax_percentageJSONOptional
tax_percentage (anyOf 1)stringAlternativeThe tax amount applied when billing the subscription. The
percentage is expressed in decimal form, using a `'.'` as the decimal
separator and without a `'%'` sign. For example, a value of `7.5`
corresponds to 7.5%.
tax_percentage (anyOf 2)nullAlternative
timezonestringOptionalTimezone that will be used in date calculations for the subscription.
Defaults to the timezone of the location based on `location_id`.
Format: the IANA Timezone Database identifier for the location timezone (for example, `America/Los_Angeles`).
Read only: true
versionJSONOptional
version (anyOf 1)integerAlternativeThe version of the object. When updating an object, the version
supplied must match the version in the database, otherwise the write will
be rejected as conflicting.
Format: int64
version (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Pay Order — response body — order total money, Swap Plan — response body — subscription phases item, Swap Plan — response body — actions item, Create Subscription — request body — body source

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

Update Subscription — request body — body

FieldTypePresenceDescription and constraints
$objectRootDefines input parameters in a request to the
[UpdateSubscription](api-endpoint:Subscriptions-UpdateSubscription) endpoint.
subscriptionJSONOptional
subscription (anyOf 1)ModelAlternativeExpand UpdateSubscription — request body — body / subscription / status: PENDING, ACTIVE, CANCELED, DEACTIVATED, PAUSED, COMPLETED
The subscription object containing the current version, and fields to update.
Unset fields will be left at their current server values, and JSON `null` values will
be treated as a request to clear the relevant data.
subscription (anyOf 2)nullAlternative

Referenced models: UpdateSubscription — request body — body / subscription / status: PENDING, ACTIVE, CANCELED, DEACTIVATED, PAUSED, COMPLETED

Update Subscription — response body

FieldTypePresenceDescription and constraints
$objectRootDefines output parameters in a response from the
[UpdateSubscription](api-endpoint:Subscriptions-UpdateSubscription) endpoint.
errorsarrayOptionalErrors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item
subscriptionModelOptionalExpand Swap Plan — response body — subscription
The updated subscription.

Referenced models: Get Shift — response body — errors item, Swap Plan — response body — subscription

UpdateSubscription — request body — body / subscription / status: PENDING, ACTIVE, CANCELED, DEACTIVATED, PAUSED, COMPLETED

FieldTypePresenceDescription and constraints
$objectRootRepresents a subscription purchased by a customer.

For more information, see
[Manage Subscriptions](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions).
actionsJSONOptional
actions (anyOf 1)arrayAlternativeThe list of scheduled actions on this subscription. It is set only in the response from
[RetrieveSubscription](api-endpoint:Subscriptions-RetrieveSubscription) with the query parameter
of `include=actions` or from
[SearchSubscriptions](api-endpoint:Subscriptions-SearchSubscriptions) with the input parameter
of `include:["actions"]`.
actions (anyOf 1)[]ModelEach itemExpand UpdateSubscription — request body — body / subscription / status: PENDING, ACTIVE, CANCELED, DEACTIVATED, PAUSED, COMPLETED actions array item
actions (anyOf 2)nullAlternative
canceled_dateJSONOptional
canceled_date (anyOf 1)stringAlternativeThe `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to cancel the subscription,
when the subscription status changes to `CANCELED` and the subscription billing stops.

If this field is not set, the subscription ends according its subscription plan.

This field cannot be updated, other than being cleared.
canceled_date (anyOf 2)nullAlternative
card_idJSONOptional
card_id (anyOf 1)stringAlternativeThe ID of the [subscriber's](entity:Customer) [card](entity:Card)
used to charge for the subscription.
card_id (anyOf 2)nullAlternative
charged_through_datestringOptionalThe `YYYY-MM-DD`-formatted date up to when the subscriber is invoiced for the
subscription.

After the invoice is sent for a given billing period,
this date will be the last day of the billing period.
For example,
suppose for the month of May a subscriber gets an invoice
(or charged the card) on May 1. For the monthly billing scenario,
this date is then set to May 31.
Read only: true
completed_dateJSONOptional
completed_date (anyOf 1)stringAlternativeThe `YYYY-MM-DD`-formatted date when the subscription enters a terminal state.
completed_date (anyOf 2)nullAlternative
created_atstringOptionalThe timestamp when the subscription was created, in RFC 3339 format.
Read only: true
customer_idstringOptionalThe ID of the subscribing [customer](entity:Customer) profile.
Read only: true
idstringOptionalThe Square-assigned ID of the subscription.
Maximum length: 255
Read only: true
invoice_idsarrayOptionalThe IDs of the [invoices](entity:Invoice) created for the
subscription, listed in order when the invoices were created
(newest invoices appear first).
Read only: true
invoice_ids[]stringEach item
location_idstringOptionalThe ID of the location associated with the subscription.
Read only: true
monthly_billing_anchor_dateintegerOptionalThe day of the month on which the subscription will issue invoices and publish orders.
Read only: true
phasesarrayOptionalarray of phases for this subscription
Read only: true
phases[]ModelEach itemExpand Create Subscription — request body — body phases item
plan_variation_idstringOptionalThe ID of the subscribed-to [subscription plan variation](entity:CatalogSubscriptionPlanVariation).
Read only: true
price_override_moneyJSONOptional
price_override_money (anyOf 1)ModelAlternativeExpand Create Payment — request body — body tip money
A custom price which overrides the cost of a subscription plan variation with `STATIC` pricing.
This field does not affect itemized subscriptions with `RELATIVE` pricing. Instead,
you should edit the Subscription's [order template](https://developer.squareup.com/docs/subscriptions-api/manage-subscriptions#phases-and-order-templates).
price_override_money (anyOf 2)nullAlternative
sourceJSONOptional
source (anyOf 1)ModelAlternativeExpand Create Subscription — request body — body source
The origination details of the subscription.
source (anyOf 2)nullAlternative
start_datestringOptionalThe `YYYY-MM-DD`-formatted date (for example, 2013-01-15) to start the subscription.
Read only: true
statusstringOptionalSupported subscription statuses.
The current status of the subscription.
See [SubscriptionStatus](#type-subscriptionstatus) for possible values
One of: PENDING, ACTIVE, CANCELED, DEACTIVATED, PAUSED, COMPLETED
Read only: true
tax_percentageJSONOptional
tax_percentage (anyOf 1)stringAlternativeThe tax amount applied when billing the subscription. The
percentage is expressed in decimal form, using a `'.'` as the decimal
separator and without a `'%'` sign. For example, a value of `7.5`
corresponds to 7.5%.
tax_percentage (anyOf 2)nullAlternative
timezonestringOptionalTimezone that will be used in date calculations for the subscription.
Defaults to the timezone of the location based on `location_id`.
Format: the IANA Timezone Database identifier for the location timezone (for example, `America/Los_Angeles`).
Read only: true
versionJSONOptional
version (anyOf 1)integerAlternativeThe version of the object. When updating an object, the version
supplied must match the version in the database, otherwise the write will
be rejected as conflicting.
Format: int64
Minimum: -9223372036854775808
Maximum: 9223372036854775807
version (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)

Referenced models: Create Payment — request body — body tip money, Create Subscription — request body — body source, Create Subscription — request body — body phases item, UpdateSubscription — request body — body / subscription / status: PENDING, ACTIVE, CANCELED, DEACTIVATED, PAUSED, COMPLETED actions array item

UpdateSubscription — request body — body / subscription / status: PENDING, ACTIVE, CANCELED, DEACTIVATED, PAUSED, COMPLETED actions array 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)integerAlternativeThe new billing anchor day value, for a `CHANGE_BILLING_ANCHOR_DATE` action.
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 Create Subscription — request body — body 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
One of: CANCEL, PAUSE, RESUME, SWAP_PLAN, CHANGE_BILLING_ANCHOR_DATE, COMPLETE
type (anyOf 2)nullAlternative

Referenced models: Create Subscription — request body — body phases item

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.