---
title: "Add a photo book editor to any website | Prodigi Studio"
description: "Embed the Prodigi Studio photo book editor on any web page with one container, one script and an onComplete callback that adds the book to your cart."
url: "https://studio.prodigi.com/help/html-embed"
---

# Add the photo book editor to any website

Use this guide for any site where you can edit the HTML. Add a container element, load the Studio embed script and initialise the editor with your merchant ID.

When a customer finishes their photo book, the onComplete callback receives a line item for your own cart and a Studio order reference. After payment, your server confirms the order with that reference and Studio prints and ships the book.

## HTML example

```
<!-- 1. Add a container element -->
<div id="photobook-designer"></div>

<!-- 2. Load Studio embed script -->
<script src="https://studio.prodigi.com/embed.js"></script>

<!-- 3. Initialise -->
<script>
  PhotobookGenerator.create(
    document.getElementById('photobook-designer'),
    {
      merchantId: 'YOUR_MERCHANT_ID',
      onComplete: function(payload) {
        // payload.lineItem        — sku, title, quantity, unitPrice
        // payload.order.reference — keep it with the cart line. After payment,
        //   your server sends it to POST /v1/orders/{reference}/submit
        //   and Studio prints and ships the book.
        addToCart(payload.lineItem, payload.order.reference);
      },
      onError: function(err) { console.error(err); },
    }
  );
</script>
```

## Quick embed generator

Enter your merchant ID to generate the minimal embed snippet. For the full integration with callbacks and platform-specific instructions, see the [Publish page](https://studio.prodigi.com/app/publish).

Merchant ID

Enter your merchant ID above to generate the embed snippet.

## Other guides

-   [Add the photo book editor to WordPress](https://studio.prodigi.com/help/wordpress)
-   [Add the photo book editor to Shopify](https://studio.prodigi.com/help/shopify)
-   [Add the photo book editor to Wix](https://studio.prodigi.com/help/wix)
-   [Add the photo book editor to Squarespace](https://studio.prodigi.com/help/squarespace)
-   [Create photo books with the Studio API](https://studio.prodigi.com/help/studio-api)
-   [Frequently asked questions](https://studio.prodigi.com/help/faq)
