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 /v1/payments request
Payment valid for 15 minutes
Redirect Customer
Customer is redirected to LakiPay hosted payment page
Payment Expiration
If not completed within 15 minutes, payment expires automatically
Receive Webhook
LakiPay sends webhook: payment.expired
Server updates payment status
Create Payment
Backend sends POST /v1/payments request
Payment valid for 15 minutes
Redirect Customer
Customer is redirected to LakiPay hosted payment page
Payment Expiration
If not completed within 15 minutes, payment expires automatically
Receive Webhook
LakiPay sends webhook: payment.expired
Server updates payment 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.
app.post('/webhooks/lakipay', (req, res) => {
if (req.body.event === 'payment.expired') {
const paymentId = req.body.data.id;
// Notify customer or re-initiate the payment
// Handle expired payment logic here
console.log('Payment expired:', paymentId);
}
res.status(200).send('OK');
});Webhook Events
payment.expired
Sent when a payment session times out
payment.completed
Sent when a payment is successfully completed
payment.failed
Sent when a payment fails
Best Practices
- Always verify webhook signatures
- Return 200 status immediately
- Process events asynchronously
- Implement idempotency checks