paymentmethod

package
v1.49.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type BankAccountDetails added in v1.34.0

type BankAccountDetails struct {
	BankName      string `json:"bankName,omitempty"`
	Last4         string `json:"last4"`
	RoutingNumber string `json:"routingNumber,omitempty"`
	AccountType   string `json:"accountType,omitempty"`
}

BankAccountDetails holds US bank account information for a payment method.

type CardDetails added in v1.34.0

type CardDetails struct {
	Brand    string `json:"brand"`
	Last4    string `json:"last4"`
	ExpMonth int    `json:"expMonth"`
	ExpYear  int    `json:"expYear"`
	Funding  string `json:"funding,omitempty"`
	Country  string `json:"country,omitempty"`
}

CardDetails holds card-specific information for a payment method.

type CryptoDetails added in v1.42.44

type CryptoDetails struct {
	Network       string `json:"network,omitempty"`
	WalletAddress string `json:"walletAddress"`
	Label         string `json:"label,omitempty"`
}

CryptoDetails holds a crypto wallet for a payment method. Field shape mirrors the billing client's `crypto` payload (network/walletAddress/label).

type PayPalDetails added in v1.42.44

type PayPalDetails struct {
	Email string `json:"email"`
}

PayPalDetails holds a PayPal account for a payment method.

type PaymentMethod

type PaymentMethod struct {
	mixin.Model[PaymentMethod]

	UserId         string                 `json:"userId,omitempty"`
	CustomerId     string                 `json:"customerId,omitempty"`
	Name           string                 `json:"name,omitempty"`
	Type           string                 `json:"type"`
	ProviderRef    string                 `json:"providerRef"`
	ProviderType   string                 `json:"providerType"`
	Card           *CardDetails           `json:"card,omitempty"`
	BankAccount    *BankAccountDetails    `json:"bankAccount,omitempty"`
	Crypto         *CryptoDetails         `json:"crypto,omitempty"`
	Wire           *WireDetails           `json:"wire,omitempty"`
	PayPal         *PayPalDetails         `json:"paypal,omitempty"`
	BillingAddress *types.Address         `json:"billingAddress,omitempty"`
	IsDefault      bool                   `json:"isDefault,omitempty"`
	Metadata       map[string]interface{} `json:"metadata,omitempty"`
	Created        time.Time              `json:"created,omitempty"`
}

func New

func (*PaymentMethod) Defaults

func (p *PaymentMethod) Defaults()

type WireDetails added in v1.42.44

type WireDetails struct {
	BankName      string `json:"bankName,omitempty"`
	AccountHolder string `json:"accountHolder,omitempty"`
	RoutingNumber string `json:"routingNumber,omitempty"`
	AccountLast4  string `json:"accountLast4,omitempty"`
	Swift         string `json:"swift,omitempty"`
	Iban          string `json:"iban,omitempty"`
	Country       string `json:"country,omitempty"`
}

WireDetails holds bank-wire information for a payment method. Field shape mirrors the billing client's `wire` payload.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL