Javascript widget integration
1
2
Add the function to trigger your payment request
<script>
function makePayment() {
IremboPay.initiate({
publicKey: "xxx",
invoiceNumber: "xxx",
locale: IremboPay.locale.EN,
callback: (err, resp) => {
if (!err) {
// Perform actions on success
// IremboPay.closeModal();
} else {
// Perform actions on error
}
}
})
}
</script>Specific error scenarios
{
"message": "Invalid request",
"success": false,
"errors": [
{
"code": "INVALID_KEY",
"detail": "Public key is not valid"
}
]
}{
"message": "Invalid request",
"success": false,
"errors": [
{
"code": "INVOICE_NOT_FOUND",
"detail": "Invoice not found"
}
]
}Last updated