API Reference

Complete reference documentation for all LakiPay API endpoints, parameters, and response formats.

Direct Payment API

POST/api/v2/payment/direct

Process payments through various payment providers. Supports both local (ETB) and international (USD) currencies.

Complete Parameter Reference

ParameterTypeRequiredDescription
amountdecimalRequiredPayment amount with 2 decimal places (e.g., 100.00)
currencystringRequired"ETB" for local, "USD" for international
phone_numberstringRequiredPhone number including country code, without + (e.g., 251911234567)
mediumstringRequiredPayment provider: MPESA, TELEBIRR, CBE, ETHSWITCH, LAKIPAY, CYBERSOURCE
descriptionstringOptionalHuman-readable payment description
referencestringRequiredUnique reference ID (max 100 characters)
callback_urlstringOptionalWebhook URL for payment status updates
redirectsobjectOptionalObject with success_url and failure_url
merchant_pays_feebooleanOptionalFor USD payments: whether merchant absorbs fees

Withdrawal API

POST/api/v2/payment/withdrawal

Initiate withdrawals from your merchant account to customer accounts.

Hosted Checkout API

POST/api/v2/payment/checkout

Create a hosted checkout session that LakiPay renders for you, supporting multiple payment mediums with redirect URLs for success and failure.

Example Request Body

{
  "amount": 1000.5,
  "callback_url": "https://example.com/callback",
  "currency": "ETB",
  "description": "Payment for order #123",
  "phone_number": "251911111111",
  "redirects": {
    "failed": "https://example.com/failed",
    "success": "https://example.com/success"
  },
  "reference": "ORDER123456",
  "supported_mediums": [
    "MPESA",
    "TELEBIRR",
    "CBE"
  ]
}
ParameterTypeRequiredDescription
amountdecimalRequiredPayment amount with 2 decimal places.
currencystringRequiredCurrency code (e.g., "ETB").
phone_numberstringRequiredPhone number including country code, without leading +.
referencestringRequiredUnique reference for this checkout session.
callback_urlstringOptionalWebhook URL where LakiPay sends asynchronous status notifications.
redirects.successstringRequiredURL to redirect the customer to after success.
redirects.failedstringRequiredURL to redirect the customer to after failure.
supported_mediumsarray[string]RequiredList of payment mediums to show on the hosted checkout (e.g., MPESA, TELEBIRR, CBE).

Transaction Detail API

GET/api/v2/payment/transaction/{id}

Retrieve full details for a specific transaction by its unique identifier.

Path Parameters

ParameterTypeRequiredDescription
idstringRequiredThe transaction ID returned by the Direct Payment or Hosted Checkout APIs.

Example Request

curl -X GET "https://api.lakipay.co/api/v2/payment/transaction/TXN-123456789" \
  -H "X-API-Key: your-publickey:your-secretkey"

Status Codes

HTTP Status Codes

200 OK

Request successful

400 Bad Request

Invalid request parameters

401 Unauthorized

Invalid or missing API key

500 Internal Server Error

Server error, contact support

Transaction Status Values

SUCCESS

Transaction completed successfully

FAILED

Transaction failed

PENDING

Transaction is being processed

CANCELLED

Transaction was cancelled