Popup Checkout
Display a payment form as an overlay modal on your website. Buyers complete payment without leaving your page.
How Popup Checkout Works
Popup Checkout opens an overlay modal on your page containing the HL Hunt payment form. The buyer enters their payment details in the popup and the payment is processed without a page redirect.
Benefits:
- No redirect — buyers stay on your site
- PCI compliant — hosted in a secure iframe
- Fast integration — just a few lines of JavaScript
- Customizable — brand colors and logo
Integration
Add the HL Hunt checkout script to your page and trigger the popup:
<script src="https://payments.hlhunt.org/js/hlhunt-checkout.js"></script>
<script>
// Opens the hosted checkout in a new tab and returns that Window object.
var popup = HLHunt.checkout.open({ sessionKey: "cs_abc123" });
// If the browser blocked the popup, fall back to a full redirect.
if (!popup) {
HLHunt.checkout.redirect({ sessionKey: "cs_abc123" });
}
</script>- Create a Checkout Session on your server (same as Checkout Sessions).
- Pass the session key to
HLHunt.checkout.open()assessionKey. - Always handle a
nullreturn value — that means the browser blocked the popup, so fall back toHLHunt.checkout.redirect(). - The popup flow does not emit lifecycle callbacks. To receive
onSuccess/onCancelevents in your page, use the embedded checkout instead.
Configuration Options
| Option | Description |
|---|---|
| sessionKey | Required. The checkout session key returned by your server. |
| replace | Redirect only (HLHunt.checkout.redirect). When true, replaces the current history entry instead of pushing a new one. |