Lipisha REST APIs


Get Transactions


API Description

This API call returns all transactions matching the specified query parameters.

API Endpoint

The API service endpoint for making the Get Transactions API call is:

https://developer.lipisha.com/index.php/v2/api/get_transactions

API Request

The API request is made via HTTP POST and must be url encoded. Some of the parameters are required while others are optional. The parameters are:

Parameter Description Example
api_key Unique string specifying merchant's Lipisha API key.

This should match the api key that you have generated for your Lipisha account
3aa67677e8bf1d4c8fe886a38c03a860
api_signature Unique string specifying merchant's Lipisha API signature.

This should match the api signature that you have generated for your Lipisha account
SYetmwsNnb5bwaZRyeQ..........KhZNNkCoEx+5x=
transaction List of one or more comma-separated strings specifying the unique codes that identify transactions. E.g the M-Pesa confirmation code received after carrying out an M-Pesa payment

Specify an empty string if parameter is not required.
NMQR38SJDI, HGQR15SJDI
transaction_type List of one or more comma-separated strings specifying types of transactions.
Possible transaction types include:
  • Payment
  • Withdrawal
  • Fees
  • Messaging
  • Payout

Specify an empty string if parameter is not required.
Payment,Fees
transaction_method List of one or more comma-separated strings specifying the methods used to carry out transactions.
Possible transaction methods include:
  • Paybill (M-Pesa)
  • Paybill (Airtel Money)
  • Bank (EFT)
  • Bank (RTGS)
  • Bank (Cheque)
  • Mobile (M-PESA)
  • Messaging (SMS)
  • Bulk Pay (M-Pesa)
  • Transfer (Lipisha)

Specify an empty string if parameter is not required.
Paybill (M-Pesa),Bulk Pay (M-Pesa)
transaction_date_start String specifying date and time when transactions were first carried out.
In the format: YYYY-MM-DD HH:mm:ss
Specify an empty string if parameter is not required.
2013-07-18 00:00:00
transaction_date_end String specifying date and time when transactions were last carried out.
In the format: YYYY-MM-DD HH:mm:ss
Specify an empty string if parameter is not required.
2013-07-18 23:59:59
transaction_account_name List of one or more comma-separated strings specifying the names of the transaction accounts in which the transactions were carried out.
Specify an empty string if parameter is not required.
Test Account, Other Account
transaction_account_number List of one or more comma-separated integers specifying transaction account numbers in which the transactions were carried out.
Specify an empty string if parameter is not required.
00155,00156
transaction_reference List of one or more comma-separated strings specifying the references customers used when entering transactions. E.g. invoice numbers or receipt numbers
Specify an empty string if parameter is not required.
LS0009,LS0010
transaction_amount_minimum Number specifying the lowest value of the transactions. Note that withdrawals and other charges e.g. fees are indicated as negative amounts
Specify an empty string if parameter is not required.
100.0000
transaction_amount_maximum Number specifying the highest value of the transactions. Note that withdrawals and other charges e.g. fees are indicated as negative amounts
Specify an empty string if parameter is not required.
500.0000
transaction_status List of one or more comma-separated strings specifying the status of a transaction.
Possible transaction status include:
  • Requested
  • Completed
  • Cancelled
  • Voided
  • Acknowledged
  • Authorized
  • Settled
  • Reversed
  • Timeouted

Specify an empty string if parameter is not required.
Completed,Acknowledged
transaction_name String specifying name of the person or entity that made a transaction.
Specify an empty string if parameter is not required.
JOHN JANE DOE
transaction_mobile_number Integers specifying mobile number of the person or entity that made a transaction.
Specify an empty string if parameter is not required.
254722002222
transaction_email String specifying email address of the person or entity that made a transaction.
Specify an empty string if parameter is not required.
test@test.com
limit Integers specifying how many records to return.
Specify an empty string if parameter is not required.
1000
offset Integers specifying the first record to return for all transactions found.
0 indicates return all transactions from the first one.
Specify an empty string if parameter is not required.
0

API Response

The API reponse will be returned as JSON. Each response will contain a status and content section. The parameters are:

Parameter Description Example
Status
status String specifying whether API Call executed successfully or failed SUCCESS
status_code Integers specifying status code of the API Call result 0000
status_description String containing description of the status Transactions found
Content
Array Of Transactions
transaction Unique code that identify transaction. E.g the M-Pesa confirmation code received after carrying out an M-Pesa payment NMQR38SJDI
transaction_type String specifying type of transaction.
Possible transaction types include:
  • Payment
  • Withdrawal
  • Fees
  • Messaging
  • Payout
Payment
transaction_method String specifying the method used to carry out the transaction.
Possible transaction methods include:
  • Paybill (M-Pesa)
  • Paybill (Airtel Money)
  • Bank (EFT)
  • Bank (RTGS)
  • Bank (Cheque)
  • Mobile (M-PESA)
  • Messaging (SMS)
  • Bulk Pay (M-Pesa)
  • Transfer (Lipisha)
Paybill (M-Pesa)
transaction_date String specifying date and time when transaction was carried out.
In the format: YYYY-MM-DD HH:mm:ss
2013-07-18 12:23:57
transaction_account_name String specifying the name of the transaction account in which the transaction was carried out. Test Account
transaction_account_number Integers specifying number of the transaction account in which the transaction were carried out. 00155
transaction_reference String specifying the reference the customer used when entering transactions. E.g. invoice number or receipt number LS0009
transaction_amount Number specifying the value of the transactions. Note that withdrawals and other charges e.g. fees are indicated as a negative amount 350.0000
transaction_status Strings specifying the status of a transaction.
Possible transaction status include:
  • Requested
  • Completed
  • Cancelled
  • Voided
  • Acknowledged
  • Authorized
  • Settled
  • Reversed
Completed
transaction_name String specifying name of the person or entity that made a transaction. JOHN JANE DOE
transaction_mobile_number Integers specifying mobile number of the person or entity that made a transaction. 254722002222
transaction_email String specifying email address of the person or entity that made a transaction. test@test.com

JSON Reponse
{
    "status": {
        "status_code": 0,
        "status_description": "Transactions Found",
        "status": "SUCCESS"
    },
    "content": [
	{
        	"transaction": "DS54EX316",
            "transaction_type": "Payment",
            "transaction_method": "Paybill (M-Pesa)",
            "transaction_date": "2013-07-18 15:13:21",
            "transaction_account_name": "Test Account",
            "transaction_account_number": "00155",
            "transaction_reference": "LS0009",
            "transaction_amount": "100.0000",
            "transaction_status": "Completed",
            "transaction_name": "JOHN JANE DOE",
            "transaction_mobile_number": "254722002222",
            "transaction_email": ""
    	},
	{
            "transaction": "DS54EX316",
            "transaction_type": "Fees",
            "transaction_method": "Paybill (M-Pesa)",
            "transaction_date": "2013-07-18 15:13:21",
            "transaction_account_name": "Test Account",
            "transaction_account_number": "00155",
            "transaction_reference": "LS0009",
            "transaction_amount": "1.5000",
            "transaction_status": "Completed",
            "transaction_name": "JOHN JANE DOE",
            "transaction_mobile_number": "254722002222",
            "transaction_email": ""
    	},
	{
        	"transaction": "HGQR15SJDI",
            "transaction_type": "Payment",
            "transaction_method": "Paybill (M-Pesa)",
            "transaction_date": "2013-07-18 15:13:22",
            "transaction_account_name": "Other Account",
            "transaction_account_number": "00156",
            "transaction_reference": "LS0010",
            "transaction_amount": "100.0000",
            "transaction_status": "Completed",
            "transaction_name": "JANE JOHN DOE",
            "transaction_mobile_number": "254722000000",
            "transaction_email": ""
    	},
	{
            "transaction": "HGQR15SJDI",
            "transaction_type": "Fees",
            "transaction_method": "Paybill (M-Pesa)",
            "transaction_date": "2013-07-18 15:13:22",
            "transaction_account_name": "Other Account",
            "transaction_account_number": "00156",
            "transaction_reference": "LS0010",
            "transaction_amount": "1.5000",
            "transaction_status": "Completed",
            "transaction_name": "JANE JOHN DOE",
            "transaction_mobile_number": "254722000000",
            "transaction_email": ""
    	}
    ]
}

Fork me on GitHub