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:
| Code | Language |
|---|---|
| en | English |
| zh | Chinese (Simplified) |
| ko | Korean |
| pt | Portuguese |
| ja | Japanese |
| fr | French |
| id | Indonesian |
| ar | Arabic |
| vi | Vietnamese |
| it | Italian |
| de | German |
| es | Spanish (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_nameextra_data.profile.last_name
If you send extra_data.profile when creating the order, you can use the following values:
| first_name | last_name | Result |
|---|---|---|
| MAGICVALUE | AUTH | Payment allowed (simulates 3DS flow) |
| MAGICVALUE | APPROVED | Payment allowed (simulates non-3DS payment) |
| PAYMENT | DELIVERED | Payment allowed and simulates a settled payment (refunds can be performed from this point) |
| MAGICVALUE | EXPIRED | Payment rejected (expired card) |
| MAGICVALUE | FRAUD | Payment rejected (card declined) |
| MAGICVALUE | NOT ENOUGH BALANCE | Payment rejected (insufficient funds) |
Test cards must be used together with these value combinations.
Test cards
Visa
| Number | Expiration | CVV | Currency | Issuing country | Type |
|---|---|---|---|---|---|
| 4010 1000 0000 0016 | 03/30 | 737 | EUR | DE | Debit |
| 4988 4388 4000 0012 | 03/30 | 737 | EUR | ES | Debit |
| 4242 4201 0000 0017 | 03/30 | 737 | GBP | GB | Credit |
| 4761 3600 0000 0017 | 03/30 | 737 | INR | IN | Debit |
| 4111 1111 1111 1111 | 03/30 | 737 | USD | US | Credit |
Mastercard
| Number | Expiration | CVV | Currency | Issuing country | Type |
|---|---|---|---|---|---|
| 2222 4000 1000 0016 | 03/30 | 737 | CAD | CA | Credit |
| 5163 6136 0000 0014 | 03/30 | 737 | AUD | AU | Debit |
| 5252 5202 0000 0017 | 03/30 | 737 | JPY | JP | Debit |
| 5454 5454 5454 5454 | 03/30 | 737 | USD | US | Credit |
American Express (Amex)
| Number | Expiration | CVV | Currency | Issuing country | Type |
|---|---|---|---|---|---|
| 3700 0000 0000 002 | 03/30 | 7373 | USD | US | Credit |