Simple, Developer-Friendly Payment Integration
LakiPay empowers businesses to accept digital payments securely via a simple, developer-friendly API. Connect payments, track transactions, and manage checkout events—all in one place.
LakiPay Payment Flow
Understand every stage of the payment process, from creation to webhook notifications.
Create Payment
Backend sends POST /api/v2/payment/direct
Customer Receives Request
Customer gets payment prompt on their device (e.g. mobile)
Payment Status
Transaction moves to SUCCESS, FAILED, PENDING, or CANCELLED
Receive Webhook
LakiPay sends DEPOSIT or WITHDRAWAL events with status
Create Payment
Backend sends POST /api/v2/payment/direct
Customer Receives Request
Customer gets payment prompt on their device (e.g. mobile)
Payment Status
Transaction moves to SUCCESS, FAILED, PENDING, or CANCELLED
Receive Webhook
LakiPay sends DEPOSIT or WITHDRAWAL events with status
Handling Expired Payments
Set up a webhook listener to detect and respond to expired payments
When a payment expires, LakiPay sends a webhook notification to your server. Handle these events to notify customers or restart payments.
// Verify RSA-2048 signature first (see docs/webhooks)
app.post('/webhooks/lakipay', (req, res) => {
const { event, transaction_id, reference, status } = req.body;
if (event === 'DEPOSIT') {
if (status === 'SUCCESS') {
// Payment completed – fulfill order, update DB
} else if (status === 'FAILED' || status === 'CANCELLED') {
// Handle failure or cancellation
}
} else if (event === 'WITHDRAWAL') {
// Handle withdrawal status updates
}
res.status(200).send('OK');
});Webhook Events
DEPOSIT
Triggered when a payment is received or its status changes
WITHDRAWAL
Triggered when a withdrawal is processed or its status changes
Status values
SUCCESS, FAILED, PENDING, CANCELLED — verify RSA-2048 signature (see docs)
Best Practices
- Always verify webhook signatures
- Return 200 status immediately
- Process events asynchronously
- Implement idempotency checks