Merchant ID.
- Find transactions (fast search)
Pay Station API (2.0)
- 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.
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.
Type of transactions shown in the search results:
| Enum Value | Description |
|---|---|
| all | All transactions. |
| transferred | Successful transactions excluding test transactions. |
| canceled | Canceled transactions excluding test transactions. |
| test | Test transactions. |
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.
A transaction status.
| Enum Value | Description |
|---|---|
| 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:
|
| partiallyRefunded | The user received a partial refund. |
- Mock serverhttps://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transactions/search.{format}
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/search.{format}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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'[ { "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.
- Mock serverhttps://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transactions/simple_search
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/simple_search
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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'[ { "transaction": { … }, "user": { … }, "payment_details": { … } } ]
- Mock serverhttps://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transactions/{transaction_id}/details
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/details
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transactions/{transaction_id}/details'[ { "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.
Period start in the YYYY-MM-DD format. Not required if at least one of the following parameters is passed:
transfer_idreport_id
Period end in the YYYY-MM-DD format. Not required if at least one of the following parameters is passed:
transfer_idreport_id
datetime_from and datetime_to cannot be more than 92 days.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_idreport_id
Whether to include the total transactions amount in the report. Available for export in CSV format only. true by default.
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 Value | Description |
|---|---|
| merchant | Returns transactions made via the partner’s gateways. |
| xsolla | Returns transactions made not via the partner’s gateways. |
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.
- Mock serverhttps://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transactions/registry.{format}
- https://api.xsolla.com/merchant/v3/merchants/{merchant_id}/reports/transactions/registry.{format}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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'[ { "payment_details": { … }, "purchase": { … }, "transaction": { … }, "user": { … }, "user_balance": { … } } ]
- Mock serverhttps://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transfers
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transfers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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'[ { "payout": { … }, "transfer": { … }, "rate": 1, "canceled": 0 } ]
- Mock serverhttps://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports/transactions/summary/transfer
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/summary/transfer
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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'[ { "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 } ]
- Mock serverhttps://xsolla.redocly.app/_mock/api/pay-station/merchants/{merchant_id}/reports
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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'[ { "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 } ]