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

Sample Code

1
<form>
2
<script src="https://api.payant.ng/assets/js/inline.min.js"></script>
3
<button type="button" onclick="payWithPayant()"> Pay </button>
4
</form>
5
6
<script>
7
function payWithPayant() {
8
var handler = Payant.invoice({
9
"key": "e47aa44e4a320ae2a2b6b8804a4d2fa1b74437ab",
10
"client": {
11
"first_name": "Albert",
12
"last_name": "Jane",
13
"email": "[email protected]",
14
"phone": "+2348012345678"
15
},
16
"due_date": "12/30/2016",
17
"fee_bearer": "client",
18
"items": [
19
{
20
"item": ".Com Domain Name Registration",
21
"description": "alberthostpital.com",
22
"unit_cost": "2500.00",
23
"quantity": "1"
24
}
25
],
26
callback: function(response) {
27
console.log(response);
28
},
29
onClose: function() {
30
console.log('Window Closed.');
31
}
32
});
33
34
handler.openIframe();
35
}
36
</script>
37
Copied!
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.
Last modified 2yr ago