ZeroPointPayments

Guides

Tested integration components

Retrieve complete reviewed code, instructions and tests through MCP before building payment plumbing from scratch.

Use the component catalog to reuse server components and browser UI. Each bundle includes exact source, its README, tests, a component version and SHA-256 hashes. These are application building blocks, not an installer, an SDK, hosted infrastructure or proof that your application is ready for live money.

Agent workflow

  1. Call list_snippets to see what actually exists. Do not guess component IDs or download URLs.
  2. Call get_snippet with one returned snippet_id. The response contains id, version, mode, runtime, api_version, description, file_count, total_bytes, and a files list. Each file has path, content, sha256, and size_bytes.
  3. Read the README and the manifest before adapting anything. The manifest's guarantee is what the component promises, not_included is what stays the host's, and host_wiring lists the exact integration points the host must supply (the route that calls it, the model that feeds it, the secret store, the storage path, the worker that consumes it): walk that list against the real app and name each one in the plan. Copy all files under a new component directory, preserving relative paths and the bundle's browser/server boundary. Write the returned UTF-8 content with LF line endings and verify SHA-256 and byte sizes. Do not overwrite unrelated project files. If content/hash checks fail, stop and retrieve a clean bundle.
  4. Run the included tests using the required runtime. Do not omit tests or rewrite verification/deduplication logic to make integration shorter.
  5. Configure secrets using the application's server-side secret management. Never paste secrets, private keys, card data or production payloads into an agent conversation, browser bundle, source file or command history.
  6. Report in three parts: reused (each file installed unchanged, with component id, version and sha256 from the catalog), generated (the glue written for this app and which host_wiring item each piece supplies), and still unsupported or open. Successfully fetching code is not successful integration.

Browser UI components

zeropoint.browser.ui supplies checkout, payment-status, receipt and error panels as dependency-free browser ES modules. The host supplies data and callbacks; these components never collect card data, call payment APIs, store credentials or infer success from a callback. The bundle includes a standalone synthetic app, stylesheet and lifecycle tests. Read Place payment UI in your app for placement, state mapping and accessibility acceptance. Browser currency formatting does not expand processor capabilities.

First component: Node webhook receiver

zeropoint.node.webhook-receiver is sandbox-only, Node 24, and uses no third-party runtime packages. It verifies exact raw bytes, rejects malformed/stale signatures, checks sandbox/merchant ownership, and stores authenticated events in a local SQLite inbox before acknowledging them. It includes tests for duplicates, restarts, identity collisions and storage failures.

It does not mark orders paid, send texts, fulfill bookings, reduce inventory or enable live payments. It requires reliable local storage on one host. Do not place it in an ephemeral serverless function without designing and verifying a different durable storage adapter. Framework adapters and business-effect workers must preserve the documented raw-body and idempotency contracts.

Offline tests do not prove hosted behavior. Later, a controlled HTTPS receiver must pass the signed, fast, replay and bad-signature checks independently. The existing hosted sink intentionally passes 3/4 because it accepts bad signatures. A 2xx replay response is receipt evidence, not proof that application business effects occurred once.

Terminal POS component

zeropoint.node.terminal-pos supplies the server-side checkout portion of the antique-store POS journey. It requires Node 24, a durable local SQLite database on one host/process, an existing sandbox merchant and terminal, and payments:write plus payments:read scopes (or an existing full sandbox key).

The host app authorizes the order and computes integer cents from trusted prices. The component records a generated request identity before one create request; repeated clicks resume that record. If the response is uncertain, read-only lookup can recover the same payment. It never silently retries a create, substitutes a new order, cancels, refunds or voids. An empty lookup is not proof that no charge occurred: unresolved cases stop for operator review. Keep the database and order identity intact.

The package validates payment ownership, mode and amount before presenting a result, and treats refunded payments as needing review rather than fully paid orders. It does not supply browser authentication, inventory updates, exactly-once fulfillment, payment tips, merchant provisioning, or a complete POS. The offline example sends no external requests. Local simulated-terminal tests are not physical-hardware or live acceptance. Read the included README before adapting the component.

Subscriptions component

zeropoint.node.subscriptions is sandbox-only, Node 24, with no third-party packages. It creates a subscription-mode checkout session under a purchase key, and applies billing events only through its vendored copy of zeropoint.node.webhook-receiver (signature over the raw body, envelope, sandbox mode, merchant): once per event id in its own SQLite database, a subscription copy never overwritten by a lower object_version, access decided by status only, and the messages your app sends (renewal reminder, receipt, failed payment, access changes) queued in the same transaction. It sends no email itself. Version 0.3.0 adds one-time purchases (mode payment, fulfilled once when complete and paid), your customer and a chosen promotion_code on the checkout request, and listen.mjs, a test-mode helper that replays your events to a receiver on localhost signed with your endpoint secret (ZeroPoint cannot deliver to localhost). It also has emails.mjs: renewal reminder, receipt and failed-payment emails from the queued messages, handed to your own sendEmail (no email provider is bundled), each linking to your own manage route, and createManageRoute, that route, which opens a fresh billing portal session for the signed-in user (a portal link works once, for 5 minutes, so it never goes in an email). See build-subscriptions.

Order-payment evidence component

zeropoint.node.order-payment-evidence applies authenticated inbox events to an immutable order binding registered by the host application. It shares the webhook receiver's SQLite database and uses one transaction to record evidence, a deduplicated local outbox entry and inbox completion. No network call or business fulfillment occurs in that transaction.

With terminal checkout version 0.2.0 or later, the host can call getBinding(orderId) after a payment ID is known, then register that binding with the evidence component. The getter reads local trusted identity; it does not prove payment success. Never register orders from incoming webhook metadata. A keyed integration must supply the equivalent trusted server-side binding itself.

The projection distinguishes awaiting_evidence, success_observed, not_paid_observed and review_required. Attention, contradictory final states and refund evidence require review. A positive payment refund counter can represent a pending reservation; only a validated canonical refund-success event records completion, once per refund ID. Neither representation supplies settlement accounting.

The outbox is durable local evidence, not a fulfillment queue with an exactly-once delivery guarantee. A later event can contradict earlier success evidence. Before inventory changes, appointment confirmation or messaging, the host must apply its own current payment verification and review policy. This component has no dispatcher, review-resolution control, SMS provider or automatic payment retry. Its offline tests do not satisfy hosted signature verification or live acceptance gates.

Evaluating a composed integration

Component tests and a real coding-agent trial are different evidence. The repository's offline antique-store fixture composes the three retrieved bundles against isolated API fixtures, including response loss, replay, bad signatures and ownership mismatch. It does not establish that your agent/client connected, your hardware works or your app is deployed. Keep those checks explicit in the owner handoff.

For a terminal POS, obtain order identity and price from trusted application state, begin or recover the checkout, pass getBinding to the evidence worker, and inspect current evidence before applying your application's business policy. Never reconstruct a trusted order from arbitrary webhook metadata or count a success outbox entry as proof of exactly-once fulfillment. The salon text-link/tip/deposit workflow requires additional supported contracts; these terminal components do not implement it.

For the complete existing-app sequence, read integrate-antique-store-pos. For an observed component code or blocked inbox row, read troubleshoot-terminal-integration. Both guides are available through get_doc; neither authorizes new payment operations.

Access and errors

Snippet tools use the same authenticated documentation access as get_doc; they do not grant access to merchants, payments or any write operation. Revoked keys fail authentication. Calls consume the existing platform MCP budget and are audited without recording returned file content. No processor calls occur.

  • snippet_not_found: use an ID returned by list_snippets.
  • snippet_unavailable: the reviewed catalog or bundle failed validation or is missing; report the request ID to the operator. Do not substitute unreviewed code or bypass a hash failure.
  • parameter_invalid: the component ID is malformed or too long; a file path or URL is not an ID.

Operators maintain an explicit file inventory in snippets/catalog.json. python scripts/build_snippet_catalog.py --check checks it; the same script without --check refreshes hashes only for already-declared paths after a reviewed change. New components need an explicit inventory and their own acceptance evidence. Versions: the catalog copies each component's version from its manifest.json. A component whose files change in a release gets one version bump in that release; a version not yet released is not bumped again for later changes before the release, so a released version and its pinned sha256 values never change.