API Reference · Payins
Create a payin
Initiate a payment collection. The customer is redirected to complete payment on the selected gateway. Sign every request with HMAC-SHA256.
https://payment.klustar.io/payment/api/payinsHeaders
X-Tenant-IDYour tenant identifier (provided during onboarding).
X-API-KEYPublic API key from the merchant dashboard.
X-Merchant-IDYour business profile / merchant ID (same as appId).
X-NonceUnique per-request value (UUID recommended). Never reuse.
X-TimestampUnix epoch seconds when the request is signed. Must be within ±300s of server time.
X-SignatureLowercase hex HMAC-SHA256 of the signature base string, using your secret key.
Content-TypeMust be application/json for JSON bodies.
Defaults to application/json
X-API-VersionContract version: 1 (legacy, no paymentMethod) or 2 (paymentMethod required and signed). Optional, and there is no default - when omitted the version is inferred from whether paymentMethod is present, so sending version 1 alongside paymentMethod is rejected with 400.
Body params
referenceUnique transaction reference generated by your system. Echoed in webhooks.
amountTransaction amount in the specified currency.
currencyISO currency code. Currently NGN.
Defaults to NGN
customerNameCustomer full name.
customerEmailCustomer email address.
redirectUrlURL to redirect the customer after payment.
notifyUrlWebhook URL for asynchronous status updates.
gatewayPayment gateway. Example: PALMPAY. Overrides paymentMethod when both are sent.
paymentMethodCARD or BANK_TRANSFER. Routes the pay-in to the providers configured for that method, with failover. Must be included in the signed canonical body when sent.
narrationShort description shown on the payment flow.
Request body
{
"reference": "REF-a1b2c3d4e5",
"amount": 2000,
"currency": "NGN",
"customerName": "Jane Doe",
"customerEmail": "jane@example.com",
"redirectUrl": "https://merchant.example/return",
"notifyUrl": "https://merchant.example/webhooks/klustar",
"paymentMethod": "BANK_TRANSFER",
"narration": "Order #1042"
}Responses
Payin created. Redirect the customer using the returned payment URL when present.
{
"success": true,
"reference": "REF-a1b2c3d4e5",
"status": "pending",
"paymentUrl": "https://checkout.example/session/...",
"message": "Payment initiated"
}{
"success": true,
"reference": "REF-a1b2c3d4e5",
"status": "pending",
"paymentUrl": "https://checkout.example/session/...",
"message": "Payment initiated"
}