Skip to content

Your own pricing

Most shops have a price list, discounts and a customer who is on a contract. Rather than asking you to mirror all of that in a catalogue, the widget can ask you.

DuorEmbed.createConfigurator('kitchen-terra', el, {
publicKey: 'pk_live_…',
priceRequest: async (bom) => {
const res = await fetch('/api/price', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify(bom),
});
return res.json();
},
});

bom is the bill of materials: lines with skus, quantities and the finishes on each. You answer { cents, currency }.

The total becomes yours. The bill of materials underneath stays the catalogue’s arithmetic, and the “confirmed by the server” note disappears — we will not put our name on a number we did not compute.

Three seconds, then the catalogue’s own price is shown instead. A configurator that hangs while a shop’s pricing service thinks is a configurator somebody closes.

If the widget is embedded somewhere you cannot run JavaScript, leave priceRequest out and read GET /v1/partner/configurations/:shortId when the order arrives. The visitor then sees the catalogue’s price while they build, and your own on the invoice — which is honest as long as they are not far apart.