run(). Read it when porting to a runtime the SDK does not cover, or to see exactly what the SDK sends on your behalf. Schemas for every request and response are in the API reference tab, which carries these seven operations and nothing else: everything else the platform serves belongs to the console, not to your app.
Four HTTP calls and one browser redirect: the token exchange, interact (blocking or streaming, one call on two routes), the approvals poll, and user-action. Consent is a navigation, never an API call. Two optional GETs sit beside them: /connect/tool-definition (unauthenticated, static) and /connect/apps/me (the app self-read).
Two base URLs appear below, and they are different hosts. The developer console shows both for your app; the SDK resolves both from your app key.
Runtime calls need the first two together. Either one alone is a 401.
The consent redirect
Build the link on your server and navigate top-level. No iframe, no popup: the customer is signing in to Payman. The SDK’s popup consent depends on the SDK-served callback page; hand-rolled flows keep the plain navigation.Node
scopes is optional and defaults to interact, the only scope.
On your callback, verify state first:
Node
POST /connect/token
The only credential call in the handshake. The browser is not part of it.
Node
POST /connect/interact
Node
message labelled as the customer’s own agent. POST /connect/interact/stream is the same call on a second route: that same customer-side agent’s NDJSON relayed verbatim, one JSON object per line, with x-paygent-environment as the stream’s only environment signal.
Result names, wire and SDK
The served tool definition names four results; the SDK renames two of them.GET /connect/tool-definition carries this mapping machine-readable as wireMapping.
GET /connect/approvals/{ref}
Poll the ticket the interact response named.
Node
approvalUrl is present only while state is pending. Send the customer there: the owner approves on Payman’s page with an emailed code, and there is no endpoint through which your app could approve or submit one. A 404 is a uniform refusal, never a verdict; keep polling until the clock runs out.
The wire reports five states. consumed means the gate spent the ticket, which happens before the bank is called, so the SDK derives two states from it:
POST /connect/interact/user-action/{userActionId}/{action}
A run can stop to ask a question: which vendor, confirm this transfer. The question arrives as a frame on the stream carrying userActionId, a field key, and the options. Answer it here; the path accepts submit, cancel, resend and expired, and apps send the first three.
Node
submit carries a body, and the body is always a chosen option id: never free text, never a code. cancel and resend post empty.
That is the whole protocol. After the consent return, answer the question the customer asked before the detour: the SDK stashes and replays it for you; hand-rolled, the stash and the replay are yours.
