Blog › Add a 3D Box Designer to Your Print Shop Website
How to Add a 3D Box Designer to Your Print Shop's Website
By Nguyễn Thành Dân, Founder of Drint ·
A print shop can put a 3D box designer on its own website by pasting one <div> and two script lines into a page, after listing its domains on an embed key in Drint. The editor loads in a frame that only those domains may show. When a customer sends a design, the page receives the mockup picture, the print file and the dieline, and the order lands in the shop's Drint orders.
Why it matters: a shop that quotes boxes by WhatsApp or email loses the customer who wants to see the box first. An embedded designer lets that customer set the size, place the artwork and send a file the shop can actually print, without leaving the shop's own site.
Disclosure: Drint makes this editor. The steps below follow Drint's embed reference; the facts about what the embed returns are the same as on the custom website page.
Key points
- The embed needs a key made in Drint under Account → Sign-in & security → Embed keys, with the domains where the editor may open.
- The editor opens at 680 px tall by default and takes the full width of its element; a
heightoption changes it. - The result has three files: the mockup picture, the print file and the dieline, plus the size. File links last 24 hours.
- The same result goes to a webhook as
design.completed, signed with the headerX-Drint-Signature. - A Business trial runs 14 days with no card, on your own domain.
What do you need before you start?
Three things: a Drint account, a page on your site where you can edit HTML, and the domains you will use. Add localhost:PORT to the list to try the editor on your own machine first. The frame only opens on the listed domains, enforced by the browser through a Content-Security-Policy frame-ancestors rule, so a copy of your page on another site shows nothing.
How do you embed the designer?
- Make an embed key. In Drint open Account → Sign-in & security → Embed keys and list your domains. The key starts with
dre_. It is not secret: it sits in your page, and what it may do is bound to the domains you list. - Paste the embed where the editor should appear.
``html <div id="drint"></div> <script src="https://drint.io/embed.js"></script> <script> Drint.open({ el: '#drint', key: 'dre_…', lang: 'en' }); </script> ``
- Choose the options you need.
mockupopens one model,sizesets the box in millimetres,langsets the editor's language,customerpasses the buyer's details, andartworkstarts from a file you already have. - Handle the result. The
onDone(result)callback gives you the mockup picture, the print file, the dieline and the size. The same data reaches your webhook asdesign.completed.
What does the customer's design look like when it arrives?
The shop receives a real dieline at the size the customer chose, not a flat picture of a box. That is the difference that matters at the press: the die maker needs the cut and crease lines, and the customer's artwork is already placed on them. The dieline is built from the same FEFCO and ECMA structures as in Drint's dieline generator.
Links to the files last 24 hours, so save them to your own storage when the order comes in rather than linking to them later.
Which site builders does it work on?
Any builder that accepts an HTML block and lets you add a script can host it. Drint has setup pages for Shopify, WooCommerce, Wix, Squarespace, Salla and Zid. Check your plan's rules on custom code before you start: some builders allow scripts only on certain plans.
What does it cost?
The embed is part of Drint's API plans. Starter includes 1 embed domain, Business 5 and Scale 20, and an extra domain costs $19 a month ($15 on Scale). The 14-day Business trial lets you test the whole flow on one domain first. Pictures carry a watermark grid until you are on a plan. For the per-render sums see Packaging Mockup API Pricing.
What this means for print shops
Start with one product, the box you sell most often, and one page. Send yourself ten test designs, open the dielines in your own prepress workflow and note what you still fix by hand. Only then put the designer on your product pages.
Sources
- Drint, Embed reference, accessed 1 December 2026.
- Drint, Embed a 3D packaging editor in any website, accessed 1 December 2026.
- Drint, API pricing, accessed 1 December 2026.
Try it
Make an embed key in your Drint account, paste the snippet on a test page and open it on localhost. When it works, move it to your shop's domain.
Frequently asked questions
Is the embed key secret?
No. It sits in your page. The editor refuses to open, and results are not accepted, anywhere except the domains you listed.
How tall is the editor?
680 px by default. Pass a height option to change it. It uses the full width of its element.
How long do the file links last?
24 hours. Copy the files to your own storage when the order arrives.
Can I test it before paying?
Yes. The Business trial runs for 14 days with no card, once per space, on your own domain.