common.bank
io.token.proto.common.bank common/src/main/proto/bankinfo.proto
syntax = "proto3";
package io.token.proto.common.bank;
option java_outer_classname = "BankProtos";
option csharp_namespace = "Tokenio.Proto.Common.BankProtos";
import "google/protobuf/wrappers.proto";
import "alias.proto";
import "providerspecific.proto";
message Bank {
string id = 1;
string name = 2;
string logo_uri = 3; // Square bank avatar icon
string full_logo_uri = 4; // Full size bank icon
bool supports_appless = 5 [deprecated = true]; // Works with appless payments
bool supports_guest_checkout = 15; // Connection supports guest checkout
bool supports_information = 7; // Connection allows for retrieval of information
bool requires_external_auth = 8; // Connection requires external authorization for creating transfers
bool supports_send_payment = 9; // Connection allows for payment initiation
bool supports_receive_payment = 10; // Connection allows for receiving payments
bool supports_balance = 16; // Connection allows for retrieving balances
bool supports_scheduled_payment = 18; // Connection supports scheduled payments
bool supports_standing_order = 19; // Connection supports standing orders
bool supports_bulk_transfer = 20; // Connection supports bulk payments
bool requires_legacy_transfer = 14 [deprecated = true]; // Connection only supports immediate redemption of transfers
bool requires_one_step_payment = 17; // Connection only supports immediate redemption of transfers
bool supports_linking_uri = 22; // Connection supports linking with a bank linking URI
string provider = 11; // Provider of the bank, e.g. Yodlee, Token
string country = 12 [deprecated = true]; // The ISO 3166-1 alpha-2 two letter country code in upper case. use countries instead
string identifier = 13; // Optional identifier of the bank, not guaranteed to be unique across all banks. BLZ for German banks.
repeated string supported_transfer_destination_types = 21; // A list of Transfer Destination Types, like SEPA, ELIXIR, supported by the bank.
bool supports_ais_guest_checkout = 23;// Connection allows ais guest checkout
bool supports_funds_confirmation = 24;// Connections supports funds confirmation
bool supports_transactions_date_filter = 25; // Connection allows get transactions by date filter
bool supports_checkout_flow_v2 = 26; // Connection supports checkout flow v2
OpenBankingStandard open_banking_standard = 28; // Optional open banking standard
repeated string countries = 29; // List of ISO 3166-1 alpha-2 two letter country codes in upper case.
repeated AuthMetadataField authorization_metadata = 30 [deprecated = true]; // List of fields required for authorization.
string bank_group = 31; // Bank group name if bank is member of one.
repeated providerspecific.CredentialField credential_fields = 32; // List of fields required for authorization.
MandatoryFields mandatory_fields = 33;
bool supports_get_consent = 34;
string bic = 35;
repeated FieldFormatInformation fields_format_information = 36;
bool supports_return_refund_account = 37;
string operational_time = 38; // bank's operational hours on a normal business day
int32 transaction_history_limit = 39; // Number of records of transaction history allowed per page.
bool supports_variable_recurring_payment = 40; //Connection supports variable recurring payments
int32 rank = 41; // This will be used to sort banks by the value of rank.
bool supports_app_to_app_on_ios = 42; // Bank supports App to App flows on iOS.
bool supports_app_to_app_on_android = 43; // Bank supports App to App flows on android.
repeated MaintenanceWindow maintenance_window = 44;
string bank_sub_group = 45; // Optional Bank Sub Group
bool supports_account_list = 46; // Connection allows for retrieval of accounts
bool supports_account_details = 47; // Connection allows for retrieval of account's details
bool supports_account_balance = 48; // Connection allows for retrieval of account's balance
bool supports_transaction_list = 49; // Connection allows for retrieval of account's transactions
bool supports_transaction_details = 50; // Connection allows for retrieval of account's transaction details
bool supports_standing_order_list = 51; // Connection allows for retrieval of account's standing order transactions
bool supports_delete_ais_consent = 52; // Connection allows to delete ais consent
bool supports_unattended_calls_limit = 53; // Connection allows to get unattended calls limit
}
message MaintenanceWindow {
string start_time = 1;
string end_time = 2;
Type type = 3;
ProductType product_type = 4;
enum Type {
INVALID = 0;
NO_DOWNTIME_EXPECTED = 1;
DOWNTIME_EXPECTED = 2;
OUTAGE = 3;
}
}
message AuthMetadataField {
option deprecated = true;
string name = 1;
string description = 2;
}
message FieldFormatInformation {
string name = 1;
string path = 2;
string constraint = 3;
string v2_name = 4;
string v2_path = 5;
}
// Depending on how user can interact with bank,
// different fields will have values.
// BankAuthorization JSON: User interacts with web site, goes to JSON uri
// OAuth: User interacts with web site, gets OAuth access token
message BankInfo {
string linking_uri = 1; // BankAuthorization JSON starting URI
string redirect_uri_regex = 2; // BankAuthorization JSON success URI pattern
string bank_linking_uri = 3; // OAuth starting URI
repeated string realm = 4; // (Optional) Realms of the bank
string custom_alias_label = 6; // (Optional) Label to be displayed if bank supports custom aliases
repeated io.token.proto.common.alias.Alias.Type alias_types = 7; // Alias type for users to login with in web app, PHONE, EMAIL, CUSTOM
}
message Paging {
int32 page = 1; // Index of current page
int32 per_page = 2; // Number of records per page
int32 page_count = 3; // Number of pages in total
int32 total_count = 4; // Number of records in total
}
message BankFilter {
string provider = 1 [deprecated = true]; // (Optional) Filter for banks whose 'provider' matches the provider (case-insensitive)
string tpp_id = 2; // (Optional) Filter for banks which are integrated with the TPP
string destination_country = 3 [deprecated = true]; // DEPRECATED. Use countries instead. Filter for banks that support sending to the destination country;
string country = 4 [deprecated = true]; // DEPRECATED. Use countries instead. Filter for banks whose 'country' matches the given ISO 3166-1 alpha-2 country code (case-insensitive)
repeated string ids = 5; // (Optional) Filter for banks whose 'id' matches any one of the given ids (case-insensitive). Can be at most 1000.
string search = 6; // (Optional) Filter for banks whose 'name' or 'identifier' contains the given search string (case-insensitive)
BankFeatures bank_features = 8;
string bank_code = 9; // (Optional) Filter for banks whose bank code matches the given value (BLZ for German banks only)
repeated string providers = 10; // (Optional) Filter for banks whose 'provider' matches the providers (case-insensitive)
repeated string countries = 11; // (Optional) Filter for banks whose 'country' matches the given ISO 3166-1 alpha-2 country code (case-insensitive)
repeated string bics = 12; // (Optional) Filter for banks whose 'bic' matches any one of the given BICs (case-insensitive). Can be at most 1000.
repeated string supported_payment_networks = 13;
string bank_group = 14; // (Optional) Filter for banks whose 'group' contains the given string (case-insensitive)
string bank_sub_group = 15; // (Optional) Filter for banks whose 'sub-group' matches the given string (case-insensitive)
}
enum OpenBankingStandard {
reserved 9;
Invalid_Standard = 0;
UK_Open_Banking_Standard = 1; // https://standards.openbanking.org.uk/
Starling_Bank_API = 2; // https://developer.starlingbank.com/docs
PolishAPI = 3; // https://polishapi.org/en/
STET_PSD2_API = 4; // https://www.stet.eu/en/psd2/
Citi_Handlowy_PSD2_API = 5; // https://sandbox.developerhub.citi.com/api/poland/bank-handlowy-w-warszawie-sa/accounts/accounts/documentation
NextGenPSD2 = 6; // https://www.berlin-group.org/nextgenpsd2-downloads
Slovak_Banking_API_Standard = 7; // https://sbaonline.docs.apiary.io/#
Czech_Open_Banking_Standard = 8; // https://github.com/Czech-BA/COBS
Budapest_Bank_API = 10; // https://openbanking.budapestbank.hu/docs/pdf/Budapest%20Bank%20Open%20Banking%20interface%20-%20AccountInfo_V1.pdf
Token = 11; // The standard for Token's Direct Banks
}
message BankFeatures {
google.protobuf.BoolValue supports_appless = 1 [deprecated = true]; // Works with appless payments
google.protobuf.BoolValue supports_guest_checkout = 2; // Connection supports guest checkout
google.protobuf.BoolValue supports_information = 3; // Connection allows for retrieval of information
google.protobuf.BoolValue requires_external_auth = 4; // Connection requires external authorization for creating transfers
google.protobuf.BoolValue supports_send_payment = 5; // Connection allows for payment initiation
google.protobuf.BoolValue supports_receive_payment = 6; // Connection allows for receiving payments
google.protobuf.BoolValue supports_balance = 7; // Connection allows for retrieving balances
google.protobuf.BoolValue supports_scheduled_payment = 8; // Connection supports scheduled payments
google.protobuf.BoolValue supports_standing_order = 9; // Connection supports standing orders
google.protobuf.BoolValue supports_bulk_transfer = 10; // Connection supports bulk payments
google.protobuf.BoolValue requires_one_step_payment = 11; // Connection only supports immediate redemption of transfers
google.protobuf.BoolValue supports_linking_uri = 12; // Connection supports linking with a bank linking URI
google.protobuf.BoolValue supports_ais_guest_checkout = 13; // Connection allows ais guest checkout
google.protobuf.BoolValue supports_funds_confirmation = 14; // Connection supports funds confirmation
google.protobuf.BoolValue supports_checkout_flow_v2 = 15; // Connection supports checkout flow v2
google.protobuf.BoolValue supports_get_consent = 17; // Connection allows to fetch consent object form the bank
google.protobuf.BoolValue supports_return_refund_account = 18; // Connection allows to request refund account
google.protobuf.BoolValue supports_transactions_date_filter = 19;
google.protobuf.BoolValue supports_account_information = 20 [deprecated = true]; // replaced by supports_account_list, supports_account_details, supports_account_balance
google.protobuf.BoolValue supports_single_payment = 21;
google.protobuf.BoolValue supports_variable_recurring_payment = 22; //Connection supports variable recurring payments
// AIS
google.protobuf.BoolValue supports_account_list = 23; // Connection allows for retrieval of accounts
google.protobuf.BoolValue supports_account_details = 24; // Connection allows for retrieval of account's details
google.protobuf.BoolValue supports_account_balance = 25; // Connection allows for retrieval of account's balance
google.protobuf.BoolValue supports_transaction_list = 26; // Connection allows for retrieval of account's transactions
google.protobuf.BoolValue supports_transaction_details = 27; // Connection allows for retrieval of account's transaction details
google.protobuf.BoolValue supports_standing_order_list = 28; // Connection allows for retrieval of account's standing order transactions
google.protobuf.BoolValue supports_delete_ais_consent = 29; // Connection allows to delete ais consent
google.protobuf.BoolValue supports_unattended_calls_limit = 30; // Connection allows to get unattended calls limit
}
message MandatoryFields {
Transfer transfer = 1;
StandingOrder standing_order = 2;
Access access = 3;
message Access {
repeated string fields = 1; // Full path to the field within the token request
}
message Transfer {
Fields domestic = 1;
Fields international = 2;
}
message StandingOrder {
Fields domestic = 1;
Fields international = 2;
}
message Fields {
repeated string fields = 7; // Full path to the field within the token request
repeated string stet_fields = 8;
repeated string polishapi_fields = 9;
google.protobuf.BoolValue debtor_account = 1 [deprecated = true]; // tokenRequestPayload.transferBody.transferInstructions.source.accountIdentifier
google.protobuf.BoolValue debtor_name = 2 [deprecated = true]; // tokenRequestPayload.transferBody.transferInstructions.source.customerData.legalNames
google.protobuf.BoolValue beneficiary_name = 3 [deprecated = true]; // tokenRequestPayload.transferBody.transferInstructions.transferDestinations.customerData.legalNames
google.protobuf.BoolValue beneficiary_address = 6 [deprecated = true]; // tokenRequestPayload.standingOrderBody.transferInstructions.transferDestinations.customerData.address
// standard-specific fields
Stet stet = 4 [deprecated = true];
PolishApi polish_api = 5 [deprecated = true];
message Stet {
google.protobuf.BoolValue creditor_agent = 1; // tokenRequestPayload.transferBody.transferInstructions.metadata.providerTransferMetadata.stetTransferMetadata.beneficiary.creditorAgent
}
message PolishApi {
google.protobuf.BoolValue delivery_mode = 1; // tokenRequestPayload.transferBody.transferInstructions.metadata.providerTransferMetadata.polishApiTransferMetadata.deliveryMode
}
}
}
enum OutageStatus {
INVALID_STATUS = 0;
AVAILABLE = 1;
POTENTIAL_OUTAGE = 2;
COMPLETE_OUTAGE = 3;
COMPLETED_OUTAGE = 4 [deprecated = true]; // Use COMPLETE_OUTAGE instead of this.
}
enum ProductType {
INVALID = 0;
AIS = 1;
SIP = 2;
}
message BankStatusFilter {
repeated string bank_id = 1; // (Optional) Filter for banks whose 'id' matches any one of the given ids
repeated io.token.proto.common.bank.ProductType product_type = 2; // (Optional) Filter will apply on the given product types.
repeated io.token.proto.common.bank.OutageStatus outage_status = 3; // (Optional) Filter for banks whose 'outage_status' matches any one of the given outage statuses
repeated string country = 4; // (Optional) Filter for banks whose 'country' matches any one of the given ISO 3166-1 alpha-2 country code
}