Get started by learning how to integrate DirectPay into your application. After finishing this guide you will be able to initiate transfer payments in a test environment.
To integrate Directpay into your current software solution, the following steps need to be taken:
- Initiate the payment request.
- Await and confirm payment from the Customer.
- Track or verify payment.
You need to initiate the payment request via the API or Mono connect widget which begins the payment process.
a. One-time payment
To initiate a one-time payment an amount, type (i.e onetime-debit), description, reference, account id and redirect URL can all be populated on the Initiate endpoint. Once all is provided, a payment link is generated which your customers and open in their browsers or on your mobile app in form of a web view.
b. Recurring payment
To initiate a recurring payment, a payment plan should be created where you can set a start date, end date, interval (e.g weekly, monthly etc), duration. Once this is already set, a plan id will be provided which you can now pass to the Initiate payment endpoint with a reference, description (if needed), account id (if needed) etc. Once all these is satisfied, a payment link is generated which can be sent to your customer for authorisation. Once authorised, their bank account gets debited based on the conditioned parameters provided above.
NOTE ON THE REDIRECT_URL
The customer will be redirected to the redirect URL after a successful or failed attempt, the URL includes the reference that was passed when initializing the widget and status and reason in case of failure.
Once the payment initiation has been created, the payment request needs to be presented to the consumer in order to allow them to select their bank and authorize the payment. If the account id of a customer who is already linked to Mono connect is already present in the initiate endpoint above, they will be presented with an authorisation screen to input their OTP, token, pin etc immediately after the screen loads without them having to select bank and log in again.
There are two ways this can be achieved.
a. Mono automatically sends a live direct_debit.payment_successful event of a transaction, to the webhook URL added to your app on the Mono Dashboard. The payload of this webhook contains the Customer's Account ID, transaction amount, transaction time, reference, transaction status etc.
b. With our Verify payment status API, you can trigger manually the status of a particular transaction via the reference which you've initially set on the Initiate endpoint. Once called, we provide all necessary payment information pertaining to a transaction as already highlighted in a. above.
- No webhook event will be sent until the payment process is completed end-to-end be it a successful or a failed transaction.
- If the transaction process is not completed end-to-end, the verify endpoint will return a message: Transaction with this reference could not be found
Updated 9 days ago
Learn how to initiate payment via API or widget