Scenario 2: Create Invoices or Plans

This is the second scenario of the integration process

There are 2 integration solutions for this component, which integration solution you require will be dependent on the integration model that you have chosen.
The links provided below, will outline these 2 integration solutions in details, and how they can be achieved with helpful guides.

Business ModelDescription
On-demand modelEzypay will not hold any schedule for re-occurring payments. The integrator will send in a create invoice API to trigger Ezypay to attempt a payment.


All schedule will be handled by the integrator.

Subscription ModelEzypay will handle the schedule of when the re-occurring payments will be attempted. Ezypay will follow the created schedule based on the subscription created by the integrators.

Process Flow on How Invoice Processing Works

Despite which invoice model you will be using to integrate with Ezypay, the way that invoices behave are the same. Below is a process flow displaying how invoice processing works.

It will clearly show how the money flows between you (the integrator) and Ezypay. It displays at each event what actions will take place, based on what API and webhook was used and the various paths that the money flow could go, depending on what the scenario is. For example:

  • The difference between what payment method the invoice was collected via (e.g bank vs credit card)
  • If the Ezypay fees collected were customer or merchant paid
  • The difference between the status of an invoice (successful or failed)

It will help you understand what parameters should be used and how they can be incorporated into your application.

The scenario details are listed in the box below.

πŸ“˜

Scenario

  • The customer will pay for an invoice through a bank transaction
  • The customer will be paying for the Ezypay fee in this transaction (Load Fee + Transaction Fee)
  • Account code : Membership Gold
  • Billing value is $80
  • Load fee is $2
  • Bank transaction fee is $1
  • Failed Payment Fee is $5

Note: This example is an on-demand example

Alt text

https://lucid.app/publicSegments/view/909686de-3898-4c52-8f13-d6b8b6c46262/image.png
Invoice Processing- MoneyFlow Diagram

On-demand Model

If you have chosen for the on-demand payments model, for this scenario you will need to "Create Invoices"
Please refer to: https://developer.ezypay.com/docs/create-invoice

Required Completed Task (On-demand)
1. Create an invoice using Ezypay Customer Id and Payment method token.
2. Be able to display both successful and failed payment collection.
3. Be able to display the failed reason for payments that failed. This can be retrieved using our GET Invoice API, or using Ezypay's invoice_past_due webhook event.

🚧

NOTE (On-demand Model):

Bank transaction:

  1. In the sandbox environment, bank transaction will take up to one business days before the result of the payment is returned (by 12 noon the next business day).

  2. In the production environment, a bank transaction takes up to 3 business days before an accurate response is returned.

Card transaction:

  1. For card transactions, it will normally take less than 30 seconds after an invoice is created, before the payment result (PAID or PAST_DUE) is available. All invoice status will remain as "PROCESSING" prior to the payment result.

πŸ‘

Steps to setup your Ezypay POSTman environment:

Guide to setting up Ezypay's POSTman sandbox environment

Create Invoice Scenario:

Incase of missing button, just click import on your POSTman application and select "Link":
https://www.getpostman.com/collections/77615a1a94c080c8ba3a


Subscription Model

If you have chosen for the subscription payments model, for this scenario you will need to "Create Plans and Subscription payments"
Please refer to:
https://developer.ezypay.com/docs/create-plans-and-subscription-payments

Required Completed Task (Subscription Model)
1. Create PLANs to act as a template which will be used to create the subscriptions in Ezypay. The PLAN can be used by multiple Subscriptions.
2. Create a Subscription that will specify the amount, the frequency (monthly, weekly or bi-weekly) on when each of the invoices will need to be attempted. Any conditions specify in the subscription will override what is specify by the PLAN.

🚧

NOTE (Subscription model):

Bank transaction:

  1. In the sandbox environment, bank transaction will take up to one business days before the result of the payment is returned (by 12 noon the next business day Australia Time).

  2. In the production environment, a bank transaction takes up to 3 business days before an accurate response is returned.

Card transaction:

  1. Card transactions will be attempted at 12 noon daily (Australia Time). Integrators will be able to received the status of the payment within 30 second after the payment is attempted, by the Ezypay subscription simulator.

πŸ‘

Steps to setup your Ezypay POSTman environment:

Guide to setting up Ezypay's POSTman sandbox environment

Collection to create PLAN and SUBSCRIPTION:

Incase of missing button, just click import on your POSTman application and select "Link":
https://www.getpostman.com/collections/65f72fa3de62de437fab

Collection to manage invoices using Ezypay SUBSCRIPTIONS:

Incase of missing button, just click import on your POSTman application and select "Link":
https://www.getpostman.com/collections/a49b4bf8a88de6472edb