Connecting Loyverse turns petakopi into the analytical layer on top of your point-of-sale: receipts flow into Pulse, variants you map become per-recipe sales on the Recipes index, and the revenue burn chart gets a real “actual” line to plot. This page covers what connecting does, what data we copy, how to disconnect, and how to wipe everything if you change your mind.Documentation Index
Fetch the complete documentation index at: https://docs.petakopi.my/llms.txt
Use this file to discover all available pages before exploring further.
What you get from connecting
- Receipts in Pulse — every Loyverse receipt projects into Pulse Summary’s actual-this-month panel and the burn chart’s actual line within ~6 seconds via webhook.
- Verdict emails — daily recap, weekly verdict, monthly verdict cadences only fire once Loyverse is connected (otherwise there’s no revenue to summarise).
- Per-recipe analytics — map Loyverse variants to local recipes via Loyverse Items and the Recipes index gains “Sold this month / Revenue / Gross margin” columns.
The consent page
Before OAuth runs, petakopi shows you a dedicated consent page at/manage/<slug>/loyverse/connect. The page spells out:
- What we copy. Encrypted access and refresh tokens, every receipt as a full JSONB payload (line items, modifiers, payments) plus extracted columns for fast queries, your item catalog, and derived
RecipeSalerows for any variant you’ve mapped. - What we don’t copy. Customer profiles, employee records, staff timesheets, anything outside the receipt + items endpoints.
- Why we copy each piece. Receipts power Pulse and the verdict emails; items power the variant-to-recipe mapping; the encrypted refresh token lets us pull new receipts in the background without asking you to log in again.
- Who can see it. You and any owners you’ve added. petakopi staff don’t open Loyverse data day-to-day — only when you specifically ask for help (e.g. troubleshooting a missing receipt).
- The webhook. petakopi sets up the Loyverse webhook for you automatically. You don’t configure anything in the Loyverse merchant dashboard — the consent copy makes this explicit so you’re not waiting for a manual step.
Connecting
Open the Manage Dashboard
/manage/<slug> — the Loyverse POS card sits with the rest of the integration cards.Click Connect Loyverse
Lands you on the consent page (above), not directly on Loyverse’s OAuth screen.
Tick the agreement and continue
petakopi records the consent, then redirects to Loyverse’s OAuth authorize page.
Authorize on Loyverse
Loyverse asks you to grant petakopi read access to receipts and items. Approve, and Loyverse redirects you back.
Disconnecting (soft)
If you want to stop receipts flowing in but keep what’s already imported, click Disconnect on the Loyverse POS card on the Manage Dashboard. What disconnect does:- Tears down the webhook subscription on Loyverse’s side, so no new receipts arrive.
- Flips an internal
disconnected_atflag on your Loyverse connection. - Keeps every previously-imported receipt, every recipe-sale record, and the verdict history. Your existing emails and Pulse pages keep working from the captured window.
Wiping all Loyverse data (hard)
Below “Disconnect” on the Loyverse POS card, there’s a destructive Wipe all Loyverse data button. Use this when you want petakopi to forget you ever connected Loyverse — for example, you’re handing the shop over, you’re done evaluating petakopi, or you simply want a clean slate. What wipe does:- Calls Disconnect (above) — webhook is torn down on Loyverse’s side.
- Deletes every
LoyverseReceipt,LoyverseItem,RecipeSale, and Loyverse-sourcedSalerow for your shop. - Destroys the connection record so the encrypted access and refresh tokens are gone from our database.
- Resets your consent flags so the next time you connect, you re-read and re-accept the disclaimer.
Asking us to wipe on your behalf
If you can’t sign in (e.g. you’ve lost access to the owner account) but want your Loyverse data deleted, contact petakopi via the support channel listed on the consent page. An admin can run the same wipe from/admin/coffee_shops/:id — same scope, same side-effects, just executed by staff at your request. The action is logged with the admin user id for audit.
