Subscription Status
WHITELABEL lets you manage subscription status directly through the API, without needing additional websites or applications. You can create, pause, resume, and cancel subscriptions.
Workflow
In the following workflow, you can find the different subscription statuses and how they can be updated.
A subscription in the trial phase behaves like an active one: it can be paused, it enters PAST_DUE on a failed charge and returns to TRIALING when a later charge succeeds. Any non-terminal status can be canceled, and a subscription created with initial_payment_validation: true goes straight from CREATED to CANCELED if the first payment fails.
Subscription status
Subscriptions can have the status described in the table below.
| Status | Description |
|---|---|
CREATED | Transitory status while the initial payment hasn’t been processed yet. Only occurs when the subscription is created with initial_payment_validation: true. |
ACTIVE | The subscription has been created with an associated customer and is already active. |
TRIALING | The subscription is inside a plan’s leading trial phase. Transitions to ACTIVE automatically once the trial ends. |
PAST_DUE | A recurring charge failed and the subscription is awaiting recovery. It keeps billing: the next successful charge returns it to ACTIVE, or to TRIALING if the trial phase is still running. See Retries, or Pix Automático for the fixed ladder a PIX_AUTOMATIC subscription recovers on instead. |
PAUSED | The subscription has been paused and can be reactivated. |
COMPLETED | The subscription is completed because it reached the end date and time. |
CANCELED | Subscription canceled. See cancellation_source for what triggered it. |
ERROR | An error occurred in the process. |
If your subscriptions never enter PAST_DUE, the status is not enabled for your account yet: a
failed recurring charge leaves the subscription in ACTIVE while the retries run. Contact your
WHITELABEL representative to have it enabled.
Status transition matrix
Each cell shows what moves a subscription from the status in the row to the status in the column. N/A means the transition does not exist. COMPLETED and CANCELED are terminal: nothing leaves them.
| From \ To | TRIALING | ACTIVE | PAST_DUE | PAUSED | COMPLETED | CANCELED |
|---|---|---|---|---|---|---|
CREATED | First payment confirmed and the plan starts with a trial phase | First payment confirmed | N/A | N/A | N/A | First payment fails under initial_payment_validation, or the subscription is canceled |
TRIALING | N/A | The trial phase ends | A recurring charge fails¹ | The subscription is paused | billing_cycles.total is reached or the availability window ends | Canceled by you, by a plan cancellation, or by retries.cancel_on_exhausted_retries |
ACTIVE | A plan change lands inside a trial phase | N/A | A recurring charge fails¹ | The subscription is paused | billing_cycles.total is reached or the availability window ends | Canceled by you, by a plan cancellation, or by retries.cancel_on_exhausted_retries |
PAST_DUE | A later charge succeeds while the trial phase is still running | A later charge succeeds | N/A | N/A | The availability window ends | Canceled by you, or retries end without a successful payment and retries.cancel_on_exhausted_retries is true |
PAUSED | Resumed while the trial phase is still running | Resumed after the trial phase | N/A | N/A | N/A | The subscription is canceled |
¹ Only where PAST_DUE is enabled for the account; otherwise the subscription stays in its current status while the retries run.
ERROR sits outside this flow: it is reserved for processing failures and is not part of the
normal lifecycle above.
Canceling a subscription
You can cancel a subscription in CREATED, ACTIVE, TRIALING, PAST_DUE and PAUSED, both
through Cancel Subscription and from the dashboard.
COMPLETED and CANCELED are terminal — canceling from either returns 400 INVALID_STATE, which
is also what a repeated cancel on an already-canceled subscription returns.
The same endpoint can also schedule the cancellation for a future date or billing cycle instead of applying it immediately — see Cancel Subscription.