// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto3"; package google.cloud.paymentgateway.issuerswitch.v1; import "google/api/field_behavior.proto"; option csharp_namespace = "Google.Cloud.PaymentGateway.IssuerSwitch.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/paymentgateway/issuerswitch/v1;issuerswitch"; option java_multiple_files = true; option java_outer_classname = "CommonFieldsProto"; option java_package = "com.google.cloud.paymentgateway.issuerswitch.v1"; option php_namespace = "Google\\Cloud\\PaymentGateway\\IssuerSwitch\\V1"; option ruby_package = "Google::Cloud::PaymentGateway::IssuerSwitch::V1"; // The API type for a transaction. Every transaction processed by the issuer // switch will be one of these API types. enum ApiType { // Unspecified API type. API_TYPE_UNSPECIFIED = 0; // Balance API. Maps to UPI's `BalEnq` API. This is a metadata // transaction API. BALANCE = 1; // Check transaction status API. Maps to UPI's `ChkTxn` API. This is a // metadata transaction API. CHECK_STATUS = 2; // Complain API. Maps to UPI's `Complaint` API. This is a metadata transaction // API. COMPLAINT = 3; // Heart beat API. Maps to UPI's `Hbt` API. This is a metadata transaction // API. HEART_BEAT = 4; // Initiate registration API. Maps to UPI's `Otp` API. This is a metadata // transaction API. INITIATE_REGISTRATION = 5; // List accounts API. Maps to UPI's `ListAccount` API. This is a metadata // transaction API. LIST_ACCOUNTS = 6; // Mandate API. Maps to UPI's `Mandate` API. This is a metadata transaction // API. MANDATE = 7; // Payment settlement API. Maps to UPI's `Pay` API. This is a financial // transaction API. SETTLE_PAYMENT = 8; // Update credentials API. Maps to UPI's `SetCre` API. This is a metadata // transaction API. UPDATE_CREDENTIALS = 9; // Validate registration API. Maps to UPI's `RegMob` API. This is a metadata // transaction API. VALIDATE_REGISTRATION = 10; // Voucher confirmation API. Maps to UPI's `VoucherConfirmation` API. VOUCHER_CONFIRMATION = 11; } // The type of a transaction. Every transaction processed by the issuer switch // will be one of these transaction types. Transaction types are associated with // a particular API type. This associated is documented with each value. enum TransactionType { // Unspecified transaction type. TRANSACTION_TYPE_UNSPECIFIED = 0; // Autoupdate transaction type. This is associated with the `CHECK_STATUS` // API type. Maps to UPI's `AUTOUPDATE` type. TRANSACTION_TYPE_AUTOUPDATE = 1; // Balance check transaction type. This is associated with the // `BALANCE_ENQUIRY` API type. Maps to UPI's `BalChk` type. TRANSACTION_TYPE_BALANCE_CHECK = 3; // Balance enquiry transaction type. This is associated with the // `BALANCE_ENQUIRY` API type. Maps to UPI's `BalEnq` type. TRANSACTION_TYPE_BALANCE_ENQUIRY = 4; // Check status transaction type. This is associated with the `COMPLAINT` API // type. Maps to UPI's `CHECKSTATUS` type. TRANSACTION_TYPE_CHECK_STATUS = 5; // Check transaction type. This is associated with the `CHECK_STATUS` API // type. Maps to UPI's `ChkTxn` type. TRANSACTION_TYPE_CHECK_TRANSACTION = 6; // Complaint transaction type. This is associated with the `COMPLAINT` API // type. Maps to UPI's `COMPLAINT` type. TRANSACTION_TYPE_COMPLAINT = 7; // Create transaction type. This is associated with the `MANDATE` API type. // Maps to UPI's `CREATE` type. TRANSACTION_TYPE_CREATE = 8; // Credit transaction type. This is associated with the `SETTLE_PAYMENT` API // type. Maps to UPI's `CREDIT` type. TRANSACTION_TYPE_CREDIT = 9; // Debit transaction type. This is associated with the `SETTLE_PAYMENT` API // type. Maps to UPI's `DEBIT` type. TRANSACTION_TYPE_DEBIT = 10; // Dispute transaction type. This is associated with the `COMPLAINT` API // type. Maps to UPI's `DISPUTE` type. TRANSACTION_TYPE_DISPUTE = 11; // Heart beat transaction type. This is associated with `HEART_BEAT` API type. // Maps to UPI's `Hbt` type. TRANSACTION_TYPE_HEART_BEAT = 12; // List accounts transaction type. This is associated with `LIST_ACCOUNTS` API // type. Maps to UPI's `ListAccount` type. TRANSACTION_TYPE_LIST_ACCOUNTS = 13; // OTP transaction type. This is associated with the `INITIATE_REGISTRATION` // API type. Maps to UPI's `Otp` type. TRANSACTION_TYPE_OTP = 14; // Register mobile transaction type. This is associated with the // `VALIDATE_REGISTRATION` API type. Maps to UPI's `RegMob` type. TRANSACTION_TYPE_REGISTER_MOBILE = 15; // Refund transaction type. This is associated with the `COMPLAINT` API // type. Maps to UPI's `REFUND` type. TRANSACTION_TYPE_REFUND = 16; // Reversal transaction type. This is associated with the `SETTLE_PAYMENT` and // `COMPLAINT` API types. Maps to UPI's `REVERSAL` type. TRANSACTION_TYPE_REVERSAL = 17; // Revoke transaction type. This is associated with the `MANDATE` API type. // Maps to UPI's `REVOKE` type. TRANSACTION_TYPE_REVOKE = 18; // Status update transaction type. This is associated with the `COMPLAINT` API // type. Maps to UPI's `STATUSUPDATE` type. TRANSACTION_TYPE_STATUS_UPDATE = 19; // Update transaction type. This is associated with the `MANDATE` API type. // Maps to UPI's `UPDATE` type. TRANSACTION_TYPE_UPDATE = 20; // Update credentials transaction type. This is associated with // `UPDATE_CREDENTIALS` API type. Maps to UPI's `SetCre` type. TRANSACTION_TYPE_UPDATE_CREDENTIALS = 21; // Redeem transaction type. This is associated with the `VOUCHER_CONFIRMATION` // API type. Maps to UPI's `REDEEM` type. TRANSACTION_TYPE_REDEEM = 22; } // A reference to uniquely identify an account according to India's UPI // standards. message AccountReference { // IFSC code of a bank's branch. string ifsc_code = 1; // Type of account. Examples include SAVINGS, CURRENT, etc. string account_type = 2; // Unique number for an account in a bank and branch. string account_number = 3; } // A participant in a payment settlement transaction processed by the issuer // switch. The participant could either be the payer or the payee in the // transaction. message SettlementParticipant { // The participant information. Participant participant = 1; // Unique identification of an account according to India's UPI standards. AccountReference account = 2; // Information about a merchant who is a participant in the payment. This // field will be specified only if the participant is a merchant. MerchantInfo merchant_info = 3; // Output only. The mobile number of the participant. string mobile = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The device id of the participant. string device_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A participant in a transaction processed by the issuer switch. message Participant { // The type of the participant. enum Persona { // Unspecified persona. PERSONA_UNSPECIFIED = 0; // Participant is an entity. ENTITY = 1; // Participant is a person. PERSON = 2; } // The virtual payment address (VPA) of the participant. string virtual_payment_address = 1; // The persona of the participant. Persona persona = 2; // The name of the participant. string user = 3; } // A merchant entity participating in a payment settlement transaction. message MerchantInfo { // A unique identifier for the merchant. string id = 1; // The name of the merchant who is a party in the payment. Includes multiple // possible names for the merchant. MerchantName merchant = 2; // Additional information about the merchant. MerchantAdditionalInfo additional_info = 3; } // The name of a merchant who is a participant in a payment settlement // transaction. Includes multiple possible names for the merchant. message MerchantName { // The brand name of the merchant. string brand = 1; // The merchant's legal name. string legal = 2; // The franchise name under which the merchant operates. string franchise = 3; } // Additional merchant information specific to India's UPI requirements. message MerchantAdditionalInfo { // Indicates the merchant's type as a small or large merchant. enum Type { // Unspecified merchant type. TYPE_UNSPECIFIED = 0; // Large merchant. LARGE = 1; // Small merchant. SMALL = 2; } // Indicates whether the merchant is an online or offline merchant. enum Genre { // Unspecified merchant genre. GENRE_UNSPECIFIED = 0; // Offline merchant OFFLINE = 1; // Online merchant. ONLINE = 2; } // Indicates whether the merchant has been onboarded by a bank or an // aggregator. enum OnboardingType { // Unspecified merchant onboarding type. ONBOARDING_TYPE_UNSPECIFIED = 0; // Onboarded by aggreagator. AGGREGATOR = 1; // Onboarded by bank. BANK = 2; // Onboarded by the UPI network. NETWORK = 3; // Onboarded by the TPAP. TPAP = 4; } // Indicates the ownership type of the merchant. enum OwnershipType { // Unspecified merchant ownership type. OWNERSHIP_TYPE_UNSPECIFIED = 0; // Properietary ownership. PROPRIETARY = 1; // Partnership ownership. PARTNERSHIP = 2; // Public ownership. PUBLIC = 3; // Private ownership. PRIVATE = 4; // Other ownership model. OTHERS = 5; } // Merchant Category Code (MCC) as specified by UPI. This is a four-digit // number listed in ISO 18245 for retail financial services. string category_code = 1; // A unique identifier for the merchant store where the payment settlement // transaction occurred. string store_id = 2; // A unique identifier for the POS terminal in the store where the payment // settlement transaction occurred. string terminal_id = 3; // Indicates the type of merchant. Type type = 4; // Indicates the genre of the merchant. Genre genre = 5; // Indicates the merchant's onboarding type. OnboardingType onboarding_type = 6; // Indicates the merchant's owner type. OwnershipType ownership_type = 7; }