Merchant ID.
Subscriptions API (2.0)
- Version: 2.0
- Servers:
https://api.xsolla.com/merchant/v2/
This API reference describes endpoints for managing subscriptions, coupons, and promotions. To get more information about Subscriptions, see the product guide and the glossary.
Request
Lists all recurrent subscriptions.
This API method can’t be used under a high load. The maximum load is 20 requests per minute.
Notice
This API call does not contain the project_id path-parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/subscriptions
- Mock serverhttps://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/subscriptions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/subscriptions?offset=0&limit=0&user_id=string&project_id%5B%5D=0&plan_id%5B%5D=0&product_id%5B%5D=0&group_id%5B%5D=string&status%5B%5D=active&datetime_from=string&datetime_to=string'OK.
Plan name. Value consists of pairs "localization":"plan name".
Billing details.
Billing period.
Number of time units. The value depends on the type parameter and can be:
- from 1 to 366, if type is day
- from 1 to 12, if type is month
- 0 if type is lifetime
Currency of the purchase. Three-letter currency code per ISO 4217.
List of prices in different currencies.
Currency of the purchase. Three-letter currency code per ISO 4217.
Plan description. Value consists of pairs "localization":"plan description".
Subscription expiration details.
Trial period details.
Grace period details.
Billing retry details.
Period of time that user can refund the payment for a subscription plan (in days).
Localized item descriptions.
Subscription creation date in the YYYY-MM-DD’T’HH:MM:SS format per ISO 8601.
Subscription end date in the YYYY-MM-DD’T’HH:MM:SS format per ISO 8601.
Last subscription charge date in the YYYY-MM-DD’T’HH:MM:SS format per ISO 8601.
Next subscription charge date in the YYYY-MM-DD’T’HH:MM:SS format per ISO 8601.
[ { "id": 45, "status": "canceled", "user": { … }, "charge_amount": 0.03, "currency": "USD", "date_create": "2013-09-05T15:27:47+04:00", "date_end": "2014-02-06T11:32:48+04:00", "date_last_charge": null, "date_next_charge": null, "plan": { … }, "product": { … } } ]
- https://subscriptions.xsolla.com/api/v1/projects/{projectId}/subscriptions/user_account
- Mock serverhttps://xsolla.redocly.app/_mock/api/subscriptions/api/v1/projects/{projectId}/subscriptions/user_account
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/api/subscriptions/api/v1/projects/{projectId}/subscriptions/user_account' \
-H 'Content-Type: application/json' \
-d '{
"user_v1": "user123",
"locale": "en"
}'{ "redirect_url": "https://subscriptions-user-account.xsolla.com/?token=<access_token>&projectId=<project_id>&merchantId=<merchant_id>&locale=<locale>", "access_token": "<access_token>" }