API lấy giao dịch

Dùng để lấy một hoặc nhiều giao dịch ngân hàng

Trước khi bắt đầu

Một số lưu ý trước khi bắt đầu với các API liên quan tới webhook:

  • Một tài khoản Casso đã liên kết một tài khoản ngân hàng. Để test với API này có thể sử dụng tài khoản demo.

  • Bạn cần có API Key hoặc Access token từ Oauth 2.0 của Casso để thiết lập ở trường Authorization HTTP Header.

Lấy giao dịch ngân hàng

GET https://oauth.casso.vn/v2/transactions

API này cho phép lấy toàn bộ thông tin giao dịch ngân hàng.

Query Parameters

Headers

{
    "error": 0,
    "message": "success",
    "data": {
        "page": 4,
        "pageSize": 10,
        "nextPage": 5,
        "prevPage": 3,
        "totalPages": 35,
        "totalRecords": 341,
        "records": [
            {
                "id": 5789,
                "tid": "TF2104152395814062",
                "description": "Khanhnm chuyen tien",
                "amount": -193000,
                "cusum_balance": 1070904,
                "when": "2021-04-15"
            },
            {
                "id": 5790,
                "tid": "TF2104152997602811",
                "description": "Chuyen tien nap momo",
                "amount": -350000,
                "cusum_balance": 720904,
                "when": "2021-04-15"
            },
        ]
    }
}

Chi tiết các tham số

Nếu tham số nào không tồn tại thì sẽ lấy giá trị mặc định.

Ví dụ:

curl --location --request GET 'https://oauth.casso.vn/v2/transactions?fromDate=2021-04-01&page=4&pageSize=20&sort=ASC' \
--header 'Authorization: Apikey <"API Key của bạn"> hoặc Bearer <"access token từ OAuth2">'

Lấy chi tiết một giao dịch

GET https://oauth.casso.vn/v2/transactions/:id

API cho phép bạn xem chi tiết của một giao dịch ngân hàng.

Path Parameters

Headers

{
    "error": 0,
    "message": "success",
    "data": {
        "id": 314344,
        "tid": "TF210702253136879",
        "description": "DH220",
        "amount": -10000,
        "cusumBalance": 389460,
        "when": "2021-07-02T12:50:00",
        "bankSubAccId": "8007041023848"
    }
}

Ví dụ:

curl --location --request GET 'https://oauth.casso.vn/v2/transactions/123 \
--header 'Authorization: Apikey <"API Key của bạn"> hoặc Bearer <"access token từ OAuth2"'

Last updated