Sandbox mode
Sandbox mode is a stand-alone environment that supports all the features of a live environment, except real payments. You can use sandbox mode to test:
- payment widget
- payee account
- forms to pass identification procedure (KYC) and a tax interview
- integration with API
Payment widget
To open a payment widget in sandbox mode:
- Get the token. In the request, pass the
Authorization:Basic <your_authorization_basic_key>
parameter, where<your_authorization_basic_key>
is the platform ID: secret key pair, encoded according to the Base64 standard. To find this test data:- Open your project in Publisher Account and go to the Payouts > Settings section.
- In the upper-right corner, choose Sandbox from the drop-down list.
- Go to the Settings > Security section.

Example of a request for getting a token:
Copy
curl -X POST 'https://payouts-sandbox-api.xsolla.com/api/v1/merchants/customer/auth' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic <your_authorization_basic_key>' \
-d '{"email": "<your email>", "name": "<your name>"}'
- Open sandbox mode following the link
https://payouts-sandbox-widget.xsolla.com/?token={token}
, where{token}
is the token received on step 1.
Note
Open the widget using SDKs
To open the payment widget in sandbox mode, pass the sandbox: true
parameter in the script for opening the widget or in the initialization code of the npm-package.
The script for opening the payment widget:
Copy
<script>
var s = document.createElement('script');
s.type = "text/javascript";
s.async = true;
s.src = "https://static.xsolla.com/payouts/v0/_bundles/santorelli.min.js";
s.addEventListener('load', function () {
const widget = new XPayoutsWidget.Widget({
token: '<auth token>',
theme: 'black',
size: 'fixed',
sandbox: true
});
widget.show('<container_id>');
widget.addEventListener('load', () => {
console.log('loaded');
});
}, false);
var head = document.getElementsByTagName('head')[0];
head.appendChild(s);
</script>
The initialization code for opening the payment widget:
Copy
import {Widget} from '@xsolla/payouts-sdk';
const widget = new Widget({
token: '<auth token>',
theme: 'black',
size: 'fixed',
sandbox: true
});
widget.show('<container_id>');
widget.addEventListener('load', () => {
console.log('loaded');
});
- In the widget that opens, check the box for reading and agreeing with the licensing agreement.
- In the
Verification tab, fill in the fields with test data:- name
- surname
- middle name (not required)
- country
- nationality
- If you want to test an unsuccessful scenario, check the box for generating an error when passing an identification procedure (KYC).
- Click
Send .
- In the
Tax Interview tab, select a scenario you want to test: a success or an error. - Make a payment using test data.
Note
Transactions made in sandbox mode don’t have any effect on the production environment.
Payee account
To open a payee account in sandbox mode:
- Open your project in Publisher Account and go to the Payouts > Settings section.
- In the upper-right corner, choose Sandbox from the drop-down list.

- Go to the Users tab and invite yourselves.
- In the email you received to your email address, follow the link to the payee account.
- In the payee account, choose a merchant and make a payment using test data.
Note
You can also go to the sandbox payee account by following the link
https://payouts-sandbox.xsolla.com/
and passing the authentication procedure.Test data
Notice
Any data not included in the list of the test one will not work in sandbox mode.
Test cards
Card number | CVC | Expiration date | Description |
---|---|---|---|
4242424242424242 | Any 3 digits | Any date in the future | Successful payment |
4000000000000002 | Any 3 digits | Any date in the future | Unsuccessful payment |
Test transactions
IBAN | Other fields | Description |
---|---|---|
FI211234569876543210 | Any data | Successful withdrawal |
AT483200000012345864 | Any data | Unsuccessful withdrawal |
Test email address
Email address | Other fields | Description |
---|---|---|
success@xsolla.com | Any data | Successful withdrawal |
failed@xsolla.com | Any data | Unsuccessful withdrawal |
Test phone numbers
Phone number | Other fields | Description |
---|---|---|
+1 (555) 123-4567 | Any data | Successful withdrawal |
+1 (555) 987-6543 | Any data | Unsuccessful withdrawal |
Was this article helpful?
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.Rate this page
Rate this page
Don’t want to answer
Thank you for your feedback!
Found a typo or other text error? Select the text and press Ctrl+Enter.