Xsolla-logoXsolla Developers
前往发布商帐户

使用以虚拟货币购买的指定商品创建订单Client-side

post/v2/project/{project_id}/payment/item/{item_sku}/virtual/{virtual_currency_sku}

使用虚拟货币创建商品购买。

SecurityXsollaLoginUserJWT
Request
path Parameters
project_id
required
integer

项目ID。您可以在您的发布商帐户项目名称旁边找到。

Example: 44056
item_sku
required
string

商品SKU。

Example: booster_mega_1
virtual_currency_sku
required
string

虚拟货币SKU。

Example: crystal
query Parameters
platform
string
Default: "xsolla"

用户玩游戏的发布平台:xsolla(默认)、playstation_networkxbox_livepc_standalonenintendo_shopgoogle_playapp_store_iosandroid_standaloneios_standaloneandroid_otherios_otherpc_other

Enum: "playstation_network" "xbox_live" "xsolla" "pc_standalone" "nintendo_shop" "google_play" "app_store_ios" "android_standalone" "ios_standalone" "android_other" "ios_other" "pc_other"
Request Body schema: application/json
object or null [ 1 .. 200 ] properties

自定义参数的形式是一组有效的JSON键值对。
您可以通过此字段传入补充参数来配置反欺诈筛选条件。 请参阅支付中心文档

additional property
string or integer or number or boolean or Array of arrays or object
One of:
string
Responses
200

快速虚拟购买成功。

404

未找到该商品。请确保project_iditem_sku正确无误。

422

虚拟货币不足。

Request samples
application/json
{
  • "custom_parameters": {
    }
}
Response samples
application/json
{
  • "order_id": 641
}