POST /v2/subscriptions
Creates a subscription for a customer to a subscription plan.
If you provide a card on file in the request, Square charges the card for
the subscription. Otherwise, Square bills an invoice to the customer's email
address. The subscription starts immediately, unless the request includes
the optional start_date
. Each individual subscription is associated with a particular location.
Servers
- https://connect.squareup.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
canceled_date |
String | No |
The date when the subscription should be canceled, in YYYY-MM-DD format (for example, 2025-02-29). This overrides the plan configuration if it comes before the date the subscription would otherwise end. |
customer_id |
String | Yes |
The ID of the customer profile. |
location_id |
String | Yes |
The ID of the location the subscription is associated with. |
timezone |
String | No |
The 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. |
price_override_money |
Object | No |
Represents an amount of money. |
price_override_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
price_override_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
start_date |
String | No |
The start date of the subscription, in YYYY-MM-DD format. For example, 2013-01-15. If the start date is left empty, the subscription begins immediately. |
tax_percentage |
String | No |
The tax to add when billing the subscription.
The percentage is expressed in decimal form, using a |
plan_id |
String | Yes |
The ID of the subscription plan created using the Catalog API. For more information, see Set Up and Manage a Subscription Plan and Subscriptions Walkthrough. |
card_id |
String | No |
The ID of the customer card to charge. If not specified, Square sends an invoice via email. For an example to create a customer and add a card on file, see Subscriptions Walkthrough. |
idempotency_key |
String | No |
A unique string that identifies this For more information, see Idempotency keys. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.