Subscriptions

List of endpoints

Description

Endpoint

Getting a List of all Subscriptions

GET/commercial/v1/subscriptions

Getting Details about a Subscription

GET/commercial/v1/subscriptions/{subscriptionID}

Creating a Subscription

POST/commercial/v1/subscriptions

Editing a Subscription

PATCH/commercial/v1/subscriptions/{subscriptionID}

Pausing, Resuming, or Cancelling a Subscription

PATCH/commercial/v1/subscriptions/{subscriptionID}/status

Cancelling an Installment of a Subscription

PATCH/commercial/v1/subscriptions/{subscriptionID}/installment/{installmentID}/status

Deleting a Subscription

DELETE/commercial/v1/subscriptions/{subscriptionID}

 

About the Subscriptions Resource

The subscriptions resource enables you to manage Subscriptions.

Getting a List of all Subscriptions

Request

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

Which subscriptions 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 subscription has been deleted, it won't be returned in the list, see Deleting a Subscription.

Example for displaying a list of subscriptions

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

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

Response

Pagination Parameters

subscriptions array

recipient object

fields array

payments array

This array contains all payments associated with the subscription. 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.

subscription object

Contains information about the subscription.

cadence object

Contains the intervals at which payments are collected.

Example: For collecting a payment every 2 weeks set occurance to 2 and timeUnit to WEEKS.

{
  "totalEntries": 22,
  "totalPages": 2,
  "page": 0,
  "perPage": 10,
  "subscriptions": [
 {
	"id": "7b2bbb4e-a9c2-4285-9bc3-551fb3d29c22",
	"publicLink": "https://app.flywire.com/rest/payment-request/pay/public/4bde36d9-482e-42c7-994c-cc1225531ae9",
	"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": 134311,
          "amount": 50000,
		  "amountPaid": 0,
          "amountDue": 50000,
          "status": "NOT_INITIATED",
		  "date": "2025-03-31",
          "payments": []
        },
        {
          "id": 134312,
          "amount": 60000,
		  "amountPaid": 60000,
          "amountDue": 60000,
          "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
	},
	"subscription": {
       "startDate": "2025-06-20",
       "endDate": "2028-06-01",
	   "resumeDate": null,
       "amount": 100000,
       "cadence": {
           "occurrence": 1,
           "timeUnit": "MONTHS"
       },
	   "initialAmount": 90000,
   	   "manageLink": "https://my-manage-link.example",					
	},
	"serviceDescription": "Gold Membership subscription"
},
[...]
}

Getting Details about a Subscription

Request

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

Example for displaying details of a subscription

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

 

How to Resolve the Path Placeholders of the Endpoint

Replace {subscriptionID} in the endpoint with the subscription ID.

 

Parameters for the Request Body

No request body needed.

GET/commercial/v1/subscriptions/{subscriptionID}

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

Response

recipient object

fields array

paymentsarray

This array contains all payments associated with the subscription. 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.

subscription object

Contains information about the subscription.

cadence object

Contains the intervals at which payments are collected.

Example: For collecting a payment every 2 weeks set occurance to 2 and timeUnit to WEEKS.

{
	"id": "7b2bbb4e-a9c2-4285-9bc3-551fb3d29c22",
	"publicLink": "https://app.flywire.com/rest/payment-request/pay/public/4bde36d9-482e-42c7-994c-cc1225531ae9",
	"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": 134311,
          "amount": 50000,
		  "amountPaid": 0,
          "amountDue": 50000,
          "status": "NOT_INITIATED",
		  "date": "2025-03-31",
          "payments": []
        },
        {
          "id": 134312,
          "amount": 60000,
		  "amountPaid": 60000,
          "amountDue": 60000,
          "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
	},
	"subscription": {
       "startDate": "2025-06-20",
       "endDate": "2028-06-01",
	   "resumeDate": null,
       "amount": 100000,
       "cadence": {
           "occurrence": 1,
           "timeUnit": "MONTHS"
       },
	   "initialAmount": 90000,
   	   "manageLink": "https://my-manage-link.example",					
	},
	"serviceDescription": "Gold Membership subscription"
}

Creating a Subscription

Request

Tips for creating subscriptions

Installments:

For subscriptions, you don't define the individual installments, since they are generated based on the set of rules you define for this subscription.

You can add or edit installments later, but the first installment of the subscription is always automatically generated.
If the first installment is due today, a second installment is also automatically generated (based on the cadence).

Initial amount:

All installments for a subscription have the same amount, but you have the option to charge a different initial amount - for example for an initial membership fee.

If the first installment is due today, the initial amount is added to that first installment.
If the first installment is in the future, a separate installment for the initial amount is created and is due today.

Start and due date:

You can collect the first installment immediately by leaving out the start date.

If no start date is defined, the first due date is today.
If a start date is defined, the start date is the first due date.

 

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

createOptions object

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

subscription object

Contains the rules that you want to define for the the subscription.

cadence object

Contains the intervals at which payments are collected.

Example: For collecting a payment every 2 weeks set occurance to 2 and timeUnit to weeks.

POST/commercial/v1/subscriptions

curl https://base-url-placeholder/subscriptions
-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"
        }
      },
	"serviceDescription": "Gold Membership subscription",
	"expirationDate": null,
	"createOptions": {
		"requireSavePaymentMethod": true,
		"paymentOptionsConfig": {
			"filters": {
				"type": [
					"credit_card",
					"online",
					"direct_debit"
				],
				"currency": [
					"local",
					"foreign",
					"fx"
				]
			}
		},
		"sendCreateEmail": true
	},
	"subscription": {
		"startDate": "2025-06-20",
		"endDate": "2028-06-01",
		"amount": 1000000,
		"cadence": {
			"occurrence": 1,
			"timeUnit": "MONTHS"
		},
		"initialAmount": 90000,
		"manageLink": "https://my-manage-link.example"
	}
}

Response

recipient object

fields array

paymentsarray

This array contains all payments associated with the subscription. 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.

subscription object

Contains information about the subscription.

cadence object

Contains the intervals at which payments are collected.

Example: For collecting a payment every 2 weeks set occurance to 2 and timeUnit to WEEKS.

{
	"id": "7b2bbb4e-a9c2-4285-9bc3-551fb3d29c22",
	"publicLink": "https://app.flywire.com/rest/payment-request/pay/public/4bde36d9-482e-42c7-994c-cc1225531ae9",
	"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": 134311,
          "amount": 50000,
		  "amountPaid": 0,
          "amountDue": 50000,
          "status": "NOT_INITIATED",
		  "date": "2025-03-31",
          "payments": []
        },
        {
          "id": 134312,
          "amount": 60000,
		  "amountPaid": 60000,
          "amountDue": 60000,
          "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
	},
	"subscription": {
       "startDate": "2025-06-20",
       "endDate": "2028-06-01",
	   "resumeDate": null,
       "amount": 100000,
       "cadence": {
           "occurrence": 1,
           "timeUnit": "MONTHS"
       },
	   "initialAmount": 90000,
   	   "manageLink": "https://my-manage-link.example",					
	},
	"serviceDescription": "Gold Membership subscription"
}

Editing a Subscription

Request

This endpoint lets you edit a subscription. What you can edit:

  • Expiration date of the subscription

  • The subscription object (start and end date, cadence, etc.)

    When you edit the subscription object, the system removes all pending (future) installments and generates new ones based on the updated rules.

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

 

How to Resolve the Path Placeholders of the Endpoint

Replace {subscriptionID} in the endpoint with the subscription ID.

Parameters for the Request Body

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.

subscriptionobject

When you edit the subscription object, the system removes all pending (future) installments and generates new ones based on the updated rules.

You can edit the following parameters:

When will the next installment be charged after editing the startDate?

startDate is defined and in the future

the first due date is the startDate

startDate is defined and in the past

the first due date is the next upcoming recurrence based on the cadence (calculated from startDate)

startDate is not defined

the first due date is today

cadenceobject

Contains the intervals at which payments are collected.

Example: For collecting a payment every 2 weeks set occurance to 2 and timeUnit to weeks.

PATCH/commercial/v1/subscriptions/{subscriptionID}

curl https://base-url-placeholder/subscriptions/959c09e5-a27b-49e9-8f92-e9e13374cfdd
  -X PATCH
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"
  -d '{
	"expirationDate": "2028-06-20",
	"subscription": {
		"startDate": "2025-06-20",
		"endDate": "2028-06-01",
		"amount": 100000,
		"cadence": {
			"occurrence": 1,
			"timeUnit": "MONTHS"
		},
		"manageLink": "https://my-manage-link.example",					
	}
}'

Response

A 204 response will let you know that the subscription has successfully been updated.

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

204 NO CONTENT

Pausing, Resuming, or Cancelling a Subscription

Request

You can edit the status of a subscription in the following way:

PAUSE

Pausing a subscription puts it on hold until it is

a) manually resumed or

b) automatically resumed as defined by the resume date (optional)

A paused subscription has the PAUSED status,

RESUME

Resumes a PAUSED subscription.

A resumed subscription has the normal ACTIVE status.

CANCEL

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 {subscriptionID} in the endpoint with the subscription ID.

Parameters for the Request Body

PATCH/commercial/v1/subscriptions/{subscriptionID}/status

curl https://base-url-placeholder/subscriptions/959c09e5-a27b-49e9-8f92-e9e13374cfdd/status
  -X PATCH
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"
  -d '{
	"statusChange" : "PAUSE",
	"resumeDate": "2025-02-07T08:27:19Z"
}'

How to Resolve the Path Placeholders of the Endpoint

Replace {subscriptionID} in the endpoint with the subscription ID.

Parameters for the Request Body

PATCH/commercial/v1/subscriptions/{subscriptionID}/status

curl https://base-url-placeholder/subscriptions/959c09e5-a27b-49e9-8f92-e9e13374cfdd/status
  -X PATCH
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"
  -d '{
	"statusChange" : "RESUME"
}'

How to Resolve the Path Placeholders of the Endpoint

Replace {subscriptionID} in the endpoint with the subscription ID.

Parameters for the Request Body

PATCH/commercial/v1/subscriptions/{subscriptionID}/status

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

Response

A 204 response will let you know that the status change of the subscription was successful.

If you cancelled the subscription, an email will be sent to the payer, see Emails for Subscriptions.

204 NO CONTENT

Cancelling an Installment of a Subscription

Request

Purpose of cancelling installments

For subscriptions, it can be necessary to cancel an installment in case a subscription is "stuck" due to a failed installment. Subscriptions normally generate the next installment automatically, but not if a previous installment has FAILED or is overdue. To fix this, you can cancel the failed installment. Once it's cancelled, the system will ignore it and resume the regular schedule.

Cancelling installments is only possible for subscriptions, not for Payment Requests.

What does cancelling mean?

Cancelling an installment means:

  • The installment is permanently put in the cancelled status.

  • A cancelled installment will not be charged

Cancelling an installment cannot be undone.

When can an installment be cancelled?

An installment can be cancelled if it is in status FAILED
An installment can be cancelled if its due date has passed
If the due date has not passed yet, an installment cannot be cancelled (even if it is still unpaid)
An installment cannot be cancelled if it is PAID

 

How to Resolve the Path Placeholders of the Endpoint

Replace {subscriptionID} in the endpoint with the subscription ID.

Replace {installmentID} in the endpoint with the installment ID.

Parameters for the Request Body

PATCH/commercial/v1/subscriptions/{subscriptionID}/installment/{installmentID}/status

curl https://base-url-placeholder/subscriptions/959c09e5-a27b-49e9-8f92-e9e13374cfdd/installments/134311/status
  -X PATCH
  -H "Content-Type: application/json"
  -H "X-Authentication-Key: {api_key}"
  -d '{
	"statusChange" : "CANCEL"
	}'

Response

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

204 NO CONTENT

Deleting a Subscription

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 {subscriptionID} in the endpoint with the subscription ID.

Parameters for the Request Body

No request body needed.

DELETE/commercial/v1/subscriptions/{subscriptionID}

curl https://base-url-placeholder/subscriptions/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 subscription has been successfully deleted.

204 NO CONTENT