Direct Payments API
Process payments directly through various payment providers. Support for local currency (ETB) and international payments (USD).
Overview
The Direct Payment API allows you to initiate payments through multiple payment providers. Payments can be processed in ETB (local) or USD (international via CYBERSOURCE).
Endpoint
POST /api/v2/payment/directAuthentication
X-API-Key header requiredLocal Currency Payments (ETB)
Supported Providers
MPESA
TELEBIRR
CBE
ETHSWITCH
LAKIPAY
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | decimal | Required | Payment amount (e.g., 100.00) |
| currency | string | Required | Currency code: "ETB" for local payments |
| phone_number | string | Required | Customer phone in E.164 format (+251...) |
| medium | string | Required | Payment provider: MPESA, TELEBIRR, CBE, etc. |
| description | string | Optional | Payment description |
| reference | string | Required | Unique reference ID for tracking |
| callback_uri | string | Optional | Webhook URL for payment status updates |
| redirects | object | Optional | Success/failure redirect URLs |
Example Request
curl -X POST https://api.lakipay.co/api/v2/payment/direct \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key-here" \
-d '{
"amount": 100.00,
"currency": "ETB",
"phone_number": "+251911234567",
"medium": "MPESA",
"description": "Payment for order #12345",
"reference": "ORDER-12345",
"callback_uri": "https://yourwebsite.com/webhook"
}'Success Response
{
"status": "SUCCESS",
"message": "Payment initiated successfully",
"data": {
"transaction_id": "TXN-123456789",
"reference": "ORDER-12345",
"amount": 100.00,
"currency": "ETB",
"status": "PENDING",
"medium": "MPESA",
"created_at": "2024-01-15T10:30:00Z"
}
}USD International Payments (via CYBERSOURCE)
Important Requirements
- • USD payments are only available via CYBERSOURCE provider
- • Your account must be enabled for USD transactions
- • Contact support to enable USD payment processing
- • Currency must be set to "USD"
Additional Parameters
| Parameter | Type | Description |
|---|---|---|
| currency | string | Must be "USD" for international payments |
| medium | string | Must be "CYBERSOURCE" |
| merchant_pays_fee | boolean | Whether merchant absorbs transaction fees |
Example USD Payment Request
curl -X POST https://api.lakipay.co/api/v2/payment/direct \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key-here" \
-d '{
"amount": 50.00,
"currency": "USD",
"phone_number": "+1234567890",
"medium": "CYBERSOURCE",
"description": "International payment",
"reference": "INTL-12345",
"merchant_pays_fee": false,
"callback_uri": "https://yourwebsite.com/webhook"
}'Payment Providers
MPESA
Mobile money payment provider
ETBTELEBIRR
Ethio Telecom mobile money service
ETBCBE
Commercial Bank of Ethiopia
ETBETHSWITCH
Ethiopian banking switch network
ETBLAKIPAY
LakiPay direct payment method
ETBCYBERSOURCE
International payment gateway for USD transactions
USD