Live Pay

LivePay

Request Money API

Send payment requests to mobile money users and receive payments instantly

Overview

The Request Money API allows you to send payment requests to mobile money users. When a request is sent, the recipient receives a prompt on their phone to approve the payment. This is ideal for e-commerce, invoicing, and peer-to-peer payment scenarios.

How It Works

The API initiates a payment request that appears on the recipient's phone. They must approve the transaction for the payment to be completed. Funds are credited to your account after successful approval.

Quick Start

Request Example

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

Response Example

JSON Response
{
  "status": "success",
  "message": "Deposit initiated successfully. Complete the transaction on your phone.",
  "phone": "256702069536",
  "payment_method": "airtel",
  "transaction_id": "MP3f123d49c70ab593",
  "reference_id": "52750by31220ffbc7de3b36",
  "amount": 500,
  "charge_amount": 22.5,
  "final_amount": 477.5,
  "current_balance": 0,
  "note": "Transaction is being processed. Your balance will update once payment is 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 Deposit")

Response Format

Success Response

success.json
{
  "status": "success",
  "message": "Deposit initiated successfully. Complete the transaction on your phone.",
  "phone": "256702069536",
  "payment_method": "airtel",
  "transaction_id": "MP3f123d49c70ab593",
  "reference_id": "52750by31220ffbc7de3b36",
  "amount": 500,
  "charge_amount": 22.5,
  "final_amount": 477.5,
  "current_balance": 0,
  "note": "Transaction is being processed. Your balance will update once payment is confirmed."
}

Error Response

error.json
{
  "status": "error",
  "message": "Invalid phone number provided"
}

Response Fields

status success/error
transaction_id LivePay transaction ID
amount Requested amount
final_amount Amount after charges
payment_method airtel/mtnmomo
charge_amount Transaction fee
current_balance Your current balance
reference_id Your reference ID

Code Examples

javascript.js
async function requestMoney(phone, amount, reference, description) {
    const response = await fetch('https://livepaye.com/api/v1/deposit', {
        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 || 'Payment Request'
        })
    });
    
    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

Recipient Approval Required

The recipient must approve the payment request on their phone for the transaction to complete. Funds will only be credited to your account after successful approval.

Request Expiry

Payment requests typically expire after 15 minutes if not approved by the recipient. You'll need to send a new request if the current one expires.

Transaction Limits

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