Inline Payment

The Payant Inline JS allows you to accept payments on almost every device. It is the easiest, most convenient and secure way of invoicing and accepting payments from your customers.

options
Inline Payment

Request
Response
Headers
optional
string
Body Parameters
key
required
string
Invoice refrence code if already exists
reference_code
required
string
Invoice refence code if already exists
client
required
array
Client Data
company_name
optional
string
Company's Name
first_name
required
string
Client's first name
last_name
required
string
Client's last name
email
required
string
Clien't email address
phone
required
string
Client's phone number
address
optional
string
Client's address
type
optional
string
Client's type customer, staff or vendor
settlement_bank
optional
string
Clien't settlement bank
account_number
optional
string
Client's account number
client_id
required
string
Client ID
due_date
required
string
Invoice due date MM/DD/YYYY
fee_bearer
required
string
Invoice fee brearer, account or client
items
required
array
Invoice items
item
required
string
Item's name
description
required
string
Item's description
unit_cost
required
string
Item's unit cost
quantity
required
string
Item's quantity
tokenize
optional
string
Tokenize cards, True or false, Defaults to false
payment_methods
optional
array
Payment methids to show on checkout can be a combination of card, bank, phone, and QR. Example, ["card", "phone"] for Card and Phone Number payments only.
200: OK

Sample Code

<form>
<script src="https://api.payant.ng/assets/js/inline.min.js"></script>
<button type="button" onclick="payWithPayant()"> Pay </button>
</form>
<script>
function payWithPayant() {
var handler = Payant.invoice({
"key": "e47aa44e4a320ae2a2b6b8804a4d2fa1b74437ab",
"client": {
"first_name": "Albert",
"last_name": "Jane",
"email": "jane@alberthospital.com",
"phone": "+2348012345678"
},
"due_date": "12/30/2016",
"fee_bearer": "client",
"items": [
{
"item": ".Com Domain Name Registration",
"description": "alberthostpital.com",
"unit_cost": "2500.00",
"quantity": "1"
}
],
callback: function(response) {
console.log(response);
},
onClose: function() {
console.log('Window Closed.');
}
});
handler.openIframe();
}
</script>

Heads up!

Only one of client or client_id is required per invoice object. The client parameter will allow you to add a new customer while invoicing on the fly in case you don't have a client_id. Client will not be added if already exist. All fields are not required if reference_code is available.

Heads up!

Please ensure that you use the right API endpoint for demo https://api.demo.payant.ngand https://api.payant.ng for LIVE on the script tag.