Skip to content

Overview

  • Version: 2.0.0
  • Servers:
    • https://api.xsolla.com/api

Pay Station allows partners to monetize their products by providing users with a convenient UI to pay for in-game purchases in the game store. To set up opening the payment UI, refer to these instructions.

The Pay Station API provides the following groups of calls:

  • Token — includes the API call to generate a token with arbitrary user parameters for further payment processing via the payment UI.
  • Tokenization — includes API calls to securely process payments without opening the payment UI or involving the user.
  • Reports — includes API calls to return data on user transactions, generate reports, and get payouts breakdown by currency.
  • Refund — includes API calls to request full and partial refunds.
  • Testing — includes the API call to test the chargeback process.

You can find detailed information about configuring the payment UI in the Payments solution integration guide.

Note

You can also refer to the Xsolla Base API section in the Postman collection to test API calls used for integration.

Download OpenAPI description
Languages
Servers
Mock server
https://xsolla.redocly.app/_mock/api/pay-station/
https://api.xsolla.com/merchant/v2/
Operations
Operations
Operations

Request

Returns a list of transactions based on specific search parameters. In response, you get data about all payments made in your game, even if they were not completed successfully. You can specify not only the transaction period, but also other parameters, e.g., to search for transactions made by a particular user or in a particular payment status. You can get the list in JSON or CSV format.

Notice

This API call does not contain the project_id path parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

formatstringrequired

Data format.

Enum"json""csv""xls"
Query
datetime_fromstring(datetime)

Period start.

datetime_tostring(datetime)

Period end.

project_idinteger

Project ID.

transaction_idinteger

Transaction ID.

typestring

Type of transactions shown in the search results:

Enum ValueDescription
all

All transactions.

transferred

Successful transactions excluding test transactions.

canceled

Canceled transactions excluding test transactions.

test

Test transactions.

phonestring

Phone number in international format.

user_idstring

Unique user ID in the game stored on your side. Make sure you pass the existing user ID. In case an error occurs, refer to the answers to the FAQs.

user_namestring

Username.

user_customstring

Custom parameter for user identification.

emailstring<= 100 characters

User email.

external_idstring

Transaction ID in the game. Has to be unique for each user payment.

order_idinteger

Order ID. You can use it to call the Get order API method.

Example: order_id=1234
offsetinteger

Number of the element from which the list is generated (the count starts from 0).

limitinteger

Limit for the number of elements on the page.

statusstring(status.enum)

A transaction status.

Enum ValueDescription
created

The user initiated the transaction but it has not been processed yet.

processing

The transaction is being processed.

review

Transaction processing has been suspended by the anti-fraud system, and the transaction is currently under additional verification.

error

An error occurred while processing the transaction. Such payments can be refunded by contacting Xsolla customer support.

done

The transaction was successfully processed.

awaitingRefund

The transaction is awaiting a decision on refund. After the user requested a refund, Xsolla customer support manually processes the request and makes a decision on the refund.

refunded

A refund was made to the user’s Xsolla balance.

canceled

There are two possible scenarios:

  • The transaction has been canceled on the payment system’s side. For example, there were insufficient funds in user account.
  • The payment was refunded to the user.
partiallyRefunded

The user received a partial refund.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transactions/search.{format}?datetime_from=string&datetime_to=string&project_id=0&transaction_id=0&type=all&phone=string&user_id=string&user_name=string&user_custom=string&email=string&external_id=string&order_id=1234&offset=0&limit=0&status=created'

Responses

OK.

Bodyapplication/json
Response
application/json
[ { "transaction": {}, "user": {}, "payment_details": {}, "purchase": {}, "payment_system": {} } ]

Request

Gets a list of transactions based on specific search parameters within a few seconds. This is an alternative to the Find transactions API call that returns data in JSON, CSV, or XLS format.

Notice

This API call does not contain the project_id path parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

Query
transaction_idinteger

Transaction ID. Either this or external_id must be provided, but not both.

external_idstring

Transaction ID in the game. It is unique for each payment. Either this or transaction_id must be provided, but not both.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transactions/simple_search?transaction_id=0&external_id=string'

Responses

The list of transactions was successfully returned.

Bodyapplication/jsonArray [
userobject

User details.

transactionobject

Transaction details.

payment_detailsobject

Payment details.

]
Response
application/json
[ { "transaction": {}, "user": {}, "payment_details": {} } ]

Request

Gets full transaction info by ID.

Notice

This API call does not contain the project_id path parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

transaction_idintegerrequired

Transaction ID.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transactions/{transaction_id}/details'

Responses

The transaction information was successfully returned.

Bodyapplication/jsonArray [
customer_detailsobject
finance_detailsobject
payment_detailsobject
subscription_detailsobject
transaction_detailsobject
]
Response
application/json
[ { "customer_details": {}, "finance_details": {}, "payment_details": {}, "subscription_details": {}, "transaction_details": {} } ]

Request

Returns the list of detailed information about successful and canceled transactions for a specified period. In response, you get information about payments, including data on fees, taxes, as well as order and user. You can get the list in JSON or CSV format. You can use this API call to perform financial reconciliation.

Notice

This API call does not contain the project_id path parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

formatstringrequired

Data format.

Enum"json""csv""xls"
Query
datetime_fromstring(datetime)required

Period start in the YYYY-MM-DD format. Not required if at least one of the following parameters is passed:

  • transfer_id
  • report_id

Example: datetime_from=2023-02-08
datetime_tostring(datetime)required

Period end in the YYYY-MM-DD format. Not required if at least one of the following parameters is passed:

  • transfer_id
  • report_id
The difference between datetime_from and datetime_to cannot be more than 92 days.

Example: datetime_to=2023-03-08
in_transfer_currencyintegerrequired

Converts all financial data to the payout currency (the pay-in currency is used by default). Not required if at least one of the following parameters is passed:

  • transfer_id
  • report_id

show_totalboolean

Whether to include the total transactions amount in the report. Available for export in CSV format only. true by default.

merchant_of_recordsstring or null

Merchant of Record. Can be xsolla, merchant, or not specified. If merchant, returns transactions made via the partner’s gateways. If xsolla, returns transactions made not via the partner’s gateways. If not specified, returns all transactions.

Enum ValueDescription
merchant

Returns transactions made via the partner’s gateways.

xsolla

Returns transactions made not via the partner’s gateways.

project_idinteger

Project ID.

show_dry_runboolean

Whether to include test transactions.

transfer_idinteger

Payout ID.

report_idinteger

Financial report ID.

offsetinteger

Number of the element from which the list is generated (the count starts from 0).

limitinteger

Limit for the number of displayed transactions on the page. If this parameter is passed, you don’t need to pass the datetime_from and datetime_to parameters.

statusstring

Transaction status.

Enum"done""canceled""error""refunded"
curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transactions/registry.{format}?datetime_from=2023-02-08&datetime_to=2023-03-08&in_transfer_currency=0&show_total=true&merchant_of_records=xsolla&project_id=0&show_dry_run=true&transfer_id=0&report_id=0&offset=0&limit=0&status=done'

Responses

The list of transactions was successfully returned.

Bodyapplication/jsonArray [
userobject

User details.

user_balanceobject

User balance.

transactionobject

Transaction data.

purchaseobject

Purchase details.

payment_detailsobject

Payment details.

]
Response
application/json
[ { "payment_details": {}, "purchase": {}, "transaction": {}, "user": {}, "user_balance": {} } ]

Request

Lists all payouts for a period.

Notice

This API call does not contain the project_id path parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

Query
datetime_fromstring(datetime)

Period start.

datetime_tostring(datetime)

Period end.

legal_entity_idinteger

ID of the developer's legal entity.

statusstring

Payout status.

Enum ValueDescription
hold

Waiting for a request to proceed.

ready

Payout in progress.

paid

Payout completed.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transfers?datetime_from=string&datetime_to=string&legal_entity_id=0&status=hold'

Responses

OK.

Bodyapplication/json
Response
application/json
[ { "payout": {}, "transfer": {}, "rate": 1, "canceled": 0 } ]

Request

Gets payouts breakdown in currency.

Notice

This API call does not contain the project_id path parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

Query
datetime_fromstring(datetime)

Period start.

datetime_tostring(datetime)

Period end.

legal_entity_idinteger

ID of the developer's legal entity.

statusstring

Transaction status.

Enum"done""canceled""error""refunded"
curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transactions/summary/transfer?datetime_from=string&datetime_to=string&legal_entity_id=0&status=done'

Responses

OK.

Bodyapplication/json
Response
application/json
[ { "IsoCurrency": "RUB", "PaymentsAmount": 223679.84, "SumCommissionAgent": 11329.58, "SumCommissionUserTaxes": 153.67, "SumItems": 571325.13, "SumNominalSum": 214792.98, "SumOutProject": 551096.13, "SumPayoutSum": 193316.71, "TaxesOfPayments": 171.56, "DirectTaxesOfPayments": 0.46 }, { "IsoCurrency": "USD", "PaymentsAmount": 482.58, "SumCommissionAgent": 77.51, "SumCommissionUserTaxes": 0.07, "SumItems": 243777.62, "SumNominalSum": 493.09, "SumOutProject": 241787.62, "SumPayoutSum": 462.62, "TaxesOfPayments": 0.14, "DirectTaxesOfPayments": 0.14 }, { "IsoCurrency": "EUR", "PaymentsAmount": 608.2, "SumCommissionAgent": 55.71, "SumCommissionUserTaxes": 90.94, "SumItems": 156238.62, "SumNominalSum": 607.26, "SumOutProject": 156158.62, "SumPayoutSum": 460.8, "TaxesOfPayments": 90.94, "DirectTaxesOfPayments": 0.07 } ]

Request

Gets the list of financial reports over a specified period.

Notice

This API call does not contain the project_id path parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

Query
datetime_fromstring(datetime)required

Period start in the YYYY-MM-DD format. Not required if at least one of the following parameters is passed:

  • transfer_id
  • report_id

Example: datetime_from=2023-02-08
datetime_tostring(datetime)required

Period end in the YYYY-MM-DD format. Not required if at least one of the following parameters is passed:

  • transfer_id
  • report_id
The difference between datetime_from and datetime_to cannot be more than 92 days.

Example: datetime_to=2023-03-08
curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports?datetime_from=2023-02-08&datetime_to=2023-03-08'

Responses

OK.

Bodyapplication/json
Response
application/json
[ { "agreement_document_id": "Organization Inc_RUB", "currency": "RUB", "is_direct_payout": false, "is_draft_by_agreement": true, "month": "January", "report_id": 57613, "year": 2019 }, { "agreement_document_id": "Organization Inc_EUR", "currency": "USD", "is_direct_payout": false, "is_draft_by_agreement": true, "month": "January", "report_id": 57619, "year": 2019 } ]
Operations
Operations