Перейти к содержимому

Metaverse Orbs API (1.0.0)

Metaverse Orbs API

Скачать описание OpenAPI
Языки
Серверы
Mock server
https://xsolla.redocly.app/_mock/ru/api/metaframe/
http://orbs.babka.com/
Операции
Операции

Запрос

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/ru/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/ru/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 } }
Операции
Операции