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>
  1. Create a Checkout Session on your server (same as Checkout Sessions).
  2. Pass the session key to HLHunt.checkout.open() as sessionKey.
  3. Always handle a null return value — that means the browser blocked the popup, so fall back to HLHunt.checkout.redirect().
  4. The popup flow does not emit lifecycle callbacks. To receive onSuccess / onCancel events in your page, use the embedded checkout instead.

Configuration Options

OptionDescription
sessionKeyRequired. The checkout session key returned by your server.
replaceRedirect only (HLHunt.checkout.redirect). When true, replaces the current history entry instead of pushing a new one.