Checkout Elements

Checkout Elements Overview

Put your Fungies checkout on your own pages: embedded, as an overlay, or as a hosted link.

A checkout element is a checkout you put on your site. It sells the offers you pick for it and is drawn in the design you give it in the dashboard. You create and style it in the Frontends builder, publish it, and copy its install code from the Checkout page.

There are three ways to reach one element:

ModeWhat the buyer seesWhat you add to your page
EmbedThe checkout drawn inside a box on your pageA container and one script tag
OverlayA dialog over your page, opened from your own buttonA button and one script tag per button
HostedA full checkout page on your store's addressNothing: share the link from a button or e-mail

The element's default mode is set in the builder. The install code always states its own mode, so code already on your page keeps its shape when you publish again.

Checkout elements are published in live mode only. Build and test the design in test mode, then switch to live mode to publish and copy the install code. See Test mode and live mode.

Where the checkout can run

An embedded or overlay checkout loads only on the hosts listed for your workspace under Allowed checkout hosts. Everywhere else the browser refuses the frame. A hosted link needs no entry.

Install code

Open Checkout in the dashboard, pick the element and copy the code under Embed or Overlay. For an embed it looks like this:

<div id="fungies-checkout-1"></div>
<script
  src="https://yourstore.fungies.io/element/v2/loader.js"
  data-checkout="2f5d0b4e-9a1c-4c7a-b0d3-1c9f6a2e7b41"
  data-target="#fungies-checkout-1"
></script>

The script comes from your own store's address. It loads the current checkout version, checks it against its integrity hash, and draws the element into the container. There is no package to install and no version to update: the same tag keeps working as the checkout is updated.

The attributes the tag reads are listed in Install code attributes. Events your page can listen to are in Events and options.

What the buyer fills in

The buyer types their details, the discount code and the payment inside the checkout frame. Your page never sees what they type, and no event carries it. Use webhooks to learn about each paid order on your server.

Your install code can start a discount code, a quantity and a single offer. See Links and prefilled values.

Browser support

The checkout supports Chrome and Edge 106 or later, Safari and iOS 16.4 or later, and Firefox 110 or later.

Next steps

Last updated