Skip to main content

Transactions

Retrieve transaction data

You can query up to 36 months of bank transaction history.

  • The Cas Transactions API allows you to automatically and securely retrieve the transaction history of bank accounts. Through this integration, you can access detailed data on completed transactions, balances, related accounts, and many other useful insights to serve needs such as:
  • Transaction reconciliation
  • Automated income and expense recording
  • Accounting and financial support
  • Credit scoring systems and cash flow analysis

Steps to Integrate Transactions

Below are the steps to integrate Transactions into your product.

  1. Create a grant /grant/token with scopes set to transaction.
  2. Open the Cas Link interface using the grantToken returned from the step above. View details
  3. After the user completes authentication, your frontend will receive a publicToken, which can be used to obtain an accessToken for the grant.
  4. You can now call the Transaction History API.

Call API

Create access grant for Transactions

curl --location 'https://sandbox.bankhub.dev/grant/token' \
--header 'X-BankHub-Api-Version: 2023-01-01' \
--header 'x-client-id: <CLIENT_ID_HERE>' \
--header 'x-secret-key: <SECRET_KEY_HERE>' \
--header 'Content-Type: application/json' \
--data '{
"scopes": "transaction",
"language": "vi",
"redirectUri": "https://your-domain.vn/link",
}'
info

Xem chi tiết API, tại đây

Get accessToken from publicToken

  curl --location 'https://sandbox.bankhub.dev/grant/exchange' \
--header 'X-BankHub-Api-Version: 2023-01-01' \
--header 'x-client-id: <CLIENT_ID_HERE>' \
--header 'x-secret-key: <SECRET_KEY_HERE>' \
--header 'Content-Type: application/json' \
--data '{
"publicToken": "bdbde2bad-7685-4f95-987c-71309a4a3"
}'
info

For detail API, here

API historical transactions

  curl --location 'https://sandbox.bankhub.dev/transactions' \
--header 'X-BankHub-Api-Version: 2023-01-01' \
--header 'Authorization: <ACCESS_TOKEN_HERE>' \
--header 'x-client-id: <CLIENT_ID_HERE>' \
--header 'x-secret-key: <SECRET_KEY_HERE>'
info

For detail API, here