Framework ยท Node.js
Node.js Beta
Server-side Node.js client with a checkout flow that confirms payment through the status API.
| Version | 0.1.0 |
|---|---|
| Compatibility | Node.js 18+. No runtime dependencies. |
| Install | npm install from integrations/node-sdk. It is not published on npm. |
| Source | integrations/node-sdk |
| License | MIT |
| Sandbox | Sandbox is the organization status on the wallet. In sandbox mode the client refuses the production host, requires sandboxHostVerified, and accepts only 256770000001 to 256770000004. Live mode requires allowLivePayments. |
Supported in this version
- Every merchant API route
- TypeScript types
- createPaymentFlow for start, callback, and confirm
- Status-API amount, reference, and UGX check
- Uncertain deposit responses stay pending
- Sandbox and live safeguards
- API key redacted from errors
Install
- Run
npm install ../ssentezo_wallet/integrations/node-sdkfrom your application. - Create
new SsentezoClient({ apiUser, apiKey, baseUrl })on the server only. The constructor refuses to run in a browser. - Wire
createPaymentFlow()to your pay, callback, and status routes. The README has an Express example. - Run
npm testinintegrations/node-sdk. The tests use a fake transport.
Checkout
start() sends one POST /api/deposit and leaves the order pending. handleCallback() reads only the reference from the unsigned callback. confirm() calls POST /api/get_status/{externalReference} and marks the order paid only for SUCCEEDED with the same reference, amount, and UGX.
Ssentezo Developers