mirror of
https://github.com/hanzoai/commerce.git
synced 2026-10-30 15:08:42 +00:00
Multi-tenant commerce and billing: orders, subscriptions, invoices, plans, usage metering and a credit ledger. One Go binary. MIT OR Apache-2.0. Claude-Session: https://claude.ai/code/session_01SAtaDFm8VDiWrhYHNNtxMw
43 lines
894 B
Go
43 lines
894 B
Go
package paymentmethods
|
|
|
|
import "encoding/json"
|
|
|
|
type Type string
|
|
|
|
const (
|
|
PlaidType Type = "plaid"
|
|
)
|
|
|
|
// Union object for all payment method parameters
|
|
type PaymentMethodParams struct {
|
|
// Verifier refers to the entity which is verifying the user
|
|
// Short lived public token reference
|
|
VerifierToken string `json:"-"`
|
|
|
|
// Reference to the verifier id
|
|
VerifierId string `json:"-"`
|
|
|
|
// Reference to external user (if any)
|
|
ExternalUserId string `json:"-"`
|
|
|
|
// Metadata to save with payment method
|
|
Metadata json.RawMessage `json:"metadata,omitempty"`
|
|
}
|
|
|
|
// Returned Pay Token
|
|
type PaymentMethodOutput struct {
|
|
Inputs PaymentMethodParams
|
|
|
|
// Long lived payment token
|
|
PayToken string `json:"-"`
|
|
|
|
// Reference to external token
|
|
PayTokenId string `json:"-"`
|
|
|
|
// Reference to external user (if any)
|
|
ExternalUserId string `json:"-"`
|
|
|
|
// Type of payment method
|
|
Type Type `json:"type"`
|
|
}
|