Lipisha REST APIs


Query Transaction


Checks whether a transaction exists and returns the full details of the transaction.


Endpoints

https://developer.lipisha.com/index.php/v2/api/query_transaction TEST
https://api.lipisha.com/v2/query_transaction LIVE

Request POST application/x-www-form-urlencoded

Parameter Description Example
api_key Your Lipisha API key. 3aa67677e8bf1d4c8fe886a38c03a860
api_signature Your Lipisha API signature. SYetmwsNnb5bwaZRyeQKhZNNkCoEx+5x=
transaction Lipisha identifier for the transaction. ABC12345QR

Example Request
curl "https://developer.lipisha.com/index.php/v2/api/query_transaction" \
  -X POST \
  --data-urlencode "api_key=3aa67677e86a38c03a860" \
  --data-urlencode "api_signature=SYetmwsNnb5bwaZRyeQKhZNNkCoEx+5x=" \
  --data-urlencode "transaction=ABC12345QR"

Response application/json

Parameter Description Example
transaction Lipisha identifier for the transaction. ABC12345QR
transaction_reference Similar to transaction ABC12345QR
transaction_type Type of transaction. Options are:
  • Payment
  • Payout
  • Reversal
  • Settlement
Payment
transaction_country Country of origin of the transaction. In 2 letter international ISO format. Options are:
  • KE (Kenya)
  • RW (Rwanda)
  • UG (Uganda)
  • TZ (Tanzania)
KE
transaction_method Method used to carry out a transaction. Varies according to transaction_type and transaction_country.
For Payments:
Kenya
  • Paybill (M-Pesa)
  • Paybill (Equitel)
  • Paybill (Airtel Money)
  • Buy Goods (M-Pesa)
Rwanda
  • Paybill (MTN Money)
  • Paybill (Tigo Cash)
Uganda
  • Paybill (MTN Money)
  • Paybill (Airtel Money)
Tanzania
  • Paybill (Vodacom M-Pesa)

For Payouts:
Kenya
  • Bulkpay (M-Pesa)
  • Bulkpay (Airtel Money)
Uganda
  • Bulkpay (Mtn Money)
  • Bulkpay (Airtel Money)
Ghana
  • Bulkpay (Mtn Money)
  • Bulkpay (Airtel Money)
  • Bulkpay (Vodafone)
  • Bulkpay (Expresso)
  • Bulkpay (Glo Cash)
  • Bulkpay (Tigo Cash)

For Settlements:
Kenya
  • Bank (SWIFT)
International
  • Bank (SWIFT)
Paybill (M-Pesa)
transaction_date Date and time of the transaction.

In the format: YYYY-MM-DD HH:mm:ss
2013-02-02 12:30:45
transaction_currency Currency of the transaction. In 3 letter international ISO format. Options are:
  • KES (Kenya Shillings)
  • RWF (Rwanda Francs)
  • UGX (Uganda Shillings)
  • TZS (Tanzania Shillings)
KES
transaction_amount Value of the transaction. 100.00
transaction_paybill Paybill, business number, till number, merchant nickname, or merchant number used for the transaction 961700
transaction_paybill_type Type of the Paybill. Options are:
  • General
  • Dedicated
Shared
transaction_account Number of the transaction account. 000075
transaction_account_number Similar to transaction_account 000075
transaction_account_keyword An alias to the transaction_account_number. User friendly alternative made of alphabets and used instead of account number mainly in shared paybills. LOAN
transaction_account_name Name of the transaction account. Test Account
transaction_merchant_reference Reference a person or entity used when executing a transaction. E.g. invoice, receipt, member number LS0009
transaction_name Name of the person or entity that made a transaction. JOHN JANE DOE
transaction_mobile Mobile number of the person or entity that made a transaction. 254722002222
transaction_email Email of the person or entity that made a transaction. test@test.com
transaction_code Unique code returned by the mobile money network or financial service provider E.g the M-Pesa confirmation code CU79AW109D
transaction_gateway_code Code returned by other intermediary platforms between mobile money network or financial service provider and Lipisha e.g third party partner. Available only for some networks and mainly for dedicated business numbers. 1234567900001234
transaction_status Status of a transaction. Options are:
  • Completed
  • Failed
Completed

Example Response
{
    "status": {
        "status_code": 0,
        "status_description": "Transaction Found",
        "status": "SUCCESS"
    },
    "content": {
        "transaction": "ABC12345QR",
        "transaction_reference": "ABC12345QR",
        "transaction_type": "Payment",
        "transaction_country": "KE",
        "transaction_method": "Paybill (M-Pesa)",
        "transaction_date": "2013-02-02 12:30:45",
        "transaction_currency": "KES",
        "transaction_amount": "100.0000",
        "transaction_paybill": "961700",
        "transaction_paybill_type": "Shared",
        "transaction_account": "000075",
        "transaction_account_number": "000075",
        "transaction_account_keyword": "LOAN",
        "transaction_account_name": "Test Account",
        "transaction_merchant_reference": "LS0009",
        "transaction_name": "JOHN JANE DOE",
        "transaction_mobile": "254722002222",
        "transaction_email": "test@test.com",
        "transaction_code": "CU79AW109D",
        "transaction_gateway_code": "1234567900001234",
        "transaction_status": "Completed"
    }
}

Fork me on GitHub