Let's fetch a single transaction

After making a successful transfer, you might want to retrieve same transaction , so to retrieve a single transfer transaction you are required to parse the trx_ref to the request body as shown in the example below.

Remember the trx_ref is auto generated when the transfer or transaction was initiated, so it's unique and can only reference a single transaction.

Example

var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://integrations.getravenbank.com/v1/get-transfer?trx_ref=202206041843ACJHBAJ',
  headers: { }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
{
  "status": "success",
  "message": "transfer retrieved successfully",
  "data": {
    "id": 2,
    "trx_ref": "202206041843ACJHBAJ",
    "amount": 1000,
    "fee": 10,
    "status": 0,
    "bank": "Access bank",
    "account_number": "0690000031",
    "account_name": "Pastor Bright",
    "account_bank": "044",
    "currency": "NGN",
    "narration": "Transfer test",
    "merchant_ref": "123456",
    "session_id": null
  }
}

👍

Try it in the console

Click here to try it