How It Works
- A guest places an order. storekit sends
order.created.v2to your app. - Your app turns the order into a ticket in your layout and puts it in a print queue.
- A Star CloudPRNT printer, configured to point at your app instead of storekit, polls the queue every few seconds, prints the ticket and confirms it.
What You Need
- Webhooks enabled on your storekit plan (Settings → Developers).
- A Star Micronics CloudPRNT printer that is not connected to storekit: a TSP100IV, mC-Print2, mC-Print3 or SP742 with the CloudPRNT firmware. If you already have one of these connected under Direct Printing, you need a second one — a printer can only poll one server.
- The printer’s web configuration page, reached by its IP address on your network (see the printer’s manual for how to print its network settings).
- A Replit account. This recipe needs a public URL that stays up 24 hours a day plus a small database, which Replit provides. Lovable or Bolt work if you attach a backend; see Choosing a Builder.
Step 1: Build the App
Paste the whole of the block below into the builder in a single message. Edit the section marked MY TICKET LAYOUT first — that is your layout, and the example is only a starting point.Either button opens the builder with the whole prompt below already filled in. Nothing starts until you press send, so read it through and edit the parts marked as yours first.
Full prompt (click to expand)
Full prompt (click to expand)
/admin, click the test ticket button, and read the rendered ticket text in the queue — you can adjust the layout with follow-up messages now, before a printer is involved.
Step 2: Connect storekit
1
Open the webhooks portal
In the dashboard sidebar, go to Settings → Webhooks. If your plan includes webhooks and they are not yet enabled, click Enable Webhooks. If the page shows Upgrade to enable webhooks, contact support to discuss adding webhooks to your plan.
2
Add your app as an endpoint
In the embedded portal, add a new endpoint, paste the webhook URL your app builder gave you, and tick only the event types the recipe needs.
3
Copy the signing secret into your app
Open the endpoint you just created and copy its signing secret. In your app builder, save it as the environment variable
STOREKIT_WEBHOOK_SECRET (builders call this “secrets” or “environment variables”). Redeploy if the builder asks you to.4
Send a test event
Use the portal’s test option on the endpoint to send a sample event. The delivery log shows the response code from your app. A
2xx means your app accepted it; anything else, read the response body in the log — it is usually a missing secret.order.created.v2 for this endpoint. The webhook URL is the one ending in /webhooks/storekit.
Step 3: Point the Printer at Your App
1
Open the Star printer's own web page
Print the printer’s network settings (the method varies by model — typically holding the feed button while powering on) and open the IP address shown in a browser on the same network.
2
Enter your app's URL
On the printer’s web page (Star’s interface, not the storekit dashboard) find the CloudPRNT settings and enable them. Enter the printer URL your builder gave you (the one containing
/cloudprnt/ followed by a long token — keep that token private, it is what stops anyone else reading your tickets) as the server URL, set a polling interval of a few seconds, and save. The exact field names vary by model and firmware; Star’s manual for your printer is the reference.3
Check the printer is polling
Reload
/admin. The printer indicator turns green as soon as the first poll arrives. If it stays red, the printer cannot reach your URL — check that the URL is https://, that you saved the settings, and that the printer has internet access.4
Print a test ticket
Click the test ticket button on
/admin. The printer picks it up on its next poll.5
Place a real order
Order something small on your own storefront. A ticket in your layout should print within a few seconds of the order confirmation.
Ideas for Your Layout
Once the basic ticket prints, the layout is a follow-up message to the builder away:- Station sections: group items by category into GRILL / COLD / DRINKS blocks, or queue a separate ticket per section.
- Allergen matrix: print a row of allergen abbreviations under each item from the item name or a lookup table you maintain in the admin page.
- Course markers: print a ”---- MAINS ----” divider based on category.
- Collection time countdown: for pre-orders, print “READY IN 45 MIN” from the requested time.
- Two copies: queue the ticket twice — one for the pass, one for the driver.
What This Does Not Do
- It does not change storekit’s ticket. storekit prints to the printers under Direct Printing as before. If you want only your custom ticket, remove the printer from Direct Printing and point it at your app instead — but then storekit no longer knows the printer exists, so Printers status,
printer.status.offlinealerts and storekit’s print log do not apply to it. - It is your service. storekit support can confirm an
order.created.v2delivery reached your URL and what response it got; they cannot see or fix the app. If it stops printing, start at/adminand the delivery log in the webhooks portal. - Cancellations are not printed unless you add them:
order.canceledis a separate event, and a “CANCELLED” ticket is a natural next follow-up prompt. - Plain text only. Logos, barcodes and large fonts need Star’s binary formats, which the builder can add later if you ask for
application/vnd.star.starprntsupport.
Related
Writing a Prompt That Works
The structure behind this prompt, and what to say when the builder gets it wrong.
Printer Setup
storekit’s own printing, including how to connect a Star CloudPRNT printer to storekit.
order.created.v2 payload
Every field available for your layout.
Verifying Signatures
What the builder is doing when it checks the Svix headers.