Skip to main content

Subscription Lifecycle

This page explains the public Subscription objects, status values, and the action a merchant should take.

Use Subscription status to control customer access, Invoice status for billing facts, and Payment Order status for the collection result. Browser returns and Operation success are not substitutes for these object states.

Object Model​

Merchant Customer 1 ── N Subscription
Plan 1 ── N Subscription
Checkout Session 1 ── 1 Subscription
Subscription 1 ── N Invoice
Invoice 1 ── N Payment Attempt
Invoice 1 ── 0..1 Payment Order
ObjectMerchant meaning
Merchant CustomerYour customer, identified by stable merchantCustomerNo. There is no separate Customer API.
PlanPrice, currency, and billing interval used for new Subscriptions.
Checkout SessionOne hosted checkout attempt that creates a real Subscription initially in PENDING_CHECKOUT.
SubscriptionThe continuing contract used to decide whether access is active.
InvoiceThe billing fact for a Subscription period.
Payment AttemptOne attempt to collect an Invoice.
Payment OrderThe payment result object associated with a paid Invoice.

Persist platform identifiers returned by creation and events. Current list APIs do not support lookup by every merchant-side identifier.

Plan Status​

ValueNameMeaning
0UNKNOWNDo not create a new Subscription.
1CREATINGCreation is in progress.
2ACTIVEMay be used to create Checkout Sessions.
3ARCHIVEDCannot be used for new Checkout Sessions. Existing Subscriptions are not canceled.
4CREATE_FAILEDCreation failed.
5CHANNEL_UNKNOWNThe processing result is unresolved; query or contact support.

Archiving a Plan also triggers closure of its unfinished Checkout Links. Stop presenting previously issued checkoutUrl values after archive. This does not cancel established Subscriptions.

Updating a Plan changes only name, description, and metadataJson. The update request requires name. Omitting description or sending an empty string keeps the old value. Omitting metadataJson or sending an empty string also keeps the old value; send the string "{}" to replace metadata with an empty object.

Checkout Session Status​

ValueNameMeaning
0UNKNOWNSession state is unknown.
1CREATEDThe hosted link was created.
2REDIRECTEDReserved; not currently a stable observable state.
3VERIFYINGDEEPayment received a completion signal and is verifying the result.
4COMPLETEDCheckout was verified. Confirm the Subscription state before granting access.
5FAILEDCheckout failed.
6EXPIREDReserved; the current flow does not guarantee this state is written.

Use the response expiresAt as the DEEPayment Session validity deadline. Do not redirect after that time. The request does not allow merchants to customize this value.

linkStatus values are UNKNOWN(0), ENABLED(1), DISABLING(2), DISABLED(3), and DISABLE_FAILED(4). Do not redirect to a disabled link.

Subscription Status​

ValueNameMerchant action
0UNKNOWNDo not grant access; query again.
1PENDING_CHECKOUTWait for the customer to complete checkout.
2ACTIVATINGConfirmation is in progress; do not grant access early.
3ACTIVEGrant normal Subscription access.
4PAST_DUEApply your grace-period policy and inspect current Invoices.
5UNPAIDStop or restrict normal access.
6CANCELEDStop Subscription access.
7FAILEDSubscription creation failed.
8TRIALINGReserved status. Merchants cannot actively create it and must not grant access based on it.

Only ACTIVE is the current positive access state. The browser return, a completed Checkout Session, or operation=SUCCEEDED alone does not grant access.

Subscription query and list responses include statusVersion. The status and version come from the same snapshot. Compare versions only within the same subscriptionNo.

Invoice Status​

ValueNameMeaning
0UNKNOWNBilling state is unknown.
1DRAFTDraft billing fact.
2OPENIssued and awaiting payment.
3PAIDThe Invoice is paid.
4VOIDThe Invoice is void.
5UNCOLLECTIBLEThe Invoice cannot be collected.
6PAYMENT_FAILEDThe current Invoice collection failed.

Payment Attempt Status​

ValueNameMeaning
0UNKNOWNAttempt state is unknown.
1PENDINGWaiting for processing.
2PROCESSINGCollection is in progress.
3SUCCEEDEDThis collection attempt succeeded.
4FAILEDThis attempt failed; inspect the current Invoice and Subscription states.
5ACTION_REQUIREDAdditional customer action is required.
6CANCELEDThis attempt was canceled.

Payment Order​

Order valueNameMeaning
0UNKNOWNUnknown.
1CREATEDOrder was created.
2PAYINGPayment is processing.
3SUCCESSPayment succeeded.
11FAILEDPayment failed.
12EXPIREDReserved; current channel results may be normalized to failure.
13CANCELEDReserved; current channel results may be normalized to failure.
14EXCEPTIONThe platform must handle an exception.

An invoice.paid event means the Invoice is paid and linked to a successful Payment Order. Settlement status is not exposed by the current Subscription API, so these payment states must not be used as settlement confirmation.

Operation Status​

Create and change APIs may return an Operation inside an HTTP 200 response.

ValueNameMeaning
0UNKNOWNUnknown Operation state.
1PENDINGWaiting to execute.
2RUNNINGExecution is in progress.
3SUCCEEDEDThe Operation is confirmed successful.
4FAILEDThe Operation is confirmed failed.
5CHANNEL_UNKNOWNThe processing result is unknown. Do not create a replacement object.

HTTP status describes the API response; Operation status describes an already-recorded side effect. HTTP 200 does not make a FAILED or CHANNEL_UNKNOWN Operation successful.

Cancellation​

The merchant action is “cancel the Subscription.” The request contains only an optional reason; end-of-period cancellation is not supported.

The cancel request is asynchronous in business meaning: keep the current access decision until the Subscription is confirmed as CANCELED by the response, a signed event, or a query. Once confirmed, stop access immediately rather than keeping it until currentPeriodEnd. Cancellation does not refund or reverse historical billing objects.

List Query Rules​

All lists default to page=1, pageSize=20, and accept at most 100 items per page. All times use Unix milliseconds.

ListSupported business filters
Plansstatus
SubscriptionsmerchantCustomerNo, planNo, merchantPlanNo, status
InvoicessubscriptionNo, merchantSubscriptionNo, status
Payment OrdersmerchantCustomerNo, subscriptionNo, merchantSubscriptionNo

Subscription and Payment Order lists require both startTime and endTime when no owner filter is provided. The range cannot exceed 90 days.

Payment Order pagination currently uses candidate Invoices. A page may therefore contain fewer orders than pageSize, or even no orders while paging.total > 0. Continue according to paging.page and paging.totalPages; do not stop because orders.length is short.