restucturization of recipients payment methods
All checks were successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
All checks were successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
This commit is contained in:
97
api/proto/common/gateway/v1/gateway.proto
Normal file
97
api/proto/common/gateway/v1/gateway.proto
Normal file
@@ -0,0 +1,97 @@
|
||||
syntax = "proto3";
|
||||
package common.gateway.v1;
|
||||
option go_package = "github.com/tech/sendico/pkg/proto/common/gateway/v1;gatewayv1";
|
||||
|
||||
enum Operation {
|
||||
OPERATION_UNSPECIFIED = 0;
|
||||
OPERATION_AUTHORIZE = 1;
|
||||
OPERATION_CAPTURE = 2;
|
||||
OPERATION_REFUND = 3;
|
||||
OPERATION_VOID = 4;
|
||||
OPERATION_PAYOUT = 5;
|
||||
OPERATION_TOKENIZE = 6;
|
||||
OPERATION_VERIFY = 7; // zero-amount verification
|
||||
OPERATION_GET_BALANCE = 8;
|
||||
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
|
||||
}
|
||||
|
||||
// Limits in minor units, e.g. cents
|
||||
message AmountLimits {
|
||||
int64 min_minor = 1;
|
||||
int64 max_minor = 2;
|
||||
}
|
||||
|
||||
// Capabilities of a particular operation (e.g. "authorize")
|
||||
message OperationCapabilities {
|
||||
// If false or absent in the map -> operation not supported
|
||||
bool supported = 1;
|
||||
bool partial_allowed = 2; // partial capture/refund
|
||||
bool supports_3ds = 3; // relevant mostly for AUTHORIZE/VERIFY
|
||||
bool synchronous = 4; // true = immediate result, false = async/poll
|
||||
}
|
||||
|
||||
// Per-method matrix entry
|
||||
message MethodCapability {
|
||||
PaymentMethodType method = 1;
|
||||
|
||||
// ISO 4217 currency codes, e.g. "EUR", "USD"
|
||||
repeated string currencies = 2;
|
||||
|
||||
// ISO 3166-1 alpha-2 country codes where this method is available
|
||||
repeated string countries = 3;
|
||||
|
||||
// Can the gateway tokenize this method (card token, wallet token, etc.)
|
||||
bool tokenization_supported = 4;
|
||||
|
||||
// Optional per-method limits; if unset, use global amount_limits
|
||||
AmountLimits amount_limits = 5;
|
||||
}
|
||||
|
||||
// Payout capabilities of this gateway
|
||||
message PayoutCapabilities {
|
||||
bool enabled = 1;
|
||||
repeated string currencies = 2;
|
||||
repeated string countries = 3;
|
||||
AmountLimits amount_limits = 4;
|
||||
}
|
||||
|
||||
// High-level capability descriptor for a gateway
|
||||
message GatewayCapabilities {
|
||||
// For each operation, describe what exactly it can do.
|
||||
// Map key uses the Operation enum name (e.g. "OPERATION_AUTHORIZE").
|
||||
map<string, OperationCapabilities> operations = 1;
|
||||
|
||||
// For each payment method, list where and how it works
|
||||
repeated MethodCapability methods = 2;
|
||||
|
||||
// Global amount limits (fallback if per-method limits not set)
|
||||
AmountLimits amount_limits = 3;
|
||||
|
||||
// Payout-related capabilities (if any)
|
||||
PayoutCapabilities payouts = 4;
|
||||
|
||||
// Free-form metadata / escape hatch
|
||||
map<string, string> extra = 10;
|
||||
}
|
||||
|
||||
// A specific gateway instance or config variant (e.g. stripe_eu_prod)
|
||||
message GatewayDescriptor {
|
||||
string id = 1; // "stripe_eu", "adyen_br", "local_bank_pl"
|
||||
string provider = 2; // "stripe", "adyen", "local_bank"
|
||||
string label = 3; // human-readable name
|
||||
string version = 4; // config or integration version
|
||||
string environment = 5; // "prod", "sandbox", "test"
|
||||
|
||||
GatewayCapabilities capabilities = 6;
|
||||
}
|
||||
Reference in New Issue
Block a user