Skip to main content
Every browser-facing integration mounts three routes. The SDK ships them shaped for Express and Next.js, and as web-standard Request in, Response out for everything else.

Pick your adapter

CI builds every package and the Next.js example and runs the unit suites; the fetch handlers share the same core as the Express and Next.js adapters.

One handler for all three routes

For anything that mounts a prefix rather than a file per route. createPaymanRouter() returns null when the request is not Payman’s, so your own 404 stays yours.
Hono

One handler per route

For frameworks that map files or explicit paths to handlers.

Options

Both stream routes reject any request whose Sec-Fetch-Site is cross-site. {basePath}/resume/stream is not a read: it runs the stashed instruction, and that can move money. same-origin, same-site, and an absent header pass; the callback is deliberately unfenced because the consent return is cross-site. If you proxy these routes through another origin, this fence is what you hit.

Requirements

Node 22.5 or newer, on a Node-compatible runtime. Not edge: the SDK uses node crypto and node:sqlite. If more than one instance of your app can serve the same customer, move off the default embedded store to sqlStore() from @paymanai/connect/stores/sql or redisStore() from @paymanai/connect/stores/redis. A connection written by one instance is otherwise missing from the next.

No SDK for your language?

There is no SDK for Go, Python, Ruby, or the JVM yet. The full wire contract is documented in the wire protocol. Build against that, and port the security rules deliberately; none of them are enforced for you.