Skip to main content
The client packages render the payment moment. The hosted embed (collect-js / <PulseCollectPayment>) runs inside a Pulse-controlled iframe or WebView and takes a session token (cs_*); the in-app SDK (<PulseCheckout>) renders in your own DOM with an API key. See Choose a model for the trade-off.
The framework-agnostic loader. See Embedded iframe.

PulseCollect.mount(target, options)

target is the HTMLElement to mount into. Returns an EmbedHandle.

Options — MountOptions

string
The browser-safe credential: a single-order session token (cs_*). Pass this or auth.
ClientAuth
Alternative to sessionToken — the result of useSession(cs_…).
string
Embed origin override — local dev or a partner-subdomain deployment.
string
API base the embed calls with the session token.
"payment" | "quote" | "status"
default:"payment"
Which piece to render: the full payment flow, a live quote only, or a status view only.
"select" | "direct"
default:"select"
select: the user picks asset + network inside the embed. direct: skip selection and use the values pinned at session creation.
string[]
Narrow the selectable networks. Intersected with the partner’s dashboard config — a mount can only narrow further, never re-enable a removed network.
string[]
Narrow the payable assets. Same narrowing rules as networks.
EmbedTheme
Brand tokens (see Theming).
EmbedStrings
Copy overrides for the money-moment states.
number
default:"15000"
Ms to wait for the embed’s ready signal before onError("embed_load_timeout").
() => void
(status: EmbedStatus, orderId: string) => void
(orderId: string) => void
UX signal only — credit a customer off the verified webhook, not this.
() => void
(lockedUntil: string) => void
(code: string, message: string) => void

Returned handle — EmbedHandle

HTMLIFrameElement
The mounted iframe element.
() => void
Remove the iframe and detach the message listener.

useSession(sessionToken)

Wraps a single-order session token into ClientAuth for mount / <PulseCollectPayment>. There is deliberately no useApiKey here — an API key must never ship to a browser.

Shared embed types

Exported from @pulsebyshiga/collect-js and re-exported by the React packages.
string union
loading, awaiting_payment, deposit_detected, deposit_confirmed, converting, completed, underpaid, overpaid, wrong_chain, expired, failed.
string union
payment, quote, status.
object
Brand tokens — primaryColor, borderRadius, mode, fontFamily, inkColor, mutedColor, backgroundColor, buttonTextColor, lineColor, successColor, dangerColor, pageBackgroundColor, density, minHeight, attribution. See Theming.
object
Copy overrides — title, subtitle, heroLabel, successTitle, successSubtitle, expiredTitle, expiredSubtitle, refreshButton, copyButton, copiedButton.