neq quotation definition + priced_at field
This commit is contained in:
@@ -5,10 +5,10 @@ package fees.v1;
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/billing/fees/v1;feesv1";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "common/money/v1/money.proto";
|
||||
import "common/fx/v1/fx.proto";
|
||||
import "common/accounting/v1/posting.proto";
|
||||
import "common/trace/v1/trace.proto";
|
||||
import "api/proto/common/money/v1/money.proto";
|
||||
import "api/proto/common/fx/v1/fx.proto";
|
||||
import "api/proto/common/accounting/v1/posting.proto";
|
||||
import "api/proto/common/trace/v1/trace.proto";
|
||||
|
||||
// --------------------
|
||||
// Core business enums
|
||||
@@ -74,10 +74,10 @@ message FXUsed {
|
||||
|
||||
// A derived posting line ready for the ledger to post as-is.
|
||||
message DerivedPostingLine {
|
||||
string ledger_account_ref = 1; // resolved account
|
||||
common.money.v1.Money money = 2; // amount/currency
|
||||
common.accounting.v1.PostingLineType line_type = 3; // FEE/TAX/SPREAD/REVERSAL
|
||||
common.accounting.v1.EntrySide side = 4; // DEBIT/CREDIT
|
||||
string ledger_account_ref = 1; // resolved account
|
||||
common.money.v1.Money money = 2; // amount/currency
|
||||
common.accounting.v1.PostingLineType line_type = 3; // FEE/TAX/SPREAD/REVERSAL
|
||||
common.accounting.v1.EntrySide side = 4; // DEBIT/CREDIT
|
||||
map<string,string> meta = 5; // fee_rule_id, rule_version, tax_code, tax_rate, fx_rate_used, etc.
|
||||
}
|
||||
|
||||
@@ -87,8 +87,8 @@ message AppliedRule {
|
||||
string rule_version = 2;
|
||||
string formula = 3; // e.g., "2.90% + 0.30 (min 0.50)"
|
||||
common.money.v1.RoundingMode rounding = 4;
|
||||
string tax_code = 5; // if applicable
|
||||
string tax_rate = 6; // decimal string
|
||||
string tax_code = 5; // if applicable
|
||||
string tax_rate = 6; // decimal string
|
||||
map<string,string> parameters = 7; // thresholds, tiers, etc.
|
||||
}
|
||||
|
||||
|
||||
11
api/proto/common/archivable/v1/archivable.proto
Normal file
11
api/proto/common/archivable/v1/archivable.proto
Normal file
@@ -0,0 +1,11 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.archivable.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/archivable/v1;archivablev1";
|
||||
|
||||
|
||||
|
||||
message Archivable {
|
||||
bool is_archived = 1;
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.gateway.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/gateway/v1;gatewayv1";
|
||||
|
||||
import "common/money/v1/money.proto";
|
||||
import "api/proto/common/money/v1/money.proto";
|
||||
import "api/proto/payments/endpoint/v1/endpoint.proto";
|
||||
|
||||
|
||||
enum Operation {
|
||||
@@ -18,17 +21,6 @@ enum Operation {
|
||||
OPERATION_CREATE_ACCOUNT = 9;
|
||||
}
|
||||
|
||||
enum PaymentMethodType {
|
||||
PM_UNSPECIFIED = 0;
|
||||
PM_CARD = 1;
|
||||
PM_SEPA = 2;
|
||||
PM_ACH = 3;
|
||||
PM_PIX = 4;
|
||||
PM_WALLET = 5;
|
||||
PM_CRYPTO = 6;
|
||||
PM_LOCAL_BANK = 7; // generic local rails, refine later if needed
|
||||
}
|
||||
|
||||
// Rail identifiers for orchestration. Extend with new rails as needed.
|
||||
enum Rail {
|
||||
RAIL_UNSPECIFIED = 0;
|
||||
@@ -70,7 +62,7 @@ message OperationCapabilities {
|
||||
|
||||
// Per-method matrix entry
|
||||
message MethodCapability {
|
||||
PaymentMethodType method = 1;
|
||||
payments.endpoint.v1.PaymentMethod method = 1;
|
||||
|
||||
// ISO 4217 currency codes, e.g. "EUR", "USD"
|
||||
repeated string currencies = 2;
|
||||
@@ -187,4 +179,4 @@ message OperationExecutionStatus {
|
||||
common.money.v1.Money executed_money = 3;
|
||||
OperationResult status = 4;
|
||||
OperationError error = 5;
|
||||
}
|
||||
}
|
||||
|
||||
10
api/proto/common/organization_bound/v1/obound.proto
Normal file
10
api/proto/common/organization_bound/v1/obound.proto
Normal file
@@ -0,0 +1,10 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.obound.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/organization_bound/v1;oboundv1";
|
||||
|
||||
|
||||
message OrganizationBound {
|
||||
string organization_ref = 1;
|
||||
}
|
||||
73
api/proto/common/payment/v1/card.proto
Normal file
73
api/proto/common/payment/v1/card.proto
Normal file
@@ -0,0 +1,73 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.payment.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/payment/v1;paymentv1";
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
|
||||
|
||||
// -------------------------
|
||||
// Card network (payment system)
|
||||
// -------------------------
|
||||
enum CardNetwork {
|
||||
CARD_NETWORK_UNSPECIFIED = 0;
|
||||
CARD_NETWORK_VISA = 1;
|
||||
CARD_NETWORK_MASTERCARD = 2;
|
||||
CARD_NETWORK_MIR = 3;
|
||||
CARD_NETWORK_AMEX = 4;
|
||||
CARD_NETWORK_UNIONPAY = 5;
|
||||
CARD_NETWORK_JCB = 6;
|
||||
CARD_NETWORK_DISCOVER = 7;
|
||||
}
|
||||
|
||||
enum CardFundingType {
|
||||
CARD_FUNDING_UNSPECIFIED = 0;
|
||||
CARD_FUNDING_DEBIT = 1;
|
||||
CARD_FUNDING_CREDIT = 2;
|
||||
CARD_FUNDING_PREPAID = 3;
|
||||
}
|
||||
|
||||
// -------------------------
|
||||
// PCI scope: raw card details
|
||||
// -------------------------
|
||||
|
||||
message RawCardData {
|
||||
string pan = 1;
|
||||
uint32 exp_month = 2; // 1–12
|
||||
uint32 exp_year = 3; // YYYY
|
||||
string cvv = 4; // optional; often omitted for payouts
|
||||
}
|
||||
|
||||
|
||||
// -------------------------
|
||||
// Safe metadata (display / routing hints)
|
||||
// -------------------------
|
||||
message CardMetadata {
|
||||
string masked_pan = 1; // e.g. 411111******1111
|
||||
CardNetwork network = 2; // Visa/Mastercard/Mir/...
|
||||
CardFundingType funding = 3; // debit/credit/prepaid (if known)
|
||||
string issuing_country = 4; // ISO 3166-1 alpha-2 (if known)
|
||||
string issuer_name = 5; // display only (if known)
|
||||
}
|
||||
|
||||
|
||||
// -------------------------
|
||||
// Card details
|
||||
// Either inline credentials OR reference to stored payment method
|
||||
// -------------------------
|
||||
message CardDetails {
|
||||
string id = 1;
|
||||
|
||||
oneof source {
|
||||
RawCardData raw = 2;
|
||||
string payment_method_id = 3;
|
||||
}
|
||||
|
||||
string cardholder_name = 4;
|
||||
string cardholder_surname = 5;
|
||||
|
||||
string billing_country = 6; // ISO 3166-1 alpha-2, if you need it per operation
|
||||
}
|
||||
|
||||
|
||||
11
api/proto/common/payment/v1/custom.proto
Normal file
11
api/proto/common/payment/v1/custom.proto
Normal file
@@ -0,0 +1,11 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.payment.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/payment/v1;paymentv1";
|
||||
|
||||
|
||||
message CustomPaymentDetails {
|
||||
string id = 1;
|
||||
bytes payment_method_json = 2;
|
||||
}
|
||||
16
api/proto/common/payment/v1/external_chain.proto
Normal file
16
api/proto/common/payment/v1/external_chain.proto
Normal file
@@ -0,0 +1,16 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.payment.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/payment/v1;paymentv1";
|
||||
|
||||
import "api/proto/gateway/chain/v1/chain.proto";
|
||||
|
||||
|
||||
message ExternalChainDetails {
|
||||
string id = 1;
|
||||
chain.gateway.v1.Asset asset = 2;
|
||||
string address = 3;
|
||||
string memo = 4;
|
||||
}
|
||||
|
||||
14
api/proto/common/payment/v1/ledger.proto
Normal file
14
api/proto/common/payment/v1/ledger.proto
Normal file
@@ -0,0 +1,14 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.payment.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/payment/v1;paymentv1";
|
||||
|
||||
|
||||
message LedgerDetails {
|
||||
string id = 1;
|
||||
oneof source {
|
||||
string ledger_account_ref = 2;
|
||||
string account_code = 3;
|
||||
}
|
||||
}
|
||||
11
api/proto/common/payment/v1/managed_wallet.proto
Normal file
11
api/proto/common/payment/v1/managed_wallet.proto
Normal file
@@ -0,0 +1,11 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.payment.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/payment/v1;paymentv1";
|
||||
|
||||
|
||||
message ManagedWalletDetails {
|
||||
string id = 1;
|
||||
string managed_wallet_ref = 2;
|
||||
}
|
||||
16
api/proto/common/payment/v1/rba.proto
Normal file
16
api/proto/common/payment/v1/rba.proto
Normal file
@@ -0,0 +1,16 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.payment.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/payment/v1;paymentv1";
|
||||
|
||||
// -------------------------
|
||||
// Russian bank account details
|
||||
// -------------------------
|
||||
|
||||
message RussianBankDetails {
|
||||
string id = 1;
|
||||
string account_number = 2; // 20 digits
|
||||
string bik = 3; // 9 digits
|
||||
string account_holder_name = 4;
|
||||
}
|
||||
17
api/proto/common/payment/v1/sepa.proto
Normal file
17
api/proto/common/payment/v1/sepa.proto
Normal file
@@ -0,0 +1,17 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.payment.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/payment/v1;paymentv1";
|
||||
|
||||
// -------------------------
|
||||
// SEPA bank account details
|
||||
// -------------------------
|
||||
|
||||
message SepaBankDetails {
|
||||
string id = 1;
|
||||
string iban = 2; // IBAN
|
||||
string bic = 3; // optional (BIC/SWIFT)
|
||||
string account_holder_name = 4;
|
||||
}
|
||||
|
||||
13
api/proto/common/payment/v1/settlement.proto
Normal file
13
api/proto/common/payment/v1/settlement.proto
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package common.payment.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/payment/v1;paymentv1";
|
||||
|
||||
// SettlementMode defines how to treat fees/FX variance for payouts.
|
||||
enum SettlementMode {
|
||||
SETTLEMENT_UNSPECIFIED = 0;
|
||||
SETTLEMENT_FIX_SOURCE = 1; // customer pays fees; sent amount fixed
|
||||
SETTLEMENT_FIX_RECEIVED = 2; // receiver gets fixed amount; source flexes
|
||||
}
|
||||
17
api/proto/common/permission_bound/v1/pbound.proto
Normal file
17
api/proto/common/permission_bound/v1/pbound.proto
Normal file
@@ -0,0 +1,17 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.pbound.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/permission_bound/v1;pboundv1";
|
||||
|
||||
import "api/proto/common/storable/v1/storable.proto";
|
||||
import "api/proto/common/archivable/v1/archivable.proto";
|
||||
import "api/proto/common/organization_bound/v1/obound.proto";
|
||||
|
||||
|
||||
message PermissionBound {
|
||||
common.storable.v1.Storable storable = 1;
|
||||
common.archivable.v1.Archivable archivable = 2;
|
||||
common.obound.v1.OrganizationBound organization_bound = 3;
|
||||
string permission_ref = 4;
|
||||
}
|
||||
14
api/proto/common/storable/v1/storable.proto
Normal file
14
api/proto/common/storable/v1/storable.proto
Normal file
@@ -0,0 +1,14 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package common.storable.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/storable/v1;storablev1";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
|
||||
message Storable {
|
||||
string id = 1;
|
||||
google.protobuf.Timestamp created_at = 10;
|
||||
google.protobuf.Timestamp updated_at = 11;
|
||||
}
|
||||
@@ -7,10 +7,10 @@ option go_package = "github.com/tech/sendico/pkg/proto/connector/v1;connectorv1"
|
||||
import "google/protobuf/struct.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common/account_role/v1/account_role.proto";
|
||||
import "common/describable/v1/describable.proto";
|
||||
import "common/money/v1/money.proto";
|
||||
import "common/pagination/v1/cursor.proto";
|
||||
import "api/proto/common/account_role/v1/account_role.proto";
|
||||
import "api/proto/common/describable/v1/describable.proto";
|
||||
import "api/proto/common/money/v1/money.proto";
|
||||
import "api/proto/common/pagination/v1/cursor.proto";
|
||||
|
||||
// ConnectorService exposes capability-driven account and operation primitives.
|
||||
service ConnectorService {
|
||||
|
||||
@@ -6,9 +6,9 @@ option go_package = "github.com/tech/sendico/pkg/proto/gateway/chain/v1;chainv1"
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common/money/v1/money.proto";
|
||||
import "common/pagination/v1/cursor.proto";
|
||||
import "common/describable/v1/describable.proto";
|
||||
import "api/proto/common/money/v1/money.proto";
|
||||
import "api/proto/common/pagination/v1/cursor.proto";
|
||||
import "api/proto/common/describable/v1/describable.proto";
|
||||
|
||||
// Supported blockchain networks for the managed wallets.
|
||||
enum ChainNetwork {
|
||||
|
||||
@@ -5,7 +5,7 @@ package mntx.gateway.v1;
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/gateway/mntx/v1;mntxv1";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "common/gateway/v1/gateway.proto";
|
||||
import "api/proto/common/gateway/v1/gateway.proto";
|
||||
|
||||
// Lifecycle status of a payout handled by Monetix.
|
||||
enum PayoutStatus {
|
||||
|
||||
@@ -6,8 +6,8 @@ option go_package = "github.com/tech/sendico/pkg/proto/ledger/v1;ledgerv1";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common/describable/v1/describable.proto";
|
||||
import "common/money/v1/money.proto";
|
||||
import "api/proto/common/describable/v1/describable.proto";
|
||||
import "api/proto/common/money/v1/money.proto";
|
||||
|
||||
// ===== Enums =====
|
||||
|
||||
|
||||
@@ -4,9 +4,11 @@ package oracle.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/oracle/v1;oraclev1";
|
||||
|
||||
import "common/money/v1/money.proto";
|
||||
import "common/fx/v1/fx.proto";
|
||||
import "common/trace/v1/trace.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "api/proto/common/money/v1/money.proto";
|
||||
import "api/proto/common/fx/v1/fx.proto";
|
||||
import "api/proto/common/trace/v1/trace.proto";
|
||||
|
||||
|
||||
message RateSnapshot {
|
||||
common.fx.v1.CurrencyPair pair = 1;
|
||||
@@ -46,6 +48,7 @@ message Quote {
|
||||
string provider = 8;
|
||||
string rate_ref = 9;
|
||||
bool firm = 10;
|
||||
google.protobuf.Timestamp priced_at = 11;
|
||||
}
|
||||
|
||||
message GetQuoteRequest {
|
||||
|
||||
40
api/proto/payments/endpoint/v1/endpoint.proto
Normal file
40
api/proto/payments/endpoint/v1/endpoint.proto
Normal file
@@ -0,0 +1,40 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package payments.endpoint.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/payments/endpoint/v1;endpointv1";
|
||||
|
||||
import "api/proto/common/describable/v1/describable.proto";
|
||||
import "api/proto/common/permission_bound/v1/pbound.proto";
|
||||
|
||||
enum PaymentMethodType {
|
||||
PAYMENT_METHOD_TYPE_UNSPECIFIED = 0;
|
||||
PAYMENT_METHOD_TYPE_IBAN = 1;
|
||||
PAYMENT_METHOD_TYPE_CARD = 2;
|
||||
PAYMENT_METHOD_TYPE_CARD_TOKEN = 3;
|
||||
PAYMENT_METHOD_TYPE_BANK_ACCOUNT = 4;
|
||||
PAYMENT_METHOD_TYPE_WALLET = 5;
|
||||
PAYMENT_METHOD_TYPE_CRYPTO_ADDRESS = 6;
|
||||
PAYMENT_METHOD_TYPE_LEDGER = 7;
|
||||
}
|
||||
|
||||
message PaymentMethod {
|
||||
common.describable.v1.Describable describable = 1;
|
||||
string recipient_ref = 2;
|
||||
PaymentMethodType type = 3;
|
||||
bytes data = 4;
|
||||
bool is_main = 5;
|
||||
}
|
||||
|
||||
message PaymentEndpoint {
|
||||
oneof source {
|
||||
string payment_method_ref = 1;
|
||||
PaymentMethod payment_method = 2;
|
||||
string payee_ref = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message PaymentMethodRecord {
|
||||
common.pbound.v1.PermissionBound permission_bound = 1;
|
||||
PaymentMethod payment_method = 2;
|
||||
}
|
||||
@@ -4,18 +4,17 @@ package payments.methods.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/payments/methods/v1;methodsv1";
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
|
||||
import "common/pagination/v2/cursor.proto";
|
||||
import "api/proto/common/pagination/v2/cursor.proto";
|
||||
import "api/proto/payments/endpoint/v1/endpoint.proto";
|
||||
|
||||
message CreatePaymentMethodRequest {
|
||||
string account_ref = 1;
|
||||
string organization_ref = 2;
|
||||
bytes payment_method_json = 3;
|
||||
payments.endpoint.v1.PaymentMethod payment_method = 3;
|
||||
}
|
||||
|
||||
message CreatePaymentMethodResponse {
|
||||
bytes payment_method_json = 1;
|
||||
payments.endpoint.v1.PaymentMethodRecord payment_method_record = 1;
|
||||
}
|
||||
|
||||
message GetPaymentMethodRequest {
|
||||
@@ -24,16 +23,16 @@ message GetPaymentMethodRequest {
|
||||
}
|
||||
|
||||
message GetPaymentMethodResponse {
|
||||
bytes payment_method_json = 1;
|
||||
payments.endpoint.v1.PaymentMethodRecord payment_method_record = 1;
|
||||
}
|
||||
|
||||
message UpdatePaymentMethodRequest {
|
||||
string account_ref = 1;
|
||||
bytes payment_method_json = 2;
|
||||
payments.endpoint.v1.PaymentMethodRecord payment_method_record = 2;
|
||||
}
|
||||
|
||||
message UpdatePaymentMethodResponse {
|
||||
bytes payment_method_json = 1;
|
||||
payments.endpoint.v1.PaymentMethodRecord payment_method_record = 1;
|
||||
}
|
||||
|
||||
message DeletePaymentMethodRequest {
|
||||
@@ -62,14 +61,21 @@ message ListPaymentMethodsRequest {
|
||||
}
|
||||
|
||||
message ListPaymentMethodsResponse {
|
||||
repeated bytes payment_methods_json = 1;
|
||||
repeated payments.endpoint.v1.PaymentMethodRecord payment_methods = 1;
|
||||
}
|
||||
|
||||
// PaymentMethodsService provides operations for managing payment methods.
|
||||
service PaymentMethodsService {
|
||||
// CreatePaymentMethod creates a new payment method.
|
||||
rpc CreatePaymentMethod(CreatePaymentMethodRequest) returns (CreatePaymentMethodResponse);
|
||||
// GetPaymentMethod retrieves a payment method by reference.
|
||||
rpc GetPaymentMethod(GetPaymentMethodRequest) returns (GetPaymentMethodResponse);
|
||||
// UpdatePaymentMethod updates an existing payment method.
|
||||
rpc UpdatePaymentMethod(UpdatePaymentMethodRequest) returns (UpdatePaymentMethodResponse);
|
||||
// Delete exising payment method
|
||||
rpc DeletePaymentMethod(DeletePaymentMethodRequest) returns (DeletePaymentMethodResponse);
|
||||
// SetPaymentMethodArchived sets the archived status of a payment method.
|
||||
rpc SetPaymentMethodArchived(SetPaymentMethodArchivedRequest) returns (SetPaymentMethodArchivedResponse);
|
||||
// ListPaymentMethods retrieves a list of payment methods.
|
||||
rpc ListPaymentMethods(ListPaymentMethodsRequest) returns (ListPaymentMethodsResponse);
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ package payments.orchestration.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/payments/orchestration/v1;orchestrationv1";
|
||||
|
||||
import "common/pagination/v1/cursor.proto";
|
||||
import "billing/fees/v1/fees.proto";
|
||||
import "gateway/chain/v1/chain.proto";
|
||||
import "gateway/mntx/v1/mntx.proto";
|
||||
import "payments/shared/v1/shared.proto";
|
||||
import "api/proto/common/pagination/v1/cursor.proto";
|
||||
import "api/proto/billing/fees/v1/fees.proto";
|
||||
import "api/proto/gateway/chain/v1/chain.proto";
|
||||
import "api/proto/gateway/mntx/v1/mntx.proto";
|
||||
import "api/proto/payments/shared/v1/shared.proto";
|
||||
|
||||
message InitiatePaymentsRequest {
|
||||
payments.shared.v1.RequestMeta meta = 1;
|
||||
|
||||
20
api/proto/payments/payment/v1/payment.proto
Normal file
20
api/proto/payments/payment/v1/payment.proto
Normal file
@@ -0,0 +1,20 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package payments.payment.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/payments/payment/v1;paymentv1";
|
||||
|
||||
import "api/proto/payments/transfer/v1/transfer.proto";
|
||||
|
||||
|
||||
// -------------------------
|
||||
// External payment semantics
|
||||
// -------------------------
|
||||
message PaymentIntent {
|
||||
payments.transfer.v1.TransferIntent transfer = 1;
|
||||
|
||||
string payer_ref = 2;
|
||||
string payee_ref = 3;
|
||||
|
||||
string purpose = 4;
|
||||
}
|
||||
@@ -4,7 +4,8 @@ package payments.quotation.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/payments/quotation/v1;quotationv1";
|
||||
|
||||
import "payments/shared/v1/shared.proto";
|
||||
import "api/proto/payments/shared/v1/shared.proto";
|
||||
|
||||
|
||||
message QuotePaymentRequest {
|
||||
payments.shared.v1.RequestMeta meta = 1;
|
||||
@@ -35,6 +36,8 @@ message QuotePaymentsResponse {
|
||||
}
|
||||
|
||||
service QuotationService {
|
||||
// QuotePayment returns a quote for a single payment request.
|
||||
rpc QuotePayment(QuotePaymentRequest) returns (QuotePaymentResponse);
|
||||
// QuotePayments returns quotes for multiple payment requests.
|
||||
rpc QuotePayments(QuotePaymentsRequest) returns (QuotePaymentsResponse);
|
||||
}
|
||||
|
||||
59
api/proto/payments/quotation/v2/interface.proto
Normal file
59
api/proto/payments/quotation/v2/interface.proto
Normal file
@@ -0,0 +1,59 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package payments.quotation.v2;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/payments/quotation/v2;quotationv2";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "api/proto/common/storable/v1/storable.proto";
|
||||
import "api/proto/common/money/v1/money.proto";
|
||||
import "api/proto/common/fx/v1/fx.proto";
|
||||
import "api/proto/billing/fees/v1/fees.proto";
|
||||
import "api/proto/oracle/v1/oracle.proto";
|
||||
|
||||
enum QuoteKind {
|
||||
QUOTE_KIND_UNSPECIFIED = 0;
|
||||
|
||||
QUOTE_KIND_EXECUTABLE = 1; // can be executed now (subject to execution-time checks)
|
||||
QUOTE_KIND_INDICATIVE = 2; // informational only
|
||||
}
|
||||
|
||||
enum QuoteState {
|
||||
QUOTE_STATE_UNSPECIFIED = 0;
|
||||
|
||||
QUOTE_STATE_ACTIVE = 1;
|
||||
QUOTE_STATE_EXPIRED = 2;
|
||||
}
|
||||
|
||||
enum QuoteBlockReason {
|
||||
QUOTE_BLOCK_REASON_UNSPECIFIED = 0;
|
||||
|
||||
QUOTE_BLOCK_REASON_ROUTE_UNAVAILABLE = 1;
|
||||
QUOTE_BLOCK_REASON_LIMIT_BLOCKED = 2;
|
||||
QUOTE_BLOCK_REASON_RISK_BLOCKED = 3;
|
||||
QUOTE_BLOCK_REASON_INSUFFICIENT_LIQUIDITY = 4;
|
||||
QUOTE_BLOCK_REASON_PRICE_STALE = 5;
|
||||
QUOTE_BLOCK_REASON_AMOUNT_TOO_SMALL = 6;
|
||||
QUOTE_BLOCK_REASON_AMOUNT_TOO_LARGE = 7;
|
||||
}
|
||||
|
||||
|
||||
message PaymentQuote {
|
||||
common.storable.v1.Storable storable = 1;
|
||||
QuoteKind kind = 2;
|
||||
QuoteState state = 3;
|
||||
optional QuoteBlockReason block_reason = 4;
|
||||
|
||||
common.money.v1.Money debit_amount = 5;
|
||||
common.money.v1.Money credit_amount = 6;
|
||||
|
||||
repeated fees.v1.DerivedPostingLine fee_lines = 7;
|
||||
repeated fees.v1.AppliedRule fee_rules = 8;
|
||||
|
||||
oracle.v1.Quote fx_quote = 9;
|
||||
|
||||
string quote_ref = 10;
|
||||
|
||||
google.protobuf.Timestamp expires_at = 11;
|
||||
google.protobuf.Timestamp priced_at = 12;
|
||||
}
|
||||
37
api/proto/payments/quotation/v2/quotation.proto
Normal file
37
api/proto/payments/quotation/v2/quotation.proto
Normal file
@@ -0,0 +1,37 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package payments.quotation.v2;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/payments/quotation/v2;quotationv2";
|
||||
|
||||
import "api/proto/payments/shared/v1/shared.proto";
|
||||
import "api/proto/payments/transfer/v1/transfer.proto";
|
||||
import "api/proto/payments/quotation/v2/interface.proto";
|
||||
|
||||
|
||||
message QuotePaymentRequest {
|
||||
payments.shared.v1.RequestMeta meta = 1;
|
||||
string idempotency_key = 2;
|
||||
payments.transfer.v1.TransferIntent intent = 3;
|
||||
bool preview_only = 4;
|
||||
string initiator_ref = 5;
|
||||
}
|
||||
|
||||
message QuotePaymentResponse {
|
||||
payments.quotation.v2.PaymentQuote quote = 1;
|
||||
string idempotency_key = 2;
|
||||
}
|
||||
|
||||
message QuotePaymentsRequest {
|
||||
payments.shared.v1.RequestMeta meta = 1;
|
||||
string idempotency_key = 2;
|
||||
repeated payments.transfer.v1.TransferIntent intents = 3;
|
||||
bool preview_only = 4;
|
||||
string initiator_ref = 5;
|
||||
}
|
||||
|
||||
message QuotePaymentsResponse {
|
||||
string quote_ref = 1;
|
||||
repeated payments.quotation.v2.PaymentQuote quotes = 3;
|
||||
string idempotency_key = 4;
|
||||
}
|
||||
@@ -5,13 +5,14 @@ package payments.shared.v1;
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/payments/shared/v1;sharedv1";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "common/money/v1/money.proto";
|
||||
import "common/fx/v1/fx.proto";
|
||||
import "common/gateway/v1/gateway.proto";
|
||||
import "common/trace/v1/trace.proto";
|
||||
import "billing/fees/v1/fees.proto";
|
||||
import "gateway/chain/v1/chain.proto";
|
||||
import "oracle/v1/oracle.proto";
|
||||
import "api/proto/common/money/v1/money.proto";
|
||||
import "api/proto/common/fx/v1/fx.proto";
|
||||
import "api/proto/common/gateway/v1/gateway.proto";
|
||||
import "api/proto/common/payment/v1/settlement.proto";
|
||||
import "api/proto/common/trace/v1/trace.proto";
|
||||
import "api/proto/billing/fees/v1/fees.proto";
|
||||
import "api/proto/gateway/chain/v1/chain.proto";
|
||||
import "api/proto/oracle/v1/oracle.proto";
|
||||
|
||||
enum PaymentKind {
|
||||
PAYMENT_KIND_UNSPECIFIED = 0;
|
||||
@@ -20,13 +21,6 @@ enum PaymentKind {
|
||||
PAYMENT_KIND_FX_CONVERSION = 3;
|
||||
}
|
||||
|
||||
// SettlementMode defines how to treat fees/FX variance for payouts.
|
||||
enum SettlementMode {
|
||||
SETTLEMENT_UNSPECIFIED = 0;
|
||||
SETTLEMENT_FIX_SOURCE = 1; // customer pays fees; sent amount fixed
|
||||
SETTLEMENT_FIX_RECEIVED = 2; // receiver gets fixed amount; source flexes
|
||||
}
|
||||
|
||||
enum PaymentState {
|
||||
PAYMENT_STATE_UNSPECIFIED = 0;
|
||||
PAYMENT_STATE_ACCEPTED = 1;
|
||||
@@ -111,7 +105,7 @@ message PaymentIntent {
|
||||
FXIntent fx = 6;
|
||||
fees.v1.PolicyOverrides fee_policy = 7;
|
||||
map<string, string> attributes = 8;
|
||||
SettlementMode settlement_mode = 9;
|
||||
common.payment.v1.SettlementMode settlement_mode = 9;
|
||||
Customer customer = 10;
|
||||
string settlement_currency = 11;
|
||||
string ref = 12;
|
||||
|
||||
21
api/proto/payments/transfer/v1/transfer.proto
Normal file
21
api/proto/payments/transfer/v1/transfer.proto
Normal file
@@ -0,0 +1,21 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package payments.transfer.v1;
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/payments/transfer/v1;transferv1";
|
||||
|
||||
import "api/proto/common/money/v1/money.proto";
|
||||
import "api/proto/common/storable/v1/storable.proto";
|
||||
import "api/proto/payments/endpoint/v1/endpoint.proto";
|
||||
|
||||
|
||||
// -------------------------
|
||||
// Base value movement
|
||||
// -------------------------
|
||||
message TransferIntent {
|
||||
payments.endpoint.v1.PaymentEndpoint source = 1;
|
||||
payments.endpoint.v1.PaymentEndpoint destination = 2;
|
||||
common.money.v1.Money amount = 3;
|
||||
|
||||
string comment = 4;
|
||||
}
|
||||
Reference in New Issue
Block a user