Links and prefilled values
Start a checkout with one offer, a quantity or a discount code, from install code or a hosted link.
You can start a checkout with three values: which offer it sells, how many, and a discount code. None of them sets a price: Fungies prices every checkout from the element you published, whatever the page or link says.
| Value | Install code | Hosted link |
|---|---|---|
| One offer | data-offer | offer= |
| Quantity | data-quantity | quantity= |
| Discount code | data-discount | discount= |
| Palette | data-appearance | appearance= |
Buyer details
The buyer types their own e-mail, name, country and the rest of their billing details inside the checkout. Neither the install code nor a link can fill them in: buyer details never travel in a page's markup or in an address, where other scripts, logs and browser history could read them.
Hosted links
The Checkout page shows each element's hosted link on your store's address:
https://yourstore.fungies.io/element/v2/hosted/2f5d0b4e-9a1c-4c7a-b0d3-1c9f6a2e7b41Add values after a # at the end of the link, separated by ;, in any order:
https://yourstore.fungies.io/element/v2/hosted/2f5d0b4e-9a1c-4c7a-b0d3-1c9f6a2e7b41#offer=7d0f3c8a-2f4e-4b8e-9a51-0c6f1e2d3b4a;quantity=2;discount=SPRING10The part after # stays in the buyer's browser: it is never sent to a server.
quantityapplies to one offer: name it withoffer, unless the element sells a single offer.- A link with a value the checkout cannot take, such as a quantity above what the offer allows,
an offer the element does not sell or an empty
discount=, shows an error instead of the checkout. - URL-encode a discount code that holds anything but letters and digits.
Palette
Where the element's design follows the buyer's device, the Checkout page lets you pick the
palette for the link. That adds #appearance=light or #appearance=dark to the end of the link,
which combines with the values above: #appearance=dark;offer=….
An element designed light-only or dark-only ignores it.
Discount codes
A code from the install code or a link fills the discount field, open so the buyer sees it and can change or remove it. It is checked when the price is calculated: an unknown, expired or inapplicable code is shown to the buyer as such, and the checkout goes on without it. A code the buyer has already typed is never replaced.
Quantity
The quantity applies to the one offer the checkout sells, and must be within what that offer
allows. An offer with a fixed quantity takes only 1. The buyer can still change an adjustable
quantity in the checkout.
Links from earlier install code
Hosted links in the older form, with fngs- query parameters, keep opening the checkout. Of their
values, only fngs-quantity and fngs-discount-code are used, and the quantity only on an element
that sells a single offer. Buyer details (fngs-customer-…) and custom
field values in such a link are dropped.
Last updated