Refunds

List of endpoints

Do you want to create a refund? This is done in the Payments resource, see Creating a Refund for a Payment.

Description Endpoint
Getting a list of all your refunds

GET/refunds

Getting details about a refund

GET/refunds/{refundID}

Getting a list of all your refund bundles

GET/refund_bundles

Getting details about a refund bundle

GET/refund_bundles/{bundleID}

Approving a refund bundle

POST/refund_bundles/{bundleID}/approve

Cancelling a refund

POST/refunds/{refundID}/cancel

About Refunds

What is a refund?

A refund is a way to return funds back to your payer via Flywire. You can define if you want to return the full amount (full refund) or just part of the amount (partial refund) of the original payment.

Refund Essentials: What You Should Know

  • A payment needs to be in status delivered before you can create a refund for it (see Payment Statuses for details about payment statuses).

  • Each refund is connected to one payment, it is not possible to create one "shared" refund for multiple payments.

  • A payment can only have one active refund at a time. When the refund is done (in status finished) you can create a new refund for the payment.

  • The refunded amount, whether it's one full refund or several partial refunds added together, can't be more than the initial payment amount.

  • Refunds and bundles are recipient-specific. The settings for refunds (how the money will be collected, the cut-off time for refund bundles, and if approvals are needed for a bundle) depend on the recipient of the original payment.

  • A refund is always part of a refund bundle, even if the bundle only contains one refund. This means even if you only create one single refund, there will automatically be a refund bundle created for it.

What is a refund bundle?

Flywire processes refunds collectively in refund bundles to streamline the reconciliation process. Bundling refunds means Flywire only needs to collect money from the original payment recipient once, reducing the number of transactions needed for refunds.

The refund bundle cycle

  1. Creating a refund for recipient A automatically generates a refund bundle for recipient A.

  2. Each recipient has a set cut-off time for their refund bundles. All refunds created for the recipient will be added to the bundle until the cut-off time is reached.

  3. When the cut-off time for recipient A is reached, Flywire either processes the bundle or requires your approval first, based on the recipient's settings.

  4. Creating a refund for recipient A now creates a new bundle (no matter if the previous bundle is being processed or waiting for approval) and the cycle starts again.

Refund Bundle Essentials: What You Should Know

  • A refund bundle has a bundle ID that enables you to identify it and retrieve all refunds in this bundle.

  • Refunds and bundles are recipient-specific. The settings for refunds (how the money will be collected, the cut-off time for refund bundles, and if approvals are needed for a bundle) depend on the recipient of the original payment.

  • A refund is always part of a refund bundle, even if the bundle only contains one refund. This means even if you only create one single refund, there will automatically be a refund bundle created for it.

Requirements for using refunds

There are two sides to requirements for using refunds:

Requirements on the client side

You as a client need to have the permission to work with refunds. Please contact the Solutions team for this.

Requirements on the recipient side

A recipient must have the following settings in place to be able to use refunds:

  • The recipient must have a cut-off time defined.

  • The recipient must have defined if refunds need to be approved or not.

How does the refund process work?

The refund process works like this:

  1. Flywire collects the funds from the recipient of the original payment.

  2. Flywire returns the money to the payer of the original payment,

How do I receive notifications for refunds?

You receive notifications about the refund status via callbacks (see Refund Status Notifications) via the notifications URL.

  • For refunds you can provide a notifications URL that is different from the notifications URL of the payment.

    • If you don't provide a URL, the notifications URL of the original payment is being used.

    • If the original payment had no notifications URL, no notifications will be sent.

  • For refund bundles, the notifications URL of the first refund that created the bundle is being used as the notifications URL for the whole bundle.

Getting a list of all your refunds

Request

You can use this endpoint to display a list of all your refunds in a UI.

Which refunds will be returned in the list?

You can see refunds for all payments you have access to. Which payments you have access to depends on your individual client settings you have agreed on with Flywire.

Example for displaying a list of refunds

Each parameter can be used as a column. You can decide which parameters you want to display to help you identify a refund before you get more detailed information about it (see Getting details about a refund). Check the response to see which parameters of the refunds are returned in the list.

 

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/refunds

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

Response

Pagination Parameters

refunds array

{
    "total_entries": 42,
    "total_pages": 5,
    "page": 1,
    "per_page": 10,
    "refunds": [
        {
            "refund_id": "RRUC247B58FE",
            "payment_id": "RUC990764382",
            "bundle_id": "BUDR123456HG",
            "recipient_id": "ARA",
            "created_at": "2023-12-04T14:07:01Z",
            "amount": 10000,
            "currency": "USD",
            "status": "pending",
            "external_reference": "a-reference"
        }
    ]
}

Getting details about a refund

Request

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

Example for displaying refund details

See the response for which details of the refund are returned so you can display them.

 

Parameters for the Request Body

No request body needed.

How to Resolve the Path Placeholders of the Endpoint

Exchange {refundID} in the endpoint with the actual refund ID.

GET/refunds/{refundID}

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

Response

status_transitions object

The status transitions provide you with a log for if and when a refund was cancelled.

See Refund Status Notifications for details about the status.

payer object

The payer information is not automatically included. Returning payer information is disabled by default and needs to be enabled by Flywire.

Please contact the Solutions team if you require payer information to be returned.

{
	"refund_id": "RFLW123456789",
	"payment_id": "FLW990764382",
	"bundle_id": "BUDR123456HG",
	"created_at": "2024-01-02T08:43:38Z",
	"status": "cancelled",
	"status_transitions": {
		"cancelled_at": "2024-01-03T15:40:50Z"
	},
	"amount": 12000,
	"currency": "USD",
	"amount_to": 10000,
	"currency_to": "EUR",
	"recipient_id": "FLW",
	"payer": {
		"first_name": "Peter",
		"last_name": "Payer",
		"middle_name": null,		
		"address1": "789 Calle Mayor",
		"address2": null,
		"city": "Madrid",
		"country": "ES",
		"state": null,
		"zip": "28013",
		"phone": "0034912345678",
		"email": "[email protected]"
    },
	"external_reference": "My reference"
}

Getting a list of all your refund bundles

Request

You can use this endpoint to display a list of refund bundles in your UI, for example:

  • To get an overview of all refund bundles created by you.

  • If you're using approvals: To get an overview of refund bundles that are waiting for approval.

Each parameter can be used as a column. You can decide which parameters you want to display to help you identify a refund before you get more detailed information about it (see Getting details about a refund bundle). Check the response to see which parameters of refund bundles are returned.

Which refund bundles are returned in the list?

You can see refund bundles that contain payments you have access to. Which payments you have access to depends on your individual client settings you have agreed on with Flywire.

 

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/refund_bundles

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

Response

Pagination Parameters

refund_bundles array

{
  "total_entries": 2,
  "total_pages": 1,
  "page": 1,
  "per_page": 10,
  "refund_bundles": [
    {
      "id": "BUDREB8E4538",
      "recipient_id": "EBS",
      "status": "pending",
      "amount": 115000,
      "currency": "GBP",
      "created_at": "2022-07-21T17:27:54Z",
      "marked_for_approval": true
    },
    {
      "id": "BUDREF477410",
      "recipient_id": "EBS",
      "status": "approved",
      "amount": 10000,
      "currency": "GBP",
      "created_at": "2022-03-23T14:27:56Z",
      "marked_for_approval": false
    }
  ]
}

Getting details about a refund bundle

Request

You can use this endpoint to display the details about a refund bundle in a UI. For example, if you are using approvals, you can see if and when a bundle has been approved. Check the response to see which parameters of the refund bundles are returned.

 

Parameters for the Request Body

No request body needed.

How to Resolve the Path Placeholders of the Endpoint

Exchange {bundleID} in the endpoint with the actual refund bundle ID.

GET/refund_bundles/{bundleID}

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

Response

reception object

The reception of funds is a special term for refunds and refers to how and when Flywire collects money from the original recipient of the payment in order to return it to the payer.

{
  "bundle_id": "BUUI123456789",
  "recipient_id": "ARA",
  "status": "approved",
  "marked_for_approval": "false",
  "created_at": "2017-12-06 17:41:27 UTC",
  "approved_at": "2017-12-06 17:41:27 UTC",
  "notifications_url": "my-notifications-url",
  "amount": 12000,
  "currency": "USD",
  "reception": {
    "date": "2019-01-11",
    "bank_reference": null,
    "account_number": null,
    "amount": 12000,
    "currency": "USD"
  }
}

Approving a refund bundle

Request

This endpoint lets you approve a refund bundle.

What are approvals for refund bundles?

All refund bundles must be approved before processing, but there is a difference between how they get approved. It depends on the settings for the recipient of the original payment which type of approval is needed:

Type of approvalapproval_type setting for the recipient

Manual approval

Manual approvals create an extra step in processing refunds. Flywire waits for your approval before processing a refund bundle (see Approving a refund bundle).

manual

Automatic approval

Flywire processes refund bundles automatically after the cut-off time.

automatic

 

 

To add or change the settings for refund approvals of a recipient please contact the Solutions team.

 

Parameters for the Request Body

No request body needed.

How to Resolve the Path Placeholders of the Endpoint

Exchange {bundleID} in the endpoint with the actual refund bundle ID.

POST/refund_bundles/{bundleID}/approve

curl https://base-url-placeholder/refund_bundles/BUDRW12345678/approve
  -X POST
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"

Response

"id": "BUUI123456789", 
"status": "approved"

Cancelling a refund

Request

When you cancel a refund, Flywire will not process the refund.

Cancelling a Refund Essentials - What You Should Know:

  • You can only cancel a refund that is in status initiated, meaning that Flywire has not taken the first step for processing the refund and no money has been moved yet.

  • You can cancel a refund before and after the cut-off time of a recipient.

  • You can't cancel a refund bundle.

 

Parameters for the Request Body

No request body needed.

How to Resolve the Path Placeholders of the Endpoint

Exchange {refundID} in the endpoint with the actual refund ID.

POST/refunds/{refundID}/cancel

curl https://base-url-placeholder/refunds/RFLW23456432/cancel
  -X POST
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"

Response

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

If you provided a notifications URL, you'll also receive a notification about the status change.

204 NO CONTENT