Casso Developer
stable (v2)
Search
K
Comment on page

API lấy thông tin tài khoản ngân hàng

Truy vấn một hoặc nhiều tài khoản ngân hàng đã kết nối và danh sách giao dịch của tài khoản đó.

Trước khi bắt đầu

Một số lưu ý trước khi bắt đầu:

Danh sách tài khoản ngân hàng

get
https://oauth.casso.vn
/v2/accounts
Lấy danh sách các tài khoản ngân hàng

Ví dụ:

CURL
PHP
JAVA
curl --location --request GET 'https://oauth.casso.vn/v2/accounts \
--header 'Authorization: Apikey <"API Key của bạn"> hoặc Bearer <"access token từ OAuth2"'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://oauth.casso.vn/v2/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Apikey <"API Key của bạn"> hoặc Bearer <"access token từ OAuth2">",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://oauth.casso.vn/v2/accounts")
.get()
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Apikey <"API Key của bạn"> hoặc Bearer <"access token từ OAuth2">")
.build();
Response response = client.newCall(request).execute();

Chi tiết tài khoản ngân hàng

get
https://oauth.casso.vn
/v2/accounts/:accountId
Chi tiết tài khoản ngân hàng

Ví dụ:

CURL
PHP
JAVA
curl --location --request GET 'https://oauth.casso.vn/v2/accounts/123 \
--header 'Authorization: Apikey <"API Key của bạn"> hoặc Bearer <"access token từ OAuth2"'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://oauth.casso.vn/v2/accounts/123",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Apikey <"API Key của bạn"> hoặc Bearer <"access token từ OAuth2">",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://oauth.casso.vn/v2/accounts/123")
.get()
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Apikey <"API Key của bạn"> hoặc Bearer <"access token từ OAuth2">")
.build();
Response response = client.newCall(request).execute();

Danh sách giao dịch ngân hàng

get
https://oauth.casso.vn
/v2/accounts/:accountId/transactions
Danh sách giao dịch của một tài khoản ngân hàng

Chi tiết các tham số

Tham số
Mô tả
Gá trị mặc định
fromDate
Thời gian bắt đầu bạn muốn lấy giao dịch
7 ngày gần nhất
toDate
Thời gian kết thúc bạn muốn lấy giao dịch
Hôm nay
page
Số thứ tự trang
1
pageSize
Số giao dịch trên một trang
10
sort
Sắp xếp giao dịch, các giá trị gồm: ASC, DESC. Với ASC là tăng dần còn DESC là giảm dần.
ASC
  • Nếu tham số nào không tồn tại thì sẽ lấy giá trị mặc định.
  • Xem chi tiết các trường của một giao dịch, xem chi tiết

Ví dụ:

CURL
PHP
JAVA
curl --location --request GET 'https://oauth.casso.vn/v2/accounts/123/transactions?fromDate=2021-04-01&toDate=2022-07-05&page=4&pageSize=20&sort=ASC' \
--header 'Authorization: Apikey <API Key của bạn> hoặc Bearer <access token từ OAuth2>'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://oauth.casso.vn/v2/accounts/123/transactions?fromDate=2021-04-01&page=4&pageSize=20&sort=ASC",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Authorization: Apikey <"API Key của bạn"> hoặc Bearer <"access token từ OAuth2">",
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://oauth.casso.vn/v2/accounts/123/transactions?fromDate=2021-04-01&page=4&pageSize=20&sort=ASC")
.get()
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Apikey <"API Key của bạn"> hoặc Bearer <"access token từ OAuth2">")
.build();
Response response = client.newCall(request).execute();