POSTURL:
https://app.kulmipay.com/api/v1/payment/collection/
Authentication
Authenticate with a Bearer token or by passing yourpublic_key in the request body. Do not use both at the same time.
Request
Required fields
string
required
Payment method to use. Currently supported values are
M-PESA and PESALINK.string
required
Transaction currency. One of:
KES, USD, EUR, GBP. M-Pesa and PesaLink always settle in KES — if you pass a different currency, Kulmi Pay converts the amount using live exchange rates.string
required
Payment amount as a decimal string, for example
"1500.00". For M-Pesa the minimum is KES 10 and the maximum is KES 150,000.string
required
Your unique reference for this payment, up to 140 characters. Store this value — you use it to reconcile transactions on your side.
Customer identity
string
Customer phone number. Required for M-Pesa. Use international format, for example
254712345678.string
Customer email address.
string
Customer first name.
string
Customer last name.
Authentication alternative
string
Your publishable API key. Use this instead of a Bearer token when calling from a client-side environment. Must match the environment (sandbox keys contain
test, live keys contain live).Fee configuration
string
default:"BUSINESS-PAYS"
Who pays the processing fee for mobile money payments. Either
BUSINESS-PAYS (fee deducted from your settlement) or CUSTOMER-PAYS (fee added to the customer-facing amount).string
default:"BUSINESS-PAYS"
Who pays the processing fee for PesaLink bank payments. Either
BUSINESS-PAYS or CUSTOMER-PAYS.Wallet routing
string
The alias ID of a specific wallet to receive the funds. If omitted, funds settle into your default settlement wallet for the transaction currency.
string
Two-letter ISO 3166-1 alpha-2 country code for the customer address.
string
Postal or ZIP code for the billing address.
string
City for the billing address.
string
State or region for the billing address.
string
Street address for billing, up to 140 characters.
Response
object
Details of the invoice created for this payment.
string
A JWT you use with the payment status endpoint to authenticate status checks without a server-side secret key. Store it alongside the invoice ID.
Code examples
Example response
For M-Pesa payments, the invoice state starts as
PENDING. The customer receives an STK push prompt on their phone and must enter their PIN to complete the payment. Poll the payment status endpoint or use webhooks to detect when the state changes to COMPLETE or FAILED.