Integration Guide

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.

Overview

To integrate Directpay into your current software solution, the following steps need to be taken:

  1. Initiate the payment request.
  2. Await and confirm payment from the Customer.
  3. Track or verify payment.

1. Initiate the payment request

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 (not required) 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, parameters such as amount, type (i.e recurring-debit), description, reference, start date, end date, duration (the frequency), interval (e.g weekly, monthly, yearly etc), duration can be set via the Initiate API. Once all these are 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 FIELD

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.

👍 Success

${redirect_url}?reference="reference"&status="successful"

🚧 Failure

${redirect_url}?reference="reference"&status="failed"&reason="widget_closed"

📘

NOTE ON THE ACCOUNT ID FIELD

The Account Id field is what binds both Mono Connect and Mono DirectPay together. Once the Account ID of an already connected account from Mono Connect is provided on the Payment Initiation API (as account_id), your users or customers wouldn’t need to sign into the DirectPay Widget. All that would be required of them would be to authorise the payment with their PIN, password or token on the payment widget.

With this, the process of collecting payment from your customers' bank account is done with ease

2. Customer authorizes payment

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.

3. Track payment status

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.

📘

NOTE

  1. No webhook event will be sent until the payment process is completed end-to-end be it a successful or a failed transaction.
  2. 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

What’s Next

Learn how to initiate payment via API or widget

Did this page help you?