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

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
}