Xsolla-logo

Create order with specified item

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

Creates an order with a specified item. The created order will get a new order status.

To open the payment UI in a new window, use the following link: https://secure.xsolla.com/paystation2/?access_token=ACCESS_TOKEN, where ACCESS_TOKEN is the received token.

For testing purposes, use this URL: https://sandbox-secure.xsolla.com/paystation2/?access_token=ACCESS_TOKEN.

Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
item_sku
required
string

Item SKU.

Example: booster_mega_1
Request Body schema: application/json
currency
string

The currency which prices are displayed in (USD by default). Three-letter currency code per ISO 4217.

locale
string

Response language.

sandbox
boolean
Default: false

Creates an order in the sandbox mode. The option is available for those users who are specified in the list of company users.

quantity
integer >= 1
Default: 1

Item quantity.

object

Custom project settings.

custom_parameters
object

Project specific parameters.

object

User shipping data.

object

Selected shipping method. The format depends on the integrated delivery provider.

Responses
200

Order was successfully created.

422

Invalid item. Check that item exists, not turned off, deleted, and not free.

Request samples
application/json
{
  • "sandbox": true,
  • "quantity": 5,
  • "settings": {
    },
  • "custom_parameters": {
    }
}
Response samples
application/json
{
  • "order_id": 641,
  • "token": "f4puMEFFDZcx9nv5HoNHIkPe9qghvBQo"
}