Make subscription non-renewable
/
Renew 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.
Download OpenAPI description
Languages
Servers
Mock server
https://xsolla.redocly.app/_mock/api/subscriptions/
- https://subscriptions.xsolla.com/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}/cancel
- Mock serverhttps://xsolla.redocly.app/_mock/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/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}/cancel' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- https://subscriptions.xsolla.com/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}/renew
- Mock serverhttps://xsolla.redocly.app/_mock/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}/renew
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://xsolla.redocly.app/_mock/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}/renew' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"settings": {
"ui": {
"size": "large",
"theme": "string",
"version": "desktop",
"desktop": {
"header": {
"is_visible": true,
"visible_logo": true,
"visible_name": true,
"type": "compact",
"close_button": true
}
},
"mobile": {
"mode": "saved_accounts",
"footer": {
"is_visible": true
},
"header": {
"close_button": true
}
},
"license_url": "string",
"mode": "user_account",
"user_account": {
"history": {
"enable": true,
"order": 1
},
"payment_accounts": {
"enable": true,
"order": 1
},
"info": {
"enable": true,
"order": 1
},
"subscriptions": {
"enable": true,
"order": 1
}
},
"independent_windows": true
},
"currency": "str",
"locale": "st",
"external_id": "string",
"payment_method": 1,
"return_url": "string",
"xsolla_product_tag": "string",
"steam_user_id": "stringstringstrin",
"redirect_policy": {
"redirect_conditions": "none",
"delay": 0,
"status_for_manual_redirection": "none",
"redirect_button_caption": "string"
},
"hide_saved_payment_accounts": true
},
"custom_parameters": null,
"steam_user_id": "string"
}'Response
application/json
{ "link_to_ps": "https://secure.xsolla.com/paystation2/?access_token=<access_token>" }
Bodyapplication/jsonrequired
Buy subscription
You must provide either a plan_external_id
Default null
Example: "PlanExternalId"
- https://subscriptions.xsolla.com/api/user/v1/projects/{project_id}/subscriptions/buy
- Mock serverhttps://xsolla.redocly.app/_mock/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/buy
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://xsolla.redocly.app/_mock/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/buy?country=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"plan_external_id": "PlanExternalId",
"product_id": "12345",
"available_plans": null,
"settings": {
"ui": {
"size": "large",
"theme": "string",
"version": "desktop",
"desktop": {
"header": {
"is_visible": true,
"visible_logo": true,
"visible_name": true,
"type": "compact",
"close_button": true
}
},
"mobile": {
"mode": "saved_accounts",
"footer": {
"is_visible": true
},
"header": {
"close_button": true
}
},
"license_url": "string",
"mode": "user_account",
"user_account": {
"history": {
"enable": true,
"order": 1
},
"payment_accounts": {
"enable": true,
"order": 1
},
"info": {
"enable": true,
"order": 1
},
"subscriptions": {
"enable": true,
"order": 1
}
},
"independent_windows": true
},
"currency": "str",
"locale": "st",
"external_id": "string",
"payment_method": 1,
"return_url": "string",
"xsolla_product_tag": "string",
"steam_user_id": "stringstringstrin",
"redirect_policy": {
"redirect_conditions": "none",
"delay": 0,
"status_for_manual_redirection": "none",
"redirect_button_caption": "string"
},
"hide_saved_payment_accounts": true
},
"custom_parameters": null
}'Response
application/json
{ "link_to_ps": "https://secure.xsolla.com/paystation2/?access_token=<access_token>" }