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

# Fetch Transactions

> Retrieve a list of transactions for a specific account.

## Overview

This endpoint retrieves a list of transactions for a specific account.

### HTTP Request

**GET** `/v1/accounts/{account_number}/transactions`

### Parameters

* **Header**: `x-carbon-key` (string, required) - API key for authentication.
* **Path**:
  * `account_number` (integer, required) - The account number.
* **Query**:
  * `page` (integer, optional, default=1) - The page number for paginated results.
  * `limit` (integer, optional, default=10) - The number of transactions per page.

### Example Response

```json theme={null}
{
  "status": "success",
  "message": "transaction fetched successfully",
  "data": {
    "transactions": [
      {
        "wasReversed": false,
        "amount": 0,
        "description": "",
        "category": "",
        "uniqueRef": "",
        "internalRef": "",
        "transactionType": "",
        "entryDate": "",
        "updatedDate": "",
        "internal": true,
        "accountId": "",
        "externalStatus": "",
        "balance": 0
      }
    ],
    "last": true,
    "query": {
      "limit": 10,
      "offset": 0,
      "includeBalance": true,
      "status": [""],
      "entity": ""
    }
  }
}
```


## OpenAPI

````yaml GET /v1/accounts/{account_number}/transactions
openapi: 3.0.0
info:
  title: Carbon Business API
  description: >-
    ## Welcome to our API Developer Documentation


    Carbon aims to unlock the full potential of your business with a
    feature-rich account designed for growth.


    ## Integrations


    We aim to provide our APIs for developers and businesses to offer financial
    services to their existing customer base through REST APIs without doing the
    heavy lifting. Our API has predictable resource-oriented URLs, accepts
    form-encoded request bodies, returns JSON-encoded responses, and uses
    standard HTTP response codes, authentication, and verbs.


    ### Authentication


    `Authorization : API Key`


    Header  

    `x-carbon-key : value`


    `x-carbon-key` can be generated via developer page on Carbon Business


    | Environment | URL |

    | --- | --- |

    | Live |  |

    | Sandbox |
    [https://carbonapistagingsecure.getcarbon.co/baas/api](https://carbonapistagingsecure.getcarbon.co/baas/api)
    |


    ### **Handling Errors**


    We use the conventional HTTP response codes to indicate the success or
    failure of an API request.  

    Codes in the 2xx range indicate success. Codes in the 4xx range indicate an
    error that failed given the information provided (e.g., a required parameter
    was omitted, etc.). Codes in the 5xx range indicate an error with our
    servers.


    | Error | Description |

    | --- | --- |

    | 400 - Bad Request | The request was unacceptable, often due to missing a
    required parameter. |

    | 401 - Unauthorized | Not a valid API key was provided. |

    | 402 - Request Failed | The parameters were valid but the request failed. |

    | 403 - Forbidden | The API key doesn't have permission to perform the
    request. |

    | 404 - Not Found | The requested resource doesn't exist. |

    | 429 - Too Many Requests | Too many requests hit the API |

    | 500, 502, 503, 504 - Server Errors | System Error |
  version: 1.0.0
servers:
  - url: https://carbonapistagingsecure.getcarbon.co/baas/api
    description: >-
      Replace {{base_url}} with your API base URL (e.g.,
      https://api.example.com)
security:
  - apikeyAuth: []
tags:
  - name: Accounts
    description: >-
      Virtual accounts are generated account details (account number and bank)
      that allow Carbon Business merchants to receive payments from customers
      via NGN bank transfer. This is currently only available in naira (NGN).


      Virtual accounts are either dynamic (temporary) or static (permanent). A
      dynamic account number expires after handling a transaction, while a
      static account number doesn't expire.


      **Static Account**


      Creating static accounts can be useful when receiving recurring payments
      through bank transfers. The process involves generating a static virtual
      account with customer information. Once payment is made, we will send you
      a webhook notification, which you can then manage.


      **Dynamic Account**


      Creating dynamic accounts can be useful when receiving one-time payments
      through bank transfers. The process involves generating a dynamic virtual
      account with a set amount for the customer during checkout. Once payment
      is made, we will send you a webhook notification, which you can then
      manage.


      Key things you can do with these endpoints:


      - Create an account

      - Retreive an account

      - Verify Transaction

      - Retreive a list of transactions
  - name: Accounts > Transactions
  - name: Banks
    description: |-
      - Get a list of banks and financial institutions
      - Verify/resolve account details
  - name: Customers
    description: >-
      This collection contains a set of API endpoints to manage customer-related
      operations for an application. The endpoints allow for creating a new
      customer, retrieving a list of all customers, and fetching details of a
      single customer.


      - Create Customer
          
      - Fetch Customer/Customers
  - name: Payout
    description: |-
      - Make Transfer
      - Verify Transfer
  - name: Status
    description: '- Service Health check'
  - name: Verification
  - name: Webhook
    description: |-
      ## EVENTS

      `account.incoming-transaction`

      ``` json
      {
          "event": "account.incoming-transaction",
          "data": {
              "id": "string",
              "amount": "float",
              "currency": "string",
              "transactionType": "string",
              "entryDate": "datetime",
              "uniqueRef": "string",
              "account": {
                  "id": "string",
                  "bankAccount": {
                      "accountName": "string",
                      "accountNumber": "string",
                      "bank": {
                          "code": "string",
                          "name": "string"
                      }
                  },
                  "static": boolean,
                  "currency": "string",
                  "clientId": "string"
              }
            }
      }

       ```

      `account.outgoing-transaction`

      ``` json
      {
          "event": "account.outgoing-transaction",
          "data": {
              "id": "string",
              "amount": "float",
              "currency": "string",
              "transactionType": "string",
              "entryDate": "datetime",
              "uniqueRef": "string",
              "account": {
                  "id": "string",
                  "bankAccount": {
                      "accountName": "string",
                      "accountNumber": "string",
                      "bank": {
                          "code": "string",
                          "name": "string"
                      }
                  },
                  "static": boolean,
                  "currency": "string",
                  "clientId": "string"
              }
          }
      }

       ```
  - name: Loans
    description: >-
      Partner lending API. Enables fintech partners to originate business loans
      for their end-customers.


      - Enroll customers for lending and trigger KYC

      - Submit loan applications and supporting documents

      - Manage offer acceptance, disbursement account, and post-offer steps

      - Charge repayments and retrieve repayment schedules
paths:
  /v1/accounts/{account_number}/transactions:
    get:
      tags:
        - Accounts > Transactions
      summary: Fetch Transactions
      description: |-
        ### Retrieve Account Transactions

        This endpoint retrieves a list of transactions for a specific account.

        #### Request

        - Method: GET
        - URL: {{BASE_URL}}/api/v1/accounts/:account_number/transactions
        - Query Parameters:
            - page (optional, default=1, type=integer): The page number for paginated results
            - limit (optional, default=10, type=integer): The number of transactions to be returned per page

        #### Response

        - Status: 200
        - Content-Type: application/json
            

        Example Response Body:

        ``` json
        {
            "status": "",
            "message": "",
            "data": {
                "transactions": [
                    {
                        "wasReversed": true,
                        "amount": 0,
                        "description": "",
                        "category": "",
                        "uniqueRef": "",
                        "internalRef": "",
                        "transactionType": "",
                        "entryDate": "",
                        "updatedDate": "",
                        "internal": true,
                        "accountId": "",
                        "externalStatus": "",
                        "balance": 0
                    }
                ],
                "last": true,
                "query": {
                    "limit": 0,
                    "offset": 0,
                    "includeBalance": true,
                    "status": [""],
                    "entity": ""
                }
            }
        }

         ```
      parameters:
        - name: x-carbon-key
          in: header
          schema:
            type: string
          required: true
          example: '{{access_token}}'
        - name: page
          in: query
          schema:
            type: integer
          example: '1'
        - name: limit
          in: query
          schema:
            type: integer
          example: '10'
        - name: account_number
          in: path
          schema:
            type: integer
          required: true
          example: '6009490194'
      responses:
        '200':
          description: OK
          headers:
            Content-Security-Policy:
              schema:
                type: string
                example: >-
                  default-src 'self';base-uri 'self';font-src 'self' https:
                  data:;form-action 'self';frame-ancestors 'self';img-src 'self'
                  data:;object-src 'none';script-src 'self';script-src-attr
                  'none';style-src 'self' https:
                  'unsafe-inline';upgrade-insecure-requests
            Cross-Origin-Opener-Policy:
              schema:
                type: string
                example: same-origin
            Cross-Origin-Resource-Policy:
              schema:
                type: string
                example: same-origin
            Origin-Agent-Cluster:
              schema:
                type: string
                example: '?1'
            Referrer-Policy:
              schema:
                type: string
                example: no-referrer
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15552000; includeSubDomains
            X-Content-Type-Options:
              schema:
                type: string
                example: nosniff
            X-DNS-Prefetch-Control:
              schema:
                type: string
                example: 'off'
            X-Download-Options:
              schema:
                type: string
                example: noopen
            X-Frame-Options:
              schema:
                type: string
                example: SAMEORIGIN
            X-Permitted-Cross-Domain-Policies:
              schema:
                type: string
                example: none
            X-XSS-Protection:
              schema:
                type: integer
                example: '0'
            RateLimit-Policy:
              schema:
                type: string
                example: 100;w=900
            RateLimit-Limit:
              schema:
                type: integer
                example: '100'
            RateLimit-Remaining:
              schema:
                type: integer
                example: '96'
            RateLimit-Reset:
              schema:
                type: integer
                example: '831'
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: '4090'
            ETag:
              schema:
                type: string
                example: W/"ffa-66Q6zLzOr80kIV6WChhJDub2dh0"
            Date:
              schema:
                type: string
                example: Wed, 28 Feb 2024 00:02:14 GMT
            Connection:
              schema:
                type: string
                example: keep-alive
            Keep-Alive:
              schema:
                type: string
                example: timeout=5
          content:
            application/json:
              schema:
                type: object
              example:
                status: success
                message: transaction fetched successfully
                data:
                  transactions:
                    - wasReversed: false
                      amount: 20050
                      description: 'Transfer from Gabriel Fuja (TRF/2000/10009/0001) '
                      category: Fund Transfer
                      uniqueRef: '203018641660868'
                      internalRef: '991042'
                      transactionType: DEBIT
                      entryDate: 2024-02-20T13:18:40.000+0000
                      updatedDate: 2024-02-20T13:18:42.000+0000
                      internal: false
                      accountId: '6009490194'
                      externalStatus: PENDING
                      balance: 833340
                    - wasReversed: false
                      amount: 105550
                      description: >-
                        Transfer from CARBON BUSINESS DEMO (Testing XPS FT API
                        via Postman 01)
                      category: Fund Transfer
                      uniqueRef: '204713729240845'
                      internalRef: '991033'
                      transactionType: DEBIT
                      entryDate: 2024-02-20T12:23:56.000+0000
                      updatedDate: 2024-02-20T12:23:58.000+0000
                      internal: false
                      accountId: '6009490194'
                      externalStatus: PENDING
                      balance: 853390
                    - wasReversed: false
                      amount: 20000
                      description: 'Transfer from Gabriel Fuja (TRF/2000/10009/0001) '
                      category: Fund Transfer
                      uniqueRef: '209421508033615'
                      internalRef: '991020'
                      transactionType: DEBIT
                      entryDate: 2024-02-20T08:30:55.000+0000
                      updatedDate: 2024-02-20T08:31:01.000+0000
                      internal: true
                      accountId: '6009490194'
                      externalStatus: PENDING
                      balance: 958940
                    - wasReversed: false
                      amount: 20000
                      description: 'Transfer from Gabriel Fuja (TRF/2000/10009/0001) '
                      category: Fund Transfer
                      uniqueRef: '201195904386519'
                      internalRef: '991018'
                      transactionType: DEBIT
                      entryDate: 2024-02-20T08:30:17.000+0000
                      updatedDate: 2024-02-20T08:30:22.000+0000
                      internal: true
                      accountId: '6009490194'
                      externalStatus: PENDING
                      balance: 978940
                    - wasReversed: false
                      amount: 15050
                      description: >-
                        Transfer from CARBON BUSINESS DEMO (Testing XPS FT API
                        via Postman 01)
                      category: Fund Transfer
                      uniqueRef: '206403559607164'
                      internalRef: '987990'
                      transactionType: DEBIT
                      entryDate: 2024-02-17T06:14:42.000+0000
                      updatedDate: 2024-02-17T06:14:43.000+0000
                      internal: false
                      accountId: '6009490194'
                      externalStatus: PENDING
                      balance: 998940
                    - wasReversed: false
                      amount: 10050
                      description: >-
                        Transfer from CARBON BUSINESS DEMO (Testing XPS FT API
                        via Postman 01)
                      category: Fund Transfer
                      uniqueRef: '200020180255668'
                      internalRef: '987987'
                      transactionType: DEBIT
                      entryDate: 2024-02-17T01:55:35.000+0000
                      updatedDate: 2024-02-17T01:55:37.000+0000
                      internal: false
                      accountId: '6009490194'
                      externalStatus: PENDING
                      balance: 1013990
                    - wasReversed: false
                      amount: 10050
                      description: >-
                        Transfer from CARBON BUSINESS DEMO (Testing XPS FT API
                        via Postman 01)
                      category: Fund Transfer
                      uniqueRef: '208354140652338'
                      internalRef: '987984'
                      transactionType: DEBIT
                      entryDate: 2024-02-17T00:00:04.000+0000
                      updatedDate: 2024-02-17T00:00:06.000+0000
                      internal: false
                      accountId: '6009490194'
                      externalStatus: PENDING
                      balance: 1024040
                    - wasReversed: false
                      amount: 500000
                      description: >-
                        Transfer from test demo
                        (TRF/INTERNAL/FRM/6009490194/5649795915)
                      category: Fund Transfer
                      uniqueRef: '208693256860847'
                      internalRef: '981005'
                      transactionType: DEBIT
                      entryDate: 2024-01-26T18:29:14.000+0000
                      updatedDate: 2024-01-26T18:29:16.000+0000
                      internal: false
                      accountId: '6009490194'
                      externalStatus: PENDING
                      balance: 1034090
                    - wasReversed: false
                      amount: 100000
                      description: BUSINES BANKING DEMO
                      category: Wallet Topup
                      uniqueRef: 324334544-561706293247
                      internalRef: '981001'
                      transactionType: CREDIT
                      entryDate: 2024-01-26T18:20:48.000+0000
                      updatedDate: 2024-01-26T18:20:52.000+0000
                      internal: false
                      accountId: '6009490194'
                      externalStatus: PENDING
                      balance: 1534090
                    - wasReversed: false
                      amount: 100000
                      description: BUSINES BANKING DEMO
                      category: Wallet Topup
                      uniqueRef: 324334544-561706293195
                      internalRef: '981000'
                      transactionType: CREDIT
                      entryDate: 2024-01-26T18:19:57.000+0000
                      updatedDate: 2024-01-26T18:20:03.000+0000
                      internal: false
                      accountId: '6009490194'
                      externalStatus: PENDING
                      balance: 1434090
                  last: false
                  query:
                    limit: 10
                    offset: 0
                    includeBalance: true
                    status:
                      - SUCCESS
                    entity: NG
components:
  securitySchemes:
    apikeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Provide your API key in the 'apikey' header.

````