Browser widget quick start
Use this when the shopper personalizes before adding a product to cart.
<script src="https://cdn.stackfill.com/widget/v1.js" async></script>
<button
data-stackfill-open
data-stackfill-key="stackfill_live_pk_REPLACE_ME"
data-stackfill-product="business-card"
data-stackfill-variant="standard">
Personalize
</button>
window.addEventListener('stackfill:saved', (event) => {
cart.attach({ stackfill_fill_id: event.detail.fill.id });
});
Read the embed widget guide
Server-minted session quick start
Use this when your backend controls customer, cart, order, or metadata values.
curl https://api.stackfill.com/v1/embed/sessions \
-H "Authorization: Bearer stackfill_live_sk_REPLACE_ME" \
-H "Content-Type: application/json" \
-d '{
"external_product_id": "business-card",
"external_cart_id": "cart_123",
"customer": { "email": "customer@example.com" }
}'
Read the server sessions guide