Skip to main content

Flywire

Introduction

Flywire is a solution specialized in high-value cross-border payment processing, particularly in sectors such as education, healthcare and travel.

Through this service, one-off payments with credit and debit cards are supported. The payer can pay in their local currency, while the system manages currency conversion, ensuring the merchant receives the exact net amount and simplifying international payment reconciliation.


Redirect integration

Flywire only supports redirect-based integration. The payer must be present during the payment process, which is completed through a web browser.

First, you must generate a payment order.

As the service identifier, you must provide the service_uuid of the Flywire service enabled in your Paylands Backend → Manage → Payment Services → List.

Finally, build the redirect URL by replacing the token with the value returned in the previous call:

https://api.paylands.com/v1/sandbox/payment/process/{token}

Payment page language

You can specify the language of the payment page using the lang parameter in the redirect URL:

?lang=en

Supported languages:

CodeLanguage
enEnglish
zhChinese (Simplified)
koKorean
ptPortuguese
jaJapanese
frFrench
idIndonesian
arArabic
viVietnamese
itItalian
deGerman
esSpanish (default)

If the lang parameter is not provided, the payment page will be displayed in Spanish (es-ES) by default.


Supported currency

  • EUR (Euro)

Extra data

Payer data

To process payments with Flywire, payer data must be provided. These details must always correspond to the person making the payment, not the beneficiary of the service.

For example, in the case of educational institutions, if a parent pays on behalf of a student, the payer data must belong to the parent, never the student.

These fields are sent in the extra_data object when creating the payment order, inside the profile and billing_address fields:

{
"extra_data": {
"profile": {
"first_name": "Peter",
"last_name": "Payer",
"email": "peterpayer@example.com",
"phone": {
"number": "625439533",
"prefix": "34"
}
},
"billing_address": {
"country": "ESP",
"address1": "Avenida del Mar",
"city": "Castellon",
"state_code": "CT",
"zip_code": "12006"
}
}
}

These fields are not mandatory when creating the payment order. If any are missing, the user will be prompted to complete them during the payment flow on the Flywire page.

Merchant dynamic fields (context_fields)

Some Flywire merchants require additional dynamic fields. These fields depend on the configured merchant and may vary (for example: student data, enrollment number, internal reference, case ID, etc.).

When required, these fields must be provided when creating the payment order. Unlike payer data, if these fields are missing the payment order creation will fail, and the payment flow cannot start.

Send them in extra_data.payment.context_fields. Example for an education merchant:

{
"extra_data": {
"payment": {
"context_fields": {
"student_email": "al123456@uni.es",
"student_first_name": "Victor",
"student_last_name": "Test",
"student_id": "123456"
}
}
}
}

Dynamic fields depend on the merchant configuration in Flywire. If you are unsure which fields are required, contact us. If your merchant does not require dynamic fields, you can omit context_fields.


Sandbox testing

Test scenarios

In sandbox, Flywire allows you to force different outcomes based on the payer’s first_name and last_name.

These correspond to:

  • extra_data.profile.first_name
  • extra_data.profile.last_name

If you send extra_data.profile when creating the order, you can use the following values:

first_namelast_nameResult
MAGICVALUEAUTHPayment allowed (simulates 3DS flow)
MAGICVALUEAPPROVEDPayment allowed (simulates non-3DS payment)
PAYMENTDELIVEREDPayment allowed and simulates a settled payment (refunds can be performed from this point)
MAGICVALUEEXPIREDPayment rejected (expired card)
MAGICVALUEFRAUDPayment rejected (card declined)
MAGICVALUENOT ENOUGH BALANCEPayment rejected (insufficient funds)

Test cards must be used together with these value combinations.

Test cards

Visa

NumberExpirationCVVCurrencyIssuing countryType
4010 1000 0000 001603/30737EURDEDebit
4988 4388 4000 001203/30737EURESDebit
4242 4201 0000 001703/30737GBPGBCredit
4761 3600 0000 001703/30737INRINDebit
4111 1111 1111 111103/30737USDUSCredit

Mastercard

NumberExpirationCVVCurrencyIssuing countryType
2222 4000 1000 001603/30737CADCACredit
5163 6136 0000 001403/30737AUDAUDebit
5252 5202 0000 001703/30737JPYJPDebit
5454 5454 5454 545403/30737USDUSCredit

American Express (Amex)

NumberExpirationCVVCurrencyIssuing countryType
3700 0000 0000 00203/307373USDUSCredit