Payment processing
Direct payments, hosted checkout, payouts, settlements, and wallet balance.
Overview
Once a connected merchant has been onboarded and verified, your platform uses the endpoints in this guide to run day-to-day money movement flows on their behalf. These flows fall into three groups:
- Collecting customer payments — direct or hosted checkout.
- Sending payouts — to mobile money or similar channels.
- Creating settlements — to registered bank accounts.
The master authenticates with their API key; the connected merchant is identified by the X-Connected-Merchant-Id header on all operations covered here.
Direct Payment
Direct payments send a payment request directly to a configured medium such as Telebirr.
POST /api/v2/payment/directRequest Headers
X-API-Key: <your_master_api_key>
Content-Type: application/json
Accept: application/json
X-Connected-Merchant-Id: <connected_merchant_uuid>Request Body
{
"amount": 1,
"callback_url": "https://yourplatform.com/api/lakiconnect/payments/callback",
"currency": "ETB",
"description": "Payment for order #123",
"details": {
"item_description": "Sample item",
"item_id": "1234567890",
"item_name": "Item name",
"item_quantity": 1
},
"medium": "TELEBIRR",
"merchant_pays_fee": false,
"phone_number": "0912345678",
"redirects": {
"failed": "https://yourplatform.com/payment/failed",
"success": "https://yourplatform.com/payment/success"
},
"reference": "your-unique-reference-id",
"tag": "ORDER_123"
}Response
{
"success": true,
"status": "PENDING",
"message": "Telebirr USSD Push request sent successfully",
"reference_id": "3c69530b-45ff-4c9f-82d6-c2d4fc7a70be",
"lakipay_transaction_id": "6b743288-4a31-429d-a846-c20bbb52ac9d",
"merchant_pays_fee": false
}Integration notes
- Persist
reference_idandlakipay_transaction_idfor reconciliation. - Update order status based on callbacks to the configured
callback_url. - Use the
redirectsURLs for browser-based flows where the customer is redirected after payment.
Hosted Checkout
Hosted checkout provides a full payment page hosted by LakiConnect, where customers can choose from multiple mediums (for example, MPESA, bank gateways).
POST /api/v2/payment/checkoutRequest Headers
X-API-Key: <your_master_api_key>
Content-Type: application/json
Accept: application/json
X-Connected-Merchant-Id: <connected_merchant_uuid>Request Body
{
"accept_tip": false,
"amount": 10,
"callback_url": "https://yourplatform.com/api/lakiconnect/payments/callback",
"currency": "ETB",
"description": "Payment for order #123",
"merchant_pays_fee": false,
"phone_number": "0912345678",
"redirects": {
"failed": "https://yourplatform.com/payment/failed",
"success": "https://yourplatform.com/payment/success"
},
"reference": "your-unique-reference-id",
"supported_mediums": [
"MPESA",
"CBE",
"OROMIA_BANK"
]
}Response
{
"success": true,
"status": "PENDING",
"message": "Hosted checkout created successfully",
"payment_url": "https://checkout.lakipay.co/checkout/3d2444a3-fe5a-4479-b2b6-931c906eff28",
"reference_id": "a4cbdcfe-05ea-469c-a574-b3ffab09c023",
"lakipay_transaction_id": "3d2444a3-fe5a-4479-b2b6-931c906eff28",
"merchant_pays_fee": false
}Redirect your customer to payment_url. Upon completion, LakiConnect sends notifications to callback_url and optionally redirects the customer to your configured success or failure URLs.
Transaction Status Lifecycle
| Status | Description |
|---|---|
| `PENDING` | Payment initiated; awaiting confirmation. |
| `SUCCESS` | Payment confirmed; wallets credited. |
| `FAILED` | Payment declined or errored. |
Payouts (Withdrawals to Payment Channels)
Payouts move funds from a connected merchant's wallet to a specific medium (for example, Telebirr).
POST /api/v2/payment/withdrawalRequest Headers
X-API-Key: <your_master_api_key>
Content-Type: application/json
Accept: application/json
X-Connected-Merchant-Id: <connected_merchant_uuid>Request Body
{
"amount": 1,
"callback_url": "https://yourplatform.com/api/lakiconnect/payouts/callback",
"currency": "ETB",
"medium": "TELEBIRR",
"merchant_pays_fee": false,
"phone_number": "0912345678",
"reference": "WD-123456789"
}Insufficient funds response
{
"success": false,
"message": "failed to lock withdrawal amount: insufficient funds: available balance is 0.00 ETB"
}Always check wallet balance before initiating payouts and display clear error messages to merchants when payouts cannot be processed.
Settlements
Transfer funds from the wallet to a registered settlement bank account belonging to the merchant.
Settlement Bank Management
GET /api/v2/lakiconnect/connected-accounts/settlements/banksRequest Headers
X-Connected-Merchant-Id: <connected_merchant_uuid>The response contains:
connected_merchant_idbanks— each withid,merchant_id,bank_name,account_number,status,created_at, andupdated_at
You must use one of these bank id values when creating a settlement.
Create Settlement
POST /api/v2/lakiconnect/connected-accounts/settlementsRequest Headers
X-API-Key: <your_master_api_key>
X-Connected-Merchant-Id: <connected_merchant_uuid>Request Body
{
"amount": 1,
"business_bank_id": "e82128f4-2f91-40d3-9626-58e5019fe830"
}Response fields
id— settlement IDconnected_merchant_idamountandstatus(for example, PENDING)- Embedded
business_bankdetails created_atandupdated_attimestamps
Retrieve Settlement
GET /api/v2/lakiconnect/connected-accounts/settlements/:withdrawIdRequest Headers
X-Connected-Merchant-Id: <connected_merchant_uuid>Returns the same settlement structure and should be used to track settlement state transitions (for example, from PENDING to COMPLETED or FAILED).
Wallet Balance
Each connected merchant has an associated wallet that tracks their funds across all payment, payout, and settlement activity. The wallet balance is the source of truth when deciding whether payouts or settlements can be initiated — your platform should check this balance before debiting or instructing transfers.
What the wallet tracks
- Available balance — funds that can be withdrawn via payouts or settlements.
- Locked amounts — funds reserved for in-progress payouts or settlements.
- Total fees and gross amounts processed — cumulative fee deductions and gross transaction volume for reconciliation.
GET /api/v2/lakiconnect/connected-accounts/walletRequest Headers
X-Connected-Merchant-Id: <connected_merchant_uuid>The response includes fields such as balance (available balance), amount (gross amount processed), total_fee, locked_amount, currency, wallet_type, and timestamps. Use this endpoint to:
- Display up-to-date balances in merchant dashboards
- Validate whether payouts or settlements can be initiated — compare the requested amount against the available balance before calling withdrawal or settlement endpoints
- Support reconciliation and risk checks
Recommended Practices
- Persist IDs for correlation — store
connected_merchant_id,reference_id,lakipay_transaction_id, and settlement IDs for reconciliation and support. - Use webhooks for asynchronous flows — configure webhook URLs at onboarding time to receive account, payment, and settlement events.
- Gate features by KYC status — only enable payments and payouts when KYC is in an approved state.
- Validate balances before debits — query wallet balance before payouts or settlements to avoid insufficient-fund errors.
- Implement idempotency at the business layer — use stable
referencevalues for retries so duplicate calls do not create duplicate business actions.