Subscriptions

Each subscription instance has a unique subscription ID, which you can obtain through webhooks or API requests. The API allows you to search for subscription instances, edit subscriptions, and initiate rebills on managed subscriptions.

Search for Subscription by Parameter

Append one or more parameters to the URL to filter search results. Use a ? to append the first result. For subsequent search results, use &.

👍

Working with parameters

Always include the event type when you use begin and end parameters, otherwise the URL variables won't filter results based on date ranges.

ParameterValue
accountIdAdd the account ID associated with the subscriptions.
beginSpecify the beginning of a date range in yyyy-mm-dd-format.
endSpecify the end of a date range in yyyy-mm-dd format.

Events

In each event, use begin and end dates to retrieve corresponding subscriptions

ParameterValue
canceledRetrieve subscriptions that were canceled within a given date range.
chargedRetrieve subscription rebills from a specific date range.
createdRetrieve subscriptions that were created in a specific date range.
deactivatedRetrieve subscriptions that were deactivated in a specific date range.
trialendedRetrieve subscriptions with free trials that ended in a specific date range.
trialstartedRetrieve subscriptions with free trials that began in a specific date range.
productEnter product IDs to filter by specific subscriptions.

Scope

ParameterValue
allUnnecessary; if you do not pass a scope parameter, the API returns both live and test-mode subscriptions by default.
liveSpecify scope=live to retrieve only live (non-test-mode) subscriptions
testSpecify scope=test to retrieve only test-mode (non-live) subscriptions

Status

ParameterValue
activeSpecify status=active to retrieve only subscriptions that are currently active (note: this includes subscriptions with free trial days that are still in trial status).
canceledSpecify status=canceled to retrieve only subscriptions that have been canceled but not yet deactivated.
deactivatedSpecify status=deactivated to retrieve only subscriptions that have been deactivated.
overdueSpecify status=overdue to retrieve only subscriptions that are currently overdue due to a failed rebill charge.
trialSpecify status=trial to retrieve only subscriptions that are currently in trial status (for example, through a Free Trial.