Brankas menu
×

Brankas Statement API v1.0.0

Brankas Statement endpoints enable fintechs and financial service providers to leverage customer transaction information and deliver highly personalized financial services and applications. You can use Brankas Statement for credit scoring, financial management applications, personalized cross-sell opportunities, and customer verification.

  • Host https://docs.brank.as

  • Base Path v1

Get Started with Brankas Statement

Create New API Key

When using requesting API, you need to create API key, to create it, please follow this step by step guide:

  1. Login to Brank.as
  2. Go to Integration Menu
  3. Input your password and click create API Key
  4. Save the API key, because we do not save any API key data on our end
Brankas recommends to store your API Key safely as Brankas does not have access to it. If your API Key is lost or compromised, you may generate a new one in the Integration menu of Brankas Dashboard.

Environment

We have set up a Sandbox environment to simulate Brankas API calls. In this environment, you may perform test API requests to Brankas Bank, a dummy bank.

Statement Sandbox API Host https://statement.sandbox.bnk.to

Initiate Statement Retrieval

Initiate Statement Retrieval Initiates a request to the Statement retrieval service to capture and store all financial transactions that have occurred over the past 90 days across all of a user’s bank accounts enrolled in a bank’s online banking portal.

This holds the request information to fetch a list of all financial transactions across all of bank accounts that a user has enrolled with their online banking profile at a specified bank’s online banking portal.

FieldTypeDescription
bank_codeBankCodebank_code is the internal code (enum) used by the service to target a specific bank for the statement retrieval request.
credCredentialcred is the user internet banking account credentials or StatementService token ID.

Initiate Statement Retrieval Response

This response holds the status information of the statement retrieval request.

FieldTypeDescription
statement_idStringstatement_id is the unique system generated identifier assigned to this specific statement retrieval request. Once a statement has been retrieved and stored, it can then be queried later on from storage by using this as the identifier.
statusStatement Retrievalstatus is the current retrieval status.
site_reponseStringsite_response is any relevant text returned by the target bank’s online banking portal as part of the Statement retrieval request.

Retrieve all statements

Calling this endpoint retrieves all statements that have been captured and stored by the Retrieve Statement request.

Retrieve all statements response

Returns all previous captured statements.

FieldTypeDescription
statusStatementStatusthe current status of the statement retrieval request.
statementidStringstatement_id is the unique system generated identifier assigned to this specific statement retrieval request.
bank_codeBankCode (enum)bank_code is the internal code used by the service to target a specific bank for the statement retrieval request.
start_dateTimestampstart_date reflects the timestamp / date of the earliest date up to which the bank provides recorded transaction data, relative to the current date. This differs from bank to bank and can range from 30 to 90 days worth of transaction records from the current date.
end_dateTimestampend_date reflects the timestamp / date of when the statement retrieval request was initiated.
account_statementStatementthe full list of transactions captured by the statement retrieval request.
errorStringerror message in the case the statement retrieval operation was unsuccessful.

Retrieve a specific Statement

Retrieves the list of all financial transactions captured by the Retrieve Statement request. Statements Request retrieves a list of all statements previously captured and stored by the RetrieveStatement request.

FieldTypeDescription
statement_idsStringstatement_ids is the unique system generated identifier assigned to specific retrieved statements, allowing them to be queried specifically from storage.

Statements Response returns the list of all financial transactions included in the requested statement_ids.

FieldTypeDescription
statusStatementStatusThe current status of the statement retrieval request.
statement_idStringstatement_id is the unique system generated identifier assigned to this specific retrieved statement.
bank_codeBankCode (enum)bank_code is the internal code used by the service to target a specific bank for the statement retrieval request.
start_dateTimestampstart_date reflects the timestamp / date of the earliest date up to which the bank provides recorded transaction data, relative to the current date. This differs from bank to bank and can range from 30 to 90 days worth of transaction records from the current date.
end_dateTimestampend_date reflects the timestamp / date of when the statement retrieval request was initiated.
account_statementsStatementThe full list of transactions captured by the statement retrieval request.
errorStringError message in the case the statement retrieval operation was unsuccessful.

Send Login OTP

Send TFA submits a two-factor authentication code.

In case a specific bank requires end users to succeed on an TFA challenge to login into their online banking accounts, the POST Send Login OTP endpoint allows you to submit the OTP code supplied by the end user to successfully authenticate and grant access to their online banking accounts.

FieldTypeDescription
purposeTFAPurposepurpose defines what this TFA code should be used for. In order to retrieve statements, this should be set to BankCredentialLogin by default.
purpose_idStringpurpose_id should reflect the statement_id included in the response of the POST Initiate Statement Retrieval endpoint. This allows the service to determine which ongoing statement retrieval process the submitted TFA code should be paired with.
tokenStringtoken is the actual TFA / OTP code string the end user needs to submit as part of this statement retrieval request.

The Send OTP Login response contains the status information of the relevant TFA challenge.

FieldTypeDescription
statusOperationStatusstatus defines the result of the Send OTP Login request, indicating whether or not the TFA token was successfully submitted to the relevant bank or if the operation resulted in an error.
auth_statusTFAStatusauth_status defines the result of submitting the TFA code with the bank, indicating whether the challenge succeeded or failed.
status_msgStringstatus_msg is the bank-specific response to a failed TFA challenge, qualifying the cause of the failure (such as an invalid or incomplete TFA code)

Status and Errors

Internally, our systems communicate using gRPC, which comes with a standard set of status codes. These codes are mapped to our status and error responses in the StatementService endpoints.

CodeNumberDescription
OK0Not an error; returned on success.
CANCELLED1The operation was cancelled, typically by the caller.
UNKNOWN2Unknown error. For example, this error may be returned when a Status value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error.
INVALID_ARGUMENT3The client specified an invalid argument. Note that this differs from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name).
DEADLINE_EXCEEDED4The deadline expired before the operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed too long.
NOT_FOUND5Some requested entity (e.g., file or directory) was not found. Note to server developers: if a request is denied for an entire class of users, such as gradual feature rollout or undocumented whitelist, NOT_FOUND may be used. If a request is denied for some users within a class of users, such as user-based access control, PERMISSION_DENIED must be used.
ALREADY_EXISTS6The entity that a client attempted to create (e.g., file or directory) already exists.
PERMISSION_DENIED7The caller does not have permission to execute the specified operation. PERMISSION_DENIED must not be used for rejections caused by exhausting some resource (use RESOURCE_EXHAUSTED instead for those errors). PERMISSION_DENIED must not be used if the caller can not be identified (use UNAUTHENTICATED instead for those errors). This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions.
UNAUTHENTICATED16The request does not have valid authentication credentials for the operation.
RESOURCE_EXHAUSTED8Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.
FAILED_PRECONDITION9The operation was rejected because the system is not in a state required for the operation’s execution. For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc. Service implementors can use the following guidelines to decide between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: (a) Use UNAVAILABLE if the client can retry just the failing call. (b) Use ABORTED if the client should retry at a higher level (e.g., when a client-specified test-and-set fails, indicating the client should restart a read-modify-write sequence). (c) Use FAILED_PRECONDITION if the client should not retry until the system state has been explicitly fixed. E.g., if an “rmdir” fails because the directory is non-empty, FAILED_PRECONDITION should be returned since the client should not retry unless the files are deleted from the directory.
ABORTED10The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. See the guidelines above for deciding between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE.
OUT_OF_RANGE11The operation was attempted past the valid range. E.g. seeking or reading past end-of-file. Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate INVALID_ARGUMENT if asked to read at an offset that is not in the range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from an offset past the current file size. There is a fair bit of overlap between FAILED_PRECONDITION and OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error) when it applies so that callers who are iterating through a space can easily look for an OUT_OF_RANGE error to detect when they are done.
UNIMPLEMENTED12The operation is not implemented or is not supported/enabled in this service.
INTERNAL13Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors.
UNAVAILABLE14The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations.
DATA_LOSS15Unrecoverable data loss or corruption.

Retrieve notifications

Retrieves the notifications

curl -X GET \
	https://docs.brank.as/v1/notification \
	-H 'Authorization: Bearer USE_YOUR_TOKEN'

HTTP Request

GET https://docs.brank.as/v1/notification

Responses

Response body

NameTypeDescription
notifications[]NotificationNotifications is a list of the notification records.
Objects
Notification
NameTypeDescription
idstringID contains the unique identifier of the notification.
descriptionstringDescription for this notification.
urlstringURL contains the actual notification value.
statusNotificationStatusStatus is the state of this notification - whether it is still active or not.
Enums
NotificationStatus
ValueDescription
UNKNOWN_URLSTATUS
ACTIVE
INACTIVE
ACTIVE_UNPROXIED

Example:

{
  "notifications": [
    {
      "id": "string",
      "description": "string",
      "url": "string",
      "status": "NotificationStatus"
    }
  ]
}

Response codes

StatusDescription
200Request executed successfully.
404Returned when the resource is not found.

Send a statement retrieval request

Initiates a statement retrieval request.

curl -X POST \
	https://docs.brank.as/v1/statement-retrieval \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"bank_code": "BankCode",
		"credential": {
			"credential_type": "CredentialType",
			"identifier": "string",
			"secret": "string"
		},
		"period_days": "int32",
		"start_date": "string",
		"end_date": "string",
		"account_number": "string",
		"api_credential": {
			"corporate_id": "string",
			"identifier": "string",
			"secret": "string"
		},
		"external_id": "string",
		"channel": "string",
		"": "map[string]string"
	}'

HTTP Request

POST https://docs.brank.as/v1/statement-retrieval

Body Parameters

NameTypeDescription
bank_codeBankCodeBankCode is the internal code (enum) used by the service to target a specific bank for the statement retrieval request (MANDIRI, BCA, etc).
credentialCredentialCredential is the user internet banking account credentials or StatementService token id.
period_daysint32PeriodDays is the filter to search transactions that occurred over a given period. note: the behaviour of the search is depends upon each bank site.
start_datestringStartDate is the start date of the statement request Date/Time ranges should follow the YYYY-MM-DD convention
end_datestringEndDate is the end date of the statement request Date/Time ranges should follow the YYYY-MM-DD convention
account_numberstringAccountNumber is the bank account number
api_credentialAPICredentialAPICredential are the credentials to access the bank API
external_idstringExternalID is an optional param. It’s a unique value provided by a 3rd party platform, which enables Brankas to associate it with statement retrieval requests.
channelstringChannel is an optional param. The parameter value identifies the Channel via API call is initiated. Possible Values: WEB,MOBILE
map[string]stringAdditionalFields are list of key value pair which is optional. This can be used to pass bank specific fields that differs from bank to bank
Objects
Credential
NameTypeDescription
credential_typeCredentialTypeCredentialType is the type of the credential the identifier matches, e.g email
identifierstringIdentifier is the unique identifier for the credential (ie, a phone number, email, token, etc).
secretstringSecret is the secret to exchange for validating the credential. If type is TOKEN, this can be empty
APICredential
NameTypeDescription
corporate_idstringCorporateID is the banks unique id for the organization. if the bank provides a partner_id, then it should be used instead.
identifierstringIdentifier is the unique identifier for the credential
secretstringSecret is the secret for the credential
Enums
BankCode

BankCode is the internal code (enum) used by the service to target a specific bank for the statement retrieval request.

ValueDescription
UNKNOWN_BANK
MANDIRI_PERSONALBank code to retrieve retail bank account transaction data for Bank Mandiri
BCA_PERSONALBank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
BNI_PERSONALBank code to retrieve retail bank account transaction data for Bank Negara Indonesia (BNI)
BRI_PERSONALBank code to retrieve retail bank account transaction data for Bank Rakyat Indonesia (BRI)
BCA_CORPORATEBank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
DUMMY_BANK_PERSONALBank code to instruct the statement retrieval service to target the sandboxed Brankas dummy bank for test calls
BDO_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Banco De Oro Unibank (BDO)
BPI_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Bank of the Philippines Islands (BPI)
KASIKORNBANK_PERSONALBank code to retrieve retail bank account transaction data for Kasikornbank.
PNB_PERSONALBank code to retrieve retail bank account transaction data for Philippine National Bank
UNIONBANK_PERSONALBank code to retrieve retail bank account transaction data for Union Bank
UNIONBANK_CORPORATEBank code to retrieve retail bank account transaction data for Union Bank
METROBANK_PERSONALBank code to retrieve retail bank account transaction data for Metropolitan Bank
RCBC_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Rizal Commercial Banking Corporation
CredentialType

CredentialType is the credential type.

ValueDescription
EMAIL
Type_MSISDN
TOKEN
CLIENT_CREDENTIAL

Responses

Response body

NameTypeDescription
statement_idstringStatementId is the unique system generated identifier assigned to this specific statement retrieval request. Once a statement has been retrieved and stored, it can then be queried later on from storage by using this as the identifier
statusInitialStatementStatusStatus is the current retrieval status
site_responsestringSiteResponse is any relevant text returned by the target bank’s online banking portal as part of the statement retrieval request
challengeChallengeChallenge is an optional challange information from the bank website to be used for next 2FA request.
Objects
Challenge
NameTypeDescription
typeChallengeType
databytes
Enums
InitialStatementStatus
ValueDescription
UNKNOWN_InitialStatementStatusUnknown statement retireval status
RECEIVEDThe statement request processing is complete.
PENDINGThe statement request is currently being processed / retrieved
TFA_AWAITAwaiting TFA authentication to gain access to the user’s online banking account
LOGIN_ERRORAn error occurred while attempting to log into the user’s online banking account as part of the statement retrieval process
INITIATEDThe statement request is initiated for retrieval via IDP flow
ChallengeType

ChallengeType for captcha or OTP challenge

ValueDescription
TEXTTEXT are challenges that are generally represented as strings.
IMAGEIMAGE are image-based challenges, for example a captcha image.
IN_APPIN_APP are challenges that happens offline and asynchronously outside our control for example, approvals from a user’s mobile device.
SMSSMS are SMS-based challenge codes.
MGENCODEMGENCODE or Mobile Generated Code, are usually challenge codes generated by bank applications.
HYBRIDHYBRID are bank-specific challenge types, for example, BCA requires a mix of the different types.
PINPIN are mostly static pin codes from banks, eg Metrobank’s passcode.

Example:

{
  "statement_id": "string",
  "status": "InitialStatementStatus",
  "site_response": "string",
  "challenge": {
    "type": "ChallengeType",
    "data": "bytes"
  }
}

Response codes

StatusDescription
200A successful response.
404Returned when the resource is not found.

Send a statement list request

Retrive the statements list request.

curl -X GET \
	https://docs.brank.as/v1/statements \
	-H 'Authorization: Bearer USE_YOUR_TOKEN'

HTTP Request

GET https://docs.brank.as/v1/statements

Responses

Response body

NameTypeDescription
statements[]StatementStatements are the statements that match the filters of a request.
next_page_tokenstringNextPageToken represents the pagination token to retrieve the next page of results. If the value is “”, it means no further results for the request.
messagestringMessage is any message from the server that are not treated as an error.
Objects
Statement
NameTypeDescription
statusStatementStatusStatus is the current status of the statement retrieval request
statement_idstringStatementID is the unique system generated identifier assigned to this specific statement retrieval request
bank_codeBankCodeBankCode is the internal code used by the service to target a specific bank for the statement retrieval request.
start_dateTimestampStartDate reflects the timestamp / date of the earliest date up to which the bank provides recorded transaction data, relative to the current date. This differs from bank to bank and can range from 30 to 90 days worth of transaction records from the current date.
end_dateTimestampEndDate reflects the timestamp / date of when the statement retrieval request was initiated
account_statements[]AccountStatementAccountStatements is the full list of transactions captured by the statement retrieval request
errorstringError message in the case the statement retrieval operation was unsuccessful
requestTimestampCreate is the request timestamp.
createTimestampCreate is the creation timestamp.
external_idstringExternalID represent an id that is passed by the api consumer to track the request
channelstringChannel represent source channel whether a statement request is initiated from
countrystringCountry is the country code (ID, PH, TH)
is_idpboolIsIDP denotes that the request processed through PIDP
sub_statusStatementSubStatusStatementSubStatus denotes the granular status
updateTimestampUpdate is the updation timestamp.
is_notification_successboolIsNotificationSuccess denotes whether the notification posted is successful or not
site_responsestringSiteResponse is an optional text response from the bank website.
challengeChallengeChallenge is an optional challange information from the bank website to be used for next 2FA request.
shortcodestringshortcode represent a staticlink code to indicate the statement request initiated via static link
consent_grantedboolConsentGranted denotes whether end-user agreed or gave consent for performing statement retrieval
map[string]bytesAccountPdfs is the list of account statement pdf files indexed by account number.
Timestamp
NameTypeDescription
secondsint64
nanosint32
AccountStatement
NameTypeDescription
accountAccountAccount is the bank account information.
transactions[]TransactionTransactions is the list of transaction which occured over the period_days.
account_pdfsbytesAccountPdfs is the list of account statement pdf files.
Challenge
NameTypeDescription
typeChallengeType
databytes
Account
NameTypeDescription
account_idstringAccountID is the bank account firestore document identifier.
typeAccountTypeType of the relevant bank account. It is an enum indicating whether it is a Savings or Checking account
owner_ids[]stringOwnerIds is the list of bank credential identifiers that own and have access to this account. The first in the list is the primary owner, and the list cannot be empty.
account_numberstringAccountNumber is the identifying account number of the bank account in question
nickstringNick is an optional nickname for the account.
balanceAmountBalance is the current balance of the relevant bank account as of the current statement retrieval
holder_namestringHolderName is the full name of the account holder. The format might change between banks.
bank_codeBankCodeBankCode is the Brankas bank code for the bank that holds the account.
total_amount_creditedAmountTotalAmountCredited is the sum of amount credited with all transactions
total_amount_debitedAmountTotalAmountDebited is the sum of amount debited with all transactions
credit_transaction_countint32CreditTransactionCount denotes number of credit transaction
debit_transaction_countint32DebitTransactionCount denotes number of debit transaction
Transaction
NameTypeDescription
transaction_idstringTransactionID is the transaction firestore document identifier.
dateTimestampDate is the transaction date in UTC
typeTransactionTypeType is the transaction’s type, whether it was a CREDIT, DEBIT.
statusTransactionStatusStatus is the transaction status marked by the bank as pending
amountAmountAmount is the financial value of the transaction
descriptorstringDescriptor is the bank statement descriptor attached to the transaction
match_idstringMatchID is a reference to related match data.
fromAccountFrom is the transaction source account.
toAccountTo is the transaction destination account.
fieldsTransaction_Fields
balanceAmountBalance is the running balance of the transaction
Amount
NameTypeDescription
curCurrencyISO4217Cur is the currency of the amount using its ISO 4217 code.
numstringNum is the actual numeric value of the amount. Note: When there are separators in the currency, we store the decimals as digits in the string. So, PHP 100.00 would be represented as “amount.cur”: “PHP” and “amount.num”: “10000”.
Transaction_Fields
NameTypeDescription
namestringName is the Name of the other party.
memostringMemo is the user input on a memo line.
account_nostringAccountNo is the other party’s acount number.
companystringCompany is the virtual account company name.
Enums
StatementStatus
ValueDescription
UNKNOWN_StatementStatusUnknown statement status
Status_PENDINGThe requested statement retrieval is in progress.
FAILEDThe requested statement couldn’t be retrieved successfully.
COMPLETEDThe requested statement was successfully retrieved
NOTIFIEDThe request statement status was successfully notified
Status_RECEIVEDThe statement request processing is complete.
CANCELLEDThe statement request was cancelled
INACTIVATEDThe statement request inactivated upon waiting for user input
PURGEDThe statement data such as accounts and transactions are purged from brankas system
BankCode

BankCode is the internal code (enum) used by the service to target a specific bank for the statement retrieval request.

ValueDescription
UNKNOWN_BANK
MANDIRI_PERSONALBank code to retrieve retail bank account transaction data for Bank Mandiri
BCA_PERSONALBank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
BNI_PERSONALBank code to retrieve retail bank account transaction data for Bank Negara Indonesia (BNI)
BRI_PERSONALBank code to retrieve retail bank account transaction data for Bank Rakyat Indonesia (BRI)
BCA_CORPORATEBank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
DUMMY_BANK_PERSONALBank code to instruct the statement retrieval service to target the sandboxed Brankas dummy bank for test calls
BDO_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Banco De Oro Unibank (BDO)
BPI_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Bank of the Philippines Islands (BPI)
KASIKORNBANK_PERSONALBank code to retrieve retail bank account transaction data for Kasikornbank.
PNB_PERSONALBank code to retrieve retail bank account transaction data for Philippine National Bank
UNIONBANK_PERSONALBank code to retrieve retail bank account transaction data for Union Bank
UNIONBANK_CORPORATEBank code to retrieve retail bank account transaction data for Union Bank
METROBANK_PERSONALBank code to retrieve retail bank account transaction data for Metropolitan Bank
RCBC_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Rizal Commercial Banking Corporation
StatementSubStatus
ValueDescription
UNKNOWN_StatementSubStatus
SubStatus_INITIATEDInitiatated a request for PIDP
SubStatus_LOGIN_ERRORError while logging in to the user internet banking account.
SubStatus_AWAITING_LOGINLogin in progress.
SubStatus_AWAITING_TFAAwaiting TFA authentication to gain access to the user’s online banking account.
SubStatus_COMPLETEDThe requested statement was successfully retrieved
SubStatus_BLOCKEDBlocked
SubStatus_INPROGRESSThe requested statement retrieval request is in progress.
SubStatus_INVALID_TFATFA provided by the user is not correct or expired.
SubStatus_NO_TFA_PROVIDEDUser didn’t provide a TFA for authentication with the bank.
SubStatus_SYSTEM_UNAVAILABLESystem busy or unavailable to process the request
SubStatus_ERRORThe requested statement couldn’t be retrieved successfully.
SubStatus_CANCELLEDCancelled
SubStatus_INACTIVATEDInactivated
SubStatus_PURGEDPurged
ChallengeType

ChallengeType for captcha or OTP challenge

ValueDescription
TEXTTEXT are challenges that are generally represented as strings.
IMAGEIMAGE are image-based challenges, for example a captcha image.
IN_APPIN_APP are challenges that happens offline and asynchronously outside our control for example, approvals from a user’s mobile device.
SMSSMS are SMS-based challenge codes.
MGENCODEMGENCODE or Mobile Generated Code, are usually challenge codes generated by bank applications.
HYBRIDHYBRID are bank-specific challenge types, for example, BCA requires a mix of the different types.
PINPIN are mostly static pin codes from banks, eg Metrobank’s passcode.
AccountType

AccountType is the account type enum.

ValueDescription
UNKNOWN_AccountTypeIndicates that the bank account type is either undefined or neither a Checking on Saving account
CHECKINGIndicates that the bank account is a Checking Account
SAVINGSIndicates that the bank account is a Savings Account
TransactionType

TransactionType is the transaction type enum.

ValueDescription
UNKNOWN_TYPEUnknown transaction type
CREDITTransactions that credit the user’s account
DEBITTransactions that debit the user’s account
TransactionStatus

TransactionStatus is the transaction status enum.

ValueDescription
UNKNOWN_STATUS
SUCCESS
TRANSACTIONSTATUS_PENDING
CurrencyISO4217

CurrencyISO4217 iso is the 3 digit currency that will be used as standard currency type on fast checkout. see: https://en.wikipedia.org/wiki/ISO_4217

ValueDescription
UNKNOWN_CURRENCY
AFN
EUR
ALL
DZD
USD
AOA
XCD
ARS
AMD
AWG
AUD
AZN
BSD
BHD
BDT
BYR
BZD
XOF
BMD
BTN
BOV
BAM
BWP
NOK
BRL
SGD
BGN
BIF
KHR
XAF
CAD
CVE
KYD
CLP
CNY
COP
KMF
CDF
NZD
CRC
HRK
CUC
CZK
DKK
DJF
DOP
EGP
ERN
ETB
FKP
FJD
XPF
GMD
GEL
GHS
GIP
GTQ
GBP
GNF
GYD
HNL
HKD
HUF
ISK
INR
IDR
IRR
IQD
IMP
ILS
JMD
JPY
JEP
JOD
KZT
KES
KPW
KRW
KWD
KGS
LAK
LBP
LSL
LRD
LYD
CHF
MKD
MGA
MWK
MYR
MVR
MRO
MUR
MXN
MDL
MNT
MAD
MZN
MMK
NAD
NPR
ANG
NIO
NGN
OMR
PKR
PGK
PYG
PEN
PHP
PLN
QAR
RON
RUB
RWF
WST
STD
SAR
RSD
SCR
SLL
SBD
SOS
ZAR
SSP
LKR
SHP
SDG
SRD
SZL
SEK
SYP
TWD
TJS
TZS
THB
TOP
TTD
TND
TRY
TMT
UGX
UAH
ARE
UYU
UZS
VUV
VEF
VND
YER
ZRN
ZMW

Example:

{
  "statements": [
    {
      "status": "StatementStatus",
      "statement_id": "string",
      "bank_code": "BankCode",
      "start_date": {
        "seconds": "int64",
        "nanos": "int32"
      },
      "end_date": {
        "seconds": "int64",
        "nanos": "int32"
      },
      "account_statements": [
        {
          "account": {
            "account_id": "string",
            "type": "AccountType",
            "owner_ids": "[]string",
            "account_number": "string",
            "nick": "string",
            "balance": {
              "cur": "CurrencyISO4217",
              "num": "string"
            },
            "holder_name": "string",
            "bank_code": "BankCode",
            "total_amount_credited": {
              "cur": "CurrencyISO4217",
              "num": "string"
            },
            "total_amount_debited": {
              "cur": "CurrencyISO4217",
              "num": "string"
            },
            "credit_transaction_count": "int32",
            "debit_transaction_count": "int32"
          },
          "transactions": [
            {
              "transaction_id": "string",
              "date": {
                "seconds": "int64",
                "nanos": "int32"
              },
              "type": "TransactionType",
              "status": "TransactionStatus",
              "amount": {
                "cur": "CurrencyISO4217",
                "num": "string"
              },
              "descriptor": "string",
              "match_id": "string",
              "from": {
                "account_id": "string",
                "type": "AccountType",
                "owner_ids": "[]string",
                "account_number": "string",
                "nick": "string",
                "balance": {
                  "cur": "CurrencyISO4217",
                  "num": "string"
                },
                "holder_name": "string",
                "bank_code": "BankCode",
                "total_amount_credited": {
                  "cur": "CurrencyISO4217",
                  "num": "string"
                },
                "total_amount_debited": {
                  "cur": "CurrencyISO4217",
                  "num": "string"
                },
                "credit_transaction_count": "int32",
                "debit_transaction_count": "int32"
              },
              "to": {
                "account_id": "string",
                "type": "AccountType",
                "owner_ids": "[]string",
                "account_number": "string",
                "nick": "string",
                "balance": {
                  "cur": "CurrencyISO4217",
                  "num": "string"
                },
                "holder_name": "string",
                "bank_code": "BankCode",
                "total_amount_credited": {
                  "cur": "CurrencyISO4217",
                  "num": "string"
                },
                "total_amount_debited": {
                  "cur": "CurrencyISO4217",
                  "num": "string"
                },
                "credit_transaction_count": "int32",
                "debit_transaction_count": "int32"
              },
              "fields": {
                "name": "string",
                "memo": "string",
                "account_no": "string",
                "company": "string"
              },
              "balance": {
                "cur": "CurrencyISO4217",
                "num": "string"
              }
            }
          ],
          "account_pdfs": "bytes"
        }
      ],
      "error": "string",
      "request": {
        "seconds": "int64",
        "nanos": "int32"
      },
      "create": {
        "seconds": "int64",
        "nanos": "int32"
      },
      "external_id": "string",
      "channel": "string",
      "country": "string",
      "is_idp": "bool",
      "sub_status": "StatementSubStatus",
      "update": {
        "seconds": "int64",
        "nanos": "int32"
      },
      "is_notification_success": "bool",
      "site_response": "string",
      "challenge": {
        "type": "ChallengeType",
        "data": "bytes"
      },
      "shortcode": "string",
      "consent_granted": "bool",
      "": "map[string]bytes"
    }
  ],
  "next_page_token": "string",
  "message": "string"
}

Response codes

StatusDescription
200A successful response.
404Returned when the resource is not found.

Send a statement retrieval initiation request

Initiates a statement retrieval request

curl -X POST \
	https://docs.brank.as/v1/statement-init \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"country": "string",
		"bank_codes": "[]BankCode",
		"external_id": "string",
		"app_redirect_uri": "string",
		"organization_display_name": "string"
	}'

HTTP Request

POST https://docs.brank.as/v1/statement-init

Body Parameters

NameTypeDescription
countrystringCountry is the country code (ID, PH, TH)
bank_codes[]BankCodeBankCodes used to specify the list of bank to be shown to user
external_idstringExternalID represent an id that is passed by the api consumer to track the request
app_redirect_uristringAppRedirectURI is the URL that end users need to be redirected after the successful statement retrieval operation
organization_display_namestringOrganizationDisplayName is a name of the organization that send the request and will be displayed when processing the statement request
Enums
BankCode

BankCode is the internal code (enum) used by the service to target a specific bank for the statement retrieval request.

ValueDescription
UNKNOWN_BANK
MANDIRI_PERSONALBank code to retrieve retail bank account transaction data for Bank Mandiri
BCA_PERSONALBank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
BNI_PERSONALBank code to retrieve retail bank account transaction data for Bank Negara Indonesia (BNI)
BRI_PERSONALBank code to retrieve retail bank account transaction data for Bank Rakyat Indonesia (BRI)
BCA_CORPORATEBank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
DUMMY_BANK_PERSONALBank code to instruct the statement retrieval service to target the sandboxed Brankas dummy bank for test calls
BDO_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Banco De Oro Unibank (BDO)
BPI_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Bank of the Philippines Islands (BPI)
KASIKORNBANK_PERSONALBank code to retrieve retail bank account transaction data for Kasikornbank.
PNB_PERSONALBank code to retrieve retail bank account transaction data for Philippine National Bank
UNIONBANK_PERSONALBank code to retrieve retail bank account transaction data for Union Bank
UNIONBANK_CORPORATEBank code to retrieve retail bank account transaction data for Union Bank
METROBANK_PERSONALBank code to retrieve retail bank account transaction data for Metropolitan Bank
RCBC_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Rizal Commercial Banking Corporation

Responses

Response body

NameTypeDescription
statement_idstringStatementID is the unique ID assigned to the statement initiation request
redirect_uristringRedirectURI is the URL that end users need to be redirected to in order to continue the statement-retrieval operation

Example:

{
  "statement_id": "string",
  "redirect_uri": "string"
}

Response codes

StatusDescription
200A successful response.
404Returned when the resource is not found.

Send a static link creation request

Initiates a static link request

curl -X POST \
	https://docs.brank.as/v1/static-link \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"country": "string",
		"bank_codes": "[]BankCode",
		"app_redirect_uri": "string",
		"organization_display_name": "string",
		"logo_url": "string",
		"expiry_limit": "int32",
		"expires_in": "string"
	}'

HTTP Request

POST https://docs.brank.as/v1/static-link

Body Parameters

NameTypeDescription
countrystringCountry is the country code (ID, PH, TH)
bank_codes[]BankCodeBankCodes used to specify the list of bank to be shown to user
app_redirect_uristringAppRedirectURI is the URL that end users need to be redirected after the successful statement retrieval operation
organization_display_namestringOrganizationDisplayName is a name of the organization that send the request and will be displayed when processing the statement request
logo_urlstringLogoURL represent the logo that should used during the statement retrieval operation
expiry_limitint32ExpiryLimit denotes the static link shall only be used until the limit/count exceeds, it will be considered as expired after when limit exceeds
expires_instringExpiresIn denotes duration for link that shall be active, it will be considered as expired after the duration Ex: 60m, 1h, 8h, 24h, 1d, 7d etc
Enums
BankCode

BankCode is the internal code (enum) used by the service to target a specific bank for the statement retrieval request.

ValueDescription
UNKNOWN_BANK
MANDIRI_PERSONALBank code to retrieve retail bank account transaction data for Bank Mandiri
BCA_PERSONALBank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
BNI_PERSONALBank code to retrieve retail bank account transaction data for Bank Negara Indonesia (BNI)
BRI_PERSONALBank code to retrieve retail bank account transaction data for Bank Rakyat Indonesia (BRI)
BCA_CORPORATEBank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
DUMMY_BANK_PERSONALBank code to instruct the statement retrieval service to target the sandboxed Brankas dummy bank for test calls
BDO_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Banco De Oro Unibank (BDO)
BPI_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Bank of the Philippines Islands (BPI)
KASIKORNBANK_PERSONALBank code to retrieve retail bank account transaction data for Kasikornbank.
PNB_PERSONALBank code to retrieve retail bank account transaction data for Philippine National Bank
UNIONBANK_PERSONALBank code to retrieve retail bank account transaction data for Union Bank
UNIONBANK_CORPORATEBank code to retrieve retail bank account transaction data for Union Bank
METROBANK_PERSONALBank code to retrieve retail bank account transaction data for Metropolitan Bank
RCBC_PERSONALBank code to retrieve retail bank account statements / transaction histories from the Rizal Commercial Banking Corporation

Responses

Response body

NameTypeDescription
static_linkstringStaticLink is the static URL that shall be used to initiate the statement-retrieval operation

Example:

{
  "static_link": "string"
}

Response codes

StatusDescription
200A successful response.
404Returned when the resource is not found.

Create or update a notification object

UpsertNotification creates or updates a notification object.

curl -X PUT \
	https://docs.brank.as/v1/notification \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"id": "string",
		"description": "string",
		"url": "string",
		"status": "NotificationStatus"
	}'

HTTP Request

PUT https://docs.brank.as/v1/notification

Body Parameters

NameTypeDescription
idstringID contains the unique identifier of the notification.
descriptionstringDescription for this notification.
urlstringURL contains the actual notification value.
statusNotificationStatusStatus is the state of this notification - whether it is still active or not.
Enums
NotificationStatus
ValueDescription
UNKNOWN_URLSTATUS
ACTIVE
INACTIVE
ACTIVE_UNPROXIED

Responses

Response body

NameTypeDescription
idstringID contains the unique identifier of the business information object.

Example:

{
  "id": "string"
}

Response codes

StatusDescription
200Request executed successfully.
404Returned when the resource is not found.

Send TFA request

Send two factor authentication request.

curl -X POST \
	https://docs.brank.as/v1/tfa \
	-H 'Authorization: Bearer USE_YOUR_TOKEN' \
	-d '{
		"purpose": "TFAPurpose",
		"purpose_id": "string",
		"token": "string"
	}'

HTTP Request

POST https://docs.brank.as/v1/tfa

Body Parameters

NameTypeDescription
purposeTFAPurposePurpose defines what this TFA code should be used for.
purpose_idstringpurpose_id is the identifier for the object that this TFA token will be used for. For example, if purpose==BankCredentialLogin, purpose_id will be a bankcredential_id.
tokenstringToken is the actual TFA / OTP code string the end user needs to submit.
Enums
TFAPurpose

TFAPurpose is the usage of the TFA code supplied in the TFAService request

ValueDescription
UnknownPurposeUnknown Purpose
BankCredentialLoginUsed to login to a bank account
FundTransferAuthenticationUsed to perform login for fund transfer

Responses

Response body

NameTypeDescription
statusStatusStatus defines the result of the request, indicating whether or not the TFA token was successfully submitted to the relevant bank or if the operation resulted in an error.
auth_statusAuthStatusAuthStatus defines the result of submitting the TFA code with the bank, indicating whether the challenge succeeded or failed.
status_msgstringStatusMsg is the bank-specific response to a failed TFA challenge, qualifying the cause of the failure (such as an invalid or incomplete TFA code)
Enums
Status

Status is the possible statuses for a TFA operation

ValueDescription
UNKNOWN_StatusUnknown operation occuring
ERRORError during operation
SUCCESSSuccessful operation
AuthStatus

AuthStatus is the possible response status’ for a TFA operation

ValueDescription
UNKNOWN_AuthStatusUnknown Status
INCOMPLETEIncomplete TFA
COMPLETESuccessful TFA

Example:

{
  "status": "Status",
  "auth_status": "AuthStatus",
  "status_msg": "string"
}

Response codes

StatusDescription
200Request executed successfully.
404Returned when the resource is not found.
400Returned when the request body is malformatted or does not match the expected request.
401Returned when the request does not contains the user’s credentials.
403Returned when the user does not have permission to access the resource.
500Returned when an unexpected error occured on the server side.