Get user account url
/
Get subscription
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.
Скачать описание OpenAPI
Языки
Серверы
Mock server
https://xsolla.redocly.app/_mock/ru/api/subscriptions/
- https://subscriptions.xsolla.com/api/user/v1/projects/{project_id}/subscriptions/user_account
- Mock serverhttps://xsolla.redocly.app/_mock/ru/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/user_account
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/ru/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/user_account?locale=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Ответ
application/json
{ "redirect_url": "https://subscriptions-user-account.xsolla.com/?token=<access_token>&projectId=<project_id>&merchantId=<merchant_id>&locale=<locale>" }
- https://subscriptions.xsolla.com/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}
- Mock serverhttps://xsolla.redocly.app/_mock/ru/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/ru/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}?locale=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Ответ
application/json
{ "charge": { "amount": 4.99, "currency": "USD", "setup_fee": 0.99 }, "date_create": "2031-04-11T13:51:02+03:00", "date_end": "2031-04-11T13:51:02+03:00", "date_last_charge": "2031-04-11T13:51:02+03:00", "date_next_charge": "2031-04-11T13:51:02+03:00", "id": "12345", "is_change_plan_allowed": "false", "is_change_to_non_renew_possible": "true", "is_in_trial": "false", "is_renew_possible": "true", "period": { "unit": "month", "value": "1" }, "plan_description": "Localized plan description", "plan_end_date": "2031-04-11T13:51:02+03:00", "plan_external_id": "PlanExternalId", "plan_id": "54321", "plan_name": "Localized plan name", "plan_start_date": "2021-04-11T13:51:02+03:00", "product_description": "Localized product description", "product_external_id": "ProductExternalId", "product_id": "12345", "product_name": "Product name", "status": "active", "trial_period": "0" }
- https://subscriptions.xsolla.com/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}/cancel
- Mock serverhttps://xsolla.redocly.app/_mock/ru/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}/cancel
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://xsolla.redocly.app/_mock/ru/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}/cancel' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'