You need a publishable key (
cesto_pk_…) and the origins you will embed from registered
against it — see API keys. And a basket slug: the last path
segment of app.cesto.co/product/<slug>.Script tag
For static sites, CMS pages, Webflow, or anywhere you can only add HTML. The IIFE bundle auto-binds every[data-cesto-invest] element on DOMContentLoaded and exposes
window.Cesto.
JavaScript
React
theme
as the dialog, so the two always match. Full reference: React.
Verify it works
Open your page and click the button. In order, you should see:1
The dialog appears
A backdrop plus a centered modal (a bottom sheet on mobile) rendered by the invest app
inside the frame.
onReady fires just before it becomes visible.2
Your branding switches on
onVerified fires with { partner } once the backend matches your key to this origin.
If it never fires, the origin is not registered — the flow still works, just unbranded.
See Troubleshooting.3
The invest completes
onSuccess with { basket, amountUsd, status } — or onScheduled if the market is
closed and the invest was queued for market open.Next
Theming
Match the dialog to your site with eight tokens.
Events
What each callback means, and how often it fires.
Modes
Dialog vs popup, and what happens when a login can’t be framed.
Troubleshooting
Popup blockers, COOP, CSP, and testing locally.