Mount an official Hadawi-styled checkout button.
Use this instead of wiring a custom “Pay” / “Split” button so branding stays consistent across merchant storefronts.
On click the button calls getIntentId(), then opens checkout (default: popup).
Open the hosted Hadawi checkout for the given intent ID.
Prefer HadawiCheckout.mountButton for the storefront CTA.
Use open() when you already have an intent id and need imperative control.
The intent ID returned by your server after calling
POST /intents (or HadawiClient.intents.create()).
Presentation mode (redirect | popup), callbacks, and optional return URL.
A close() function — only meaningful in popup mode.
Browser-side Hadawi checkout controller.
Supports two presentation modes:
Prefer HadawiCheckout.mountButton for the storefront CTA so shoppers always see official Hadawi branding (not a custom merchant button).
Modal / iframe embedding is not supported. ClickPay's hosted payment page responds with
X-Frame-Options: deny, so payment cannot complete inside an iframe (including nested frames). Useredirectorpopupinstead.Example: Branded button (recommended)
Example: Imperative open