Subscriptions
Creates and manages customer subscriptions in Square, including plan details, billing settings, payment methods, and subscription lifecycle status.
Table Specific Information
Select
The add-in uses the Square API to process search criteria that refer to the Id column, while other filters are processed client side within the add-in.
Retrieve all subscriptions.
SELECT * from Subscriptions
Retrieve a specific subscription.
SELECT * FROM Subscriptions where id = 'f29e36f4-9732-4d31-8d23-d1ca6b2273f5'
Insert
To create a subscription, you will need to specify the LocationId, CustomerId, PlanVariationId columns and pseudo columns: Ordinal and OrderTemplateId.
INSERT INTO Subscriptions(LocationId, CustomerId,PlanVariationId,Ordinal,OrderTemplateId) VALUES('92BYHNBR6W77E','73VZQE9T08ZVVDPBBJ42JED0Y8','AF3H4KOG4HK54EPPTE7YIAK7',0,'saE29DtJG5iMpoGhg5ho2er0KjAZY'); Update
Updates a subscription.
UPDATE Subscriptions SET Note = 'New Note' where id = '52eb5160-1eeb-45c3-bf81-b02beb1824d2'
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
The Square-assigned Id of the subscription. |
| LocationId | String | True |
The Id of the location associated with the subscription. |
| CustomerId | String | True |
The Id of the subscribing customer's Square profile. |
| PlanVariationId | String | True |
The Id for the specific subscription plan variation the customer is subscribed to. |
| SourceName | String | False |
The 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. |
| StartDate | Datetime | True |
The YYYY-MM-DD-formatted date to start the subscription. |
| CanceledDate | Datetime | False |
The YYYY-MM-DD-formatted date to cancel the subscription, when the subscription status changes to CANCELED and the subscription billing stops. |
| ChargedThroughDate | Datetime | True |
The YYYY-MM-DD-formatted date up to when the subscriber is invoiced for the subscription. |
| Note | String | False |
An optional note to include when creating a payment. |
| Status | String | True |
The current status of the subscription. |
| TaxPercentage | String | False |
The tax amount applied when billing the subscription. |
| InvoiceIds | String | True |
The Ids of the invoices created for the subscription, listed in order when the invoices were created. |
| PriceOverrideMoneyAmount | Int64 | False |
The amount of money, in the smallest denomination of the currency indicated by currency, which overrides the cost of a subscription plan variation with STATIC pricing. |
| PriceOverrideMoneyCurrency | String | False |
The type of currency (in ISO 4217 format) used to indicate the type of currency for the amount which overrides the cost of a subscription plan variation with STATIC pricing. |
| Version | Int64 | False |
The 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. |
| CreatedAt | Datetime | True |
The timestamp when the subscription was created, in RFC 3339 format. |
| CardId | String | False |
The Id of the subscriber's card used to charge for the subscription. |
| Timezone | String | True |
Timezone used in date calculations for the subscription. Defaults to the timezone of the location based on location_id. |
| Phases | String | False |
Array of subscription phases, each defining a pricing and billing schedule for a portion of the subscription term. |
| Actions | String | False |
The list of scheduled actions for this subscription. |
| MonthlyBillingAnchorDate | Integer | True |
The day of the month on which the subscription issues invoices and publishes orders. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements (unless stated otherwise) and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| Ordinal | Int64 |
Index of the subscription phase within the overall subscription plan. |
| OrderTemplateId | String |
Id of the order template used to generate recurring orders for billing. |