Commit Widget
The Commit Widget is the most-used widget. Place a button on your page; on click, it opens a modal that:
- Connects the buyer's wallet.
- Shows the offer details.
- Handles ERC-20 approval if needed.
- Calls
commitToOffer. - Confirms success and shows the new voucher (rNFT).
Embed
<script src="https://widgets.bosonprotocol.io/scripts/boson-widgets.js" async></script>
<button
id="boson-commit"
data-config-id="production-137-0"
data-seller-id="12"
data-product-uuid="ec00f1a5-2c96-4d22-9d80-2a7c12345678">
Buy now
</button>Key attributes
| Attribute | Required? | Notes |
|---|---|---|
id="boson-commit" | Yes | Marker so the widget script finds the button |
data-config-id | Yes | See Networks → ConfigIds matrix |
data-seller-id | One of these | Targets all offers from one seller |
data-product-uuid | One of these | Targets a specific product (incl. variants) |
data-bundle-uuid | One of these | Targets a bundle |
data-offer-id | One of these | Targets a single offer |
data-account | No | Restrict to one buyer wallet |
data-look-and-feel | No | "modal" (default) or "regular" |
Full list at Reference → Widget URL params.
Variants & products
If you publish 3 variants under one productUuid, the widget lets the buyer pick a variant before committing. Each variant is its own offer underneath.
Programmatic open
If you don't want a button:
window.boson.openCommit({
configId: "production-137-0",
sellerId: "12",
productUuid: "...",
})Common gotchas
- Wrong chain. The buyer's wallet must be on the chain that matches
configId. The widget prompts a switch. - Iframe ancestors. If you embed inside another iframe, ensure the buyer's wallet provider supports nested-iframe access (some don't).
- CSP. Allow
widgets.bosonprotocol.ioinscript-srcandframe-src.
Next
- Embedding methods — iframe and Zoid alternatives.
- Configuration & ConfigIds.
- Postback URLs & deep links.