Available Methods
The Subscriptions client provides the following methods:CreateSubscription- Create a new subscription for a customerSearchSubscriptions- Search for subscriptions with filtersGetSubscription- Retrieve a subscription by IDUpdateSubscription- Update an existing subscriptionCancelSubscription- Cancel a subscriptionPauseSubscription- Temporarily pause a subscriptionResumeSubscription- Resume a paused subscriptionSwapPlan- Change a subscription’s planBulkSwapPlan- Change plans for multiple subscriptionsChangeBillingAnchorDate- Change the billing anchor dateDeleteSubscriptionAction- Delete a scheduled actionListSubscriptionEvents- List events for a subscription
Create Subscription
Creates a subscription to a subscription plan by a customer. The required input includes the plan variation ID, customer ID, and location ID.Parameters
The ID of the location the subscription is associated with
The ID of the subscription plan variation created using the Catalog API
The ID of the customer subscribing to the subscription plan variation
A unique string that identifies this CreateSubscription request. See Idempotency for more information.
The YYYY-MM-DD-formatted date to start the subscription. If it is unspecified, the subscription starts immediately.
The YYYY-MM-DD-formatted date when the newly created subscription is scheduled for cancellation
The tax to add when billing the subscription. The percentage is expressed in decimal form, using a ’.’ as the decimal separator and without a ’%’ sign.
A custom price which overrides the cost of a subscription plan variation with STATIC pricing
The ID of the subscriber’s card to charge. If it is not specified, the subscriber receives an invoice via email with a link to pay for their subscription.
The timezone that is used in date calculations for the subscription. Format: the IANA Timezone Database identifier for the location timezone.
The origination details of the subscription
The day-of-the-month to change the billing date to
Array of phases for this subscription
Response
The newly created subscription. For more information, see the Subscription object.
Errors encountered during the request
Search Subscriptions
Searches for subscriptions with filtering and sorting options. Returns a paginated list of subscriptions.Parameters
A subscription query consisting of specified filtering conditions. If this query field is unspecified, the SearchSubscriptions call will return all subscriptions.
The upper limit on the number of subscriptions to return in a paged response
When the total number of resulting subscriptions exceeds the limit of a paged response, specify the cursor returned from a preceding response to fetch the next set of results.
An option to include related information in the response. The supported values are: actions - to include scheduled actions on the targeted subscriptions.
Response
The subscriptions matching the query
The pagination cursor to retrieve the next set of results
Errors encountered during the request
Get Subscription
Retrieves a specific subscription by ID.Parameters
The ID of the subscription to retrieve
A query parameter to specify related information to be included in the response. Supported values: actions - to include scheduled actions on the targeted subscription.
Response
The requested subscription
Errors encountered during the request
Cancel Subscription
Schedules a subscription for cancellation. The subscription continues until the end of the current billing cycle.Parameters
The ID of the subscription to cancel
Response
The specified subscription scheduled for cancellation according to the action created by the request
A list of a single CANCEL action scheduled for the subscription
Errors encountered during the request
Pause Subscription
Pauses a subscription. The subscription is paused at the beginning of the next billing cycle.Parameters
The ID of the subscription to pause
The 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.
The number of billing cycles the subscription will be paused before it is reactivated
The date when the subscription is reactivated by a scheduled RESUME action
The timing whether the subscription is reactivated immediately or at the end of the billing cycle, relative to resume_effective_date
The user-provided reason to pause the subscription
Response
The paused subscription
The list of a PAUSE and/or RESUME actions created for the subscription
Errors encountered during the request
Resume Subscription
Resumes a paused subscription. The subscription is resumed at the beginning of the specified billing cycle.Parameters
The ID of the subscription to resume
The YYYY-MM-DD-formatted date when the subscription reactivated
The timing to resume a subscription, relative to the specified resume_effective_date attribute value
Response
The resumed subscription
The list of a RESUME action created for the subscription
Errors encountered during the request
Swap Plan
Changes the subscription plan for a subscription. The new plan takes effect at the next billing date.Parameters
The ID of the subscription to swap the subscription plan for
The ID of the new subscription plan variation. This field is required.
A list of PhaseInputs, to pass phase-specific information used in the swap
Response
The subscription with the swapped plan
The list of a SWAP_PLAN action created for the subscription
Errors encountered during the request
Bulk Swap Plan
Swaps the plan for multiple subscriptions. Active subscriptions using the old plan variation will be subscribed to the new plan variation on their next billing day.Parameters
The ID of the new subscription plan variation. This field is required.
The ID of the plan variation whose subscriptions should be swapped
The ID of the location to associate with the swapped subscriptions
Response
The number of affected subscriptions
Errors encountered during the request
