KBank Open API (893393e651eb150eb681016f03f2f0a1c6699141)

Download OpenAPI specification:Download

Package kbank.v1 defines shared v1 types and messages for the kbank.v1.* services.

Authentication

OAuth2

kbank impements Authorization using the OAuth 2.0 framework. It enables secure authorization using standard methods that can easily be integrated any application. Everything should look familiar, if you're familiar with OAuth 2.0. If not, you might want to check out the OAuth 2.0 resources here.

Your first step is to signup for a developer account at the developer portal. Through the developer account you will receive/set up your:

  • Client ID
  • Client secret
  • Valid redirect URIs
  • Select scopes


Base URL for Authorization service: https://developer-dev.kbank.brank.as

Access token is put in header: Authorization: Bearer <your token>

Security scheme type: OAuth2
authorizationCode OAuth Flow
Authorization URL: https://developer-dev.kbank.brank.as/auth/realms/soba/protocol/openid-connect/auth
Token URL: https://developer-dev.kbank.brank.as/auth/realms/soba/protocol/openid-connect/token
Scopes:
  • profile -

    Read user's profile information

Account

Create new deposit account

Create new deposit account

Authorizations:
Request Body schema: application/json
customer
string
major
string (MajorType is the account type enum. CK : CHECKING SAV : SAVING TD : TimeDeposit CML : CommercialLoan MTG : MortgageLoan CNS : ConsumerLoan)
Default: "MajorTypeUKNOWN"
Enum:"MajorTypeUKNOWN" "CHECKING" "SAVING" "TIME_DEPOSIT" "COMMERCIAL_LOAN" "MORTAGE_LOAN" "CONSUMER_LOAN"
account_id
string (If null, auto-generated in backend)
user_information
object (CreateAccountRequestUserInformationMessage)
interest_rate
string
account_description
string
customer_type
string (CreateAccountRequestEntityType)
Default: "UNKNOWN"
Enum:"UNKNOWN" "PERS" "ORG"
minor
string
debit_transaction
object (CreateAccountRequestDebitTransactionMessage)
branch
string
account_roles
Array of object (CreateAccountRequestAccountRolesMessage)
maturity_date
string

Responses

200

A successful response.

post /v1/account/deposit
https://developer-dev.kbank.brank.as/v1/account/deposit

Request samples

application/json
Copy
Expand all Collapse all
{
  • "customer": "string",
  • "major": "MajorTypeUKNOWN",
  • "account_id": "string",
  • "user_information":
    {
    },
  • "interest_rate": "string",
  • "account_description": "string",
  • "customer_type": "UNKNOWN",
  • "minor": "string",
  • "debit_transaction":
    {
    },
  • "branch": "string",
  • "account_roles":
    [
    ],
  • "maturity_date": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "debit_transaction_number": "string",
  • "major": "MajorTypeUKNOWN",
  • "credit_transaction_number": "string",
  • "account_id": "string",
  • "minor": "string"
}

Update account information

Update account information

Authorizations:
path Parameters
account_id
required
string
Request Body schema: application/json
account_id
string
description
string

Responses

200

A successful response.

put /v1/account/{account_id}
https://developer-dev.kbank.brank.as/v1/account/{account_id}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "account_id": "string",
  • "description": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "error_message": "",
  • "error_code": "0",
  • "success": true
}

Retrieves account information

Get account information

Authorizations:
path Parameters
account_id
required
string

Responses

200

A successful response.

get /v1/account/{account_id}
https://developer-dev.kbank.brank.as/v1/account/{account_id}

Request samples

Copy
curl --request GET \
  --url https://api.dev.kbank.com.vn/v1/account/{account_id} \
  --header 'authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

application/json
Copy
Expand all Collapse all
{
  • "major": "MajorTypeUKNOWN",
  • "current_accrued_interest": "string",
  • "next_payment_due_date": "string",
  • "account_status": "string",
  • "available_credit_limit": "string",
  • "interest_rate": "string",
  • "contract_date": "string",
  • "account_branch_name": "string",
  • "major_category": "MajorCategoryUNKNOWN",
  • "start_date": "string",
  • "due_date": "string",
  • "owner_name": "string",
  • "account_id": "string",
  • "checking_interest_rate": "string",
  • "account_branch": "string",
  • "available_balance":
    {
    },
  • "credit_limit": "string",
  • "maturity_date": "string",
  • "current_balance":
    {
    },
  • "accrued_interest_at_maturity_date": "string",
  • "current_term": "string",
  • "amount_due":
    {
    }
}

Update account status

Authorizations:
path Parameters
account_id
required
string
Request Body schema: application/json
status
string
account_id
string

Responses

200

A successful response.

put /v1/account/{account_id}/status
https://developer-dev.kbank.brank.as/v1/account/{account_id}/status

Request samples

application/json
Copy
Expand all Collapse all
{
  • "status": "string",
  • "account_id": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "error_message": "",
  • "error_code": "0",
  • "success": true
}

Retrieves account status

Authorizations:
path Parameters
account_id
required
string
query Parameters
status
string

Responses

200

A successful response.

get /v1/account/{account_id}/status
https://developer-dev.kbank.brank.as/v1/account/{account_id}/status

Request samples

Copy
curl --request GET \
  --url 'https://developer-dev.kbank.brank.as/v1/account/{account_id}/status?status=SOME_STRING_VALUE' \
  --header 'authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

application/json
Copy
Expand all Collapse all
{
  • "effective_date": "string",
  • "status": "string",
  • "status_description": "string",
  • "account_id": "string"
}

Card

Get card details information

Returns all information about a bank card.

Authorizations:
path Parameters
card_token
required
string

Responses

200

A successful response.

get /v1/card/{card_token}
https://developer-dev.kbank.brank.as/v1/card/{card_token}

Request samples

Copy
curl --request GET \
  --url https://api.dev.kbank.com.vn/v1/card/{card_token} \
  --header 'authorization: Bearer REPLACE_BEARER_TOKEN'

Response samples

application/json
Copy
Expand all Collapse all
{
  • "info":
    {
    },
  • "iss":
    {
    }
}

Update card status

Lock, unlock or active a card

Authorizations:
path Parameters
card_token
required
string
Request Body schema: application/json
status
string (v1CardStatus)
Default: "CardStatusUNKNOWN"
Enum:"CardStatusUNKNOWN" "LOCK" "UNLOCK" "ACTIVE"
card_token
string

Responses

200

A successful response.

put /v1/card/{card_token}/status
https://developer-dev.kbank.brank.as/v1/card/{card_token}/status

Request samples

application/json
Copy
Expand all Collapse all
{
  • "status": "CardStatusUNKNOWN",
  • "card_token": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "error_message": "",
  • "error_code": "0",
  • "success": true
}

Update card access status

Set to often or rare the access status of a card

Authorizations:
path Parameters
card_token
required
string
Request Body schema: application/json
status
string (v1CardAccessStatus)
Default: "CardAccessStatusUNKNOWN"
Enum:"CardAccessStatusUNKNOWN" "OFTEN" "RARE"
card_token
string

Responses

200

A successful response.

put /v1/card/{card_token}/access_status
https://developer-dev.kbank.brank.as/v1/card/{card_token}/access_status

Request samples