Guides
Integrate an antique-store POS with the terminal reference components
A read-first recipe for composing the reviewed Node terminal checkout, webhook receiver and order-evidence components into an existing antique store POS.
I built an antique-store POS. Send the trusted sale amount from my computer to a Poynt terminal and show the customer's payment result.
Start with a plan for the existing app and an isolated simulated-terminal test. The three components below supply payment plumbing, not a complete POS, browser login, inventory system or permission to use a physical device. Read this guide together with accept-a-terminal-payment, handle-every-payment-state, webhooks and troubleshoot-terminal-integration through get_doc.
1. Discover before editing or sending payments
Inspect the app's server runtime, order model, user authorization and trusted price calculation. Call get_openapi, list_snippets, and integration_checklist when the key has its required read scopes. Missing scope is an operator setup task, not a reason to try another route or key. Checklist history belongs to the platform; it does not prove this app is integrated. Availability is not permission to perform a test.
Use get_snippet with each supported ID, then read its entire README and manifest:
| Component ID | Version in this draft | Purpose |
|---|---|---|
zeropoint.node.terminal-pos | 0.3.1 | Durable order identity, at most one uncertain create attempt, and read-only recovery |
zeropoint.node.webhook-receiver | 0.3.0 | Raw-byte signature verification, durable receipt inbox, optional trusted merchant lookup |
zeropoint.node.order-payment-evidence | 0.1.2 | Trusted order binding and transactional application of inbox evidence |
Check the connected catalog rather than assuming these drafts are deployed. Unknown snippet tools mean that release lacks discovery; stop and ask for the reviewed source or a release decision. Never invent a download URL or silently substitute another payment provider. A different component version needs its own compatibility review.
These references support server-side Node.js >=24.21.0 <25, one process on one host, durable local SQLite, sandbox mode, USD and zero-tip terminal payments. They have no runtime npm dependencies. A serverless, Python, older-Node or distributed app needs a separately verified adapter; do not claim that copying these files supplies one.
The checkout needs payments:write and payments:read; an existing full sandbox key works but is not necessary. Optional setup/acceptance calls need their own permissions: create_sandbox_merchant requires merchants:write and terminals:write, terminal reads require terminals:read, event inspection requires events:read, and webhook registration/ verification requires webhooks:write. The integration checklist requires platform:read, merchants:read, payments:read, refunds:read and webhooks:read. A checkout does not need refund write access. Physical registration and other calls retain their documented scopes.
Present the proposed files, app-owned business decisions and isolated test plan to the owner. Work only within the approved plan and approved test objects. Keep credentials in server-side configuration; never put them in chat, generated client code, browser storage or reports. Do not reuse another operator's probe transactions or refund keys.
2. Copy complete bundles and run their offline tests
Place the bundles in distinct server-only directories, preserving every returned relative path, including manifests and tests. For example:
server/zeropoint/terminal-pos/
server/zeropoint/webhook-receiver/
server/zeropoint/order-payment-evidence/Verify each returned UTF-8/LF file's SHA-256 and byte size before executing anything. Do not overwrite unrelated app files. Run node --test test/*.test.mjs from each bundle directory. Terminal/evidence examples use synthetic fixtures; the receiver's example.mjs instead expects configured signing secrets and opens a loopback listener. Do not run that receiver example as though it were a credential-free offline test. Do not copy any example's TEST ONLY inbox seeding into an application path.
Passing these tests verifies the copied reference, not app authorization, hosted reachability, physical hardware or successful use by a fresh coding agent. Record every failure; do not weaken signature, ownership or duplicate-handling checks to get a green result.
3. Connect trusted order state to checkout
The host authenticates the user, authorizes the order, calculates integer cents from trusted product data, and applies its own request/CSRF/rate controls. A browser-supplied amount, webhook field or button click is not authoritative order data.
Construct TerminalCheckout as its README specifies, using the approved API origin, sandbox key, merchant and terminal. Use durable storage with a separate checkout database for that origin/merchant/terminal binding. Keep the original order ID and database across repeated clicks and restarts. Call begin({orderId, amountCents}) only for the approved logical sale; repeated calls return its stored snapshot. One logical order has at most one create attempt whose outcome is uncertain, and never two payments.
A timeout or unknown create result requires investigation and refresh(orderId) read-only recovery. Never delete the local row, change the order ID, or substitute a new payment identity to force another POST. The two exceptions go through begin() itself: after a not_submitted snapshot (the server refused the create, for example terminal_busy, and wrote no payment) the next begin() sends a new attempt, and after review_required / processor_unavailable the next begin() resends the identical request with the same Idempotency-Key, at most twice. A declined/canceled/expired order does not automatically create a replacement; the host owns any separately authorized new-sale decision.
If the host caches snapshots for a local status display, its cache needs its own crash tests. Persist an incomplete-operation marker before a refresh. A repeated begin can return an old cached success without a GET; that must not clear an interrupted refresh's uncertainty. Preserve review until appropriate read-only recovery, including across restart. Test process death during the read, not just a rejected fetch promise. This boundary was missed by the first offline agent construction and caught by independent review; copying the components does not automatically validate host glue.
4. Compose authenticated receipt and order evidence
Create the receiver's SqliteInbox first. Configure a trusted receiver namespace, signing secret and merchant allowlist. Verify exact raw bytes before JSON parsing and acknowledge only after durable inbox commit. Keep the platform API key separate from the webhook signing secret. Unknown events may be received without business effects.
Construct OrderEvidence with the same inbox database and receiverId as the receiver. Once checkout has a known payment ID, pass its locally saved binding directly:
const binding = checkout.getBinding(order.id);
evidence.registerOrder(binding);
const counts = evidence.processBatch(20);
const currentEvidence = evidence.getOrder(order.id);This is an integration point, not a complete HTTP route or application worker. Authorize access to order before it runs. Never build the binding from incoming webhook metadata. payment_unbound means recovery has not established an identity yet; unbound inbox evidence is held. Do not fabricate an ID or bypass the binding check to process it.
The checkout snapshot and evidence projection have different meanings. A checkout paid snapshot is a verified observed success with no known refund. Evidence success_observed is historical evidence, not permission to fulfill. Attention, conflicting final states, late reversal or refund evidence makes the evidence projection require review. That state is sticky; a later success event cannot clear it, and this component has no review-reset API.
listOutbox is inspection of deduplicated local evidence, not a shipping/message dispatcher. The host must check current payment truth and its own order/review policy before making transactionally deduplicated inventory or fulfillment changes. A webhook HTTP 200, a success outbox entry or a receipt URL alone cannot establish exactly-once business effects. The snapshot's validated same-origin receipt URL may be shown to an authorized customer; its hosted rendering and access still need the app's acceptance checks.
5. Validate the app and hand off honestly
Exercise repeated clicks, process restart, lost create response, decline, cancel/expiry, invalid signatures, duplicate deliveries, wrong ownership and attention after success. Assert no new create identity after uncertainty and no automatic fulfillment on review. Keep tests on synthetic credentials and fake transports until a separately approved sandbox acceptance flow is ready. The repository's tests/test_retrieved_terminal_scenario.py is a deterministic composition example; it is not a fresh-agent or deployed acceptance run.
A controlled HTTPS receiver with independent bad-signature rejection must be tested before partner reliance. The existing hosted sink's expected 3/4 is delivery evidence only, not a regression or proof of independent signature verification. Provisioning or registering a receiver, using a real terminal, deploying code and live payments need their own authorization. A physical-terminal capability flag never replaces separate hardware approval.
Report copied versions/hashes, changes outside the copied bundles, tests and actual results, manual interventions, unresolved outcomes and the next owner's action. Keep secrets, raw payloads and card data out of the handoff. Use troubleshoot-terminal-integration for a safe next action when stopped. Say explicitly what was only tested offline. Do not deploy or claim that a prototype, local fixture or historical checklist clears a release.
This recipe does not implement the salon's texted checkout, deposits, remaining balances or customer-selected tips. Those require separately selected and verified product contracts.