Websites and builders
Webflow
Add one script to your Webflow site settings and any button, link block or div can open a Plandalf checkout. You can also show a checkout or a deadline timer right in the page.
Webflow only lets you add custom code on a paid Site plan, or a Core, Growth, Agency or Freelancer Workspace plan.
Add the script
These are the steps your checkout's Share screen shows for Webflow. Copy the snippets from there and they already hold your script address and checkout slug.
Install the SDK
Site Settings → Custom Code → Footer Code. Paste the script tag.
<script async src="https://YOUR-ORG.plandalf.dev/js/plandalf-sdk.js"></script>Add the trigger button
Select a Button element on your page. In Element Settings → Custom Attributes, add each row from the table:
data-plandalf-present = YOUR-CHECKOUTPublish
Publish the site — the SDK auto-discovers the element on load. Webflow only injects Custom Code on publish, not on save.
Make the first open instant (optional)
Paste this under the SDK script tag on the pages that hold the trigger. It fetches the checkout UI (about 1.2 MB) in the background while the page sits idle, so the click only pays for creating the session. Leave it off pages with no checkout: visitors download it whether or not they buy. In a React app, call sdk.preload('checkout') from the ready callback in an effect instead.
<script> // Optional: fetch the checkout UI while the page is idle, so the first click opens at once. window.plandalf = window.plandalf || function () { (window.plandalf.q = window.plandalf.q || []).push(arguments); }; plandalf('ready', (sdk) => sdk.preload('checkout')); </script>
Any clickable element works (Link Block, Div, Button) — Webflow just needs the data attributes attached.
Paste the script once, in Site settings → Custom code → Footer code, not in each page's settings. Webflow adds custom code only when you publish, so the Designer canvas and an unpublished save won't run it.
Open a checkout from a button
Select a Button, Link Block or Div Block, open Element settings → Custom attributes and click +. Add the name data-plandalf-present with your checkout's slug as the value.
| Name | Value |
|---|---|
data-plandalf-present | YOUR-CHECKOUT |
data-plandalf-frame (optional) | modal, slideout, bottom or fullscreen |
If the element is a link, leave its link setting empty or set to #, so the click opens the checkout instead of leaving the page. Publish to see it work. More options are in Buy buttons.
Show a checkout on the page
Drag a Code Embed element where the checkout should appear and paste:
<div data-plandalf-mount="YOUR-CHECKOUT" style="min-height: 480px"></div>
The checkout fills the element. Change min-height to suit your layout, then publish.
Show a deadline timer
Add a Div Block where the countdown belongs and give it the custom attribute data-plandalf-promo with your deadline timer's slug. The script draws the live countdown inside it. To charge the deadline timer's current price, add data-plandalf-apply-promo with the same slug to your buy button.
<div data-plandalf-promo="YOUR-PROMO"></div>
<button data-plandalf-present="YOUR-CHECKOUT" data-plandalf-apply-promo="YOUR-PROMO">Buy Now</button>
See Countdowns.
Check it's working
Open the published site
Use a private window, so you see what a buyer sees. In the browser console, type
plandalf: you should see a function.undefinedmeans the script isn't on the page.Click your button
The checkout opens over the page.
Make a test purchase
Add your Webflow staging address, such as
your-site.webflow.io, in Plandalf under Settings → Advanced → Test domains. Checkouts there use Stripe test cards while your custom domain stays live. See Test mode.
If it isn't working
- Publish again after every change to custom code or attributes. Check the domain you published to is the one you opened.
- Make sure the script is on the page only once. A second copy in page settings or an embed isn't needed.
- Check the attribute name is exactly
data-plandalf-presentand the value matches the slug on the Share screen. - Add
data-debug="true"to the script tag and the console logs each step the script takes.
See Troubleshooting.
