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/direct
Authentication
X-API-Key header required

Local Currency Payments (ETB)

Supported Providers

MPESA
TELEBIRR
CBE
ETHSWITCH
LAKIPAY

Request Parameters

ParameterTypeRequiredDescription
amountdecimalRequiredPayment amount (e.g., 100.00)
currencystringRequiredCurrency code: "ETB" for local payments
phone_numberstringRequiredCustomer phone in E.164 format (+251...)
mediumstringRequiredPayment provider: MPESA, TELEBIRR, CBE, etc.
descriptionstringOptionalPayment description
referencestringRequiredUnique reference ID for tracking
callback_uristringOptionalWebhook URL for payment status updates
redirectsobjectOptionalSuccess/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

ParameterTypeDescription
currencystringMust be "USD" for international payments
mediumstringMust be "CYBERSOURCE"
merchant_pays_feebooleanWhether 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

ETB

TELEBIRR

Ethio Telecom mobile money service

ETB

CBE

Commercial Bank of Ethiopia

ETB

ETHSWITCH

Ethiopian banking switch network

ETB

LAKIPAY

LakiPay direct payment method

ETB

CYBERSOURCE

International payment gateway for USD transactions

USD