Project ID.
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
Lists saved payment accounts of a given user.
Note
In sandbox mode, this API call works only with test cards that have no 3-D Secure function.
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.
- Mock serverhttps://xsolla.redocly.app/_mock/api/pay-station/projects/{project_id}/users/{user_id}/payment_accounts
- https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/payment_accounts
- 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/projects/{project_id}/users/{user_id}/payment_accounts?mode=string'[ { "id": 4612345, "name": "PP_saved_account", "payment_system": { … }, "type": "paypal" } ]
Request
Charges a user via a saved payment account.
Note
In sandbox mode, this API call works only with test cards that have no 3-D Secure function.
Notice
For the API call to work correctly, configure a timeout of 2 minutes.
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.
Type of payment account.
| Enum Value | Description |
|---|---|
| card | Bank cards. |
| amazon | Amazon Pay. |
| skrill | Skrill Digital Wallet. |
| paypal | PayPal. |
| toss | Toss Wallet. |
| alipayplus_cn | Alipay. |
| alipayplus_hk | Alipay (Hong Kong). |
| alipayplus_gcash | GCash. |
| alipayplus_dana | DANA. |
| alipayplus_rabbitlinepay | Rabbit LINE pay. |
This object contains parameters to configure anti-fraud filters. The list of parameters is shown below. To add custom parameters, contact your Customer Success Manager or email at csm@xsolla.com.
- Mock serverhttps://xsolla.redocly.app/_mock/api/pay-station/projects/{project_id}/users/{user_id}/payments/{type}/{account_id}
- https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/payments/{type}/{account_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/api/pay-station/projects/{project_id}/users/{user_id}/payments/{type}/{account_id}' \
-H 'Content-Type: application/json' \
-d '{
"purchase": {
"description": {
"value": "currency purchase"
},
"virtual_currency": {
"quantity": 100
}
},
"settings": {
"currency": "USD",
"external_id": "ext123",
"mode": "sandbox"
},
"user": {
"ip": "111.11.11.11",
"name": "John Smith",
"legal": {
"name": "My Awesome Company",
"address": "17 Crown Street London SW2 0JW United Kingdom",
"vat_id": "GB111111111",
"country": "GB"
}
}
}'{ "transaction_id": 123458390 }
Request
Deletes a saved payment account.
Note
In sandbox mode, this API call works only with test cards that have no 3-D Secure function.
Note
You can call this API method in sandbox mode. To do this, pass the test payment account data in the request. Refer to the instruction for more information about sandbox mode access and testing scenarios.
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.
Type of payment account.
| Enum Value | Description |
|---|---|
| card | Bank cards. |
| amazon | Amazon Pay. |
| skrill | Skrill Digital Wallet. |
| paypal | PayPal. |
| toss | Toss Wallet. |
| alipayplus_cn | Alipay. |
| alipayplus_hk | Alipay (Hong Kong). |
| alipayplus_gcash | GCash. |
| alipayplus_dana | DANA. |
| alipayplus_rabbitlinepay | Rabbit LINE pay. |
- Mock serverhttps://xsolla.redocly.app/_mock/api/pay-station/projects/{project_id}/users/{user_id}/payment_accounts/{type}/{account_id}
- https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/payment_accounts/{type}/{account_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/api/pay-station/projects/{project_id}/users/{user_id}/payment_accounts/{type}/{account_id}'