PUT /v2/subscriptions/{subscription_id}

Updates a subscription. You can set, modify, and clear the subscription field values.

Servers

Path parameters

Name Type Required Description
subscription_id String Yes

The ID for the subscription to update.

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
subscription Object No

Represents a customer subscription to a subscription plan. For an overview of the Subscription type, see Subscription object.

subscription.canceled_date String No

The subscription cancellation date, in YYYY-MM-DD format (for example, 2013-01-15). On this date, the subscription status changes to CANCELED and the subscription billing stops. If you don't set this field, the subscription plan dictates if and when subscription ends.

You cannot update this field, you can only clear it.

subscription.plan_id String No

The ID of the associated subscription plan.

subscription.status String No

The current status of the subscription.

subscription.id String No

The Square-assigned ID of the subscription.

subscription.customer_id String No

The ID of the associated customer profile.

subscription.location_id String No

The ID of the location associated with the subscription.

subscription.timezone String No

Timezone 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).

subscription.price_override_money Object No

Represents an amount of money. Money fields can be signed or unsigned. Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See Working with Monetary Amounts for more information.

subscription.price_override_money.amount Integer No

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents. Monetary amounts can be positive or negative. See the specific field description to determine the meaning of the sign in a particular case.

subscription.price_override_money.currency String No

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

See Currency for possible values.

subscription.start_date String No

The start date of the subscription, in YYYY-MM-DD format (for example, 2013-01-15).

subscription.tax_percentage String No

The 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%.

subscription.invoice_ids[] Array No

The IDs of the invoices created for the subscription, listed in order when the invoices were created (oldest invoices appear first).

subscription.version Integer No

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.

subscription.card_id String No

The ID of the customer card that is charged for the subscription.

subscription.created_at String No

The timestamp when the subscription was created, in RFC 3339 format.

subscription.charged_through_date String No

The date up to which the customer is invoiced for the subscription, in YYYY-MM-DD format (for example, 2013-01-15).

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 customer gets an invoice (or charged the card) on May 1. For the monthly billing scenario, this date is then set to May 31.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.