Reserved Accounts History

Learn how to check the account history of your reserved accounts via the API https://api.marasoftpay.live/account_history/reserved_accounts

1. Post Data to API

To begin, you'll need to pass information such as Encryption Key, Start Date, End Date etc. You can also pass any other additional information in the metadata object field and post in the form-data format below.



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/reserved_accounts',
        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/reserved_accounts',
  headers: { 
    ...data.getHeaders()
  },
  data : data
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

2. Url Response

Below is what your response should look like.

{
    "request_status": true,
    "transactions": [
        {
            "reserved_account_reference": "75164903116757818251245660494",
            "reserved_account_number": "8021178182",
            "reserved_account_name": "MDT \/ - Ay Owolana",
            "reserved_bank_code": null,
            "transaction_reference": "",
            "currency": "NGN",
            "amount": "300000",
            "amount_settled": "294000",
            "source_account_number": "000",
            "source_account_name": "MARASOFTPAY",
            "source_bank_code": "WEMA BANK",
            "time": "2023-Mar-06 12: 48: 01 AM"
        },
        {
            "reserved_account_reference": "43485445216776157401769535187",
            "reserved_account_number": "8021161574",
            "reserved_account_name": "MDT\/ - Majorie Abang",
            "reserved_bank_code": null,
            "transaction_reference": "",
            "currency": "NGN",
            "amount": "241094",
            "amount_settled": "236272.12",
            "source_account_number": "000",
            "source_account_name": "MARASOFT PAY ",
            "source_bank_code": "WEMA BANK",
            "time": "2023-Mar-07 02: 22: 14 PM"
        }
    ]
} 

3. Error Response

Below is what an error response should look like.

{
    "request_status": false,
    "error": "start_date cannot be greater than end_date",
}