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

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.

Security
basicAuth
Path
project_idintegerrequired

Project ID.

user_idstringrequired

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.

Query
modestring

Set to sandbox to test the payment process. Remove the parameter to make real payments.

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'

Responses

OK.

Bodyapplication/json
Response
application/json
[ { "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.

Security
basicAuth
Path
project_idintegerrequired

Project ID.

user_idstringrequired

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.

typestringrequired

Type of payment account.

Enum ValueDescription
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.

account_idintegerrequired

ID of the saved account in Xsolla database.

Bodyapplication/jsonrequired
userobject

User details.

settingsobject

Object containing purchase settings.

purchaseobject

Object containing purchase details.

custom_parametersobject(custom_parameters)

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.

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"
      }
    }
  }'

Responses

Created.

Bodyapplication/json
transaction_idinteger
Response
application/json
{ "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.

Security
basicAuth
Path
project_idintegerrequired

Project ID.

user_idstringrequired

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.

typestringrequired

Type of payment account.

Enum ValueDescription
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.

account_idintegerrequired

ID of the saved account in Xsolla database.

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}'

Responses

No Content.

Operations
Operations
Operations