Xsolla-logo

Create order with all items from current cart

post/v2/project/{project_id}/payment/cart

Creates an order with all items from the cart. 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.

SecurityAuthForCart
Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
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.

object

Custom project settings.

custom_parameters
object [ 1 .. 200 ] properties

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 cart. Check that cart exists, not empty, and all items in it are not free.

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