To integrate Subscriptions:
- Create a project for your game.
- Set up subscription plans.
- Set up authorization.
- Create catalog UI.
- Set up opening the payment UI.
- Implement getting subscription information.
- Sign licensing agreement.
How it works
Automatic renewal of recurring subscription
A combination of the product and the chosen plan. A subscription is created when a user selects a subscription plan and gets access to a service. The number of subscriptions a user can get at the same time depends on the number of products in the project. Subscription conditions (billing period, cost, and others) correspond to the conditions of the selected plan. Conditions of the existing subscription are not changed if conditions of the plan were changed after subscription had been created.
Product: Access to the game
- Subscription plan
Silver: $10 per 1 month
- Subscription plan
Gold: $100 per 1 year
A user can select one of the following subscriptions:
- Subscription 1: Access to the game with the $10/month plan
- Subscription 2: Access to the game with the $100/year plan
Product 1: Access to the game1
Product 2: Access to the game2
- Subscription plan: $10 per 1 month
A user can get two subscriptions simultaneously:
- Subscription 1: Access to the game1 with the $10/month plan
- Subscription 2: Access to the game2 with the $10/month plan
Group of plans
A set of plans that have the same
group_id parameter value.
To create or modify a group, pass the
group_id parameter to the API calls:
Creating a group of plans is necessary if you want to:
create a subscription-based product
limit the number of plans you can choose to subscribe to a product
let the user switch to another plan inside the group
You can read more about setting up and using groups in these instructions.
- When a subscription with a trial period is purchased, a billing account is created, and an authorization payment is made. There is a small amount charged from the user’s account and, then, refunded. When payment is charged, a payment webhook is not sent to the webhook URL.
- After the end of the trial period, the full cost of the subscription plan is charged and Payment and Updated subscription webhooks are sent to the webhook URL. If the payment for the subscription is unsuccessful the Canceled Subscription webhook is sent. The trial period is not included in the plan’s validity period and its duration is calculated separately.
- A trial period can be added as a bonus to a promotion.
- A grace period is only available for regular plan and one-time payment subscriptions. Subscriptions with auto payment renewal type are charged automatically.
- Xsolla notifies the user of the need to make payment at the time the grace period is activated and each subsequent day of the grace period.
- If the user pays for a subscription during the grace period, payment is made for the full payment period.
- The number of days the user has access to the partner’s service without actual payment is subtracted from the total number of days in a subscription period.
- If the value in the Grace period field in the plan settings is
0, the plan has no grace period.
- Retry period is only available for a regular plan and auto payment subscriptions.
- Charge attempts are made from a saved payment account once a day.
- The system will try to charge until the subscription is renewed, canceled by a user, or canceled after exceeding the number of billing retries.
- If a user renews the subscription before the end of the retry period, the number of days during which the user has access to the partner’s service without actual payment is subtracted from the total number of days in a subscription period.
- If the value in the Number of billing retries field in the plan settings is
0, the plan has no retry period.
A subscription can have one of the following statuses:
- Active. Primary status. The subscription is created and activated after the first successful payment. Further charges are only possible for active subscriptions.
- Canceled. The subscription has been canceled with immediate effect due to one of the following reasons:
- Status changed via an API method or from the Xsolla Publisher Account.
- Canceled by the user.
- Expired, if an expiration date was set in the parameters.
- Maximum number of charging attempts exceeded. This is three by default; please contact your Customer Success Manager or email to email@example.com to change it.
- User not found in the game.
- User account deleted.
- Non renewing. Subscription renewal canceled. The subscription will last until the current billing cycle ends before the status changes to Canceled. A renewal can be canceled due to one of the following reasons:
- Status changed via an API method or from Publisher Account.
- Canceled by user via email link.
- User account deleted.
Found a typo or other text error? Select the text and press Ctrl+Enter.