Use Case: 529 Payments

What are 529 Payments?

A 529 Payment is when someone uses Flywire's recipient network but doesn't need Flywire to collect funds from a payer. This might be because you already have the funds (for example if you are a 529 provider or a bank) or use another system to collect payments. Since funds are collected independently, 529 Payments don't include payment details like credit card or bank account info.

Walkthrough: Creating a 529 Payment

To be able to use the Flywire API, you need to be registered, and all requests to the Flywire API need to be authenticated, see Flywire API Basics

If you are just getting started and only have Sandbox credentials, you need to use the Sandbox environment. All request examples let you switch between the production and sandbox base URL.

1. Choose the recipient for the payment.

GET /recipients

Since you are using the network of Flywire recipients, you have to find the recipient ID of the recipient who receives the funds from the payer.

In this step you get the list of recipients that are available for you.

The returned list contains only minimal information about the recipients. You are looking for the recipient ID to identify them. In this example, the list of recipients contains International American University and Flywire University.

You can find all details about this step here: Recipients - Getting a List of all available Recipients.

2. Check which fields and items are needed for a payment to this recipient.

GET/recipients/{recipientId}

You need the following information for creating a 529 payment: 

  • The mandatory fields for the recipient.

  • The items for the recipient.

To get this information, you have to get details about the recipient.In this example, you want to get the recipient information for Flywire University. From the recipient list you got in the step before, you can see that the recipient ID for Flywire University is “FWU”.
This means your API request has to be GET /recipients/FWU.

You can find all details about this step here: Recipients - Getting Details about a Recipient.

3. Choose the payment method (offer) for this payment.

GET/offers

Usually, the payer can decide which payment method they want to use. For 529 Payments, you are choosing the payment method for them. This will be a special payment method that Flywire created for you.

Get the list of offers to find your payment method. In this example, you want to get offers for Flywire University (FWU), paying from the US a total amount of 12,000 USD. These settings are added as query parameters, which makes the request look like this:

GET /offers?amount=1200000&country=US&recipient=FWU

Each payment method in the returned list has different attributes to identify them (name, what kind of payment method it is, etc.). Each payment method also has a unique ID. You will need the ID of your chosen payment method for the order in the next step.

Can I just use the same offer ID for all my 529 Payments?

You need to get an offer each time you want to create a payment. The offer ID depends on the provided amount, country and currency, so different IDs will be generated for the same payment method.

You can find all details about this step here: Offers - Getting a List of Offers.

4. Create an order.

POST/orders

In this example, the order is for Flywire University (FWU). You need the mandatory fields, the items, and the offer ID from the steps before the create the order.

You'll get an ID back. In this example, the order ID is 52c6a5df-b6c6-40bc-a71a-fefb82ad96b3: This is the order ID you need to confirm the order.

You can find all details about this step here: Orders - Creating an Order.

5. Confirm the order to create the payment.

POST/orders/{orderId}/charge

As soon as you confirm an order, it gets a payment reference and turns into a payment.

In this example, the order you created in the step before returned the order ID 52c6a5df-b6c6-40bc-a71a-fefb82ad96b3. This means your endpoint is:

POST /orders/52c6a5df-b6c6-40bc-a71a-fefb82ad96b3/charge

You'll get the payment reference for this payment back, along with some more information about the payment.

You can find all details about this step here: Orders - Charging an Order (Creating a Payment).

Next steps

You can track the payment if you added a notifications URL to the order (see Payment Status Notifications).