A plugin from outside PopCraft
Popprint is the worked example. Its source does not live in this repository. It is a plugin you install from the marketplace, and the service it talks to is its own site. That is the shape a third-party integration takes: your code, our editor, payment on your domain.
What it does
From an open comic, Popprint offers two actions.
- Print a copy uploads the print pages and opens a private checkout. The order is not listed for sale.
- Sell this comic publishes a public page on the Popprint site. Anyone with the link can buy a printed copy. A later run updates the artwork on the same page.
Popprint prints through Mixam and takes payment with Stripe, including Apple Pay. Sellers connect a Stripe account and keep their share of a public sale. PopCraft does not process that payment.
What the marketplace listing has to say
The plugin id is popprint.comics. It asks for read, export and network. The description says that it
uploads the file's print-page PDFs to Popprint. A network plugin that sends file contents without saying so
does not pass review.
People install it from the marketplace (/marketplace/plugin/popprint.comics), not by being handed a zip.
The same shape, for your own service
- Keep the plugin in your repository:
manifest.json,main.js, andui.htmlif you show a panel. - Ask only for the permissions you use. If you upload the file, say where it goes, in the description.
- Export with
exportNode.PDFis 300 dpi, with bleed and no crop marks. - The sandbox cannot open a tab. Call
openExternalwith anhttpsURL (httpis only allowed on localhost). Your server must allow cross-origin requests from an opaque origin. - Publish from Manage plugins… → Publish from file…. The first version stays in review until it is approved. After that, anyone can install it.
- Take payment on your site. A hosted Checkout session is enough for Apple Pay once the domain is registered with your payment provider. If other people sell through you, connect their accounts there. PopCraft does not take a cut of that sale.
Store the id of the thing you published in popcraft.storage, so the next run updates it instead of creating
a second one.