payment rails
This commit is contained in:
@@ -11,6 +11,7 @@ import "common/trace/v1/trace.proto";
|
||||
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 "oracle/v1/oracle.proto";
|
||||
|
||||
enum PaymentKind {
|
||||
@@ -20,6 +21,13 @@ enum PaymentKind {
|
||||
PAYMENT_KIND_FX_CONVERSION = 3;
|
||||
}
|
||||
|
||||
// SettlementMode defines how to treat fees/FX variance for payouts.
|
||||
enum SettlementMode {
|
||||
SETTLEMENT_MODE_UNSPECIFIED = 0;
|
||||
SETTLEMENT_MODE_FIX_SOURCE = 1; // customer pays fees; sent amount fixed
|
||||
SETTLEMENT_MODE_FIX_RECEIVED = 2; // receiver gets fixed amount; source flexes
|
||||
}
|
||||
|
||||
enum PaymentState {
|
||||
PAYMENT_STATE_UNSPECIFIED = 0;
|
||||
PAYMENT_STATE_ACCEPTED = 1;
|
||||
@@ -61,11 +69,25 @@ message ExternalChainEndpoint {
|
||||
string memo = 3;
|
||||
}
|
||||
|
||||
// Card payout destination.
|
||||
message CardEndpoint {
|
||||
oneof card {
|
||||
string pan = 1; // raw PAN
|
||||
string token = 2; // network or gateway-issued token
|
||||
}
|
||||
string cardholder_name = 3;
|
||||
uint32 exp_month = 4;
|
||||
uint32 exp_year = 5;
|
||||
string country = 6;
|
||||
string masked_pan = 7;
|
||||
}
|
||||
|
||||
message PaymentEndpoint {
|
||||
oneof endpoint {
|
||||
LedgerEndpoint ledger = 1;
|
||||
ManagedWalletEndpoint managed_wallet = 2;
|
||||
ExternalChainEndpoint external_chain = 3;
|
||||
CardEndpoint card = 4;
|
||||
}
|
||||
map<string, string> metadata = 10;
|
||||
}
|
||||
@@ -88,6 +110,7 @@ message PaymentIntent {
|
||||
FXIntent fx = 6;
|
||||
fees.v1.PolicyOverrides fee_policy = 7;
|
||||
map<string, string> attributes = 8;
|
||||
SettlementMode settlement_mode = 9;
|
||||
}
|
||||
|
||||
message PaymentQuote {
|
||||
@@ -107,6 +130,20 @@ message ExecutionRefs {
|
||||
string credit_entry_ref = 2;
|
||||
string fx_entry_ref = 3;
|
||||
string chain_transfer_ref = 4;
|
||||
string card_payout_ref = 5;
|
||||
string fee_transfer_ref = 6;
|
||||
}
|
||||
|
||||
// Card payout gateway tracking info.
|
||||
message CardPayout {
|
||||
string payout_ref = 1;
|
||||
string provider_payment_id = 2;
|
||||
string status = 3;
|
||||
string failure_reason = 4;
|
||||
string card_country = 5;
|
||||
string masked_pan = 6;
|
||||
string provider_code = 7;
|
||||
string gateway_reference = 8;
|
||||
}
|
||||
|
||||
message Payment {
|
||||
@@ -121,6 +158,7 @@ message Payment {
|
||||
map<string, string> metadata = 9;
|
||||
google.protobuf.Timestamp created_at = 10;
|
||||
google.protobuf.Timestamp updated_at = 11;
|
||||
CardPayout card_payout = 12;
|
||||
}
|
||||
|
||||
message QuotePaymentRequest {
|
||||
@@ -138,10 +176,8 @@ message InitiatePaymentRequest {
|
||||
RequestMeta meta = 1;
|
||||
string idempotency_key = 2;
|
||||
PaymentIntent intent = 3;
|
||||
string fee_quote_token = 4;
|
||||
string fx_quote_ref = 5;
|
||||
map<string, string> metadata = 6;
|
||||
string quote_ref = 7;
|
||||
map<string, string> metadata = 4;
|
||||
string quote_ref = 5;
|
||||
}
|
||||
|
||||
message InitiatePaymentResponse {
|
||||
@@ -198,6 +234,15 @@ message ProcessDepositObservedResponse {
|
||||
Payment payment = 1;
|
||||
}
|
||||
|
||||
message ProcessCardPayoutUpdateRequest {
|
||||
RequestMeta meta = 1;
|
||||
mntx.gateway.v1.CardPayoutStatusChangedEvent event = 2;
|
||||
}
|
||||
|
||||
message ProcessCardPayoutUpdateResponse {
|
||||
Payment payment = 1;
|
||||
}
|
||||
|
||||
message InitiateConversionRequest {
|
||||
RequestMeta meta = 1;
|
||||
string idempotency_key = 2;
|
||||
@@ -221,4 +266,5 @@ service PaymentOrchestrator {
|
||||
rpc InitiateConversion(InitiateConversionRequest) returns (InitiateConversionResponse);
|
||||
rpc ProcessTransferUpdate(ProcessTransferUpdateRequest) returns (ProcessTransferUpdateResponse);
|
||||
rpc ProcessDepositObserved(ProcessDepositObservedRequest) returns (ProcessDepositObservedResponse);
|
||||
rpc ProcessCardPayoutUpdate(ProcessCardPayoutUpdateRequest) returns (ProcessCardPayoutUpdateResponse);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user