Paylode Checkout
Paylode Checkout is an inline smart payment form that works seamlessly across devices. It supports all the payment methods you get with the checkout standard integration
How it worksβ
Paylode checkout allows you to embed the payment form on your webpage using our Paylodecheckout()
JavaScript function. The function responds to your request in accrodancewith the request configuration set. If you specify a redirect_url inyour request, the function will redirect your users to the provided redirect URL when they complete the payment.
Parameter Descriptionβ
Name | Type | Description | Required |
---|---|---|---|
public key | string | public key can be found on the paylode dashboard settings>API key | True |
currency | string | Payment Currency | True |
amount | string | Amount to be paid | True |
Before you beginβ
Ensure you have your public key. You can find this on the Paylode Merchant dashboard under Settings > api keys. If you donβt have an account with us yet, you can create a test account now
Add the code snippet to your siteβ
Adding the checkout.js script to your page
Adding this will automatically inlcude all the features and payment methods the paylode checkout has.
<html>
<head>
<title>Sample Paylode Checkout</title>
<script src="https://pg.checkout/checkout.js"></script>
</head>
<body>
<button onlick="Paylodecheckout()">Pay Now</button>
</body>
</html>
Adding the Paylode.js script to your pageβ
Adding this will automatically inlcude all the features and payment methods the Paylode checkout has. Including our advanced fraud detection tools whenever your customers attempts to make a payment.
<html>
<head>
<title>Sample Paylode Checkout</title>
<script src="https://pg.checkout/checkout.js"></script>
</head>
<body>
<button onlick="Paylodecheckout()">Pay Now</button>
<script type ="text/javascript">
function Paylodecheckout() {
Setup ({
//replace with your public key
"publicKey": "PLPK_**************",
"currency": "NGN",
"amount": "150.00",
"email": "test@emaildomain.com",
"full_name": "John Doe", //optional
"redirectUrl": "http://yourdomain.com",
},
function callback(response, closeModal) {
console.log(response) //response of transaction
},
function close(close) {
console.log(close) //transaction close
})
}
</script>
</body>
</html>