common.transferinstructions

io.token.proto.common.transferinstructions /common/src/main/proto/transferinstructions.proto


syntax = "proto3";
package io.token.proto.common.transferinstructions;

option java_outer_classname = "TransferInstructionsProtos";
option csharp_namespace = "Tokenio.Proto.Common.TransferInstructionsProtos";

import "account.proto";
import "address.proto";
import "banklink.proto";
import "security.proto";
import "extensions/message.proto";

// A bank might require a Purpose of Payment for some transfers.
enum PurposeOfPayment {
  INVALID = 0;
  OTHER = 1;
  PERSONAL_EXPENSES = 2;
  PURCHASE_OF_SHARES = 3;
  TRANSFER_TO_YOUR_OWN_ACCOUNT = 4;
  PURCHASE_OF_PROPERTY = 5;
  FAMILY_MAINTENANCE = 6;
  SAVINGS = 7;
}

// A bank might require a context code for some transfers.
enum PaymentContext {
  INVALID_CONTEXT = 0;
  OTHER_CONTEXT = 1;
  BILL_PAYMENT = 2;
  ECOMMERCE_GOODS = 3;
  ECOMMERCE_SERVICES = 4;
  PERSON_TO_PERSON = 5;
}

message CustomerData {
  option (io.token.proto.extensions.message.redact) = true;
  repeated string legal_names = 1;                   // Repeated in case of joint account holders.
  io.token.proto.common.address.Address address = 2; // Physical address
}

// Money transfer source or destination account.
message TransferEndpoint {
  io.token.proto.common.account.BankAccount account = 1; // Account identifier, e.g., SWIFT transfer info
  CustomerData customer_data = 2;                        // Customer data: name and address
}

// Money transfer instructions.
message TransferInstructions {
  TransferEndpoint source = 1;                   // Transfer source.
  repeated TransferEndpoint destinations = 2;    // Transfer destination.
  Metadata metadata = 3;

  message Metadata {
    PurposeOfPayment transfer_purpose = 1;       // Purpose of payment
    PaymentContext payment_context = 2;          // Optional payment context
    string merchant_category_code = 3;           // Optional ISO 18245 Merchant Category Code (MCC)
    string merchant_customer_id = 4;             // Optional Unique merchant customer identifier
    io.token.proto.common.address.Address delivery_address = 5; // Optional delivery address
  }
}