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";

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, FinApi, 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
  bool requires_source_account = 27; // Connection requires source account
  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; // List of fields required for authorization.
  string bank_group = 31; // Bank group name if bank is member of one.
}

message AuthMetadataField {
  string name = 1;
  string description = 2;
}

// 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)
  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)

  BankFeatures bank_features = 8;
}

enum OpenBankingStandard {
  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
  American_Express_PSD2_API = 9; // https://developer.americanexpress.com/open-banking
  Budapest_Bank_API = 10; // https://openbanking.budapestbank.hu/docs/pdf/Budapest%20Bank%20Open%20Banking%20interface%20-%20AccountInfo_V1.pdf
}

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 requires_source_account = 16;  // Connection requires source account
}