Xsolla-logo

Create order with specified item purchased by virtual currency

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

Creates item purchase using virtual currency.

SecurityXsollaLoginUserJWT
Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
item_sku
required
string

Item SKU.

Example: booster_mega_1
virtual_currency_sku
required
string

Virtual currency SKU.

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

Publishing platform the user plays on: xsolla (default), playstation_network, xbox_live, pc_standalone, nintendo_shop, google_play, app_store_ios, android_standalone, ios_standalone, android_other, ios_other, pc_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

Your custom parameters represented as a valid JSON set of key-value pairs.

Responses
200

Successful quick virtual purchase.

404

The item was not found. Make sure the project_id and the item_sku are correct.

422

Not enough virtual currency.

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