Cash Kiosks API v2.0

Game Catalog API

The API is designed to provide a game catalog, i.e. the list of all projects available in the Xsolla system. The API provides basic information on each project such as project name, project icon, payment parameters, etc. The above-mentioned information can be used to create payment pages for the projects.

The game catalog API can be useful for payments via cash kiosks and placing so-called “game buttons” in their UIs. Replacing the usual Xsolla button replaced with a “game button” on a cash kiosk’s screen allows users to make payments in their favorite projects in an easy and habitual way.

API URL: https://api.xsolla.com/projects/list/index.php

Request Format

Request Parameters for Obtaining Game List

Field nameTypeDescriptionExample
IDintegerPayment system counterparty ID. Required.184
signintegerSignature for unauthorized access prevention. Required.0a8d9fb24fcbac2efafec5e51045d05c
Observação
Please contact your Customer Success Manager or email to csm@xsolla.com to get the counterparty ID and secret key.

Generating the Signature

A signature ensures security when checking and making payments. It is created by MD5-hashing a string taht is a concatenation of the above parameters, separated by “|”, in the order shown below.

Copy
Full screen
Small screen
1md5(<ID>|<secret_key>)

secret_key: Counterparty’s secret key.

Example: The signature for counterparty #184 with the secret key “SecretKey” is formed as follows:

$sign=md5(“184|SecretKey”)=0a8d9fb24fcbac2efafec5e51045d05c

Request Example:

https://api.xsolla.com/projects/list/index.php?id=184&sign=0a8d9fb24fcbac2efafec5e51045d05c

Response Format

The response is in XML format and contains both the game list and basic information about each game. The XML has the following structure:

Copy
Full screen
Small screen
 1<projectlist>
 2   <project>
 3       <id>12345</id>
 4       <name>Game</name>
 5       <virtual_currency>Game of currency</virtual_currency>
 6       <logo>http://static.xsolla.com/img/game/12345.gif</logo>
 7       <limits>
 8           <min>Minimum of amount game of currency</min>
 9           <max>max of amount game of currency</max>
10       </limits>
11       <prompt>enter nickname of personage</prompt>
12       <v1>nickname of personage</v1>
13   </project>
14   ...
15</projectlist>

Field Description

Field nameTypeDescription
projectlistarrayList of projects (project). Project fields are described below.
projectstringContains the following fields: id, name, virtual_currency, logo, limits, prompt, “v1”, “v2”, “v3”, each described below.
idintegerGame ID.
namestringName.
virtual_currencystringVirtual currency name.
logostringGame logo URL.
limitsarrayContains min and max fields. If limits is not set for the project, the section is not shown.
minstringMinimum virtual currency quantity.
maxstringMaximum virtual currency quantity.
promptstringMessage prompting to enter the parameters.
localstringInterface language (locale).
v1stringMessage prompting to enter basic user identification parameters for the project.
v2stringMessage prompting to enter one of the additional user identification parameters for the project.
v3stringMessage prompting to enter one of the additional user identification parameters for the project.

Response format in case of an error

In case of an error, the API will respond with an XML message.

Copy
Full screen
Small screen
    1<error>
    2    <description>Incorrect signature</description>
    3</error>
    
    Field nameTypeDescription
    errorstringContains description, described below.
    descriptionstringError description.

    Error Description

    ErrorTypeDescription
    Incorrect signaturestringInvalid signature submitted (sign).
    Temporary technical errorstringInvalid counterparty ID (id), server breakdown, or another error.

    Interaction with Agent

    Overview

    There are two possible interaction options:

    • Xsolla button. This button is placed at the agent side. After clicking the button, the user is prompted to enter a number they have received before and make the payment to this number. To enable payments via the Xsolla button, fill in the account field (project, “v1”, “v2”, “v3” fields must remain empty). The account field must contain the 9-digit Xsolla number. To set up a Xsolla button, contact the manager to obtain a logo and the number.
    • Game buttons. These buttons are placed at the agent side, each corresponding to a different game. The user clicks on the button of a particular game and then logs in to make a payment to their own account. To enable payments via game-specific buttons, fill the project, “v1”, “v2” and “v3” fields (leave account field empty). You will be able to send project, “v1”, “v2” and “v3” fields after the particular project (game) button is configured at the terminal. The project and “v1” fields are mandatory, while “v2” and “v3” are optional and depend on each specific project. To set up game buttons, contact the manager to obtain game logos, game’s internal ids and authorization methods (rules for filling out the “v1”, “v2”, “v3” fields) and other information for each game.

    A button is an element of the agent’s system that initiates a payment through the Xsolla system.

    Before connecting the agent to the Xsolla system, make sure to clarify the following:

    1. Partner number (type) in the Xsolla system. You can get it by contacting your Customer Success Manager at Xsolla.
    2. secret_key, a confidential string parameter that is required to generate the digital signature (MD5 string). You can find it in Publisher Account through your Customer Success Manager.

    You can interact with the API by sending HTTP requests to the API gateway at:

    Copy
    Full screen
    Small screen
    1https://ps.xsolla.com/api/gate
    

    The API accepts GET or POST requests. All parameters must be UTF-8-encoded, as using non-matching encodings will result in signature issues.

    Request Format

    The Xsolla gateway accepts three types of requests:

    • Check whether payment is possible (command = check)
    • Make a payment (command = pay)
    • Calculate the cost and amount of game currency (command = calculate)
    Observação
    If the gateway receives a request with the id of an already completed payment, no money is charged, and the gateway responds with a “0” and “OK” comment. In this case, the order field of the response will contain the number of the previously performed payment.

    Check Command: Identify User by Xsolla Number

    Field nameTypeDescriptionExample
    commandstringCheck whether a payment is possible. Required.check
    accountintegerXsolla number (9 digits). Required.check
    sumfloatAmount of payment in the agreed currency. Decimal separator: “.”; 2 decimal places. Optional.100.98
    typeintegerYour partner number in Xsolla. Required.151
    datestringDate in the YYYYMMDDHHMMSS format. Required.20060425180622
    md5stringSignature used to prevent unauthorized access. Required.0a8d9fb24fcbac2efafec5e51045d05c

    Check command: Identify User by Project/v1/v2/v3

    Field nameTypeDescriptionExample
    commandstringCheck whether a payment is possible. Required.check
    projectintegerProject identifier in the Xsolla system; found in Publisher Account. Required.4783
    v1stringUser identification parameter (usually the in-game nickname). Required.XsollaUser
    v2stringAdditional user identification parameter (depends on project settings). Optional.0
    v3stringAdditional user identification parameter (depends on project settings). Optional.0
    sumfloatAmount of payment in the agreed currency. Decimal separator: “.”; 2 decimal places. Optional.100.98
    typeintegerYour partner number in Xsolla. Required.151
    datestringDate in the YYYYMMDDHHMMSS format. Required.20060425180622
    md5stringSignature used to prevent unauthorized access. Required.0a8d9fb24fcbac2efafec5e51045d05c

    Pay Command: Identify Subscriber by Account

    Field nameTypeDescriptionExample
    commandstringCheck whether a payment is possible. Required.pay
    accountintegerXsolla number (9 digits). Required.1234567, 001234567
    sumfloatAmount of payment in the agreed currency. Decimal separator: “.”; 2 decimal places. Required.100.98
    idstringUnique transaction number in the partner system. Required.xsollaid1
    typeintegerYour partner number in Xsolla. Required.151
    datestringDate in the YYYYMMDDHHMMSS format. Required.20060425180622
    testbooleanTest flag: 1 if this is a test payment, 0 (default value) otherwise. Optional.1
    md5stringSignature used to prevent unauthorized access. Required.0a8d9fb24fcbac2efafec5e51045d05c

    Pay Command: Identify Subscriber by Project/v1/v2/v3

    Field nameTypeDescriptionExample
    commandstringCheck whether a payment is possible. Required.check
    projectintegerProject (game) number. Required.4783
    v1stringUser identification parameter (usually the in-game nickname). Required.XsollaUser
    v2stringAdditional user identification parameter (depends on project settings). Optional.0
    v3stringAdditional user identification parameter (depends on project settings). Optional.0
    sumfloatAmount of payment in the agreed currency. Decimal separator: “.”; 2 decimal places. Optional.100.98
    idstringUnique transaction number in the partner system. Required.xsollaid2
    typeintegerYour partner number in Xsolla. Required.151
    datestringDate in the YYYYMMDDHHMMSS format. Required.20060425180622
    testbooleanTest flag: 1 if this is a test payment, 0 (default value) otherwise. Optional.1
    md5stringSignature used to prevent unauthorized access. Required.0a8d9fb24fcbac2efafec5e51045d05c
    Observação
    If the gateway receives a request with the id of an already completed payment, no money is charged, and the gateway responds with a “0” and “OK” comment. In this case, the order field of the response will contain the number of the previously performed payment.

    Calculate Command

    Field nameTypeDescriptionExample
    commandstringCheck whether a payment is possible. Required.calculate
    projectintegerProject (game) number. Required.4783
    sumfloatAmount of payment in the agreed currency. Decimal separator: “.”; 2 decimal places. Required unless out is specified.100.98
    outfloatAmount of game currency. Decimal separator: “.”; 2 decimal places. Required unless sum is specified.10.98
    typeintegerYour partner number in Xsolla. Required.151
    datestringDate in the YYYYMMDDHHMMSS format. Required.20060425180622
    md5stringSignature used to prevent unauthorized access. Required.0a8d9fb24fcbac2efafec5e51045d05c

    Generating MD5 field

    The signature ensures secure payments and payment checks. It is generated by taking an MD5 hash of a string derived by concatenating the values of all the parameters transmitted, in the same order in which they follow in request, including optional parameters, if any, and the private key of the payment system, which you can get from your your Xsolla Customer Success Manager.

    Check Command

    Copy
    Full screen
    Small screen
     1<?php
     2  $request['command']='check';
     3  $request['account']=1234567;
     4  $request['sum']=150.75;
     5  $request['type']=151;
     6  $request['date']='20110117000516';
     7  $md5='';
     8  foreach ($request as $value) {
     9  $md5.=$value;
    10  }
    11  $request['md5']=md5($md5.$secret_key);
    12?>
    

    Line:

    check1234567150.7515120110117000516test

    MD5:

    1cad5a2c3457cffa8e857a507a7050ba

    Pay Command

    Copy
    Full screen
    Small screen
     1<?php
     2$request['command']='pay';
     3$request['account']=1234567;
     4$request['sum']=150.75;
     5$request['id']=384957;
     6$request['type']=151;
     7$request['date']='20110117000516';
     8$md5='';
     9foreach ($request as $value) {
    10$md5.=$value;
    11}
    12$request['md5']=md5($md5.$secret_key);
    13?>
    

    Line:

    pay1234567150.7538495715120110117000516test

    MD5:

    7cfa05abde4ae2464142bf2ac7a72f32

    Calculate Command

    Copy
    Full screen
    Small screen
     1<?php
     2  $request['command']='calculate';
     3  $request['project']=4783;
     4  $request['out']=12;
     5  $request['type']=151;
     6  $request['date']='20110117000516';
     7  $md5='';
     8  foreach ($request as $value) {
     9  $md5.=$value;
    10  }
    11  $request['md5']=md5($md5.$secret_key);
    12?>
    

    Line:

    calculate47831215120110117000516test

    MD5:

    e73e11a9cad00e205358e05254905af5

    Responses Codes

    The system generates an XML containing the status code in result and the description in comment.

    ResultCommentDescription
    0OKPayment allowed (in case of the check command) or successfully/previously completed (in case of the pay command).
    1technical problemService under maintenance (resend the notification later).
    11type is not exists or disabledType does not exist or is disabled.
    2xsolla-number not correctIncorrect Xsolla number length.
    3xsolla-number not foundXsolla number not found.
    4StopXsolla number not intended for payment.
    5sum errorInvalid amount.
    6bonus errorOutput error.
    7md5 errorMD5 hash mismatch.
    8IP errorProhibited IP address.
    9request is not correctRequired parameters missing or invalid command specified.
    10project is not existsProject does not exist (disabled or permanently deleted).

    Payment System Transaction Registry API

    The document is intended for developers who want to use the payment system transaction registry API to let their users pay for virtual items and services of their project. The document requires basic knowledge of APIs, HTTP requests, and software architectures.

    Interacting with the API

    • The work is only possible via server-server integration;
    • All parameters should be UTF-8-encoded;
    • Data is returned in CSV format.

    Description of API Methods

    • Get – receive payment data.

    API URL

    Basic URL: https://api.xsolla.com/payments/

    URL Mask

    Copy
    Full screen
    Small screen
    1https://api.xsolla.com/payments/v<number versions>/<command>?<parameter1=value1>&<parameter2=value2
    

    Get

    Creates a request to get data on payments from all payment systems of the given counterparty for the last 24 hours.

    Getting API Access

    To get API access, contact your Customer Success Manager or email to csm@xsolla.com to get a unique partner ID and secret key.

    Request Example

    https://api.xsolla.com/payments/v1/Get?date=2013-08-20&id=1234&sign=8f683701c03b03fe49e6ef7bbfafb8fb

    Input Parameters

    Field nameTypeDescriptionExample
    datestringThe reply contains payment data for the last 24 hours. The date is formatted as YYYY-MM-DD (in GMT+4 time zone).2013-08-20
    idintegerUnique partner ID. To get an ID, please contact your Customer Success Manager or email to csm@xsolla.com.1234
    signstringSignature for preventing unauthorized access.8f683701c03b03fe49e6ef7bbfafb8fb

    Response

    The reply is provided in the CSV format, with “,” used as the separator:

    69927355,95188933,394,2013-08-01T06:49:25+04:00,91.0000,RUB,done

    Field Description:

    Field nameTypeDescriptionExample
    xsolla_idintegerTransaction number within the Xsolla system. Required.12345678
    ps_idintegerTransaction number as sent by the payment system. Required.1234
    pidintegerPayment system ID. Required.64
    datetimestringTime of payment (GMT+4 time zone). Required.2013-08-01T06:49:25+04:00
    amountfloatAmount paid by the user. Required.10.98
    currencystringPayment currency. Required.USD
    statusstringPayment status (the report includes payments with statuses done — payment completed successfully — and canceled — payment canceled). Required.done

    Generating the Signature

    The parameters are sorted alphabetically by keys. The signature is an MD5 hash of a string that is a concatenation of parameter values and the secret key (you can learn one from the manager). The separator is “|”.

    Request Example

    Copy
    Full screen
    Small screen
      1date = 2013-08-20;
      2id=1234;
      3secret_key=password.
      

      The string will look as follows:

      2013-08-20|1234|password

      MD5 of the above string:

      e8df0ff2e4360300a5142cc28d86b422

      List of completion codes

      HTTP status of the responseError messageError description
      200Success
      400Wrong parametersInvalid parameters sent
      400Wrong ID partnerInvalid counterparty
      400Wrong dateInvalid date
      403Incorrect signInvalid signature
      404Unknown commandUnknown command
      500Internal API error

      Transaction Reconciliation with Payment Systems

      Reconciliation via Email Notification

      Transaction reconciliation consists in the payment system’s sending an email with an attachment of a particular format. The frequency of reconciliation must be negotiated in advance.

      Reconciliation document format

      The reconciliation document has the following format:

      • UTF-8 encoding
      • CSV format (comma or semicolon as the delimeter)
      • Sent from a previously agreed email to stats@xsolla.com
      • Email subject: “stats registry”
      • Attachment file name: stats_registry_period, where period is determined by start_dateTend_date in format YYYY-MM-DD. If the period consists of one day (24 hours), the portion including and after T can be omitted

      Observação

      Stats for processed transactions for November 24, 2010.

      Filename: stats_registry_2010-11-24.csv

      Stats for processed transactions for the period from October 10 to December 16, 2010.

      Filename: stats_registry_2010-01-10T2010-12-16.csv

      Stats for processed transactions for May 2011.

      Filename: stats_registry_2011-05-01T2011-05-31.csv

      Document Content

      Observação
      Columns must be in this order.
      ParameterTypeDescription
      conststringTransaction id in the merchant’s system (id in your system). Required unless pid is passed.
      pidstringTransaction id in Xsolla system (we send it in the request). Required unless const is passed.
      amountstringPayment amount. Decimal separator: “.”, 2 decimal places. Required.
      payoutstringXsolla payout amount. Required.
      currencystringPayment currency (ISO 4217). Required.
      statestringPayment status. Only send payments with statuses success or cancelled. A canceled payment is a payment that was originally approved but later canceled by the user. Required.
      timestringTime and date of payment (YYYY-MM-DD HH:MM:SS). Required.
      descstringAdditional parameter, for example some payment details we pass in the request (email, nick, phone). Optional.

      Registry Example

      Example 1

      Copy
      Full screen
      Small screen
      197035765;6654448;10.00;9.50;RUB;done;2011-09-01 13:30:45;nickname
      2
      397035766;6634558;150.00;145.00;RUB;done;2011-09-01 16:43:54;vassilliy@mail.ru
      

      Example 2 (if there is no pid in the payment system)

      Copy
      Full screen
      Small screen
      1564;;10.00;9.50;RUB;done;2011-09-01 13:30:45;nickname
      2
      3456;;150.00;145.00;RUB;done;2011-09-01 16:43:54;vassilliy@mail.ru
      

      Example 3 (if there is no desc — note the semicolon at the end)

      Copy
      Full screen
      Small screen
      1564;6654855;10.00;9.50;RUB;done;2011-09-01 13:30:45;
      2
      3456;4588554;150.00;145.00;RUB;done;2011-09-01 16:43:54;
      

      Reconciliation via Payment System API

      Transaction reconciliation can also be done via the payment system’s HTTP (HTTPS) API. After querying the API, Xsolla must receive the following parameters:

      Observação
      Names of the parameters in the API response may differ from those shown in the table.
      ParameterTypeDescription
      conststringTransaction id in the merchant’s system (id in your system). Required unless pid is passed.
      pidstringTransaction id in Xsolla system (we send it in the request). Required unless const is passed.
      amountstringPayment amount. Decimal separator: “.”, 2 decimal places. Required.
      payoutstringXsolla payout amount. Required.
      currencystringPayment currency (ISO 4217). Required.
      statestringPayment status. Only send payments with statuses success or cancelled. A canceled payment is a payment that was originally approved but later canceled by the user. Required.
      timestringTime and date of payment (YYYY-MM-DD HH:MM:SS). Required.
      descstringAdditional parameter, for example some payment details we pass in the request (email, nick, phone). Optional.
      Este artigo foi útil?
      Obrigado!
      Podemos melhorar alguma coisa? Mensagem
      Que pena ouvir isso
      Explique porque este artigo não foi útil para você. Mensagem
      Obrigado pelo seu feedback!
      Avaliaremos sua mensagem e a usaremos para melhorar sua experiência.
      Última atualização: 25 de Novembro de 2025

      Encontrou um erro de texto ou digitação? Selecione o texto e pressione Ctrl+Enter.

      Relatar um problema
      Nós sempre avaliamos nossos conteúdos. Seu feedback nos ajuda a melhorá-los.
      Forneça um e-mail para que possamos responder
      Obrigado pelo seu feedback!
      Não conseguimos enviar seu feedback
      Tente novamente mais tarde ou contate-nos via doc_feedback@xsolla.com.