Skip to main content
Three paths to the same flow. Pick the one that matches your stack; they all take the same options and fire the same events.
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.
That is the whole integration. Full attribute list and dynamic binding: Script tag.

JavaScript

Full reference: JavaScript API.

React

Wrap once, then drop buttons in anywhere below it:
The button is styled out of the box and takes its accent and radius from the same 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.
Keep invest() synchronous inside the click handler. An await or a setTimeout before it breaks the user-gesture chain and browsers will block the popup path — which the dialog can fall back to at any time.

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.