Collection History
You can view collection data for a specific date range on your account using the endpoint https://api.marasoftpay.live/account_history/transactions
How to Integrate
1. Post required data to the endpoint https://api.marasoftpay.live/account_history/transactions
Usage
API Endpoint - https://api.marasoftpay.live/account_history/transactions
Method - POST
Data Type - FORM-DATA
Limit - No Limit
Param | Required? | Description |
---|---|---|
enc_key | yes | Your encryption Key |
start_date | yes | Start Date in format d-m-y |
end_date | yes | End Date in format d-m-y |
Code example
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.marasoftpay.live/account_history/transactions',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('enc_key' => 'your encryption key', 'start_date' => '06-03-2023', 'end_date' => '22-03-2023'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
var axios = require('axios');
var FormData = require('form-data');
var data = new FormData();
data.append('enc_key', 'your encryption key');
data.append('start_date', '06-03-2023');
data.append('end_date', '22-03-2023');
var config = {
method: 'post',
url: 'https://api.marasoftpay.live/account_history/transactions',
headers: {
...data.getHeaders()
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "https://api.marasoftpay.com/account_history/transactions"
payload={'enc_key': 'your encryption key',
'start_date': '06-03-2023',
'end_date': '22-03-2023'}
files=[
]
headers = {}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
2. Url Response
Below is what your response should look like.
{
"request_status": true,
"transactions": [
{
"transaction_ref": "ref_MPWR43627389",
"msft_reference": "_21258021178182",
"currency": "KSH",
"expected_amount": "300",
"amount_paid": null,
"amount_settled": null,
"transaction_status": "PENDING",
"status": "PENDING",
"created_at": "2023-Mar-06 12: 48: 01 AM"
},
{
"transaction_ref": "PWR43627389",
"msft_reference": "ref_YIC58021178182",
"currency": "KSH",
"expected_amount": "300",
"amount_paid": 650,
"amount_settled": 649.7,
"transaction_status": "SUCCESS",
"status": "SUCCESS",
"created_at": "2023-Mar-06 12: 48: 01 AM"
}
]
}
3. Error Response
Below is what an error response should look like.
{
"request_status": false,
"error": "start_date cannot be greater than end_date",
}