imageTesting One Off Payments

Testing requires you to make API calls in the Sandbox environment:

Make sure you have credentials for the API Sandbox.
Remember to use the Sandbox environment for all tests:
https://api-platform-sandbox.flywire.com/

Card Payments

1. Choose the recipient for the test payment.

2. Create a Checkout Session.

Since you are testing status notifications, make sure to provide a notifications URL where you can receive the notifications via callbacks.

You'll receive a URL for the UI form in the API response.

3. Open the URL for the form in your browser.

4. In your browser, add the event listener code to the page.

5. Fill out the payer information fields.

The fields do not affect the test scenario, you can fill them with any data you want.

6. Enter the magic values and credit card data for your scenario.

  1. Enter magic values as the card holder’s first and last name depending on which scenario you want to test:

    Scenario First Name Last Name

    "Happy path", meaning no errors. 3DS will be triggered.

    The payment will successfully be charged.

    MAGICVALUE AUTH

    "Happy path", meaning no errors. 3DS will not be triggered.

    The payment will successfully be charged.

    MAGICVALUE APPROVED

    Credit card is expired.

    Payments that try to use this card will not be charged successfully.

    MAGICVALUE CARD EXPIRED

    Credit card is declined because of fraud suspicion.

    Payments that try to use this card will not be charged successfully.

    MAGICVALUE FRAUD

    Credit card doesn't have enough balance and can't be charged for this payment.

    Payments that try to use this card will not be charged successfully.

    MAGICVALUE NOT ENOUGH BALANCE
  2. Use one of the demo credit cards for the credit card details:

    Brand Number Expiration date CVV
    Visa 4111 1111 1111 1111 03/30 737
    Mastercard 5454 5454 5454 5454 03/30 737
    Amex 3700 0000 0000 002 03/30 7373

7. Send the form.

image

If you used a scenario that triggers 3DS authentication, you now see the Flywire 3DS authentication simulator. Enter the word password in the password field and click on continue to complete the authentication.

8. Check the notifications.

The payment is now created according to your scenario. You'll receive the following notifications:

Within the next 30 seconds:

image Initiated

This is the end of this scenario.

Within the next 1 minute:

image Initiated

image Cancelled (immediately after initiated)

This is the end of this scenario.