跳转到内容

概览

  • Version: 2.0
  • 服务器https://api.xsolla.com/merchant/v2/

本API参考介绍管理订阅、优惠券和促销活动的端点。 如需了解关于订阅的详细信息,请参考产品指南词汇表

下载 OpenAPI 描述
语言
服务器
Mock server
https://xsolla.redocly.app/_mock/zh/api/subscriptions/
操作
操作
操作
操作
操作
操作
操作
操作

请求

安全
subscriptionsManagementJwtAuth
路径
subscription_idinteger\d+必需
project_idinteger\d+必需
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/zh/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/payment_account' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

响应

Get payment account info

正文application/json
card_expiry_dateobject or null
idinteger必需
示例: "123"
namestring or null
示例: "** 7398"
ps_namestring or null
示例: "Mastercard"
switch_icon_namestring or null
示例: "mastercard.svg"
typestring必需
示例: "card"
响应
application/json
{ "card_expiry_date": { "month": "09", "year": "2023" }, "id": "123", "name": "** 7398", "ps_name": "Mastercard", "switch_icon_name": "mastercard.svg", "type": "card" }

请求

安全
subscriptionsManagementJwtAuth
路径
subscription_idinteger\d+必需
project_idinteger\d+必需
查询
sandboxboolean
curl -i -X POST \
  'https://xsolla.redocly.app/_mock/zh/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/payment_account/manage?sandbox=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

响应

Returns link for managing payment accounts

正文application/json
link_to_psstring必需
示例: "https://secure.xsolla.com/paystation2/?access_token=<access_token>"
响应
application/json
{ "link_to_ps": "https://secure.xsolla.com/paystation2/?access_token=<access_token>" }