KulmiPay Checkout lets you accept payments without building your own payment form. You create a checkout session with your publishable key, then send the customer to a hosted KulmiPay checkout page or render it with theDocumentation Index
Fetch the complete documentation index at: https://developers.kulmipay.com/llms.txt
Use this file to discover all available pages before exploring further.
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
| Field | Type | Required | Description |
|---|---|---|---|
public_key | string | Yes* | Your publishable API key. You can pass it in the body or as X-KULMI-PUBLIC-API-KEY. |
amount | number | Yes | Amount to collect. |
currency | string | No | Currency code. Defaults to your payment settings when omitted. Common values are KES, USD, EUR, and GBP. |
email | string | No | Customer email. Used to pre-fill checkout details. |
phone_number | string | No | Customer phone number in international format. |
first_name | string | No | Customer first name. |
last_name | string | No | Customer last name. |
api_ref | string | Recommended | Your order or transaction reference. |
redirect_url | string | Recommended | URL where the customer should return after payment. |
callback_url | string | No | Compatibility field sent by the browser SDK. Use redirect_url for customer redirects. |
host | string | No | Merchant website origin. The browser SDK sets this automatically. |
method | string | No | Restrict checkout to a payment method when supported by your account settings. |
mobile_tarrif | string | No | BUSINESS-PAYS or CUSTOMER-PAYS. |
bank_tarrif | string | No | BUSINESS-PAYS or CUSTOMER-PAYS. |
wallet_id | string | No | Wallet to fund directly, when your account supports wallet funding. |
unique_api_ref | boolean | No | When true, KulmiPay returns an existing checkout for the same api_ref instead of creating a duplicate. |
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.
Sandbox and live endpoints
| Environment | Checkout API | Checkout page |
|---|---|---|
| Sandbox | https://sandbox.kulmipay.com/api/v1/checkout/ | https://checkout-sandbox.kulmipay.com |
| Live | https://app.kulmipay.com/api/v1/checkout/ | https://checkout.kulmipay.com |
