Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Pay with Transfer

  2. Pay with BankCard, 

  3. Pay with CardBank Account, and

  4. Pay with Phone Number.

Adding the Monnify Checkout to Your Website

...

It is recommended that you always make a get transaction status call whenever a transaction is completed (or canceled) before saving the transaction on your database. Monnify will also notify you via your webhook URL of the status of any transaction.

...

User Cancelled Response

If a user cancels, Monnify returns the following response to your onClose function

Code Block
languagejson
{
    "authorizedAmount": 30,
    "paymentStatus": "USER_CANCELLED",
    "redirectUrl": null,
    "responseCode": "USER_CANCELLED",
    "responseMessage": "User cancelled Transaction"
}

Field Reference

Field

(M) indicates fields that are mandatory in the request body

Field

Description

amount (M)

The amount to be paid by the customer

amountPaid

The actual amount paid by customer

currency (M)

The currency of the transaction being initialized. "NGN"

reference (M)

Merchant's Unique reference for every transaction. (The SDK already has a code snippet that generates this for you, but you can always replace it)

customerName (M)

Full name of the customer

customerEmail (M)

Email address of the customer

customerMobileNumber (M)

Phone number of the customer

apiKey (M)

Merchant's API Key (Can be found on the Monnify dashboard)

contractCode (M)

Merchant's contract code (Can be found on the Monnify dashboard)

paymentDescription (M)

Description for the transaction. Will be used as the account name for bank transfer payments

paymentStatus (M)

Status of the transaction ("PAID", "PENDING" or "FAILED")

incomeSplitConfig 

Object containing specifications on how payments to this reserve account should be split.

subAccountCode (m)

The unique reference for the sub account that should receive the split.

feeBearer

Boolean to determine if the sub account should bear transaction fees or not

feePercentage

The percentage of the transaction fee to be borne by the sub account

splitPercentage

The percentage of the amount paid to be split into the sub account.

paymentMethods

An array containing payment methods which will be displayed to select from. It's defaulted to both account and card payment methods.

...

How to Migrate from Version 1 to Version 2

Change the Monnify Web SDK Javascript snippet on your website by changing the javascript type URL of version 1 to that of version 2.

Version 1

Code Block
languagejs
<script type="text/javascript" src="https://sdk.monnify.com/plugin/monnify.js"></script>

Version 2 (Latest Version)

Code Block
languagejs
<script type="text/javascript" src="https://sdk-v2.monnify.com/plugin/monnify.js"></script>

...

What’s Changed from Version 1?

...

Code Block
languagejs
<script type="text/javascript" src="https://sdk.monnify.com/plugin/monnify.js"></script>

Version 2 (Latest Version)

Code Block
languagejs
<script type="text/javascript" src="https://sdk-v2.monnify.com/plugin/monnify.js"></script>

...

  1. OnLoadStart function was added

This allows you the flexibility of performing an action when the SDK is about to start. You can define whatever trigger you want to happen when the SDK is about to be launched.

Code Block
languagejs
  ...
  onLoadStart: () => {
    console.log("loading has started");
  },

...

  1. OnLoadComplete function was added

This allows the flexibility of performing an action when the SDK has been loaded fully and payment methods displayed. You can define whatever trigger you want to happen immediately after the SDK has loaded fully.4.

  1. Two new payment methods were added

The newly added payment methods are Pay with Phone Number and Pay with USSD. Version 2 has four(4) payment methods available for collections; 

...

Code Block
languagejs
...
paymentMethods: [
    "USSD",
    "PHONE_NUMBER"
],
onComplete: function(response) {
    console.log(response);
},

...

  1. The

isTestMode field has been removed from version 1 which was used to indicate your active environment (whether live or test). The active environment will be automatically detected using the apiKey specified by you in the javascript snippet.

How to Migrate from Version 1 to Version 2

Change the Monnify Web SDK Javascript snippet on your website by changing the javascript type URL of version 1 to that of version 2.

Version 1

...

languagejs

...

.

...

Version 2

...

languagejs

...

...