Payment Requests

List of endpoints

Description

Endpoint

Getting a List of all Payment Requests

GET/commercial/v1/payment-requests

Getting Details about a Payment Request

GET/commercial/v1/payment-requests/{paymentRequestID}

Creating a Payment Request

POST/commercial/v1/payment-requests

Editing a Payment Request

PATCH/commercial/v1/payment-requests/{paymentRequestID}

Cancelling a Payment Request

PATCH/commercial/v1/payment-requests/{paymentRequestID}/status

Deleting a Payment Request

DELETE/commercial/v1/payment-requests/{paymentRequestID}

 

About the Payment Request Resource

The Payment Request resource enables you to create and manage Payment Requests.

If your goal is only to create links to Payment Requests that you can give to your payer, be aware that there are two ways to create Payment Request links: via query parameters and via API requests. Which one you should use depends on your use case and the level of integration you want to achieve.

Getting a List of all Payment Requests

Request

You can use this endpoint to display a list of all Payment Requests in a UI.

Which Payment Requests will be returned in the list?

The list will contain all Payment Requests you have access to, meaning all Payment Requests that have been created for portals that are assigned to your company.

If a Payment Request has been deleted, it won't be returned in the list, see Deleting a Payment Request.

Example for displaying a list of Payment Requests

Each parameter can be used as a column (for example the status). Check the response to see which parameters are returned in the list.

image

 

Parameters for the Request Body

No request body needed.

Optional Query Parameters for Filtering

You can filter the list of results by the following parameters:

Optional Query Parameters for Pagination

This endpoint supports pagination. If you are not providing any pagination parameters, the response is returned with default pagination settings.

Pagination parameters are added as query parameters with the request in the format {endpoint_path}?page=2&per_page=10

GET/commercial/v1/payment-requests

curl https://base-url-placeholder/payment-requests
  -X GET
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"

Response

Pagination Parameters

paymentRequests array

recipient object

fields array

payments array

This array contains all payments associated with the Payment Request. Only payments that have already been created (meaning they have a payment reference) are included in this array. Upcoming payments that haven't been created yet are not included.

sender object

Contains the payer information.

address object

installments array

This array contains the installments of the Payment Request or subscription.

For Payment Requests:

If no date is returned, the installment doesn't have a due date. For multiple installments, note that either all have a due date or none do.

For subscriptions:

Installments for subscriptions always have a due date.

payments array

Contains the payment reference(s) of any payments associated with this installment. The array is empty if no payment has been created for the installment yet.

There is an additional payments array in root which gives you more information about the payment status.

tags array

Contains events for Payment Requests and subscriptions. Can be used for displaying a history of events.

{
  "totalEntries": 22,
  "totalPages": 2,
  "page": 0,
  "perPage": 10,
  "paymentRequests": [
{
	"id": "7b2bbb4e-a9c2-4285-9bc3-551fb3d29c22",
	"publicLink": "https://app.flywire.com/rest/payment-request/pay/public/7b2bbb4e-a9c2-4285-9bc3-551fb3d29c22",
	"createTime": "2024-08-13T06:33:33Z",
	"updateTime": "2024-08-13T06:33:33Z",
	"status": "ACTIVE",
	"recipient": {
		"id": "FWU",
   		"fields": [
            {
                "id": "custom_field_1",
                "value": "ID12345"
            },
			{
				"id": "custom_field_2",
				"value": "2020"
			}
        ]
	},
	"currency": "EUR",
	"payments": [
		{
			"id": "TVO802017131",
			"status": "delivered"
		}
	],	
      "sender": {
        "firstName": "Troy",
        "lastName": "Traveler",
        "email": "[email protected]",
        "phone": "+441234567890",
        "address": {
          "street1": "123 Fake Street",
          "street2": "Apt 4B, Dream Tower",
          "city": "Faketown",
          "state": "Imaginaryshire",
          "country": "GB",
          "postalCode": "AB1 2CD"
        }
      }, 
      "installments": [
        {
          "id": 134312,
          "amount": 50000,
		  "amountPaid": 0,
          "amountDue": 50000,
		  "serviceDescription": "This is the second installment",
          "status": "NOT_INITIATED",
		  "date": "2025-03-31",
          "payments": []
        },
        {
          "id": 134311,
          "amount": 60000,
		  "amountPaid": 60000,
          "amountDue": 60000,
		  "serviceDescription": "This is the first installment",
          "status": "PAID",
		  "date": "2025-02-31",
          "payments": [
            "TVO227007381"
          ]
        }
      ],
	"tags": [
		{
		"name": "SENT",
		"date": "2024-08-13T06:33:32"
		},
		{
		"name": "SEEN",
		"date": "2024-08-30T09:51:13"
		}
	],
	"expirationDate": null
	},
...
  ]
}

Getting Details about a Payment Request

Request

You can use this endpoint to show details about a Payment Request in a UI.

Example for displaying details of a Payment Request

Check the response to see which details are returned so you can display them.

image

 

How to Resolve the Path Placeholders of the Endpoint

Replace {paymentRequestID} in the endpoint with the Payment Request ID.

 

Parameters for the Request Body

No request body needed.

GET/commercial/v1/payment-requests/{paymentRequestID}

curl https://base-url-placeholder/payment-requests/959c09e5-a27b-49e9-8f92-e9e13374cfdd
  -X GET
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"

Response

recipient object

fields array

payments array

This array contains all payments associated with the Payment Request. Only payments that have already been created (meaning they have a payment reference) are included in this array. Upcoming payments that haven't been created yet are not included.

sender object

Contains the payer information.

address object

installments array

This array contains the installments of the Payment Request or subscription.

For Payment Requests:

If no date is returned, the installment doesn't have a due date. For multiple installments, note that either all have a due date or none do.

For subscriptions:

Installments for subscriptions always have a due date.

payments array

Contains the payment reference(s) of any payments associated with this installment. The array is empty if no payment has been created for the installment yet.

There is an additional payments array in root which gives you more information about the payment status.

tags array

Contains events for Payment Requests and subscriptions. Can be used for displaying a history of events.

{
	"id": "7b2bbb4e-a9c2-4285-9bc3-551fb3d29c22",
	"publicLink": "https://app.flywire.com/rest/payment-request/pay/public/7b2bbb4e-a9c2-4285-9bc3-551fb3d29c22",
	"createTime": "2024-08-13T06:33:33Z",
	"updateTime": "2024-08-13T06:33:33Z",
	"status": "ACTIVE",
	"recipient": {
		"id": "FWU",
   		"fields": [
            {
                "id": "custom_field_1",
                "value": "ID12345"
            },
			{
				"id": "custom_field_2",
				"value": "2020"
			}
        ]
	},
	"currency": "EUR",
	"payments": [
		{
			"id": "TVO802017131",
			"status": "delivered"
		}
	],	
      "sender": {
        "firstName": "Troy",
        "lastName": "Traveler",
        "email": "[email protected]",
        "phone": "+441234567890",
        "address": {
          "street1": "123 Fake Street",
          "street2": "Apt 4B, Dream Tower",
          "city": "Faketown",
          "state": "Imaginaryshire",
          "country": "GB",
          "postalCode": "AB1 2CD"
        }
      }, 
      "installments": [
        {
          "id": 134312,
          "amount": 50000,
		  "amountPaid": 0,
          "amountDue": 50000,
		  "serviceDescription": "This is the second installment",
          "status": "NOT_INITIATED",
		  "date": "2025-03-31",
          "payments": []
        },
        {
          "id": 134311,
          "amount": 60000,
		  "amountPaid": 60000,
          "amountDue": 60000,
		  "serviceDescription": "This is the first installment",
          "status": "PAID",
		  "date": "2025-02-31",
          "payments": [
            "TVO227007381"
          ]
        }
      ],
	"tags": [
		{
		"name": "SENT",
		"date": "2024-08-13T06:33:32"
		},
		{
		"name": "SEEN",
		"date": "2024-08-30T09:51:13"
		}
	],
	"expirationDate": null
	},

Creating a Payment Request

Request

This endpoint creates a Payment Request.

Parameters for the Request Body

recipient object

fields array

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.

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

sender object

Contains the payer information.

address object

installments array

This array contains the installments of the Payment Request.

Help for creating installments:

To create a Payment Request for a single payment, simply add just one installment in the array.
If you are using a date, either all installments must have a date or none do.

createOptions object

Note for Pre-Authorization Payments

Installments:

If you want to define this Payment Request as a Pre-Authorization Payment, you can only add one installment.

Payment options:

It is recommended to leave out the paymentOptionsConfig object for Pre-Authorization Payments. The system will automatically default to the appropriate configuration, meaning the Checkout Experience will only show credit cards as payment options.

If you filter the payment type manually to anything other than credit card only, you will get an error.

paymentOptionsConfig object

filters object

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

POST/commercial/v1/payment-requests

curl https://base-url-placeholder/payment-requests
  -X POST
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"
  -d '{
	"recipient": {
		"id": "FWU",
   		"fields": [
            {
                "id": "custom_field_1",
                "value": "ID12345"
            },
			{
				"id": "custom_field_2",
				"value": "2020"
			}
        ]
	}, 
      "sender": {
        "firstName": "Troy",
        "lastName": "Traveler",
        "email": "[email protected]",
        "phone": "+441234567890",
        "address": {
          "street1": "123 Fake Street",
          "street2": "Apt 4B, Dream Tower",
          "city": "Faketown",
          "state": "Imaginaryshire",
          "country": "GB",
          "postalCode": "AB1 2CD"
        }
      },
	"installments":[
         {
            "serviceDescription": "First installment",
            "amount": 12000,
            "date": "2025-06-12T11:26:19Z"
         },
         {
            "serviceDescription": "Second installment",
            "amount": 45050,
            "date": "2025-12-12"
         }
    ],
	"expirationDate": "2025-04-29T22:59:00Z",						
	"createOptions" : {
		"requireSavePaymentMethod": true,
		"preAuth": false,
		"paymentOptionsConfig" : {
			"filters": {
				"type": [
					"credit_card",
					"online",
					"direct_debit"
				],
				"currency": [
					"local",
					"foreign",
					"fx"
				]		
		},						
		"sendCreateEmail": true									
	}'

Response

recipient object

fields array

payments array

This array contains all payments associated with the Payment Request. Only payments that have already been created (meaning they have a payment reference) are included in this array. Upcoming payments that haven't been created yet are not included.

sender object

Contains the payer information.

address object

installments array

This array contains the installments of the Payment Request or subscription.

For Payment Requests:

If no date is returned, the installment doesn't have a due date. For multiple installments, note that either all have a due date or none do.

For subscriptions:

Installments for subscriptions always have a due date.

payments array

Contains the payment reference(s) of any payments associated with this installment. The array is empty if no payment has been created for the installment yet.

There is an additional payments array in root which gives you more information about the payment status.

tags array

Contains events for Payment Requests and subscriptions. Can be used for displaying a history of events.

{
	"id": "7b2bbb4e-a9c2-4285-9bc3-551fb3d29c22",
	"publicLink": "https://app.flywire.com/rest/payment-request/pay/public/7b2bbb4e-a9c2-4285-9bc3-551fb3d29c22",
	"createTime": "2024-08-13T06:33:33Z",
	"updateTime": "2024-08-13T06:33:33Z",
	"status": "ACTIVE",
	"recipient": {
		"id": "FWU",
   		"fields": [
            {
                "id": "custom_field_1",
                "value": "ID12345"
            },
			{
				"id": "custom_field_2",
				"value": "2020"
			}
        ]
	},
	"currency": "EUR",
	"payments": [
		{
			"id": "TVO802017131",
			"status": "delivered"
		}
	],	
      "sender": {
        "firstName": "Troy",
        "lastName": "Traveler",
        "email": "[email protected]",
        "phone": "+441234567890",
        "address": {
          "street1": "123 Fake Street",
          "street2": "Apt 4B, Dream Tower",
          "city": "Faketown",
          "state": "Imaginaryshire",
          "country": "GB",
          "postalCode": "AB1 2CD"
        }
      }, 
      "installments": [
        {
          "id": 134312,
          "amount": 50000,
		  "amountPaid": 0,
          "amountDue": 50000,
		  "serviceDescription": "This is the second installment",
          "status": "NOT_INITIATED",
		  "date": "2025-03-31",
          "payments": []
        },
        {
          "id": 134311,
          "amount": 60000,
		  "amountPaid": 60000,
          "amountDue": 60000,
		  "serviceDescription": "This is the first installment",
          "status": "PAID",
		  "date": "2025-02-31",
          "payments": [
            "TVO227007381"
          ]
        }
      ],
	"tags": [
		{
		"name": "SENT",
		"date": "2024-08-13T06:33:32"
		},
		{
		"name": "SEEN",
		"date": "2024-08-30T09:51:13"
		}
	],
	"expirationDate": null
	},

Editing a Payment Request

Request

This endpoint lets you edit the following settings of a Payment Request:

  • Expiration date of the Payment Request

  • Installments of the Payment Request

    The installments array you submit in the request body will completely replace the data in the existing installment array:

    Adding an installment without an ID will create a new installment.
    Adding an installment with an existing ID will edit it.
    Not adding an existing installment with its ID will remove it.
    Since the ID is used to match installments, it is not possible to edit the ID.

After the edit, an email will automatically be sent to the payer informing them about the change, see Emails for Payment Requests.

 

How to Resolve the Path Placeholders of the Endpoint

Replace {paymentRequestID} in the endpoint with the Payment Request ID.

Parameters for the Request Body

Installments

The installments array you submit in the request body will completely replace the data in the existing installment array:

Adding an installment without an ID will create a new installment.
Adding an installment with an existing ID will edit it.
Not adding an existing installment with its ID will remove it.
Since the ID is used to match installments, it is not possible to edit the ID.

Expiration date

If there was no expiration date, you can add one with this parameter.
If there already was an expiration date, you can overwrite it with this parameter.
You can remove an existing expiration date by leaving this parameter out or by submitting it as empty ("").
Note that leaving out the parameter doesn't leave the expiration date unchanged. Leaving it out will remove the expiration date.

PATCH/commercial/v1/payment-requests/{paymentRequestID}

curl https://base-url-placeholder/payment-requests/959c09e5-a27b-49e9-8f92-e9e13374cfdd
  -X PATCH
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"
  -d '{
    "installments":[
         {
           "id": 2411941,
           "amount": 12055,
           "serviceDescription": "edited installment",
		   "date": "2026-05-18"
        }
    ],
    "expirationDate": "2026-02-18T14:57:36Z"
}'

Response

A 204 response will let you know that the installments have successfully been updated.

An email will now automatically be sent to the payer informing them about the change, see Emails for Payment Requests.

204 NO CONTENT

Cancelling a Payment Request

Request

Cancelling a Payment Request or a subscription means:

  • It is permanently put in the CANCELLED status.

  • All future installments will cancelled and payments will not be charged.

  • Your customer will be notified about the cancellation via email and won't be able to make payments anymore.

Cancelling a Payment Request or subscription cannot be undone.

Unlike deleting, cancelling does not remove the Payment Request or subscription from the system, meaning you will still be able to view it in Dashboard and retrieve it via the API.

 

How to Resolve the Path Placeholders of the Endpoint

Replace {paymentRequestID} in the endpoint with the Payment Request ID.

Parameters for the Request Body

PATCH/commercial/v1/payment-requests/{paymentRequestID}/status

curl https://base-url-placeholder/payment-requests/959c09e5-a27b-49e9-8f92-e9e13374cfdd/status
  -X PATCH
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"
  -d '{
	"statusChange" : "CANCEL",
	"cancelNotificationAddress" : "[email protected]"
	}'

Response

A 204 response will let you know that the Payment Request has been successfully cancelled.

The cancellation email will automatically be sent to the address you provided. See Emails for Payment Requests for the content of the email.

204 NO CONTENT

Deleting a Payment Request

Request

Deleting a Payment Request or subscription permanently removes it from the system, which means:

  • You can't view it in Dashboard anymore.

  • You can't retrieve it via the API anymore.

  • All future installments will cancelled.

  • Your customer won't be able to make payments anymore.

Deleting a Payment Request or subscription cannot be undone.

 

How to Resolve the Path Placeholders of the Endpoint

Replace {paymentRequestID} in the endpoint with the Payment Request ID.

Parameters for the Request Body

No request body needed.

DELETE/commercial/v1/payment-requests/{paymentRequestID}

curl https://base-url-placeholder/payment-requests/959c09e5-a27b-49e9-8f92-e9e13374cfdd
  -X DELETE
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"

Response

A 204 response will let you know that the Payment Request has been successfully deleted.

204 NO CONTENT