How to set up payment method

How it works

When you open the payment UI, you can send the payment method ID in the settings.payment_method parameter. In this case, the user is immediately redirected to the payment form of the selected payment method.

How to get it

EXAMPLE

Copy
Full screen
Small screen
curl -v https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/token \
 -X POST \
 -u your_merchant_id:merchant_api_key \
 -H 'Content-Type:application/json' \
 -H 'Accept: application/json' \
 -d '
 {
     "user": {
         "id": {
             "value": "1234567"
         },
     },
     "settings": {
         "project_id": 14004,
         "payment_method": 24
     },
     "purchase": {
             "checkout": {
                 "amount": 9.99,
                 "currency": "USD"
             }
     }
 }'

To get the list of payment methods IDs:

  1. Open your project in Publisher Account and go to the Pay Station > Payment methods tab.
  2. Copy the ID under the name of a necessary payment method, or click Download XLS and wait until the XLS file is downloaded.

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Last updated: September 30, 2024

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!