From cea79ef8253b6c624e058a70017a83635a7bf361 Mon Sep 17 00:00:00 2001 From: nutcas3 Date: Fri, 17 Apr 2026 15:55:32 +0300 Subject: [PATCH] feat: Add PaymentMethodDetails struct for token-based payment method retrieval - Add PaymentMethodDetails with payment method ID, type, card details (last4, brand, expiry), fingerprint, and creation timestamp - Support structured response for payment method token processing --- apps/api-server/internal/payment/gateway.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/api-server/internal/payment/gateway.go b/apps/api-server/internal/payment/gateway.go index d3b7d5e..ac4e5f8 100644 --- a/apps/api-server/internal/payment/gateway.go +++ b/apps/api-server/internal/payment/gateway.go @@ -104,6 +104,18 @@ type PaymentMethod struct { Metadata map[string]string `json:"metadata"` } +// PaymentMethodDetails represents payment method details retrieved from token +type PaymentMethodDetails struct { + PaymentMethodID string `json:"paymentMethodId"` + Type string `json:"type"` + Last4 string `json:"last4"` + Brand string `json:"brand"` + ExpiryMonth int `json:"expiryMonth"` + ExpiryYear int `json:"expiryYear"` + Fingerprint string `json:"fingerprint"` + CreatedAt time.Time `json:"createdAt"` +} + // PaymentStatusType represents payment status type PaymentStatusType string