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://statement.sandbox.bnk.to

API Reference Overview

Retrieve notifications

Retrieves the notifications

curl -X GET \
	https://statement.sandbox.bnk.to/v1/notification \
	-H 'x-api-key: USE_YOUR_API_KEY'

HTTP Request

GET https://statement.sandbox.bnk.to/v1/notification

Responses

Response body

Name Type Description
notifications []Notification Notifications is a list of the notification records.
Objects
Notification
Name Type Description
id string ID contains the unique identifier of the notification.
description string Description for this notification.
url string URL contains the actual notification value.
status NotificationStatus Status is the state of this notification - whether it is still active or not.
lastrun string Lastrun holds the result of last notification status
map[string]string Headers consist of list of key/value that need to be added for the notification request
Enums
NotificationStatus
Value Description
UNKNOWN_URLSTATUS
ACTIVE
INACTIVE
ACTIVE_UNPROXIED

Example:

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

Response codes

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

Send a statement retrieval request

Initiates a statement retrieval request.

curl -X POST \
	https://statement.sandbox.bnk.to/v1/statement-retrieval \
	-H 'x-api-key: USE_YOUR_API_KEY' \
	-d '{
		"bank_code": "DUMMY_BANK_PERSONAL",
		"credential": {
			"identifier": "user+1@domain.com"
		}
	}'

HTTP Request

POST https://statement.sandbox.bnk.to/v1/statement-retrieval

Body Parameters

Name Type Description
bank_code BankCode BankCode is the internal code (enum) used by the service to target a specific bank for the statement retrieval request (MANDIRI, BCA, etc).
credential Credential Credential is the user internet banking account credentials or StatementService token id.
period_days int32 PeriodDays 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_date string StartDate is the start date of the statement request Date/Time ranges should follow the YYYY-MM-DD convention
end_date string EndDate is the end date of the statement request Date/Time ranges should follow the YYYY-MM-DD convention
account_number string AccountNumber is the bank account number
api_credential APICredential APICredential are the credentials to access the bank API
external_id string ExternalID 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.
channel string Channel is an optional param. The parameter value identifies the Channel via API call is initiated. Possible Values: WEB,MOBILE
org_id string OrgID is an optional param. It contains the unique organization identifier.
client_key_id string ClientKeyId is an identifier that specifies the respective key that need to be used in order to decrypt the credentials. The key must’ve been generated/uploaded already in order to know what the key identifier is. If the key is empty, that denotes the client credentials are in plain text if the key_id has a value, that denotes the client credentials are encrypted, and that will be decrypted before using the same.
map[string]string AdditionalFields 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
Name Type Description
credential_type CredentialType CredentialType is the type of the credential the identifier matches, e.g email
identifier string Identifier is the unique identifier for the credential (ie, a phone number, email, token, etc).
secret string Secret is the secret to exchange for validating the credential. If type is TOKEN, this can be empty
corporate_code string CorporateCode is the code that the corporate own to access their corporate account
APICredential
Name Type Description
corporate_id string CorporateID is the banks unique id for the organization. if the bank provides a partner_id, then it should be used instead.
identifier string Identifier is the unique identifier for the credential
secret string Secret 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.

Value Description
UNKNOWN_BANK
MANDIRI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Mandiri
BCA_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
BNI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Negara Indonesia (BNI)
BRI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Rakyat Indonesia (BRI)
BCA_CORPORATE Bank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
DUMMY_BANK_PERSONAL Bank code to instruct the statement retrieval service to target the sandboxed Brankas dummy bank for test calls
BDO_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Banco De Oro Unibank (BDO)
BPI_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Bank of the Philippines Islands (BPI)
BPI_CORPORATE Bank code to retrieve retail bank (corporate) account statements / transaction histories from the Bank of the Philippines Islands (BPI)
KASIKORNBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Kasikornbank.
PNB_PERSONAL Bank code to retrieve retail bank account transaction data for Philippine National Bank
UNIONBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Union Bank
UNIONBANK_CORPORATE Bank code to retrieve retail bank account transaction data for Union Bank
METROBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Metropolitan Bank
RCBC_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Rizal Commercial Banking Corporation
CredentialType

CredentialType is the credential type.

Value Description
EMAIL
Type_MSISDN
TOKEN
CLIENT_CREDENTIAL

Responses

Response body

Name Type Description
statement_id string StatementId 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
status InitialStatementStatus Status is the current retrieval status
site_response string SiteResponse is any relevant text returned by the target bank’s online banking portal as part of the statement retrieval request
challenge Challenge Challenge is an optional challange information from the bank website to be used for next 2FA request.
Objects
Challenge
Name Type Description
type ChallengeType
data bytes
Enums
InitialStatementStatus
Value Description
UNKNOWN_InitialStatementStatus Unknown statement retireval status
RECEIVED The statement request processing is complete.
PENDING The statement request is currently being processed / retrieved
TFA_AWAIT Awaiting TFA authentication to gain access to the user’s online banking account
LOGIN_ERROR An error occurred while attempting to log into the user’s online banking account as part of the statement retrieval process
INITIATED The statement request is initiated for retrieval via IDP flow
ERROR An error occurred while attempting to retrieve statement
ChallengeType

ChallengeType for captcha or OTP challenge

Value Description
TEXT TEXT are challenges that are generally represented as strings.
IMAGE IMAGE are image-based challenges, for example a captcha image.
IN_APP IN_APP are challenges that happens offline and asynchronously outside our control for example, approvals from a user’s mobile device.
SMS SMS are SMS-based challenge codes.
MGENCODE MGENCODE or Mobile Generated Code, are usually challenge codes generated by bank applications.
HYBRID HYBRID are bank-specific challenge types, for example, BCA requires a mix of the different types.
PIN PIN are mostly static pin codes from banks, eg Metrobank’s passcode.

Example:

{
  "site_response": "Your request is currently being processed",
  "statement_id": "123_statement_id",
  "status": "PENDING"
}

Response codes

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

Send a statement list request

Retrive the statements list request.

curl -X GET \
	https://statement.sandbox.bnk.to/v1/statements \
	-H 'x-api-key: USE_YOUR_API_KEY'

HTTP Request

GET https://statement.sandbox.bnk.to/v1/statements

Responses

Response body

Name Type Description
statements []Statement Statements are the statements that match the filters of a request.
next_page_token string NextPageToken represents the pagination token to retrieve the next page of results. If the value is “”, it means no further results for the request.
message string Message is any message from the server that are not treated as an error.
total_count int32 TotalCount of the statements matched by the query filters
previous_page_token string PreviousPageToken represents the pagination token to retrieve the previous page of results. If the value is “”, it means no further results for the request.
Objects
Statement
Name Type Description
status StatementStatus Status is the current status of the statement retrieval request
statement_id string StatementID is the unique system generated identifier assigned to this specific statement retrieval request
bank_code BankCode BankCode is the internal code used by the service to target a specific bank for the statement retrieval request.
start_date Timestamp StartDate 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_date Timestamp EndDate reflects the timestamp / date of when the statement retrieval request was initiated
account_statements []AccountStatement AccountStatements is the full list of transactions captured by the statement retrieval request
error string Error message in the case the statement retrieval operation was unsuccessful
request Timestamp Create is the request timestamp.
create Timestamp Create is the creation timestamp.
external_id string ExternalID represent an id that is passed by the api consumer to track the request
channel string Channel represent source channel whether a statement request is initiated from
country string Country is the country code (ID, PH, TH)
is_idp bool IsIDP denotes that the request processed through PIDP
sub_status StatementSubStatus StatementSubStatus denotes the granular status
update Timestamp Update is the updation timestamp.
is_notification_success bool IsNotificationSuccess denotes whether the notification posted is successful or not
site_response string SiteResponse is an optional text response from the bank website.
challenge Challenge Challenge is an optional challange information from the bank website to be used for next 2FA request.
shortcode string shortcode represent a staticlink code to indicate the statement request initiated via static link
consent_granted bool ConsentGranted denotes whether end-user agreed or gave consent for performing statement retrieval
org_id string OrgID is the unique organization identifier.
income Income Income details related to the statement transactions.
bank_type string BankType is the type of the bank whether personal or corporate
code int32 Code is status error code if statement not found
message string Message is error message if statement not found
details []ErrorDetail Details is detailed message if statement not found
map[string]bytes AccountPdfs is the list of account statement pdf files indexed by account number.
Timestamp
Name Type Description
seconds int64
nanos int32
AccountStatement
Name Type Description
account Account Account is the bank account information.
transactions []Transaction Transactions is the list of transaction which occured over the period_days.
account_pdfs bytes AccountPdfs is the list of account statement pdf files.
Challenge
Name Type Description
type ChallengeType
data bytes
Income
Name Type Description
overview Overview Overview of income information in a very high level
details []Details Details of income information in very detailed level
created_at Timestamp CreatedAt is the time when income prediction created in the system
statement_id string StatementID of the income model
ErrorDetail
Name Type Description
status_code string status_code contains the status code of the request.
status_desc string status_desc contains the description of the given status code of the request.
Account
Name Type Description
account_id string AccountID is the bank account firestore document identifier.
type AccountType Type of the relevant bank account. It is an enum indicating whether it is a Savings or Checking account
owner_ids []string OwnerIds 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_number string AccountNumber is the identifying account number of the bank account in question
nick string Nick is an optional nickname for the account.
balance Amount Balance is the current balance of the relevant bank account as of the current statement retrieval
holder_name string HolderName is the full name of the account holder. The format might change between banks.
bank_code BankCode BankCode is the Brankas bank code for the bank that holds the account.
total_amount_credited Amount TotalAmountCredited is the sum of amount credited with all transactions
total_amount_debited Amount TotalAmountDebited is the sum of amount debited with all transactions
credit_transaction_count int32 CreditTransactionCount denotes number of credit transaction
debit_transaction_count int32 DebitTransactionCount denotes number of debit transaction
Transaction
Name Type Description
transaction_id string TransactionID is the transaction firestore document identifier.
date Timestamp Date is the transaction date in UTC
type TransactionType Type is the transaction’s type, whether it was a CREDIT, DEBIT.
status TransactionStatus Status is the transaction status marked by the bank as pending
amount Amount Amount is the financial value of the transaction
descriptor string Descriptor is the bank statement descriptor attached to the transaction
match_id string MatchID is a reference to related match data.
from Account From is the transaction source account.
to Account To is the transaction destination account.
fields Transaction_Fields
balance Amount Balance is the running balance of the transaction
Overview
Name Type Description
count_of_days int32 CountOfDays from start_date to end_date, counting last day as 1 day
count_of_whole_months int32 CountOfWholeMonths, rounded up
months_with_income int32 MonthsWithIncome denotes the number of month income is available
calculation Calculation Calculation is a monthly count of categorized fund_in transaction by average
calculation_frequency string CalculationFrequency denotes the frequency of the calculation
confidence string Confidenence denotes the confidence level of the income deduction
uncategorized_income UncategorizedIncome UncategorizedIncome are the transaction which arent categorized yet
count_of_months int32 CountOfMonths rounded up
persona string Persona of the user
income IncomeOverview Income overview
non_income NonIncomeOverview NonIncome overview
Details
Name Type Description
year string Year of the income details
month string Month of the income details
is_whole_month bool IsWholeMonth denotes if the income details is for whole month or partial days in a month
total_amount Amount TotalAmount of the income details
income_count int32 IncomeCount is the number of transaction counted as income
streams_count int32 StreamsCount is the number of the stream or category the income is received
streams []string Streams denotes the list of streams the income received from.
transactions []Transaction Transactions are the list of income transactions
income IncomeDetails Income Details
non_income NonIncomeDetails NonIncome Details
Amount
Name Type Description
cur CurrencyISO4217 Cur is the currency of the amount using its ISO 4217 code.
num string Num 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”.
decimal Decimal Decimal is the actual amount value with decimal points
Transaction_Fields
Name Type Description
name string Name is the Name of the other party.
memo string Memo is the user input on a memo line.
account_no string AccountNo is the other party’s acount number.
company string Company is the virtual account company name.
Calculation
Name Type Description
average_count int32 AverageCount is the average number of income transactions
average_amount Amount AverageAmout is the average amount of income transactions
max_amount Amount MaxAmount denotes the maximum amount part of income transactions
min_amount Amount MinAmount denotes the minimum amount part of income transactions
median_amount Amount MedianAmount denotes the median amount part of income transactions
mean_amount Amount MeanAmount denotes the mean amount part of income transactions
UncategorizedIncome
Name Type Description
total_amount Amount TotalAmount is the total amount of uncategorized income
total_acount int32 TotalAcount is the total acount of uncategorized income
IncomeOverview
Name Type Description
months_with_income string MonthsWithIncome overview of the income
total_amount Amount TotalAmount overview of the income
count int32 Count overview of the income
confidence string Confidence overview of the income
monthly Monthly Monthly overview of the income
NonIncomeOverview
Name Type Description
overall_total_amount Amount OverallTotalAmount overview of nonincome
overall_count int32 OverallCount overview of nonincome
Amount
Name Type Description
cur CurrencyISO4217 Cur is the currency of the amount using its ISO 4217 code.
num string Num 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”.
decimal Decimal Decimal is the actual amount value with decimal points
Transaction
Name Type Description
date Timestamp Date is the transaction date
type string Type is the trasnaction type
stream string Stream denotes the transactions source like paycheck, investment_income etc
confidence string Confidenence denotes the confidence level of the income deduction
amount Amount Amount denotes the transaction amount
descriptor string Descriptor denoes the details of the transaction
category string Category of the transaction
IncomeDetails
Name Type Description
total_amount Amount TotalAmount of the income
count int32 Count of the income
categories []string Categories of the income
categories_count int32 CategoriesCount of the income
transactions []Transactions Transactions of the income
NonIncomeDetails
Name Type Description
total_amount Amount TotalAmount details of nonincome
count int32 Count details of nonincome
categories []string Categories details of nonincome
categories_count int32 CategoriesCount details of nonincome
transactions []Transactions Transactions details of nonincome
Decimal
Name Type Description
places int32 Places denotes the number of decimal points included with the amount
num string Num is the actual amount value with decimal points It is the decimal representation of the Num field as PHP 100.00 only for Indonesia, Philippine and Thailand
Monthly
Name Type Description
average_count int32 AverageCount of the monthly income
average_amount Amount AverageAmount of the monthly income
max_amount Amount MaxAmount of the monthly income
min_amount Amount MinAmount of the monthly income
median_amount Amount MedianAmount of the monthly income
mean_amount Amount MeanAmount of the monthly income
Decimal
Name Type Description
places int32 Places denotes the number of decimal points included with the amount
num string Num is the actual amount value with decimal points It is the decimal representation of the Num field as PHP 100.00 only for Indonesia, Philippine and Thailand
Transactions
Name Type Description
date Timestamp Date of the transaction
type string Type of the transaction
category string Category of the transaction
confidence string Confidence is the percentage of
amount Amount Amount of the transaction
descriptor string Descriptor of the transaction
Enums
StatementStatus
Value Description
UNKNOWN_StatementStatus Unknown statement status
Status_PENDING The requested statement retrieval is in progress.
FAILED The requested statement couldn’t be retrieved successfully.
COMPLETED The requested statement was successfully retrieved
NOTIFIED The request statement status was successfully notified
Status_RECEIVED The statement request processing is complete.
CANCELLED The statement request was cancelled
INACTIVATED The statement request inactivated upon waiting for user input
PURGED The statement data such as accounts and transactions are purged from brankas system
RECORDS_AVAILABLE Indicates atleast one or more transaction available for statement
INITIATED_Status The statement request is initiated for retrieval via IDP flow
BankCode

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

Value Description
UNKNOWN_BANK
MANDIRI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Mandiri
BCA_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
BNI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Negara Indonesia (BNI)
BRI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Rakyat Indonesia (BRI)
BCA_CORPORATE Bank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
DUMMY_BANK_PERSONAL Bank code to instruct the statement retrieval service to target the sandboxed Brankas dummy bank for test calls
BDO_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Banco De Oro Unibank (BDO)
BPI_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Bank of the Philippines Islands (BPI)
BPI_CORPORATE Bank code to retrieve retail bank (corporate) account statements / transaction histories from the Bank of the Philippines Islands (BPI)
KASIKORNBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Kasikornbank.
PNB_PERSONAL Bank code to retrieve retail bank account transaction data for Philippine National Bank
UNIONBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Union Bank
UNIONBANK_CORPORATE Bank code to retrieve retail bank account transaction data for Union Bank
METROBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Metropolitan Bank
RCBC_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Rizal Commercial Banking Corporation
StatementSubStatus
Value Description
UNKNOWN_StatementSubStatus
SubStatus_INITIATED Initiatated a request for PIDP
SubStatus_LOGIN_ERROR Error while logging in to the user internet banking account.
SubStatus_AWAITING_LOGIN Login in progress.
SubStatus_AWAITING_TFA Awaiting TFA authentication to gain access to the user’s online banking account.
SubStatus_COMPLETED The requested statement was successfully retrieved
SubStatus_BLOCKED Blocked
SubStatus_INPROGRESS The requested statement retrieval request is in progress.
SubStatus_INVALID_TFA TFA provided by the user is not correct or expired.
SubStatus_NO_TFA_PROVIDED User didn’t provide a TFA for authentication with the bank.
SubStatus_SYSTEM_UNAVAILABLE System busy or unavailable to process the request
SubStatus_ERROR The requested statement couldn’t be retrieved successfully.
SubStatus_CANCELLED Cancelled
SubStatus_INACTIVATED Inactivated
SubStatus_PURGED Purged
SubStatus_RECORDS_AVAILABLE Indicates atleast one or more transaction available for statement
SubStatus_TFA_OPTIONAL Indicates multiple TFA option available to change
SubStatus_INCOME_AVAILABLE The income data available for the statement
SubStatus_PERMISSION_REQUIRED Permission required
ChallengeType

ChallengeType for captcha or OTP challenge

Value Description
TEXT TEXT are challenges that are generally represented as strings.
IMAGE IMAGE are image-based challenges, for example a captcha image.
IN_APP IN_APP are challenges that happens offline and asynchronously outside our control for example, approvals from a user’s mobile device.
SMS SMS are SMS-based challenge codes.
MGENCODE MGENCODE or Mobile Generated Code, are usually challenge codes generated by bank applications.
HYBRID HYBRID are bank-specific challenge types, for example, BCA requires a mix of the different types.
PIN PIN are mostly static pin codes from banks, eg Metrobank’s passcode.
AccountType

AccountType is the account type enum.

Value Description
UNKNOWN_AccountType Indicates that the bank account type is either undefined or neither a Checking on Saving account
CHECKING Indicates that the bank account is a Checking Account
SAVINGS Indicates that the bank account is a Savings Account
TransactionType

TransactionType is the transaction type enum.

Value Description
UNKNOWN_TYPE Unknown transaction type
CREDIT Transactions that credit the user’s account
DEBIT Transactions that debit the user’s account
TransactionStatus

TransactionStatus is the transaction status enum.

Value Description
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

Value Description
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
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

Value Description
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": [
    {
      "account_statements": [
        {
          "account": {
            "account_number": "xxxxx1234",
            "balance": {
              "cur": "PHP",
              "num": "10000"
            },
            "holder_name": "TEST USER",
            "type": "SAVINGS"
          },
          "transactions": [
            {
              "amount": {
                "cur": "PHP",
                "num": "10000"
              },
              "date": "2020-10-21T04:50:35Z",
              "descriptor": "Payment to merchant X for product Y",
              "status": "Success",
              "type": "DEBIT"
            },
            {
              "amount": {
                "cur": "PHP",
                "num": "10000"
              },
              "date": "2020-10-21T04:50:35Z",
              "descriptor": "Payment to merchant X for product Y",
              "status": "Success",
              "type": "CREDIT"
            }
          ]
        }
      ],
      "bank_code": "DUMMY_BANK_PERSONAL",
      "end_date": "2019-01-21T04:50:35Z",
      "start_date": "2020-10-21T04:50:35Z",
      "statement_id": "123_statement_id",
      "status": "COMPLETED"
    },
    {
      "account_statements": [
        {
          "account": {
            "account_number": "xxxxx5678",
            "balance": {
              "cur": "PHP",
              "num": "10000"
            },
            "holder_name": "TEST USER 2",
            "type": "CHECKINGS"
          },
          "transactions": [
            {
              "amount": {
                "cur": "PHP",
                "num": "10000"
              },
              "date": "2020-10-21T04:50:35Z",
              "descriptor": "Payment to merchant X for product Y",
              "status": "Success",
              "type": "DEBIT"
            },
            {
              "amount": {
                "cur": "PHP",
                "num": "10000"
              },
              "date": "2020-10-21T04:50:35Z",
              "descriptor": "Payment to merchant X for product Y",
              "status": "Success",
              "type": "CREDIT"
            }
          ]
        }
      ],
      "bank_code": "DUMMY_BANK_PERSONAL",
      "end_date": "2019-01-21T04:50:35Z",
      "start_date": "2020-10-21T04:50:35Z",
      "statement_id": "456_statement_id",
      "status": "COMPLETED"
    }
  ]
}

Response codes

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

Send a statement retrieval initiation request

Initiates a statement retrieval request

curl -X POST \
	https://statement.sandbox.bnk.to/v1/statement-init \
	-H 'x-api-key: USE_YOUR_API_KEY' \
	-d '{
		"app_redirect_uri": "http://foo.com",
		"bank_codes": [
			"BDO_PERSONAL",
			"BPI_PERSONAL",
			"PNB_PERSONAL"
		],
		"country": "PH",
		"external_id": "test@domain.com",
		"organization_display_name": "NeoBank"
	}'

HTTP Request

POST https://statement.sandbox.bnk.to/v1/statement-init

Body Parameters

Name Type Description
country string Country is the country code (ID, PH, TH)
bank_codes []BankCode BankCodes used to specify the list of bank to be shown to user
external_id string ExternalID represent an id that is passed by the api consumer to track the request
app_redirect_uri string AppRedirectURI is the URL that end users need to be redirected after the successful statement retrieval operation
organization_display_name string OrganizationDisplayName is a name of the organization that send the request and will be displayed when processing the statement request
app_redirect_error_uri string AppRedirectErrorURI is the URL that end users need to be redirected for the failure on statement retrieval operation
app_redirect_duration string AppRedirectDuration is the time (in seconds) the user should be redirected upon statement retrieval operation finish.
remember_me bool RememberMe shows the remember_me option when performing the statement-retrieval flow if it is set to true, otherwise won’t show remember me option
link_id string LinkID is the identifier that maps to the bank and generated after a credential is stored in browser
auto_consent bool AutoConsent is a flag that skip the consent on PIDP flow and it is disabled by default
corporate bool Corporate flag indicates the flow will be for corporate bank statement retrievals
start_date string StartDate is the start date of the statement request Date/Time ranges should follow the YYYY-MM-DD convention
end_date string EndDate is the end date of the statement request Date/Time ranges should follow the YYYY-MM-DD convention
Enums
BankCode

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

Value Description
UNKNOWN_BANK
MANDIRI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Mandiri
BCA_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
BNI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Negara Indonesia (BNI)
BRI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Rakyat Indonesia (BRI)
BCA_CORPORATE Bank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
DUMMY_BANK_PERSONAL Bank code to instruct the statement retrieval service to target the sandboxed Brankas dummy bank for test calls
BDO_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Banco De Oro Unibank (BDO)
BPI_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Bank of the Philippines Islands (BPI)
BPI_CORPORATE Bank code to retrieve retail bank (corporate) account statements / transaction histories from the Bank of the Philippines Islands (BPI)
KASIKORNBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Kasikornbank.
PNB_PERSONAL Bank code to retrieve retail bank account transaction data for Philippine National Bank
UNIONBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Union Bank
UNIONBANK_CORPORATE Bank code to retrieve retail bank account transaction data for Union Bank
METROBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Metropolitan Bank
RCBC_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Rizal Commercial Banking Corporation

Responses

Response body

Name Type Description
statement_id string StatementID is the unique ID assigned to the statement initiation request
redirect_uri string RedirectURI is the URL that end users need to be redirected to in order to continue the statement-retrieval operation

Example:

{
  "statement_id": "96481b6f-f6f1-4414-badc-8fb1dae6c51c",
  "redirect_uri": "https://pidp-server.bnk.to?app=statement\u0026statement_id=96481b6f-f6f1-4414-badc-8fb1dae6c51c\u0026country=PH\u0026organization_display_name=NeoBank\u0026return_url=http%3A%2F%2Ffoo.com\u0026bank_codes=262,263,406"
}

Response codes

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

Send the statement delete request

Purge the statement associated with statement_ids and download identifier

curl -X POST \
	https://statement.sandbox.bnk.to/v1/statement-purge \
	-H 'x-api-key: USE_YOUR_API_KEY' \
	-d '{
		"statement_ids": "[]string",
		"download_id": "string",
		"confirm": "bool"
	}'

HTTP Request

POST https://statement.sandbox.bnk.to/v1/statement-purge

Body Parameters

Name Type Description
statement_ids []string StatementIDs are the list of statement ids for which the account and transaction details need to be purged
download_id string DownloadID is the unique identifier that represens a list of statement ids associated when statement detail report downloaded, passing the download_id will delete the statement account and transactions corresponds to the download identifier
confirm bool Confirm denotes that the statement shall be deleted, the flag won’t be required if purge happens by passing the statement_id if the download_id is passed and confirm is set to true the statement ids associated with download id’s will be purged, otherwise the downloaded statements details against the download_id will be deleted.

Responses

Response body

Name Type Description
purged_at Timestamp PurgedAt denotes the time when statement purged
statement_count int32 StatementCount returns the number of statement purged
Objects
Timestamp
Name Type Description
seconds int64
nanos int32

Example:

{
  "purged_at": {
    "seconds": "int64",
    "nanos": "int32"
  },
  "statement_count": "int32"
}

Response codes

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

Send a static link creation request

Initiates a static link request

curl -X POST \
	https://statement.sandbox.bnk.to/v1/static-link \
	-H 'x-api-key: USE_YOUR_API_KEY' \
	-d '{
		"country": "string",
		"bank_codes": "[]BankCode",
		"app_redirect_uri": "string",
		"organization_display_name": "string",
		"logo_url": "string",
		"expiry_limit": "int32",
		"expires_in": "string",
		"start_date": "string",
		"end_date": "string"
	}'

HTTP Request

POST https://statement.sandbox.bnk.to/v1/static-link

Body Parameters

Name Type Description
country string Country is the country code (ID, PH, TH)
bank_codes []BankCode BankCodes used to specify the list of bank to be shown to user
app_redirect_uri string AppRedirectURI is the URL that end users need to be redirected after the successful statement retrieval operation
organization_display_name string OrganizationDisplayName is a name of the organization that send the request and will be displayed when processing the statement request
logo_url string LogoURL represent the logo that should used during the statement retrieval operation
expiry_limit int32 ExpiryLimit denotes the static link shall only be used until the limit/count exceeds, it will be considered as expired after when limit exceeds
expires_in string ExpiresIn 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
start_date string StartDate is the start date of the statement request Date/Time ranges should follow the YYYY-MM-DD convention
end_date string EndDate is the end date of the statement request Date/Time ranges should follow the YYYY-MM-DD convention
Enums
BankCode

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

Value Description
UNKNOWN_BANK
MANDIRI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Mandiri
BCA_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
BNI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Negara Indonesia (BNI)
BRI_PERSONAL Bank code to retrieve retail bank account transaction data for Bank Rakyat Indonesia (BRI)
BCA_CORPORATE Bank code to retrieve retail bank account transaction data for Bank Central Asia (BCA)
DUMMY_BANK_PERSONAL Bank code to instruct the statement retrieval service to target the sandboxed Brankas dummy bank for test calls
BDO_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Banco De Oro Unibank (BDO)
BPI_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Bank of the Philippines Islands (BPI)
BPI_CORPORATE Bank code to retrieve retail bank (corporate) account statements / transaction histories from the Bank of the Philippines Islands (BPI)
KASIKORNBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Kasikornbank.
PNB_PERSONAL Bank code to retrieve retail bank account transaction data for Philippine National Bank
UNIONBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Union Bank
UNIONBANK_CORPORATE Bank code to retrieve retail bank account transaction data for Union Bank
METROBANK_PERSONAL Bank code to retrieve retail bank account transaction data for Metropolitan Bank
RCBC_PERSONAL Bank code to retrieve retail bank account statements / transaction histories from the Rizal Commercial Banking Corporation

Responses

Response body

Name Type Description
static_link string StaticLink is the static URL that shall be used to initiate the statement-retrieval operation

Example:

{
  "static_link": "string"
}

Response codes

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

Create or update a notification object

UpsertNotification creates or updates a notification object.

curl -X PUT \
	https://statement.sandbox.bnk.to/v1/notification \
	-H 'x-api-key: USE_YOUR_API_KEY' \
	-d '{
		"id": "string",
		"description": "string",
		"url": "string",
		"status": "NotificationStatus",
		"": "map[string]string"
	}'

HTTP Request

PUT https://statement.sandbox.bnk.to/v1/notification

Body Parameters

Name Type Description
id string ID contains the unique identifier of the notification.
description string Description for this notification.
url string URL contains the actual notification value.
status NotificationStatus Status is the state of this notification - whether it is still active or not.
map[string]string Headers consist of list of key/value that need to be added for the notification request
Enums
NotificationStatus
Value Description
UNKNOWN_URLSTATUS
ACTIVE
INACTIVE
ACTIVE_UNPROXIED

Responses

Response body

Name Type Description
id string ID contains the unique identifier of the business information object.

Example:

{
  "id": "string"
}

Response codes

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