Monicredit Api
  • 😊Hello
  • How to use this documentation
  • Demo vs Live Environment
  • Authentication
    • Login
  • OnBoarding
    • OnBoard New Merchant
  • Collection
    • Getting Started
    • Accept Payment (Inline)
    • Accept Payment (Standard)
    • Verify Payment
    • Virtual Accounts
    • Revenue Head
    • Settlement Bank
  • Transactions
    • Get Transactions
    • Get Initiated Transaction Info
    • Verify Transaction
    • Verify Payment
    • Transaction Virtual Account
    • Settlement Transactions
    • Initiate Transaction
  • Commercial
    • Calculate Commercials
  • Settlement Bank
    • Create Settlement Bank
    • List Settlement Banks
    • Update Settlement Bank
  • Revenue Heads
    • Create Revenue Head
    • Update Revenue Head
    • List Revenue Heads
    • Get Single Revenue Head
    • Search Revenue Head
    • Delete Revenue Head
  • Reports
    • Settlement Bank Report
    • Revenue Head Report
    • Merchant Report
  • Settlement
    • Get Settlements
    • Get Single Settlement
  • Wallets
    • Create Wallet
    • Update Wallet
    • Get Wallet Transactions
    • Get Single Customer Wallet
    • Get Account Wallets
    • Get All Wallets
    • Create Virtual Account
  • Customer Wallet
    • Create Customer Wallet
    • Get Customer Wallets
    • Create Customer Virtual Account
    • Update Customer Wallet
  • Beneficiary
    • Add Beneficiary
    • Update Beneficiary
    • Search Beneficiary
  • Disbursement
    • Single Fund Transfer
    • Transaction Settlement
    • Bank List
    • Name Enquiry
Powered by GitBook
On this page
  1. Collection

Accept Payment (Inline)

Monicredit's Inline JS allows you to easily integrate our payment functionality into your websites, empowering your customers to make payments directly on your platform.

Parameter
Type
Required
Description

public_key

string

Yes

Your Monicredit Public Key. You can get it from your dashboard.

order_id

string

Yes

Unique order ID you should provide for each transaction. It is case-sensitive.

customer

object

Yes

An object containing, basic information about the customer. e.g first_name, last_name

fee_bearer

string

Yes

Specify who will bear the Monicredit transaction fee, which can either be client or- merchant.

items

array

Yes

An array of items in this format: [{"item": "Demo Payment", "unit_cost": '500', "revenue_head_code": 'Rev_000000'}]

currency

string

No

Specify the currency you want to accept payment with. For now, we support only Naira. e.g NGN

meta_data

array

No

An array of your request meta data

paytype

string

No

Specify the method you are using for the payment. It can either be inline or standard

Specify the method you are using for the payment. It can either be inline or standard

Parameter
Type
Required
Description

item

string

Yes

The name/title of the item to be paid for by the customer

unit_cost

string

Yes

revenue_head_code

string

Yes

Revenue head code generated from creating a revenue head.

split_details

array

No

A list of objects containing subaccount code, the sharing percentage, and a fee_flat parameter to add extra charges on the overall amount.

Sample Code

Installing the Monicredit’s Checkout Page is very easy and can be done by adding the checkout Javascript snippet to your website by copying the snippet code as shown below. The Monicredit script also has a demo version and a live version to suit your needs.

  • Demo JS: https://demo.monicredit.com/js/demo.js

  • Demo JS: https://demo.monicredit.com/js/demo.js

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Monicredit Dev</title>
  <script src="https://demo.monicredit.com/js/demo.js"></script>
    <script>
        function payWithMonicredit() {
            var handler = PayDirect.invoice({
            "public_key": "PUB_DEMO_Test",
            "order_id" : "transaction_id"
            "customer": {
                "first_name": 'Test',
                "last_name": 'Test',
                "email": 'test@test.com',
                "phone": '99000000000'
            },
            "fee_bearer": "client",
            "items": [
                {
                "item": "Demo Payment",
                "unit_cost": '500',
                "revenue_head_code": 'Rev_000000',
                "split_details": [
                    {
                        "sub_account_code": 'SB_000000',
                        "fee_percentage": 100,
                        "fee_flat": 0
                    }
	                ]
                },
            ],
            callback: function(response) {
                console.log(response);
                location.href ='/callback.php?reference='+response.reference_code;
            },
            onClose: function() {
                console.log('Window Closed.');
                location.href ='/index.php';
            }
            });
            handler.openIframe();
        }
        </script>
</head>
<body onload="payWithMonicredit()">
     
</body>
</html>
PreviousGetting StartedNextAccept Payment (Standard)

Last updated 1 year ago

Amount in the subunit of the you are debiting the customer.

supported currency