Localization
The Flywire payment experience is localized, which means you can return results like field labels in different languages.
The parameter for localization is called locale,
The default setting is US English (en). You can change the language by simply adding the locale parameter to a request in the following format:
https://api-platform.flywire.com/payments/v1/recipients/FWU?locale=zh-CN
Supported language values for the locale parameter
Language | Value for locale |
---|---|
English | en |
Spanish | es-ES |
Chinese | zh-CN |
Korean | ko |
Portuguese | pt-PT |
Japanese | ja |
French | fr-FR |
Bahasa Indonesia | id |
Arabic | ar |
Vietnamese | vi |
Italian | it-IT |
German | de-DE |
Tip: Changing the text direction in browsers
The default text direction in browsers is left-to-right. If your localization is in a language that is written from right to left (for example Arabic), you need to change the text direction settings for your UI. To change the text direction to right-to-left, set the HTML dir attribute to rtl on the element that renders the text.
<div dir="rtl">
...
</div>
Example for a localized recipient object
This example shows a localized response for a recipient object.
In this example, the following fields are returned in Chinese:
fields array

Validation message that you can display in your PayEx portal when an error related to the validation of this field appears. This is a helpful hint for your payer to help them fill out the field correctly. For example "Your student ID needs to start with an F followed by 8 digits".
view_options object
The view options contain additional information about how to display this field in your PayEx portal.

The section name where the field belongs. It can be rendered as a section title when rendering the view.

The label of the field. The label value will be returned in the language set in the locale parameter when you were retrieving the recipient details. If you didn't specify a locale, the default is English.
items array

User friendly description of the item.
"id": "FWU",
"name": "Flywire University",
...
"fields": [
{
"id": "student_id",
...
"pattern_message": "FWU ID 以 F 开头,后接 8 位数字",
"value": "",
"view_options": {
"section_identifier": "student_information",
"section_name": "学生信息",
"section_description": null,
"label": "学号",
...
}
},
...
],
"items": [
{
"id": "default",
"currency": "USD",
"label": "金额"
}
],
...
}
}