Xsolla-logo

Charge with saved account

post/projects/{project_id}/users/{user_id}/payments/{type}/{account_id}

Charges a user via a saved payment account.

Note

This API method can't be used under high load. When the number of requests is high, rate limits may apply. Contact your Account Manager to find out the rate limits for this API method.
SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID.

user_id
required
string

User ID.

type
required
string

Type of payment account.

Enum: Description
card

Bank cards.

amazon

Amazon Pay.

skrill

Skrill Digital Wallet.

yandex

YooMoney.

paymasterwebmoney

WebMoney.

paypal

PayPal.

qiwi

QIWI Wallet.

toss

Toss Wallet.

account_id
required
integer

ID of the saved account in Xsolla database.

Request Body schema: application/json
object

User details.

object

Object containing purchase settings.

object

Object containing purchase details.

object

You can pass additional parameters in the token in the custom_parameters object to configure anti-fraud filters. The recommended parameters are shown in the drop-down list. See Pay Station documentation.

Responses
201

Created.

422

Unprocessable Entity.

Request samples
application/json
{
  • "card": {
    },
  • "purchase": {
    },
  • "settings": {
    },
  • "user": {
    }
}
Response samples
application/json
{
  • "transaction_id": 123458390
}