Installation
Initialization
Opening Checkout
Overlay Mode
Opens checkout in a full-screen modal overlay:Embed Mode
Renders checkout inside a target DOM element:Checkout Options
| Option | Type | Description |
|---|---|---|
checkoutUrl | string | Required. The checkout URL from your Fungies dashboard |
settings.mode | "overlay" | "embed" | Display mode for the checkout |
settings.frameTarget | string | DOM element ID for embed mode |
customerEmail | string | Customer email (deprecated, use billingData.email) |
billingData | object | Prefilled billing information (see below) |
discountCode | string | Discount code to apply |
quantity | number | Product quantity |
items | array | Items for multi-product checkout |
customFields | object | Custom field values |
Billing Data Object
Prefill customer billing information:| Field | Type | Description |
|---|---|---|
email | string | Customer email address |
firstName | string | Customer first name |
lastName | string | Customer last name |
country | string | Country code (ISO 3166-1 alpha-2, e.g., US, GB, PL) |
state | string | State or province |
city | string | City name |
zipCode | string | Postal/ZIP code |