Lipisha REST APIs


Get Customers


API Description

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

API Endpoint

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

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

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=
api_version String specifying the version of the API in use 1.3.0
api_type String specifying the type of handshake or IPN call Callback
customer_name String specifying name of the customer that made a transaction.
Specify an empty string if parameter is not required.
JOHN JANE DOE
customer_mobile_number Integers specifying mobile number of the customer that made a transaction.
Specify an empty string if parameter is not required.
254722002222
customer_email String specifying email address of the customer that made a transaction.
Specify an empty string if parameter is not required.
test@test.com
customer_first_payment_from String specifying the start date and time for one or more customers who first carried transactions from that day.
In the format: YYYY-MM-DD HH:mm:ss
Specify an empty string if parameter is not required.
2013-07-18 00:00:00
customer_first_payment_to String specifying the last date and time for one or more customers who first carried transactions to that day.
In the format: YYYY-MM-DD HH:mm:ss
Specify an empty string if parameter is not required.
2013-07-18 23:59:59
customer_last_payment_from String specifying the start date and time for one or more customers who last carried transactions from that day.
In the format: YYYY-MM-DD HH:mm:ss
Specify an empty string if parameter is not required.
2013-07-18 00:00:00
customer_last_payment_to String specifying the last date and time for one or more customers who last carried transactions to that day.
In the format: YYYY-MM-DD HH:mm:ss
Specify an empty string if parameter is not required.
2013-07-18 23:59:59
customer_payments_minimum Integer specifying the lowest number or count of payments made by one or more customers.
Specify an empty string if parameter is not required.
100.0000
customer_payments_maximum Integer specifying the highest number or count of a payments made by one or more customers.
Specify an empty string if parameter is not required.
500.0000
customer_total_spent_minimum Number specifying the lowest value of total payments made by one or more customers.
Specify an empty string if parameter is not required.
100.0000
customer_total_spent_maximum Number specifying the lowest value of total payments made by one or more customers.
Specify an empty string if parameter is not required.
500.0000
customer_average_spent_minimum Number specifying the lowest value of the average of payments made by one or more customers.
Specify an empty string if parameter is not required.
100.0000
customer_average_spent_maximum Number specifying the highest value of the average of payments made by one or more customers.
Specify an empty string if parameter is not required.
500.0000
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 customers found.
0 indicates return all customers 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 Customers
customer_name String specifying name of the customer that made a transaction.
Specify an empty string if parameter is not required.
JOHN JANE DOE
customer_mobile_number Integers specifying mobile number of the customer that made a transaction.
Specify an empty string if parameter is not required.
254722002222
customer_email String specifying email address of the customer that made a transaction.
Specify an empty string if parameter is not required.
test@test.com
customer_first_payment_date String specifying date and time when the customer first made a payment.
In the format: YYYY-MM-DD HH:mm:ss
2013-07-18 12:23:57
customer_last_payment_date String specifying date and time when the customer last made a payment.
In the format: YYYY-MM-DD HH:mm:ss
2013-07-18 12:23:57
customer_payments Integer specifying the total number or count of payments made by the customers. 5
customer_total Number specifying the total value of payments made by the customers. 25000.0000
customer_average Number specifying the average value of payments made by the customers. 5000.0000

JSON Reponse
{
	"status": {
		"status_code": 0,
		"status_description": "Customers Found",
		"status": "SUCCESS"
	},
	"content": [
		{
			"customer_name": "JOHN JANE DOE",
			"customer_mobile_number": "254722002222",
			"customer_email": "test@test.com",
			"customer_first_payment_date": "2015-02-11 07:18:16",
			"customer_last_payment_date": "2015-02-11 07:18:16",
			"customer_payments": "1",
			"customer_total": "30000.0000",
			"customer_average": "30000.00000000"
		},
		{
			"customer_name": "PETER MARY DOE",
			"customer_mobile_number": "254722000000",
			"customer_email": "example@example.com",
			"customer_first_payment_date": "2013-01-11 07:18:16",
			"customer_last_payment_date": "2014-02-11 15:13:20",
			"customer_payments": "5",
			"customer_total": "250000.0000",
			"customer_average": "50000.00000000"
		},

	]
}

Fork me on GitHub