Testing Payment Flows
To ensure your system handles callbacks reliably, Flywire recommends testing specific payment flow scenarios. This page guides you through testing payment flows, which means moving a payment into different statuses and receiving the callbacks for each status.
Test Scenarios and their Magic Values
Below you can find all Flywire-recommended test scenarios. Depending on your system, some of the edge cases might not apply to you.
| Magic Value (as payer's first name) | Payment flow |
|---|---|
|
SANDBOX_TO_GUARANTEED_STATUS |
Successful Payment - realistic disbursement
This scenario simulates a successful payment that moves into delivered after 24 hours. This is a realistic scenario since payments get disbursed every 24 hours. If you create multiple test payments like this, you create a realistic disbursement file that contains multiple payments. |
|
SANDBOX_TO_DELIVERED_STATUS |
Successful Payment - disbursed immediately
This magic value moves a payment into delivered immediately. Be aware that this is not a realistic payment behavior and creates disbursement files that contain only one payment, since every time a payment is moved to
Delivered a new disbursement file is generated. Usually, all payments for the day get bundles into one disbursement file. |
|
SANDBOX_TO_CANCEL_STATUS |
Unsuccessful Payment - cancelled payment
This can happen for any payment method when then payment gets cancelled by you, the payer, or by Flywire. |
|
SANDBOX_TO_VERIFICATION |
Successful Payment - with simulated successful verification
This can happen for any payment method if a manual review (for example document collection or quality checks) is necessary. This magic value simulates a payment that fails automated checks and gets routed to manual review which ends up being successful. The manual compliance review time is simulated as 2 hours, but note that the actual duration on a real compliance review differs depending on the necessary reviews.
|
|
SANDBOX_TO_VERIFICATION_FAILED |
Unsuccessful Payment - with simulated failed verification
This can happen for any payment method if document collection or quality checks fail and cannot be manually corrected by contacting the payer. The magic value simulates a payment that fails automated checks and gets routed to manual review and fails the check. The manual compliance review time is simulated as 2 hours, but note that the actual duration on a real compliance review differs depending on the necessary reviews.
|
|
SANDBOX_CANCELLED_BACK_TO_PROCESS_STATUS |
Re-initiated Cancelled Payment
This can happen for payments made via bank transfer, card, or alternative payment methods. In some edge cases, the When can this happen? For bank transfer:
For payment via card and alternative payment methods:
|
|
SANDBOX_TO_REVERSED_STATUS |
Reversed Payment
This can only happen for direct debit payments. This can happen when a direct debit payment remains unpaid:
|
|
SANDBOX_SMALL_UNDERPAYMENT_STATUS
SANDBOX_SMALL_OVERPAYMENT_STATUS |
Underpayment
Overpayment
This can only happen for bank transfer as the payment method (because the payment is completed manually outside of the Flywire platform). If the payer transfers a slightly wrong amount, the payment amount that is The guaranteed amount will always be the same as the delivered amount.
|
Testing Payment Flows Guide
The quickest, easiest way to create a payment and move it to different statuses is via the
Pay-By-Link integration, which is why this guide uses this option. There are other guides for helping you test payments with specific integrations.
1. Fill out the form to open your demo portal.
-
Enter the recipient ID of your portal.
What is the recipient ID (also called portal code)?
The recipient ID identifies the recipient (also called portal). The recipient ID has been assigned by Flywire when the recipient has been set up.
Format:
Either: 3 letters (ABC)
Or: 5 alphanumeric characters, always starting with a letter (ABC1D)
You must use a portal that exists in the demo environment.
-
Choose your test scenario and use the magic value for it.
-
For the callback URL, you have the following options:
a) Use your own static or dynamic callback URL. If your portal has a static URL that you want to use for this test, leave the field empty. If your portal has a static URL but you want to use a different one for this test, you can overwrite it with a dynamic url here.
Dynamic vs. static URL
There are two different URLs for receiving callbacks:
Static URL
For API integrations:
When you set up your application that accesses the Flywire API, you had the option to define a notifications URL. This is the static notifications URL. Callbacks will be sent to this URL for all payments you created via the Flywire API.
The recipient of a payment may also have a static notifications URL defined which might be different from your static notifications URL as a client. In that case, callbacks will also be sent to the recipient's notifications URL.For other integrations:
When you set up your portal together with Flywire, you had the option to define a callback URL for that portal. Callbacks will be sent to this URL for all payments for this portal.
If you don't use a static callback URL yet and want to start using it, please contact the Solutions team.
Dynamic URL
The URL you can set in a parameter when you are creating a payment is the dynamic notifications URL. Since this URL can be different for every payment you create, it is called dynamic.
How defining static and dynamic URLs affect callbacks
= not set
= setStatic
URLDynamic
URLResult
You won't receive notifications.
You'll receive notifications to your static URL.
For API integrations:
The dynamic URL will override the static URL and you'll receive notifications only to the dynamic URL.
For other integrations:
You'll receive callbacks to both URLs. This is called "dual callback URL".
A dual callback URL means you defined a static URL in your portal and you are sending callbacks to a different callback URL via the parameter for the payment. In this case, callbacks will be sent to both URLs. This approach can be useful if you want to update two separate systems.
You'll receive notifications to your dynamic URL b) Use the button to generate a temporary dynamic URL and receive the callbacks live on this page.
-
Enter an external reference to make it easier to identify your test payment (optional). The reference will be returned in the callbacks.
2. In your portal: Complete all steps until you are on the payment tracking page.
-
Choose a country.
-
Choose a payment method.
The best payment method for testing purposes is bank transfer, since most payment flows can be simulated with this payment method. You can choose other payment methods too, but you need to ensure that the scenario you are testing is possible for the payment method.
For SANDBOX_TO_REVERSED_STATUS you need to chose a direct debit payment.
-
You can leave the payer information as it is, or enter different demo data. This data does not affect the scenario.
The payer's first name can't be changed because it contains the magic value you chose.
-
Depending on your portal settings, you might have to complete more steps before you reach the payment tracking page.
-
Stop once you reach the payment tracking page. The callbacks for your chosen scenario will trigger now.
Important: If you chose credit card or direct debit, it is not necessary to provide any data. Do not enter any card or direct debit details, and do not click any buttons in the credit card payment simulator.
There are separate testing scenarios for testing credit card behavior, and at this point, you only want to test the payment flow. Entering additional data may break the payment flow test.
3. Wait for the callbacks to be returned.
Depending on your scenario, this might take a few minutes.
If you used the generated URL, you will now receive the callbacks according to your scenario on this page.
| Magic value used | Callbacks you will receive |
|---|---|
|
SANDBOX_TO_GUARANTEED_STATUS |
Successful Payment - realistic disbursement
After 24 hours:
|
|
SANDBOX_TO_DELIVERED_STATUS |
Successful Payment - disbursed immediately
|
|
SANDBOX_TO_CANCEL_STATUS |
Unsuccessful Payment - cancelled payment
|
|
SANDBOX_TO_VERIFICATION |
Successful Payment - with simulated successful verification
After 2 hours:
|
|
SANDBOX_TO_VERIFICATION_FAILED |
Unsuccessful Payment - with simulated failed verification
After 2 hours:
|
|
SANDBOX_CANCELLED_BACK_TO_PROCESS_STATUS |
Re-initiated Cancelled Payment
|
|
SANDBOX_TO_REVERSED_STATUS |
Reversed Payment (only for direct debit)
|
|
SANDBOX_SMALL_UNDERPAYMENT_STATUS |
Underpayment
|
|
SANDBOX_SMALL_OVERPAYMENT_STATUS |
Overpayment
|



