Once a customer has been created, invoices/plans will need to be attached to a customer. This will allow payments be be deducted from the customer's account. There are 2 invoice models that can be choosen for this component:
1. On- Demand Model
Ezypay 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 when it is required. All schedules will be handled by the integrator.
2. Subscription Model
Ezypay 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. This is the preferred integration model.
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.
Updated over 1 year ago