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 &.

πŸ‘

When using Begin & End parameters, always include the event type in your parameters, otherwise, the URL variables do not filter results based on date ranges.

ParameterValue
accountIdAdd the account ID associated with the subscriptions.
begin dateSpecify 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.
product idsEnter 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 (i.e., via the Free Trial