> ## Documentation Index
> Fetch the complete documentation index at: https://docs.girostack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Find Transactions

> This endpoint returns all transactions belonging to the user.

`GET {{baseurl}}/transactions`

<Tabs>
  <Tab title="Staging">
    ```
       https://gw.stg.girostack.com/v1
    ```
  </Tab>

  <Tab title="Production">
    ```
       https://gw.prod.girostack.com/v1
    ```
  </Tab>
</Tabs>

<Card title="Headers">
  <ParamField body="x-giro-key" type="string" required>
    Pass your account's secret key as the value.
  </ParamField>
</Card>

<Card title="Query Params">
  <ParamField query="entry" type="string">
    Value should be `credit` or `debit`
  </ParamField>

  <ParamField query="status" type="string">
    Value should be `pending`, `processing`, `success` or `failed`
  </ParamField>

  <ParamField query="amount" type="number" />

  <ParamField query="live" type="boolean" />

  <ParamField query="createdAt" type="object">
    Value should be an object containing a date string in this format `{"startDate": "2024-01-01",  "endDate": "2024-03-30"}`
  </ParamField>
</Card>

<RequestExample>
  ```bash cURL theme={null}
  curl --location '{{API_BASE_URL}}/transactions' \
  --header 'x-giro-key: {{SECRET_KEY}}' \
  --header 'Content-Type: application/json'

  ```

  ```javascript Node.JS theme={null}
  const fetch = require("node-fetch");

  const url = "{{API_BASE_URL}}/transactions";
  const headers = {
    "x-giro-key": "{{SECRET_KEY}}",
    "Content-Type": "application/json",
  };

  fetch(url, {
    method: "GET",
    headers: headers,
  })
    .then((response) => response.json())
    .then((data) => console.log(data))
    .catch((error) => console.error("Error:", error));
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  curl_setopt_array($curl, array(
    CURLOPT_URL => '{{API_BASE_URL}}/transactions',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => array(
      'x-giro-key: {{SECRET_KEY}}',
      'Content-Type: application/json'
    )
  ));

  $response = curl_exec($curl);
  $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

  if (curl_errno($curl)) {
    echo 'Error: ' . curl_error($curl);
  } else {
    echo "Response Code: $httpcode\n";
    echo $response;
  }

  curl_close($curl);
  ?>
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "meta": {
      "statusCode": 200,
      "success": true,
      "pagination": {
        "totalCount": 2,
        "perPage": 10,
        "current": 1
      }
    },
    "data": [
      {
        "_id": "66e2a48a7648f2b0f28e86742",
        "publicId": "trx-8d4332e00-fc44-4bfe-95a9-348a2r39d5888",
        "auth": "65b12bbf512f9932b67f53d7",
        "account": "65b12bbf36e38c6bfbe35f95",
        "deletedAt": null,
        "tags": [],
        "currency": "NGN",
        "entry": "debit",
        "destination": "bka-849sd4a45-c04c-4226-825a-12dff9c3fg40a9",
        "live": true,
        "destinationType": "BankAccount",
        "destinationData": {
          "id": 4353,
          "publicId": "bka-849sd4a45-c04c-4226-825a-12dff9c3fg40a9",
          "bankName": "Opay",
          "bankCode": "999992",
          "accountName": "Jane Doe",
          "accountNumber": "7086576668",
          "processor": "source",
          "clientIds": {},
          "nameEnquiryRef": "555558136afb46a6b6sde45a4653a4b3c3re384ccfb5a90131037"
        },
        "source": "vba-00228fe5c-aeff-45f5-a338-6b045545714b",
        "sourceType": "VirtualAccount",
        "sourceData": {
          "id": 113,
          "publicId": "vba-00228fe5c-aeff-45f5-a338-6b045545714b",
          "bankName": "Source MFB",
          "bankCode": "090641",
          "accountName": "Giro Expenses",
          "accountNumber": "6153332037",
          "currency": "NGN",
          "reference": null,
          "processor": "source"
        },
        "amount": 2000000,
        "balance": 5000000,
        "clientTransaction": {
          "fee": 2500,
          "actualAmount": 2002500
        },
        "fee": 2500,
        "feeReference": "fee-73887083e-c99b-42ee-85ec-4577998336454",
        "actualAmount": 2002500,
        "narration": "Expenses",
        "reference": "TRF-7107555149278192088783030331355765593680-17261292800944",
        "debitReference": null,
        "tRef": "GIR-6291285234044666400580911355723887500713-1726129289945",
        "linkRef": "TRFLNK-3205567866441776185720553998786846299624-1726129289944",
        "status": "success",
        "processor": "source",
        "meta": {
          "isThirdParty": true,
          "rate": {
            "rateId": 1,
            "rate": 1,
            "sourceCurrency": "NGN",
            "destinationCurrency": "NGN",
            "convertedAmount": 2000000
          },
          "credit": {
            "sourceType": "VirtualAccount",
            "sourceData": {
              "id": 113,
              "publicId": "vba-00228fe5c-aeff-45f5-a338-6b045545714b",
              "bankName": "Source MFB",
              "bankCode": "090641",
              "accountName": "Giro Expenses",
              "accountNumber": "6153332037",
              "currency": "NGN",
              "reference": null,
              "processor": "source"
            },
            "source": "vba-00b8fe5c-aeff-45f5-a338-6b082d35714b",
            "destination": "bka-84934a45-c08c-4426-825a-122f9c3f40a9",
            "destinationType": "BankAccount",
            "destinationData": {
              "id": 4353,
              "publicId": "bka-849sd4a45-c04c-4226-825a-12dff9c3fg40a9",
              "bankName": "Opay",
              "bankCode": "999992",
              "accountName": "Jane Doe",
              "accountNumber": "7086576668",
              "processor": "source",
              "clientIds": {}
            },
            "amount": 2000000,
            "currency": "NGN",
            "actualAmount": 2002500,
            "fee": 2500,
            "narration": "Expenses",
            "balance": 5000000
          },
          "verify": {
            "status": "success",
            "data": {
              "status": "success",
              "message": "request successful",
              "data": {
                "narration": "Expenses",
                "amount": 20000,
                "date": "2024-09-12T08:21:30.542Z",
                "beneficiary": {
                  "accountNumber": "7086576668",
                  "bankCode": "100004",
                  "bankName": "Opay",
                  "accountName": "Jane Doe"
                },
                "transactionStatus": "successful",
                "sessionId": "0906412409889921317200929291099",
                "type": "debit"
              }
            }
          }
        },
        "currencyPair": "NGN/NGN",
        "batchId": null,
        "updatedAt": "2024-09-12T08:25:00.610Z",
        "createdAt": "2024-09-12T08:21:29.945Z",
        "metadata": {}
      },

      {
        "_id": "66e1adc363452b0f33e86113",
        "publicId": "trx-3d64r353-3dbd-47aa-b434-76a7e3f9a4ed6",
        "deletedAt": null,
        "tags": [],
        "auth": "65b12bbf512f9932b67f53d7",
        "account": "65b12bbf36e38c6bfbe35f95",
        "currency": "NGN",
        "entry": "credit",
        "destination": "vba-00228fe5c-aeff-45f5-a338-6b045545714b",
        "live": true,
        "destinationType": "VirtualAccount",
        "destinationData": {
          "id": 35,
          "publicId": "vba-00228fe5c-aeff-45f5-a338-6b045545714b",
          "bankName": "Source MFB",
          "bankCode": "090641",
          "accountName": "Giro Expenses",
          "accountNumber": "6153332037",
          "currency": "NGN",
          "reference": null,
          "processor": "source"
        },
        "source": "src-6t57d7567-3c4f-444a-8a29-e5818c34781a",
        "sourceType": "External",
        "sourceData": {
          "id": 326,
          "processor": "source",
          "type": "External",
          "publicId": "src-6t57d7567-3c4f-444a-8a29-e5818c34781a",
          "createdAt": "2024-09-11T14:41:22.568Z",
          "updatedAt": "2024-09-11T14:41:22.568Z",
          "channel": "dedicated_nuban",
          "reference": "000014240911153948284061812350",
          "sessionId": "000014240345153948267861002350",
          "bankName": "Access Bank",
          "bankCode": "044",
          "nibssBankCode": "000014",
          "accountName": "Salako Emmanuel",
          "accountNumber": "0043304350",
          "currency": "NGN",
          "live": true
        },
        "amount": 12000,
        "balance": 29000,
        "fee": 0,
        "feeReference": null,
        "actualAmount": 12000,
        "narration": "3218013037 Payment Collected - TRFRefundFRM SALAKO EMMANUEL TO giroGiro Expenses",
        "reference": "0000142409111539482330618562350",
        "debitReference": null,
        "tRef": "GIR-483021596135432381937524243435428070872-1726065682699",
        "linkRef": "TRXCLNK-0255033096945280276879217641986838769535-1726055682601",
        "status": "success",
        "processor": "source",
        "meta": {
          "clientResponse": {
            "message": "credit successful",
            "amount": 12000,
            "tranDateTime": "2024-09-11T14:40:24.000Z",
            "currency": "NGN",
            "processor": "source",
            "narration": "3218013037 Payment Collected - TRFRefundFRM SALAKO EMMANUEL TO giroGiro Expenses",
            "reference": "0000142409111539482330618562350",
            "type": "credit",
            "authorization": {
              "channel": "dedicated_nuban",
              "reference": "000014240911153948284061812350",
              "sessionId": "000014240345153948267861002350",
              "bankName": "Access Bank",
              "bankCode": "044",
              "nibssBankCode": "000014",
              "accountName": "Salako Emmanuel",
              "accountNumber": "0043304350"
            },
            "status": "success"
          },
          "rate": {
            "rateId": 1,
            "rate": 1,
            "sourceCurrency": "NGN",
            "destinationCurrency": "NGN",
            "convertedAmount": 12000
          },
          "credit": {
            "auth": "65b12bbf512f9932b67f53d7",
            "account": "65b12bbf36e38c6bfbe35f95",
            "destination": "vba-00228fe5c-aeff-45f5-a338-6b045545714b",
            "destinationType": "VirtualAccount",
            "destinationData": {
              "id": 35,
              "publicId": "vba-00228fe5c-aeff-45f5-a338-6b045545714b",
              "bankName": "Source MFB",
              "bankCode": "090641",
              "accountName": "Giro Expenses",
              "accountNumber": "6153332037",
              "currency": "NGN",
              "reference": null,
              "processor": "source"
            },
            "source": "src-6t57d7567-3c4f-444a-8a29-e5818c34781a",
            "sourceType": "External",
            "sourceData": {
              "id": 326,
              "processor": "source",
              "type": "External",
              "publicId": "src-6t57d7567-3c4f-444a-8a29-e5818c34781a",
              "createdAt": "2024-09-11T14:41:22.568Z",
              "updatedAt": "2024-09-11T14:41:22.568Z",
              "channel": "dedicated_nuban",
              "reference": "000014240911153948284061812350",
              "sessionId": "000014240345153948267861002350",
              "bankName": "Access Bank",
              "bankCode": "044",
              "nibssBankCode": "000014",
              "accountName": "Salako Emmanuel",
              "accountNumber": "0043304350",
              "currency": "NGN",
              "live": true
            },
            "narration": "3218013037 Payment Collected - TRFRefundFRM SALAKO EMMANUEL TO giroGiro Expenses",
            "currency": "NGN",
            "linkRef": "TRXCLNK-0255033096945280276879217641986838769535-1726055682601",
            "amount": 12000,
            "actualAmount": 12000,
            "fee": 0
          }
        },
        "currencyPair": "NGN/NGN",
        "batchId": null,
        "updatedAt": "2024-09-11T14:41:22.779Z",
        "createdAt": "2024-09-11T14:41:22.699Z",
        "metadata": {}
      }
    ]
  }
  ```
</ResponseExample>
