Framework ยท React
React Beta
Hook and form that talk only to your server. The API key never reaches the browser.
| Version | 0.1.0 |
|---|---|
| Compatibility | React 17+. Plain ES modules, no build step. |
| Install | npm install from integrations/react-ssentezo together with integrations/node-sdk on the server. Not published on npm. |
| Source | integrations/react-ssentezo |
| 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
- useSsentezoPayment hook
- Unstyled SsentezoPayForm
- Polling with timeout and cleanup
- Browser sends only the phone number
- Example node:http server
- End-to-end test against a fake API
Install
- Install
integrations/node-sdkon your server andintegrations/react-ssentezoin your React app. - Add a pay route and a status route on your server.
example/app.mjsis a working reference. - Render
<SsentezoPayForm startUrl statusUrl onPaid />, or build your own UI withuseSsentezoPayment.
Checkout
The browser posts only the phone number. Your server loads the amount from the stored order and calls the API. The form polls your status route, which calls the status API. A browser state of paid only reflects what your server confirmed.
Ssentezo Developers