IppoPay
Search…
Javascript Integration
The Ippopay Payments plugin allows you to accept credit card, UPI, Netbanking and debit card payments via Ippopay payment gateway.

Configuration

Initialize your object by passing your order id and public key:
Get Order Id from Create order api from next step
1
<script type="text/javascript" src="https://js.ippopay.com/scripts/ippopay.v1.js"></script>
2
<script type="text/javascript">
3
var order_id;
4
var options = {
5
"order_id" : order_id, //Get order_id params value from Create Order from next step
6
"public_key" : "pk_live_xxxxxxxxx"
7
}
8
var ipay = new Ippopay(options);
Copied!
You can get your Public and Secret key from the api dashboard.

Create Order

Create order from Server side using below API and get the Order id. Click here to know how to create a order.

Open the payment view

Use the below code to open the payment view for the customers to pay.
1
ipay.open();
Copied!

Close the payment view

Use the below code to close the payment view.
1
ipay.close();
Copied!

Response Handlers

For Success and Error handlers use the below handler function for payment response
1
ippopayHandler(response, function (e) {
2
if(e.data.status == 'success'){
3
console.log(e.data)
4
}
5
if(e.data.status == 'failure'){
6
console.log(e.data)
7
}
8
});
9
Copied!
Last modified 7mo ago