Checkout for Scheduled Payments

image

Scheduled payments allow you to collect future payments with variable amounts on specific dates. All payments that belong together are bundled into one Payment Request.

Scheduled payments are a type of recurring payment.

Example:

"Store your card to pay 200 now, 500 next month, and 400 in two months."

Who handles future payment creation and emails to your payer?

Flywire will create the payments and send communications on your behalf at the appropriate times.

Configuration Example

 

The following code sample shows how to configure the Checkout integration to initiate a schedule of payments using a card.

 

Basic Settings

After-Payment Settings

Specify the returnUrl or an onCompleteCallback handler. See After-Payment Settings for details.

Payer Info and Custom Info

Optionally pre-fill fields and decide which input pages will be shown. See Pre-filling Fields of the Form for details.

Payment Settings

amount decimal

To use scheduled payments the amount here must be set to 0.
The amount for each payment is set in the amount parameter in scheduledPayments.data.instalments.

Payment Schedule Settings

scheduledPayments object

data object

instalments array

An array of objects for each payment (installment) that should be scheduled and collected in the future.

var config = {
  env: "demo",
  recipientCode: "Your Portal Code",

  // Specify the returnUrl or an onCompleteCallback handler
  returnUrl: "https://httpbin.org/get",

  // Other checkout parameters (e.g. pass some payer info and set requestPayerInfo to true)
  firstName: "John",
  lastName: "Doe",
  requestPayerInfo: true,

  // The amount must be 0 for scheduled payments
  amount: 0,

  // The payment schedule
  scheduledPayments: {
    type: "scheduled",
    data: {
      instalments: [
        {
          amount: 100.50,
          date: "2021-05-01"
        },
        {
          amount: 899.50,
          date: "2021-06-01"
        },
      ],
      serviceDescription: "Optional purpose of the payment"
    }
  }
};

After Payment Completion

Once a the payer has successfully entered their details and the Checkout Experience form is closed, you receive information about the payment either via the returnUrl or the onCompleteCallback handler.

Example for response via returnUrl:

(Click to see the return URL in JSON formatting. For a detailed description of the parameters see the response via onCompleteCallback handler below.)

http://httpbin.org/get?reference=2e828d42-9b90-4cbd-969c-7320bd559115&status=active&amount=0&payment_method=scheduled

Example for response via onCompleteCallback handler:

{
  "status": "active",
  "paymentMethod": "scheduled",
  "amount": 0,
  "reference": "82804964-0497-4e07-990a-60076a463a29"
}

Managing Scheduled Payments

If you are using the imageFlywire API:  via the Payment Request resource
If you are using no integrations: via imageClient Dashboard (as a Payment Request)