Test payment process

To test the payment process, you can use the sandbox mode. Sandbox mode is a stand-alone environment that supports all features of a live environment, except real and declined payments. You can access sandbox mode by sending "mode":"sandbox" when you get the token.

Note
Before you sign a contract with Xsolla, testing the payment process is only available in sandbox mode.

In sandbox mode, you can test the payment process with:

Test bank card payment

  1. Open the payment UI in sandbox mode.
  2. Choose the Credit/Debit cards group of payment methods.
  3. Enter the bank card details. Enter any values in the remaining fields. You can also specify incorrect details (card number or expiration date) to generate an error.
  4. Click Pay now.
Test cards list
See the list of test bank cards.
Note

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.

Notice
See the description of all available scenarios for testing one-time purchases and saved cards.

Test PayPal payment

Create test PayPal account

To test the payment process, you need to create an account for PayPal sandbox mode:

  1. Open the PayPal Developer website.
  2. Log in to your account or create a new one.
  3. Go to the Sandbox accounts tab.
  4. On the Sandbox test accounts page, click Create account.
  5. Select the Personal (Buyer Account) account type and choose the country.
  6. Click Create.

The created account is shown in the list of sandbox accounts.

You can also use information from existing sandbox accounts:

Email IDSystem Generated Password
sb-xmxij16980134@business.example.comoi9_m_KW
sb-p7pju16979920@business.example.com7%%p8ioS

Make test payment

  1. Open the payment UI in sandbox mode.
  2. Choose the PayPal payment method.
  3. In the Mock Response Code field, enter 0 or leave the field empty.
  4. In the ZIP Code field, enter any 5 digits.

  1. Click Pay. You will be redirected to a window to log in to your PayPal account.
  2. Enter information about your sandbox account: Email ID as the email address and System Generated Password as the password. To find this information:
    1. Log in to your account on the PayPal Developer website.
    2. Go to the Sandbox accounts tab.
    3. On the Sandbox test accounts page, choose a sandbox account.
    4. Click ••• and select View/Edit account from the drop-down list. You will see the data in the modal window that opens.
  3. Complete the test payment.

Notice
See the description of all available scenarios for testing one-time purchases and saved PayPal accounts.
Your progress
Thank you for your feedback!
Last updated: March 6, 2023

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!