Skip to main content
A subscription is the recurring billing arrangement on credit card. The integrator starts the subscription once, and the platform makes the charges of the following cycles on the card provided, without a new request. The integrator neither schedules charges nor stores card data.

Prerequisite

The amount and the billing interval of the subscription derive from a plan previously configured on the account. The plan is identified, in the request, by the productId and offerSlug fields. The interval may be weekly, monthly, bimonthly, quarterly, semiannual or annual.

Starting the subscription

Starting a subscription comprises two operations. The first converts the card data into a token, through POST /v1/card-token, as described in Credit card. The second, POST /v1/subscriptions, makes the first charge and creates the subscription.
The request contains neither an amount nor a number of installments: the amount is that of the plan, and recurring charges are always made as a single payment.

First charge declined

The subscription is created only when the first charge is authorized. If it is declined, the response keeps status 200, contains the transaction in the refused status, with the reason in refuseReason, and does not contain the subscription block. It is for the integrator to obtain another card and submit a new request. A 400 response indicates that the plan was not found or is not configured as recurring. The temporary block of the payer described in Credit card applies to this operation.

Statuses

Renewal

At each cycle, the platform makes the charge on the card linked to the subscription. Each renewal charge is a transaction of its own and generates the ordinary transaction notifications, including transaction_paid, described in Webhooks.

Renewal failure

A declined renewal charge moves the subscription to the overdue status, and the platform makes further charge attempts. Authorization of a further attempt restores the active status. Upon the fifth attempt without authorization, the subscription is cancelled by the platform.

Cancellation

The POST /v1/subscriptions/{subscriptionId}/cancel operation cancels the subscription. From cancellation onwards, no further charge is made.
Cancellation does not return amounts already paid. The return of a specific charge depends on the refund of the corresponding transaction. The operation responds 400 when the subscription is already cancelled or completed.

Retrieval

The GET /v1/subscriptions/{subscriptionId} operation returns the subscription, with its status, the date of the next charge, the plan contracted and the identification of the payer. The GET /v1/subscriptions operation lists the subscriptions of the account, filtered by plan (productId, offerId), status (status), period and search text, and paginated by the page and limit parameters. The listing also contains consolidated indicators in the stats block.