Test saved cards in sandbox mode
Sandbox mode is a stand-alone environment that supports all the features of a live environment, except real and declined payments. You can access sandbox mode by sending "mode":"sandbox"
when you get the token.
To open the payment UI, use this link and specify the obtained token there: https://sandbox-secure.xsolla.com/paystation3/?access_token={token}
.
In the sandbox mode, you can test the following scenarios of interaction with the payment UI while making a payment with a saved bank card:
Save card
You can test saving a card by two ways:
Saving card while making a test payment
- Configure the Add payment account webhook.
- Open the payment UI in sandbox mode.
- Choose the Credit/Debit cards group of payment methods.
- Enter the bank card details. You can also specify incorrect details (card number or expiration date) to test if an error is generated.
- Check the Save this card for future payments box.
- Click Pay now.

A notification about adding a new card will be sent to the webhook URL.
Saved card will be displayed in the Payment accounts section.
In addition to card details, you need to specify the ZIP code if at least one of the following conditions is true:
- The user’s country is the US or Canada.
- The Bank Identification Number (BIN) indicates that a card was issued in the US.
You can specify any valid ZIP code (e.g., 12345). This determines the sales tax rate and does not affect the progress of the test payment.
Sandbox bank card payments can be made in the following currencies: USD, EUR, RUB, GBP, AED, ALL, AMD, ARS, AUD, AZN, BGN, BRL, BYN, CAD, CHF, CLP, CNY, COP, CZK, DKK, DZD, EGP, GEL, HKD, HRK, HUF, IDR, ILS, INR, ISK, JPY, KES, KGS, KRW, KZT, MAD, MDL, MKD, MNT, MXN, MYR, NGN, PEN, PHP, PKR, PLN, RON, RSD, SAR, SEK, SGD, THB, TRY, TWD, UAH, UYU, UZS, VEF, VND, ZAR.
To see transactions made in sandbox mode:
- Open your Publisher Account.
- Go to Accounting > Transaction registry.
- Check the Show test transactions box.
Saving card from a user account
- Configure the Add payment account webhook.
- Open the payment UI in sandbox mode.
- Go to My payment accounts.
- Click Add account.
- Choose the Credit/Debit cards group of payment methods.
- Enter the bank card details. You can also specify incorrect details (card number or expiration date) to test if an error is generated.
- Click Save.

A notification about adding a new card will be sent to the webhook URL.
Saved card will be displayed in the Payment accounts section.
Delete saved card
You can test deleting a saved card by two ways:
Deleting saved card via API
- Configure the Remove payment account webhook.
- Call the Delete saved accounts API method.
A notification about deleting a card will be sent to the webhook URL.
Deleting saved card in payment UI
- Configure the Remove payment account webhook.
- Open the payment UI in sandbox mode.
- Go to My payment accounts.
- Choose a card and click Delete.

A notification about deleting a card will be sent to the webhook URL.
Charge with saved card
You can test a payment with a saved card in the following ways:
Charging with saved card via API
- Configure the Payment webhook.
- Save card in the sandbox mode.
- Call the Charge with saved account API method.
A notification about a successful payment will be sent to the webhook URL.
Charging with saved card in the payment UI
- Configure the Payment webhook.
- Save card in the sandbox mode.
- Open the payment UI in sandbox mode.
- Click the card from the list of saved payment accounts.
- Click Proceed to checkout.
- If needed, enter CVV.
- Click Pay now.

A notification about a successful payment will be sent to the webhook URL.
Get list of saved cards
- Save cards in the sandbox mode.
- Call the Get saved accounts API method.
You will get masked data in the response.
Was this article helpful?
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.