跳转到内容

Metaverse Orbs API (1.0.0)

Metaverse Orbs API

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

Charges Shards from user's balance

请求

Charge shards from user

安全
Server
路径
merchantIdstring必需

Merchant ID of the client

projectIdstring必需

Project ID of the project

标头
X-OPERATION-IDstring(UUID)= 36 characters必需

Unique operation ID.

X-HOST-IDstring(UUID)= 36 characters必需

Unique operator ID.

正文application/json
shardsinteger(int64)>= 1必需

Number of Shards to charge.

示例: 22
user_tokenstringnon-empty必需

Authentication token of the user whose balance is to charge.

virtual_currency_skustringnon-empty必需

Multicurrency SKU

示例: "blue_orb_point"
curl -i -X POST \
  'https://xsolla.redocly.app/_mock/zh/api/metaframe/v2/merchants/{merchantId}/projects/{projectId}/multicurrency-charge' \
  -H 'Content-Type: application/json' \
  -H 'X-HOST-ID: stringstringstringstringstringstring' \
  -H 'X-OPERATION-ID: stringstringstringstringstringstring' \
  -H 'X-SERVER-AUTHORIZATION: YOUR_API_KEY_HERE' \
  -d '{
    "shards": 22,
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJ....LGH2xCeJHxl8u8Xn2aI=",
    "virtual_currency_sku": "blue_orb_point"
  }'

响应

Operation successful

正文application/json
balanceobject
示例: {"orbs":1,"shards":5}
响应
application/json
{ "balance": { "orbs": 1, "shards": 5 } }

Charges Shards from user's balance by Xsolla Account ID

请求

Charge shards from user by Xsolla Account ID

安全
Server
路径
merchantIdstring必需

Merchant ID of the client

projectIdstring必需

Project ID of the project

标头
X-OPERATION-IDstring(UUID)= 36 characters必需

Unique operation ID.

X-HOST-IDstring(UUID)= 36 characters必需

Unique operator ID.

正文application/json
shardsinteger(int64)>= 1必需

Number of Shards to charge.

示例: 22
user_idstring(UUID)non-empty必需

Xsolla Account ID.

示例: "b8fa3003-2448-49fb-bbe2-7f72f420e350"
virtual_currency_skustringnon-empty必需

Multicurrency SKU

示例: "blue_orb_point"
curl -i -X POST \
  'https://xsolla.redocly.app/_mock/zh/api/metaframe/v2/merchants/{merchantId}/projects/{projectId}/multicurrency-charge-user' \
  -H 'Content-Type: application/json' \
  -H 'X-HOST-ID: stringstringstringstringstringstring' \
  -H 'X-OPERATION-ID: stringstringstringstringstringstring' \
  -H 'X-SERVER-AUTHORIZATION: YOUR_API_KEY_HERE' \
  -d '{
    "shards": 22,
    "user_id": "b8fa3003-2448-49fb-bbe2-7f72f420e350",
    "virtual_currency_sku": "blue_orb_point"
  }'

响应

Operation successful

正文application/json
balanceobject
示例: {"orbs":1,"shards":5}
响应
application/json
{ "balance": { "orbs": 1, "shards": 5 } }
操作
操作