OK.
Subscriptions API (2.0)
下载 OpenAPI 描述
语言
服务器
Mock server
https://xsolla.redocly.app/_mock/zh/api/subscriptions/
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/review
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/promotions/{promotion_id}/review
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/zh/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/review'响应
application/json
[ { "component": "rewards", "message": "Please select a reward" } ]
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/rewards
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/promotions/{promotion_id}/rewards
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/zh/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/rewards'响应
application/json
{ "id": 17840, "item": { "bonus": [ … ], "discount": [ … ] }, "package": { "bonus_amount": 5, "bonus_percent": 5 }, "purchase": { "discount_percent": 10 }, "subscription": { "trial_days": 30 } }
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/rewards
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/promotions/{promotion_id}/rewards
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/zh/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/rewards' \
-H 'Content-Type: application/json' \
-d '{
"item": {
"bonus": [
{
"quantity": 2,
"sku": "1234"
}
],
"discount": [
{
"discount_percent": 5,
"max_amount": 10,
"sku": "1234"
}
]
},
"package": {
"bonus_amount": 5,
"bonus_percent": 5
},
"purchase": {
"discount_percent": 10
},
"subscription": {
"trial_days": 30
}
}'