Used for client-to-server integration. Creates an order with a specified item and generates a payment token for it. The created order gets the new
order status.
The client IP is used to determine the user’s country, which is then used to apply the corresponding currency and available payment methods for the order.
To open the payment UI in a new window, use the following link: https://secure.xsolla.com/paystation4/?token={token}
, where {token}
is the received token.
For testing purposes, use this URL: https://sandbox-secure.xsolla.com/paystation4/?token={token}
.
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. | ||||||||||||||||||||||||||||||||||||||||||||
promo_code | string Redeems a code of a promo code promotion with payment. | ||||||||||||||||||||||||||||||||||||||||||||
object Settings for configuring payment process and the payment UI for a user. | |||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||
Order was successfully created.
Item or coupon not found. Make sure the used data is correct.
Invalid error.
{- "sandbox": true,
- "quantity": 5,
- "promo_code": "discount_code",
- "settings": {
- "ui": {
- "theme": "63295a9a2e47fab76f7708e1",
- "desktop": {
- "header": {
- "is_visible": true,
- "visible_logo": true,
- "visible_name": true,
- "visible_purchase": true,
- "type": "normal",
- "close_button": false
}
}
}
}, - "custom_parameters": {
- "character_id": "ingameUsername"
}
}
{- "order_id": 641,
- "token": "f4puMEFFDZcx9nv5HoNHIkPe9qghvBQo"
}