Live Pay

LivePay

Send Money API

Send payments directly to mobile money users instantly

Overview

The Send Money API allows you to transfer funds directly to mobile money users. This is ideal for disbursements, refunds, peer-to-peer transfers, and any scenario where you need to send money to customers.

How It Works

The API initiates an immediate transfer to the recipient's mobile money account. The funds are deducted from your LivePay balance and credited to the recipient's account in real-time.

Quick Start

Request Example

Terminal
curl "https://livepay.me/api/v1/withdraw" \
   -X POST \
   -H "Content-Type: application/json" \
   -H "Authorization: Bearer <--your-secret-key-->" \
   -d '{
        "apikey": "<--your-public-key-->",
        "reference": "52750b30ffbc7de3b36",
        "phone": "256702069536",
        "amount": 500.00,
        "description": "Send Payment to"
    }'

Response Example

JSON Response
{
  "status": "success",
  "message": "Withdrawal initiated successfully",
  "phone": "256702069536",
  "payment_method": "airtel",
  "transaction_id": "MP3f123d49c70ab593",
  "reference_id": "52750b30ffbc7de3b36",
  "amount": 500,
  "charge_amount": 15.0,
  "total_amount": 515.0,
  "current_balance": 1485.0,
  "note": "Transaction is being processed. Funds will be deducted from your balance once confirmed."
}

Authentication

All API requests require Bearer token authentication using your Secret Key in the Authorization header, and your Public Key in the request body.

Headers

Authorization

Bearer <--your-secret-key-->

Content-Type

application/json

Body Parameters

apikey

<--your-public-key-->

Request Parameters

Parameter Type Required Description
apikey String Yes Your public API key
reference String Yes Unique reference ID (8-36 characters)
phone String Yes Recipient's phone number (9+ digits)
amount Number Yes Amount in UGX (500 - 5,000,000)
description String No Payment description (default: "API Withdrawal")

Response Format

Success Response

success.json
{
  "status": "success",
  "message": "Withdrawal initiated successfully",
  "phone": "256702069536",
  "payment_method": "airtel",
  "transaction_id": "MP3f123d49c70ab593",
  "reference_id": "52750b30ffbc7de3b36",
  "amount": 500,
  "charge_amount": 15.0,
  "total_amount": 515.0,
  "current_balance": 1485.0,
  "note": "Transaction is being processed. Funds will be deducted from your balance once confirmed."
}

Error Response

error.json
{
  "status": "error",
  "message": "Insufficient balance"
}

Response Fields

status success/error
transaction_id LivePay transaction ID
amount Sent amount
total_amount Amount including charges
payment_method airtel/mtnmomo
charge_amount Transaction fee
current_balance Your updated balance
reference_id Your reference ID

Code Examples

javascript.js
async function sendMoney(phone, amount, reference, description) {
    const response = await fetch('https://livepaye.com/api/v1/withdraw', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Authorization': 'Bearer <--your-secret-key-->'
        },
        body: JSON.stringify({
            apikey: '<--your-public-key-->',
            reference: reference,
            phone: phone,
            amount: amount,
            description: description || 'Send Payment to'
        })
    });
    
    if (!response.ok) {
        const errorText = await response.text();
        throw new Error(`HTTP ${response.status} - ${errorText}`);
    }
    
    const result = await response.json();
    
    if (result.status !== 'success') {
        throw new Error(`API Error: ${result.message || 'Unknown error'}`);
    }
    
    return result;
}

Important Notes

Balance Requirements

Ensure you have sufficient balance in your LivePay account before making send money requests. The total amount (amount + transaction charges) will be deducted from your balance.

Transaction Limits

Minimum amount: 500 UGX, Maximum amount: 5,000,000 UGX per transaction. Daily and monthly limits may apply based on your account verification level.

Processing Time

Transactions are typically processed instantly. However, in rare cases, it may take a few minutes to complete. Always verify transaction status using webhooks.