Xsolla Documentation - Test PayPal in sandbox mode (2024)

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/paystation4/?token={token}.

In sandbox mode, you can test the following payment UI interaction scenarios for PayPal:

  • making test payment
  • refund
  • partial refund
  • chargeback
  • saving account
  • deleting saved account
  • charging with saved account
  • getting the list of saved accounts

Note

For each scenario, you can also test generating errors.

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
[email protected]oi9_m_KW
[email protected]7%%p8ioS

Test one-time purchase

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.
Xsolla Documentation - Test PayPal in sandbox mode (1)
  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.

The transaction ID is shown on the page after completing the payment:

Xsolla Documentation - Test PayPal in sandbox mode (2)

After completing a successful test payment, your PayPal account is saved in the list of payment methods.

To see detailed information, including fees, about transactions made in sandbox mode:

  1. Open your Publisher Account.
  2. Go to Accounting > Transaction registry.
  3. Check the Show test transactions box.

Additionally, you can see the transactions’ details and request refunds in Publisher Account in the Support > Transaction search section.

Refund

  1. Configure the Refund webhook.
  2. Make a successful test payment.
  3. Call the Request refund API method.

A notification about the payment refund will be sent to the webhook URL.

Partial refund

  1. Configure the Partial refund webhook.
  2. Make a successful test payment.
  3. Call the Request partial refund API method.

A notification about the partial payment refund will be sent to the webhook URL.

Chargeback

A separate API call for sandbox mode was developed to test this scenario without any bank participation.

To test chargeback:

  1. Configure the Refund webhook.
  2. Make a successful test payment.
  3. Call the Request chargeback API method.

You will receive a Refund webhook with the following code:

CodeReasonDescription
2ChargebackTransaction chargeback requested.

Test saved account

Save account

You can test saving an account in the payment UI:

  • while making a test payment
  • from a user account

Save account while making test payment

  1. Configure the Add payment account webhook.
  2. Open the payment UI in sandbox mode.
  3. Choose PayPal as a payment method.
  4. In the Mock Response Code field, enter 0 or leave the field empty.
  5. In the ZIP Code field, enter any 5 digits.
  6. Check the Never ask again box.
  7. Click Pay. You will be redirected to a window to log in to your PayPal account.
  8. Enter information about your sandbox account.
  9. Complete the test payment.
Xsolla Documentation - Test PayPal in sandbox mode (3)

A notification about adding a new account is sent to the webhook URL.

The saved account is displayed in the Saved methods section.

Save account in payment UI

  1. Configure the Add payment account webhook.
  2. Open the payment UI in sandbox mode.
  3. Go to Saved.
  4. Click the pencil icon and choose Add new method.
  5. Choose PayPal.
  6. In the Mock Response Code field, enter 0 or leave the field empty.
  7. In the ZIP Code field, enter any 5 digits.
  8. Click Save. You will be redirected to a window to log in to your PayPal account.
  9. To complete settings, enter information about your sandbox account.
  10. Click Save and Continue.
Xsolla Documentation - Test PayPal in sandbox mode (4)

A notification about adding a new account is sent to the webhook URL.

The saved account is displayed in the Saved methods section.

Delete saved account

You can test deleting a saved account:

  • via API
  • in the payment UI

Delete saved account via API

  1. Configure the Remove payment account webhook.
  2. Call the Delete saved accounts API method.

A notification about deleting an account is sent to the webhook URL.

Delete saved account in payment UI

  1. Configure the Remove payment account webhook.
  2. Open the payment UI in sandbox mode.
  3. Go to Saved.
  4. Click the pencil icon.
  5. Click Edit methods.
  6. Choose an account and click the bin icon.
Xsolla Documentation - Test PayPal in sandbox mode (5)

A notification about deleting an account is sent to the webhook URL.

Charge with balance of saved account

You can test a payment with a saved account:

  • via API
  • in the payment UI

Note

You can test both:

  • a one-time charge (e.g., purchase with a saved card)
  • regular charges (e.g., subscription payment)

Charge balance of saved account via API

  1. Configure the Payment webhook.
  2. Save account in the sandbox mode.
  3. Call the Charge with saved account API method.

A notification about a successful payment is sent to the webhook URL.

Charge balance of saved account in payment UI

  1. Configure the Payment webhook.
  2. Save the account in sandbox mode.
  3. Open the payment UI in sandbox mode.
  4. Click the account from the list of saved payment accounts.
  5. Click Pay.
Xsolla Documentation - Test PayPal in sandbox mode (6)

A notification about a successful payment is sent to the webhook URL.

Get list of saved accounts

  1. Save accounts in the sandbox mode.
  2. Call the Get saved accounts API method.

You will get masked data in the response.

Generate errors

  1. Open payment UI in sandbox mode.
  2. Choose the PayPal payment method.
  3. In the Mock Response Code field, enter an error code from the list that you want to test, or leave the field empty.
  4. In the ZIP Code field, enter any 5 digits.
  5. Click Pay. You will be redirected to your PayPal account to complete the payment.

The error message will appear on the payment UI.

Xsolla Documentation - Test PayPal in sandbox mode (7)

Error codes:

Error codesTest scenario
1501, 1057, 1015, 3006, 1801, 1803, 1039Any test scenarios.
3031, 1203, 1039, 3006, 1201, 1002, 1089, 2031, 1046, 5004Payment without saving an account.
1084, 1089, 1071, 1501, 1207, 1021, 1022, 1002, 5020, 5022, 3031, 1091, 1203, 1039, 3006, 1201, 1002, 1089, 2031, 1046, 5004, 2030, 1059, 3022, 1803, 1090, 2001, 1000, 1050, 1044Payment with saving an account.
3031, 1203, 1039, 3006, 1201, 1002, 1089, 2031, 1046, 5004Payment with a saved account.
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!

Last updated:September 12, 2024

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

Xsolla Documentation - Test PayPal in sandbox mode (2024)
Top Articles
JackTheRippler acknowledges XRP is the next Bitcoin
MSCI Emerging Markets Index: Overview, How to Invest
Where To Go After Howling Pit Code Vein
Craigslist Mpls Mn Apartments
Calamity Hallowed Ore
T&G Pallet Liquidation
House Share: What we learned living with strangers
zopiclon | Apotheek.nl
Craigslist Deming
Transfer Credits Uncc
Hair Love Salon Bradley Beach
24 Hour Walmart Detroit Mi
Alfie Liebel
Hennens Chattanooga Dress Code
Leccion 4 Lesson Test
Busted Newspaper Fauquier County Va
Allybearloves
Lakers Game Summary
Between Friends Comic Strip Today
Panolian Batesville Ms Obituaries 2022
Governor Brown Signs Legislation Supporting California Legislative Women's Caucus Priorities
PCM.daily - Discussion Forum: Classique du Grand Duché
Www.paystubportal.com/7-11 Login
Dark Entreaty Ffxiv
Urban Dictionary Fov
Costco Jobs San Diego
Cornedbeefapproved
Bj타리
Watson 853 White Oval
Cor Triatriatum: Background, Pathophysiology, Epidemiology
Danielle Moodie-Mills Net Worth
The Fabelmans Showtimes Near Baton Rouge
Issue Monday, September 23, 2024
Fairwinds Shred Fest 2023
Ma Scratch Tickets Codes
Arcane Odyssey Stat Reset Potion
#1 | Rottweiler Puppies For Sale In New York | Uptown
Myql Loan Login
Captain Billy's Whiz Bang, Vol 1, No. 11, August, 1920
America's Magazine of Wit, Humor and Filosophy
Wlds Obits
140000 Kilometers To Miles
Casamba Mobile Login
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Umd Men's Basketball Duluth
56X40X25Cm
Mlb Hitting Streak Record Holder Crossword Clue
antelope valley for sale "lancaster ca" - craigslist
Bluebird Valuation Appraiser Login
Ics 400 Test Answers 2022
Tenichtop
Karen Kripas Obituary
Supervisor-Managing Your Teams Risk – 3455 questions with correct answers
Latest Posts
Article information

Author: Dean Jakubowski Ret

Last Updated:

Views: 6019

Rating: 5 / 5 (70 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Dean Jakubowski Ret

Birthday: 1996-05-10

Address: Apt. 425 4346 Santiago Islands, Shariside, AK 38830-1874

Phone: +96313309894162

Job: Legacy Sales Designer

Hobby: Baseball, Wood carving, Candle making, Jigsaw puzzles, Lacemaking, Parkour, Drawing

Introduction: My name is Dean Jakubowski Ret, I am a enthusiastic, friendly, homely, handsome, zealous, brainy, elegant person who loves writing and wants to share my knowledge and understanding with you.