ZeroPointPayments

Guides

Place payment UI in your app

Reuse checkout, status, receipt and error panels with explicit host callbacks and uncertain-outcome handling.

The browser bundle provides four working presentation components. Your host supplies authorized order data, current payment state and callbacks. The bundle has no payment execution, card fields, network calls or browser storage.

Retrieve and try it

  1. Call list_snippets, then get_snippet with snippet_id: "zeropoint.browser.ui" if listed. Availability follows the deployed catalog; do not assume a draft branch is deployed.
  2. Copy the complete bundle to a new folder, preserving paths and verifying the returned hashes. Read its README. Run node --test test/*.test.mjs with Node 20 or newer.
  3. Run the bundled python serve.py and open http://127.0.0.1:8011/example.html. This local-only server explicitly serves .mjs as JavaScript; generic static servers on Windows may use an incorrect MIME type. Opening the file directly does not load browser modules reliably.
  4. Try every synthetic state. Controls log UI intents only. Check that changing success to unknown removes receipt access and never offers another checkout automatically.
  5. Copy ui-kit.mjs and ui-kit.css into your app's static assets. Load the stylesheet and mount into an empty element. There is no build step or runtime package dependency.

Minimal host adapter

HTML
<link rel="stylesheet" href="/assets/ui-kit.css">
<div id="checkout"></div>
<script type="module" src="/assets/checkout.mjs"></script>
JavaScript
import { mountCheckout } from './ui-kit.mjs';

const checkout = mountCheckout(document.querySelector('#checkout'), {
  title: 'Your order', amountMinor: 1299, currency: 'USD', state: 'ready',
  onCheckout: ({ signal }) => host.openAuthorizedPaymentFlow({ signal }),
});
// Publish only state verified by your host integration:
checkout.update({ state: 'processing' });
// On navigation or a change of order:
checkout.destroy();

host is a placeholder for your application, not a supplied SDK. Callback completion does not update payment state. The checkout remains locked until an explicit host state update. Set ready again only when the host establishes that starting a payment is appropriate. Never reuse a mounted checkout for a different order; destroy and remount.

Component reference

Every export accepts (targetElement, props) and returns update(partialProps) and destroy().

ExportIntent callbackEnabled condition
mountCheckoutonCheckoutValid amount and currency, ready, callback present, no pending action
mountPaymentStatusonRefreshPending, processing, expired or unknown, callback present
mountReceiptonReceiptConfirmed succeeded, valid amount, receiptAvailable true, callback present
mountPaymentErroronReviewDeclined, canceled, expired or unknown, callback present

Props include plain-text title, integer amountMinor from 0 through 999999999999, uppercase currency, state, and boolean receiptAvailable. Currency formatting is display support, not a claim that the payment API accepts every displayed currency or amount. Callbacks receive a frozen snapshot containing state, amountMinor, currency and an abort signal. The host owns receipt access; no arbitrary receipt URL is accepted.

Map state explicitly

UI states are ready, pending, processing, succeeded, declined, canceled, expired, and unknown. These are a presentation vocabulary, not a replacement for the API schema. Map only a confirmed processor decline to declined. Generic API failed, a timeout, an unrecognized state or a network failure must not be interpreted as a decline or proof of no charge. Use unknown until the host establishes a more specific outcome. Expiration alone does not establish what happened to a payment.

Updates preserve native controls. When a focused action becomes disabled, focus moves to its feedback or current outcome; clearing focused feedback moves focus to the new outcome. These text targets do not add Tab stops, and updates do not take focus from elsewhere in the host app. Destroy aborts callback signals and suppresses late feedback; aborting UI work does not cancel an operation already sent. Component guards do not supply backend idempotency or prevent duplicate requests from another tab. Read payment states and integration components before wiring callbacks.

Use the workspace

Open UI components for the same module running inside the console. Open Documentation to search guide bodies and read examples. In Projects, save your app profile, selected components and implementation notes, then copy the brief to your coding agent. Projects are shared by authorized console members of your platform, with a maximum of 20 projects. Any console member can read them; saving or deleting one requires access that includes projects:write, which read-only access does not. Save explicitly before leaving.

Evidence selections are your team's observations, not automatic verification. Record commands, results and remaining work in notes without including credentials or customer data. A saved project does not connect an agent, deploy code or verify a sandbox transaction. If another session changed the project, preserve your brief and reload before reconciling edits.

Acceptance in your app

Check keyboard activation, visible focus, narrow layouts, both component themes and 200% zoom. Use a real screen reader to confirm names, disabled states and live payment announcements in the host application. The bundle's automated tests and console preview do not establish screen-reader acceptance or payment integration readiness. Keep UI, local component, hosted sandbox and physical-terminal evidence separate.

Keyed checkout needs one manual step. Card tokenization refuses browsers driven by automation tools with RECAPTCHA_DECLINED (processor behaviour, VERIFIED 10/18/2026), so a scripted test cannot obtain a nonce: enter a test card by hand in a real browser. If your app sends a Content-Security-Policy, its frame-src must allow the hosted card form's host; the hosted card form concept lists what loads inside it.