@pulsebyshiga/node is the server component of Pulse. It runs only on your backend,
holds your API key, and talks to the Pulse engine over HTTPS. Every method returns
typed data directly and throws a typed error on failure — you wrap each call in
your own service method, exactly as you would any other vendor.
Its job in one line: turn your API key into the things the browser component needs —
a cs_ session token and a rate — without the key ever leaving the server.
Install
Construct it once
useApiKey(...) is the server credential. Constructing with an API key in a
browser throws PulseAccessError — on the client you use useSession(cs_…)
instead. See Create a session for how that
session_token is minted, and Render the payment moment
for how the client consumes it.
Your secret key (
sk_…) and any user identity (BVN/NIN) stay only between
your backend and Pulse. The browser only ever holds a single short-lived client
session token (cs_…) scoped to one order — never the secret key.