Skip to main content
payluk-escrow-inline-checkout is a lightweight, TypeScript-first client SDK that opens a hosted escrow checkout widget directly in your web app. It loads the widget script for you, exposes a promise-based pay() function, and ships an optional React hook and button.

Zero script tags

The widget script is injected automatically — no manual <script> to add.

TypeScript-first

Full type definitions for every option, result and error.

Multi-escrow

Pay one or many escrow tokens in a single checkout session.

React-ready

Optional useEscrowCheckout() hook and <EscrowCheckoutButton> component.

How it fits with the REST API

The SDK doesn’t replace the REST API — it pairs with it. Your backend creates escrows and produces payment tokens; your frontend hands those tokens to the SDK to collect payment.
1

Create an escrow (server)

Call Create escrow (or Create milestone escrow) with your secret key. Keep the returned paymentToken.
2

Launch checkout (client)

Pass the paymentToken to the SDK’s pay() with your publishable key. The widget collects payment and funds the escrow.
3

Settle (server)

Confirm delivery or resolve disputes through the REST API as usual.

Installation

npm i payluk-escrow-inline-checkout
Requires a browser environment. React is an optional peer dependency (react >= 17) and is only needed if you use the React entry point.

Keys & environments

The SDK authenticates with a publishable key, which is safe to ship in client-side code. Your secret keys must stay on your backend.
Never put a secret (sk_…) key in front-end code. The SDK only needs the publishable key; all sensitive operations (creating escrows, releasing funds) happen server-side with your secret key. See Authentication.

Next steps

JavaScript / TypeScript

Initialize once and call pay().

React

Use the hook or the drop-in button.

Error handling

Handle EscrowCheckoutError codes.

SDK reference

Every type, option and default.