Skip to content

Latest commit

 

History

History
48 lines (38 loc) · 4.5 KB

subscription.md

File metadata and controls

48 lines (38 loc) · 4.5 KB

Subscription

Represents a subscription purchased by a customer.

For more information, see Manage Subscriptions.

Structure

Subscription

Fields

Name Type Tags Description
id str Optional The Square-assigned ID of the subscription.
Constraints: Maximum Length: 255
location_id str Optional The ID of the location associated with the subscription.
plan_variation_id str Optional The ID of the subscribed-to subscription plan variation.
customer_id str Optional The ID of the subscribing customer profile.
start_date str Optional The YYYY-MM-DD-formatted date (for example, 2013-01-15) to start the subscription.
canceled_date str Optional The 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.
charged_through_date str Optional The 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.
status str (Subscription Status) Optional Supported subscription statuses.
tax_percentage str Optional 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%.
invoice_ids List[str] Optional The IDs of the invoices created for the
subscription, listed in order when the invoices were created
(newest invoices appear first).
price_override_money Money Optional 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.
version long|int Optional 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.
created_at str Optional The timestamp when the subscription was created, in RFC 3339 format.
card_id str Optional The ID of the subscriber's card
used to charge for the subscription.
timezone str Optional 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).
source Subscription Source Optional The origination details of the subscription.
actions List Subscription Action Optional The list of scheduled actions on this subscription. It is set only in the response from
RetrieveSubscription with the query parameter
of include=actions or from
SearchSubscriptions with the input parameter
of include:["actions"].
monthly_billing_anchor_date int Optional The day of the month on which the subscription will issue invoices and publish orders.
phases List Phase Optional array of phases for this subscription

Example (as JSON)

{
  "id": "id4",
  "location_id": "location_id8",
  "plan_variation_id": "plan_variation_id8",
  "customer_id": "customer_id2",
  "start_date": "start_date8"
}