Payment Request Links

There are two ways to create Payment Request links: via query parameters and via API requests. This page is about creating Payment Requests via query parameters.The end result of creating the link will be a stateful link that you can give to a payer.

When you are using query parameters, you can only create links for a Payment Request with a single payment.

  • For creating Payment Requests with advanced features like installments or subscriptions you need to use imageClient Dashboard or the imageFlywire API. (You could also use Checkout for this, but that would mean embedding the Checkout Experience into your website instead of giving a link to your payer).

  • For managing Payment Requests, for example changing or deleting them, you need to use imageClient Dashboard or the imageFlywire API .

Important information

When building Payment Request links via query parameters, you must include a unique value, like a booking reference. This ensures that the system generates a unique Payment Request ID. If the query parameters and values are identical, the same Payment ID will be generated.

You can create payment request links by constructing them with these two parts:

  1. Base URL (depends on the environment you want to use, see Base URL)

  2. Query String (depends on your individual settings and use case, see Query string parameters)

Example:

https://app.flywire.com/#/payment-request/quick-pay?code=FWB&clientId=XYZ123&amount=2000&firstName=John&lastName=Doe

Base URL

Production
https://app.flywire.com/#/payment-request/quick-pay
Demo
https://app.demo.flywire.com/#/payment-request/quick-pay

Query string parameters

All parameters are added as query string key value pairs.

Things to keep in mind:

  • All query string parameter values should be URL encoded. To make reading the guide easier the example values have not been encoded. Omitting this step may generate broken links.

  • It depends on your settings which payer data and custom fields you need to provide.

Portal identification and authentication (required)

If you don't know your portal code or client ID, please reach out to your Flywire contact.

Parameter Description Type Example
code

The portal code for this portal (also called recipient).

The portal code identifies the portal. The portal code has been assigned by Flywire when the portal has been set up.

Format:

Either: 3 letters (ABC)

Or: 5 alphanumeric characters, always starting with a letter (ABC1D)

required code=FWB
clientId

Your client ID is identical to the public reference of your company.

required clientId=ABC123

Payment amount (required)

Parameter Description Type Example
amount

The payment amount in the billing currency.

The billing currency is the currency in which the recipient of the payment is billing their payer. The billing currency depends on the portal's configuration and is defined when the portal is set up by Flywire.

The amount is specified as a decimal (1000.25).

required amount=1234.56

Payer data

You can pass payer data to pre-populate the fields in the Checkout Experience form.

Which payer data fields are required?

It depends on your Dashboard settings whether and which sender (payer) fields are required.

 

Parameter Description Example
firstName

The payer's first name.

This parameter has a maximum length of 256 characters.

This parameter cannot contain Chinese (Han), Japanese (Katakana or Hiragana), or Korean (Hangul) characters.

firstName=John
lastName

The last name (family name) of the payer.

This parameter has a maximum length of 256 characters.

This parameter cannot contain Chinese (Han), Japanese (Katakana or Hiragana), or Korean (Hangul) characters.

lastName=Doe
email

The payer's email address.

This parameter has a maximum length of 32 characters.

[email protected]
address

The payer's address.

address=21 Jump St
city

The payer's city.

This parameter has a maximum length of 256 characters.

This parameter cannot contain Chinese (Han), Japanese (Katakana or Hiragana), or Korean (Hangul) characters.

city=Boston
state

The state of the payer.

Format:

Only the second part of the ISO 3166-2 code, for example for US-NY the value is NY.

This parameter has a maximum length of 256 characters.

This parameter cannot contain Chinese (Han), Japanese (Katakana or Hiragana), or Korean (Hangul) characters.

state=MA
zip

The payer's zip code.

zip=02111
country

The country of the payer.

Format:

Two-letter format (ISO 3166-1 alpha-2), for example US for USA or GB for the United Kingdom.

country=US
phone

The phone number of the payer (including the country code).

Use + in front of the country code, for example, "+44123456" for country code 44.

phone=+16173214567

Custom fields for the portal

Custom fields are fields that are specific to your portal.

Fields are defined when the recipient (also called portal) is set up by Flywire. They are additional fields that the payer has to fill out when they make their payment (additional to the standard payer fields that are the same for all recipients).

Typically, these are fields your own system needs to be able to process and reconcile the payment. While some fields are common across many recipients, others are unique to yours.

Which fields are required?

It depends on your settings if a custom field is optional or required.

There are two layers of required fields:

Fields that are required due to settings in your Dashboard

If a field is set to required in Client Dashboard, you must provide it when you create the Payment Request or subscription. Optional fields can be left out.

Fields that are required due to settings for the portal

If a field is required for the portal, it is required to create the payment. This means if a field is not required in Dashboard but is required for the portal, you have the option to not provide it when you create the Payment Request or subscription. But since it is required to create the payment, your payer has to fill out the field in the Checkout Experience form.

Example for common custom fields:

(Note that the custom fields for your portal might be different, these are just examples)

Parameter Description Example
booking_reference Unique booking identifier booking_reference=REF-1234
invoice_number Unique invoice identifier invoice_number=INV-1234

Language options

Parameter Description Type Example
locale

Enables you to set the language of the payment page.

If not provided, the payment page defaults to the browser's language (if supported). While browser-based adaptation is recommended, you can set a fixed language using this parameter.

optional locale=es

Filtering payment options

By default, Flywire displays all payment options for a portal. In some cases, you might want to restrict the available payment options, for example if you want to accept only bank transfers for payments over a certain amount or only show card payments a certain time before a booking.

You can use two filters to restrict payment options:

  • Restrict to specific types of payments

  • Restrict to specific currencies

 

Parameter Description Type Example
filterType

Payment method type filters.

Each filter you add means show this option. Each filter you leave out means hide this option.

For example, credit_card ,online means: Show card payment options and online alternative pay options, but no bank transfer options.

If you don't provide any filters, all payment method types will be displayed in the Checkout Experience.

bank_transfer Bank transfer option - payer receives instructions how to transfer the money to Flywire
credit_card Card payment options - credit or debit cards
online Alternative online payment options - e.g. PayPal
direct_debit Direct debit option - funds are automatically withdrawn from the payer’s bank account
moto_payment MOTO (Mail Order / Telephone Order) payment – payments entered manually by a Flywire agent
optional filterType=online,credit_card
filterCcy

Payment currency filters. The filters restrict payment options based on currencies:

local

Show only payment options in the payer's local currency (e.g., only GBP for a payer in the UK).

foreign

Show only payment options not in the payers local currency (e.g., everything but GBP options for a payer in the UK).

fx

Only show payment options that are a different currency to the billing currency (e.g., everything but GBP if your billing currency is GBP).

nonFX

Only show payment options that are in the same currency as the billing currency (e.g., only GBP if your billing currency is GBP).

Be careful with combining those filters. Your payer might end up not being able to pay if you restrict the options too much. As a best practice, use either local/ foreign (when you want the options to depend on the payer's country) or fx / nonFX (when you want the options to depend on your billing currency).

optional filterCcy=fx

Callbacks for Payment Requests

Callbacks for the Payment Request

Callbacks for Payment Requests are set up via Dashboard, see Callbacks for Payment Request Notifications.

Callbacks for payments that are part of a Payment Request

You cannot provide a dynamic callback URL for payments that are part of a Payment Request. To receive callbacks about those payments, you have to use the static URL. Alternatively, you can use callback notifications for Payment Request status updates, but note that the content of those callbacks are different from payment status callbacks.

Anti-Tampering

When query parameters are used as plain text in URLs, they can be easily understood and potentially tampered with. To safeguard against this, you can encrypt the links with Base64 and URL encoding to enhance their security.

While this anti-tampering method does not fully prevent customers from decoding and editing the URL, it does effectively discourage casual users from viewing and altering the values within the URL.

1. Base URL

2. Query String Construction

Note: Do not include the leading query string ?

3. Base64 Encoding

4. URL Encoding

5. Final URL Construction

const baseUrl = 'https://app.flywire.com/#/payment-request/quick-pay';
// Note: Do not include the leading query string ?
let queryString = 'code=FWB';
queryString += '&clientId=ABC123';
queryString += '&amount=1234.56';
queryString += '&callbackUrl=' + encodeURIComponent('https://api.your-domain.com/flywire-notifications');
queryString += '&callbackId=' + encodeURIComponent('REF1234');

queryString = btoa(queryString);
queryString = encodeURIComponent(queryString);

const finalUrl = baseUrl + '?' + queryString;
console.log(finalUrl);

After the payment is created

After the payer followed the payment request link and filled out the form, a payment is created.

The payment will be visible to you in your imageClient Dashboard , where you can manage it (for example add installments) and track the payment's history (for example checking if the payer has opened the link).