Refund list

To view the complete list of refund request records

GET
/api/v1/refund/
AuthorizationBearer <token>

Pass access token obtained from login endpoint

In: header

Query Parameters

fromDatestring

Pass the from date (YYYY-MM-DD)

toDatestring

Pass the to date (YYYY-MM-DD)

pagenumber

Pass the pagination number

search?string

Pass the search string if required

datastring

Convert payload JSON object to encrypted string and send it to the server

Header Parameters

accessCodestring

Pass the merchant access code issued by Hesabe

Acceptstring

application/json

Content-Typestring

"application/json"

Sample Encryption and Decryption Process:

The following steps demonstrate how to integrate with this API using sandbox credentials.

Step 1: Create JSON Object

{
  "merchantCode": "842217", // Pass the merchant code provided by Hesabe
}

Payload details:

Contains the list of parameters and their corresponding values required to make the API request.

Field NameDescriptionRequired
merchantCodePass the merchant code provided by HesabeYes

Step 2: Convert the JSON object into an encrypted string format and post to Hesabe

{
  "data": "0e7898bd7464d0c402fe8a949d9cbf9b826ccb9b83b56fa003373275f1947a65"
}

Step 3: Receive encrypted response from Hesabe:

{
  "response": "60a8f6241932227b840a9f5e36987f4d818fba84808037f6ad7f9e741d18e6664ec2852ff018d3a493a35da5f803d38e9e27ea4500dee8c971218e40da5772391a55411ceb7fb54accf30197caa1fca1e870821ca65ff8ac2c90ba55896f339ac188680178b52b3ef225b60ccd9aa0ad70061c012c2bead000f5f8c4c20c17e3693bae93490da3c518cf248e27f74e16c79bacbabbe61aff516b73a059f794a78aeb270934b1b0005bea4a7bcd289c1a3c697e46c54f21368f2f53c969bb722a41e5d534766725853a6c6ff458c7cb58a40a6ac6bfbba7a1b6e3d4ad0607eda3a9657fd8bfd97c0550a0617391fc4f89cf9430213c3454170b9780388dd9b27a1fe55f387f6c884c0d50a84f71abad16b28e16e329026eebf57acf6788801ad1b7e4c6c41c49961469d80eaa993f942494cdcad525ce41b870cb599eef39b2615c7886187ff00280b3ddecb677b9219a0c8b372ffa874bebf7a4278287ecf65dd24a94e8edfdd4f74607a5b82a509f6e736c0a5c7d176953f8027250e7879a9f72e7da6217b8d7ffca9d6db55f8e86c813b723bf3958c67414909dd3057f51d641543f76a8bc03c14c641399e737727468e40c6e476782684e02fde1eddfb439bb83a11d4001bdc71fe03e7c8f0fe56795c52a1d8bd65ccbb486948033b5895776a0bb821cffd295a97ad9bd537c0d279770c8761f87e8112399ea22485008be66a18dfa61e334f2466ef0eba0cb3590614d2c307dad6670ebc2c044606aa3e61d20a1fa5a3e2fd9634cb6d272bbb1ddf3ac7abd9a38b193be33f66ea99d4cb35fae5a7e5d9fb2c1d0e3280a68c0cdcc16ee1a68b2f4cf6a8fac912c9ec8a39081712717bb14e718726ccbaa1b57ac0d6604aaf3af8d095c885b61350786c9713f5569ba89f99d24988a1195e28538be0fb013f48c7784fa7567e3c18ebc205bfde1757774f0a453b5812eb2a090c7c6a156020da944ae559151bfdab215b0ddbbce4cf1668ebb6918b9ee68a151f2f6425d43de94412037dca8ac989e4d056fe32e90e035704a56c4452af5f68be690cab58f6a628258fd59cb255ff86e69fefb53f9a52ff9d559e6436010b0d3095443b209cb1b0bd7c5b9b1b24e9d2c97fcad61778baf6f137c498c133bee1b15847f16565d84623a5cd94c77109b8d12f2225e21809c68983f24e8d13738e5431368d9937961dd3e8068400d6dd13cdabcdcfb92e4fdb66af285077c67c9deb4eb3d93e76082dfd51e0fc0a93d5e287be2616ad6518431af5e9d874586215c7125eb8555c343cf7b25fb71db37092e3dee4dbdc3d0d539603367520f851f85d3322ba00fac08357025cbd115eb592f087953c49d906f0e23da21819fb3642eae19f1c9e9845393989604671cb5ea75891b88549f10a7290fff794bb8f60fb9e6e70316e487a8bd58dfd078674eee43e349f4751c92fc6da4642c1202f497f9fb6292bdadb7909a6ea1b9a7f9076f01a93ca7d868e754d432b0ffcd7027617e192c0791f039719faf1e44490192b34c4240d5bb625a293365d3182f2127b166cd8a192e14c058c1f294fe47fbd248e1fa21e46e8fa69b3ae4528e60b67701adf29b631a3a90ded7931c8a91636be966b60c2f8c1362995e19688ffcd6238ec3ffd038587baef6774e687204c4a9eb4e1b21125c786c730cbe1dca7a01be3c115fcd532cfeb91e5596d54654ebe3cf3c31b837cec030654f0395205d41cd22daf42fa09519808ab93b8f9d71cfa3fbd91407d204ee9750602dc6e79744060c459a333c984425564ec12879e94210e3ee16e127fa7faa914e17a1e4fbd2082cd162613f4429a6af094509984747e9ee620bd2"
}

Step 4: Decrypt the api response and view the JSON output

{
  "status": true,
  "message": "Refund requests",
  "response": {
    "stats": {
      "total_refund_request_count": 1,
      "total_refund_request_amount": "650.000",
      "pending_total_refund_request_amount": "0.000",
      "approved_total_refund_request_amount": "650.000",
      "rejected_total_refund_request_amount": "0.000"
    },
    "refund_request_list": {
      "data": [
        {
          "id": 1400,
          "merchant_id": 84,
          "amount": "650.000",
          "refund_at": "2025-09-10",
          "document_number": null,
          "token": "84221717574846529885446566742",
          "transaction_date": "2025-09-10 09:14:34",
          "order_reference_number": "",
          "recover_method": "1",
          "status": 1,
          "refund_method": "2",
          "remarks": "Auto Refund Approved",
          "approved_by": "Admin",
          "total_balance_amount": "0.000",
          "total_refunded_amount": "650.000",
          "total_transaction_amount": "650.000",
          "created_at": "2025-09-10 10:22:22",
          "updated_at": "2025-09-10 10:38:11",
          "transaction": {
            "id": 159776,
            "amount": 650,
            "admin_charge": 0,
            "token": "84221717574846529885446566742",
            "payment_id": 2,
            "payment_name": "MPGS",
            "display_name": "MPGS",
            "track_id": "343624",
            "transaction_id": "841757484826",
            "service_id": 3,
            "auth": "012353",
            "status": 1,
            "created_at": "2025-09-10 09:14:34"
          }
        }
      ],
      "pagination": {
        "total": 1,
        "count": 1,
        "per_page": 15,
        "current_page": 1,
        "total_pages": 1,
        "page_url": "https://merchantapisandbox.hesabe.com/api/v1/refund",
        "next_page_url": null,
        "previous_page_url": null
      }
    }
  }
}

Response Body

application/json

application/json

application/json

application/json

fetch("https://merchantapisandbox.hesabe.com/api/v1/refund/?fromDate=2025-09-09&toDate=2025-09-11&page=1&search=&data=0e7898bd7464d0c402fe8a949d9cbf9b826ccb9b83b56fa003373275f1947a65", {  method: "GET",  headers: {    "accessCode": "c333729b-d060-4b74-a49d-7686a8353481",    "Accept": "application/json",    "Content-Type": "application/json"  }})
{
  "status": true,
  "message": "Refund requests",
  "response": {
    "stats": {
      "total_refund_request_count": 1,
      "total_refund_request_amount": "650.000",
      "pending_total_refund_request_amount": "0.000",
      "approved_total_refund_request_amount": "650.000",
      "rejected_total_refund_request_amount": "0.000"
    },
    "refund_request_list": {
      "data": [
        {
          "id": 1400,
          "merchant_id": 84,
          "amount": "650.000",
          "refund_at": "2025-09-10",
          "document_number": null,
          "token": "84221717574846529885446566742",
          "transaction_date": "2025-09-10 09:14:34",
          "order_reference_number": "",
          "recover_method": "1",
          "status": 1,
          "refund_method": "2",
          "remarks": "Auto Refund Approved",
          "approved_by": "Admin",
          "total_balance_amount": "0.000",
          "total_refunded_amount": "650.000",
          "total_transaction_amount": "650.000",
          "created_at": "2025-09-10 10:22:22",
          "updated_at": "2025-09-10 10:38:11",
          "transaction": {
            "id": 159776,
            "amount": 650,
            "admin_charge": 0,
            "token": "84221717574846529885446566742",
            "payment_id": 2,
            "payment_name": "MPGS",
            "display_name": "MPGS",
            "track_id": "343624",
            "transaction_id": "841757484826",
            "service_id": 3,
            "auth": "012353",
            "status": 1,
            "created_at": "2025-09-10 09:14:34"
          }
        }
      ],
      "pagination": {
        "total": 1,
        "count": 1,
        "per_page": 15,
        "current_page": 1,
        "total_pages": 1,
        "page_url": "https://merchantapisandbox.hesabe.com/api/v1/refund",
        "next_page_url": null,
        "previous_page_url": null
      }
    }
  }
}
{
  "status": false,
  "message": "Request not found, Please verify the request data",
  "response": null
}
{
  "message": "Internal server error occurred"
}
{
  "status": false,
  "code": 506,
  "message": "Invalid Request Data",
  "response": null
}