kulmipay browser SDK.
The checkout flow supports M-Pesa and PesaLink payments through the same session. Your account payment settings can control the final method order, layout, and checkout styling.
Create a checkout session
Send aPOST request to /api/v1/checkout/ with your public key and payment details. The response includes a hosted url, a checkout id, and a signature.
Request fields
* Required unless passed as
X-KULMI-PUBLIC-API-KEY.
Success response
Use the browser SDK
Install the browser SDK from npm or load it from a CDN.Popup checkout
Inline checkout
Hosted redirect
If you do not need the SDK, redirect the customer to theurl returned by the checkout API.
Idempotency with unique_api_ref
Use unique_api_ref: true with a stable api_ref when retries or page refreshes could create duplicate checkout sessions. If a checkout already exists for that reference, KulmiPay returns the existing session.
