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

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;            // 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 requires_legacy_transfer = 14;   // Connection only supports immediate redemption of transfers
  string provider = 11;                 // Provider of the bank, e.g. Yodlee, FinApi, Token
  string country = 12;                  // The ISO 3166-1 alpha-2 two letter country code in upper case.
  string identifier = 13;               // Optional identifier of the bank, not guaranteed to be unique across all banks. BLZ for German banks.
}

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

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;                // (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;     // (Optional) Filter for banks that support sending to the destination country
  string country = 4;                 // (Optional) 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)
}