1. Initialize
Call initEscrowCheckout once, as early as possible (e.g. at your app’s
entry point). This registers your publishable key and prepares the widget
script.
initEscrowCheckout(config: InitConfig) accepts:
2. Collect payment
pay() opens the checkout widget for one or more payment tokens. It returns a
Promise<void> that resolves once the session has been created and the widget
launched.
pay() parameters
pay() must run in a browser. Calling it during server-side rendering throws an
EscrowCheckoutError with code BROWSER_ONLY. Calling it before
initEscrowCheckout() throws NOT_INITIALIZED.
Multi-escrow checkout
Pass an array of tokens to settle several escrows in a single session:
All tokens in a multi-escrow checkout must belong to the same merchant and
each escrow must still be in PENDING status (not yet funded).
TypeScript
The SDK is written in TypeScript and ships its own types; no @types package
needed. Import the types directly when you need them:
See the full SDK reference for every exported type.