Get a token

To obtain a token, use the Create payment token by server API endpoint. Your server should send a request to the Xsolla server with the following data:

  • the ID of the user who made the purchase
  • amount of payment
  • payment currency
  • purchase details (optional)
  • Pay Station parameters (optional)

You can pass purchase information in one of the following ways:

  • as a list of items via the item parameter
  • as a description of the purchase via the description parameter

Pay Station parameters (e.g., localization language, interface properties, theme) are passed in the settings object. To enable/disable sandbox mode, you need to change the value of the sandbox parameter in the request to receive a token, and change the SDK settings. To change the rest of the Pay Station interface settings, you need to change the parameters of the request for a token.

Note:
You can pass additional information using the custom_parameters parameter. This information will also be passed in the configured webhooks.

Continue reading