Frontend Integration
Last updated
Last updated
DOKU API
Legacy DocumentationThe aim of integrating the frontend is to present the DOKU Checkout payment page seamlessly within your website.
Once you have the payment.url
, you can now display the payment page by embedding the DOKU Checkout JS on your HTML file.
Simply import the jokul-checkout-1.0.0.js
and then call the loadJokulCheckout()
with the payment.url:
Type | Value |
---|---|
VIEWPORT
The viewport
on the <head>
tag is important to ensure that the payment page is load correctly.
There are 2 approaches for integrating the DOKU Checkout page into your web/app interface.
Redirect customer to a new page.
Use the payment.url
value without importing the JS file
Present it as modal overlay (pop-up mode)
Kindly importing the JS file as the sample attached above
JS (sandbox)
JS (production)