A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/stripe/stripe-go below:

stripe package - github.com/stripe/stripe-go - Go Packages

type APIConnectionError struct {
	
}

APIConnectionError is a failure to connect to the Stripe API.

Error serializes the error object to JSON and returns it as a string.

APIError is a catch all for any errors not covered by other types (and should be extremely uncommon).

Error serializes the error object to JSON and returns it as a string.

Account is the resource representing your Stripe account. For more details see https://stripe.com/docs/api/#account.

UnmarshalJSON handles deserialization of an account. This custom unmarshaling is needed because the resulting property may be an ID or the full struct if it was expanded.

type AccountAddress struct {
	City       string `json:"city"`
	Country    string `json:"country"`
	Line1      string `json:"line1"`
	Line2      string `json:"line2"`
	PostalCode string `json:"postal_code"`
	State      string `json:"state"`

	
	
	Town string `json:"town"`
}

AccountAddress is the structure for an account address.

type AccountAddressParams struct {
	City       *string `form:"city"`
	Country    *string `form:"country"`
	Line1      *string `form:"line1"`
	Line2      *string `form:"line2"`
	PostalCode *string `form:"postal_code"`
	State      *string `form:"state"`

	
	
	Town *string `form:"town"`
}

AccountAddressParams represents an address during account creation/updates.

type AccountBusinessProfile struct {
	MCC                string   `json:"mcc"`
	Name               string   `json:"name"`
	ProductDescription string   `json:"product_description"`
	SupportAddress     *Address `json:"support_address"`
	SupportEmail       string   `json:"support_email"`
	SupportPhone       string   `json:"support_phone"`
	SupportURL         string   `json:"support_url"`
	URL                string   `json:"url"`
}

AccountBusinessProfile represents optional information related to the business.

type AccountBusinessProfileParams struct {
	MCC                *string `form:"mcc"`
	Name               *string `form:"name"`
	ProductDescription *string `form:"product_description"`
	SupportEmail       *string `form:"support_email"`
	SupportPhone       *string `form:"support_phone"`
	SupportURL         *string `form:"support_url"`
	URL                *string `form:"url"`
}

AccountBusinessProfileParams are the parameters allowed for an account's business information

type AccountBusinessType string

AccountBusinessType describes the business type associated with an account.

List of values that AccountBusinessType can take.

AccountCapabilities is the resource representing the capabilities enabled on that account.

AccountCapability maps to a given capability for an account.

List of values that AccountCapability can take.

type AccountCapabilityStatus string

AccountCapabilityStatus is the status a given capability can have

List of values that AccountCapabilityStatus can take.

AccountCompany represents details about the company or business associated with the account.

AccountCompanyParams are the parameters describing the company associated with the account.

type AccountCompanyStructure string

AccountCompanyStructure describes the structure associated with a company.

List of values that AccountCompanyStructure can take.

AccountCompanyVerification represents details about a company's verification state.

AccountCompanyVerificationDocument represents details about a company's verification state.

type AccountCompanyVerificationDocumentDetailsCode string

AccountCompanyVerificationDocumentDetailsCode is a machine-readable code specifying the verification state of a document associated with a company.

List of values that AccountCompanyVerificationDocumentDetailsCode can take.

type AccountCompanyVerificationDocumentParams struct {
	Back  *string `form:"back"`
	Front *string `form:"front"`
}

AccountCompanyVerificationDocumentParams are the parameters allowed to pass for a document verifying a company.

AccountCompanyVerificationParams are the parameters allowed to verify a company.

type AccountDeclineOn struct {
	AVSFailure bool `json:"avs_failure"`
	CVCFailure bool `json:"cvc_failure"`
}

AccountDeclineOn represents card charges decline behavior for that account.

type AccountDeclineSettingsParams struct {
	AVSFailure *bool `form:"avs_failure"`
	CVCFailure *bool `form:"cvc_failure"`
}

AccountDeclineSettingsParams represents the parameters allowed for configuring card declines on connected accounts.

type AccountExternalAccountParams struct {
	Params            `form:"*"`
	AccountNumber     *string `form:"account_number"`
	AccountHolderName *string `form:"account_holder_name"`
	AccountHolderType *string `form:"account_holder_type"`
	Country           *string `form:"country"`
	Currency          *string `form:"currency"`
	RoutingNumber     *string `form:"routing_number"`
	Token             *string `form:"token"`
}

AccountExternalAccountParams are the parameters allowed to reference an external account when creating an account. It should either have Token set or everything else.

AppendTo implements custom encoding logic for AccountExternalAccountParams so that we can send the special required `object` field up along with the other specified parameters or the token value.

type AccountLinkCollect string

AccountLinkCollect describes what information the platform wants to collect with the account link.

List of values that AccountLinkCollect can take.

type AccountLinkParams struct {
	Params     `form:"*"`
	Account    *string `form:"account"`
	Collect    *string `form:"collect"`
	FailureURL *string `form:"failure_url"`
	SuccessURL *string `form:"success_url"`
	Type       *string `form:"type"`
}

AccountLinkParams are the parameters allowed during an account link creation.

AccountLinkType is the type of an account link.

const (
	AccountLinkTypeCustomAccountUpdate       AccountLinkType = "custom_account_update"
	AccountLinkTypeCustomAccountVerification AccountLinkType = "custom_account_verification"
)

List of values that AccountLinkType can take.

AccountList is a list of accounts as returned from a list endpoint.

type AccountListParams struct {
	ListParams `form:"*"`
}

AccountListParams are the parameters allowed during account listing.

AccountParams are the parameters allowed during account creation/updates.

type AccountPayoutSchedule struct {
	DelayDays     int64          `json:"delay_days"`
	Interval      PayoutInterval `json:"interval"`
	MonthlyAnchor int64          `json:"monthly_anchor"`
	WeeklyAnchor  string         `json:"weekly_anchor"`
}

AccountPayoutSchedule is the structure for an account's payout schedule.

type AccountRejectParams struct {
	Params `form:"*"`
	Reason *string `form:"reason"`
}

AccountRejectParams is the structure for the Reject function.

type AccountRejectReason string

AccountRejectReason describes the valid reason to reject an account

List of values that AccountRejectReason can take.

AccountRequirements represents information that needs to be collected for an account.

type AccountRequirementsDisabledReason string

AccountRequirementsDisabledReason describes why an account is disabled.

List of values that AccountRequirementsDisabledReason can take.

type AccountRequirementsError struct {
	Code        string `json:"code"`
	Reason      string `json:"reason"`
	Requirement string `json:"requirement"`
}

AccountRequirementsError represents details about an error with a requirement.

AccountSettings represents options for customizing how the account functions within Stripe.

type AccountSettingsBranding
type AccountSettingsBranding struct {
	Icon           *File  `json:"icon"`
	Logo           *File  `json:"logo"`
	PrimaryColor   string `json:"primary_color"`
	SecondaryColor string `json:"secondary_color"`
}

AccountSettingsBranding represents settings specific to the account's branding.

type AccountSettingsBrandingParams
type AccountSettingsBrandingParams struct {
	Icon           *string `form:"icon"`
	Logo           *string `form:"logo"`
	PrimaryColor   *string `form:"primary_color"`
	SecondaryColor *string `form:"secondary_color"`
}

AccountSettingsBrandingParams represent allowed parameters to configure settings specific to the account’s branding.

type AccountSettingsCardPayments struct {
	DeclineOn                 *AccountDeclineOn `json:"decline_on"`
	StatementDescriptorPrefix string            `json:"statement_descriptor_prefix"`
}

AccountSettingsCardPayments represents settings specific to card charging on the account.

type AccountSettingsCardPaymentsParams struct {
	DeclineOn                 *AccountDeclineSettingsParams `form:"decline_on"`
	StatementDescriptorPrefix *string                       `form:"statement_descriptor_prefix"`
}

AccountSettingsCardPaymentsParams represent allowed parameters to configure settings specific to card charging on the account.

type AccountSettingsDashboard struct {
	DisplayName string `json:"display_name"`
	Timezone    string `json:"timezone"`
}

AccountSettingsDashboard represents settings specific to the account's Dashboard.

type AccountSettingsDashboardParams struct {
	DisplayName *string `form:"display_name"`
	Timezone    *string `form:"timezone"`
}

AccountSettingsDashboardParams represent allowed parameters to configure settings for the account's Dashboard.

AccountSettingsParams are the parameters allowed for the account's settings.

type AccountSettingsPayments struct {
	StatementDescriptor      string `json:"statement_descriptor"`
	StatementDescriptorKana  string `json:"statement_descriptor_kana"`
	StatementDescriptorKanji string `json:"statement_descriptor_kanji"`
}

AccountSettingsPayments represents settings that apply across payment methods for charging on the account.

type AccountSettingsPaymentsParams struct {
	StatementDescriptor      *string `form:"statement_descriptor"`
	StatementDescriptorKana  *string `form:"statement_descriptor_kana"`
	StatementDescriptorKanji *string `form:"statement_descriptor_kanji"`
}

AccountSettingsPaymentsParams represent allowed parameters to configure settings across payment methods for charging on the account.

type AccountSettingsPayouts struct {
	DebitNegativeBalances bool                   `json:"debit_negative_balances"`
	Schedule              *AccountPayoutSchedule `json:"schedule"`
	StatementDescriptor   string                 `json:"statement_descriptor"`
}

AccountSettingsPayouts represents settings specific to the account’s payouts.

type AccountSettingsPayoutsParams struct {
	DebitNegativeBalances *bool                 `form:"debit_negative_balances"`
	Schedule              *PayoutScheduleParams `form:"schedule"`
	StatementDescriptor   *string               `form:"statement_descriptor"`
}

AccountSettingsPayoutsParams represent allowed parameters to configure settings specific to the account’s payouts.

type AccountTOSAcceptance struct {
	Date      int64  `json:"date"`
	IP        string `json:"ip"`
	UserAgent string `json:"user_agent"`
}

AccountTOSAcceptance represents status of acceptance of our terms of services for the account.

type AccountTOSAcceptanceParams struct {
	Date      *int64  `form:"date"`
	IP        *string `form:"ip"`
	UserAgent *string `form:"user_agent"`
}

AccountTOSAcceptanceParams represents tos_acceptance during account creation/updates.

AccountType is the type of an account.

List of values that AccountType can take.

type Address struct {
	City       string `json:"city"`
	Country    string `json:"country"`
	Line1      string `json:"line1"`
	Line2      string `json:"line2"`
	PostalCode string `json:"postal_code"`
	State      string `json:"state"`
}

Address describes common properties for an Address hash.

type AddressParams struct {
	City       *string `form:"city"`
	Country    *string `form:"country"`
	Line1      *string `form:"line1"`
	Line2      *string `form:"line2"`
	PostalCode *string `form:"postal_code"`
	State      *string `form:"state"`
}

AddressParams describes the common parameters for an Address.

Amount is a structure wrapping an amount value and its currency.

type AppInfo struct {
	Name      string `json:"name"`
	PartnerID string `json:"partner_id"`
	URL       string `json:"url"`
	Version   string `json:"version"`
}

AppInfo contains information about the "app" which this integration belongs to. This should be reserved for plugins that wish to identify themselves with Stripe.

type ApplePayDomain
type ApplePayDomain struct {
	Created    int64  `json:"created"`
	Deleted    bool   `json:"deleted"`
	DomainName string `json:"domain_name"`
	ID         string `json:"id"`
	Livemode   bool   `json:"livemode"`
}

ApplePayDomain is the resource representing a Stripe ApplePayDomain object

type ApplePayDomainList

ApplePayDomainList is a list of ApplePayDomains as returned from a list endpoint.

type ApplePayDomainListParams
type ApplePayDomainListParams struct {
	ListParams `form:"*"`
}

ApplePayDomainListParams are the parameters allowed during ApplePayDomain listing.

type ApplePayDomainParams
type ApplePayDomainParams struct {
	Params     `form:"*"`
	DomainName *string `form:"domain_name"`
}

ApplePayDomainParams is the set of parameters that can be used when creating an ApplePayDomain object.

type Application struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Application describes the properties for an Application.

UnmarshalJSON handles deserialization of an Application. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type ApplicationFee struct {
	Account                *Account            `json:"account"`
	Amount                 int64               `json:"amount"`
	AmountRefunded         int64               `json:"amount_refunded"`
	Application            string              `json:"application"`
	BalanceTransaction     *BalanceTransaction `json:"balance_transaction"`
	Charge                 *Charge             `json:"charge"`
	Created                int64               `json:"created"`
	Currency               Currency            `json:"currency"`
	ID                     string              `json:"id"`
	Livemode               bool                `json:"livemode"`
	OriginatingTransaction *Charge             `json:"originating_transaction"`
	Refunded               bool                `json:"refunded"`
	Refunds                *FeeRefundList      `json:"refunds"`
}

ApplicationFee is the resource representing a Stripe application fee. For more details see https://stripe.com/docs/api#application_fees.

UnmarshalJSON handles deserialization of an ApplicationFee. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

ApplicationFeeList is a list of application fees as retrieved from a list endpoint.

type AuthenticationError struct {
	
}

AuthenticationError is a failure to properly authenticate during a request.

Error serializes the error object to JSON and returns it as a string.

type AuthorizationControlsParams struct {
	AllowedCategories []*string                                           `form:"allowed_categories"`
	BlockedCategories []*string                                           `form:"blocked_categories"`
	MaxApprovals      *int64                                              `form:"max_approvals"`
	SpendingLimits    []*IssuingAuthorizationControlsSpendingLimitsParams `form:"spending_limits"`

	
	SpendingLimitsCurrency *string `form:"spending_limits_currency"`

	
	MaxAmount *int64 `form:"max_amount"`
}

AuthorizationControlsParams is the set of parameters that can be used for the shipping parameter. This is deprecated and will be removed in the next major version.

type AuthorizeURLParams struct {
	Params                `form:"*"`
	AlwaysPrompt          *bool                  `form:"always_prompt"`
	ClientID              *string                `form:"client_id"`
	RedirectURI           *string                `form:"redirect_uri"`
	ResponseType          *string                `form:"response_type"`
	Scope                 *string                `form:"scope"`
	State                 *string                `form:"state"`
	StripeLanding         *string                `form:"stripe_landing"`
	StripeUser            *OAuthStripeUserParams `form:"stripe_user"`
	SuggestedCapabilities []*string              `form:"suggested_capabilities"`

	
	
	Express *bool `form:"-"`
}

AuthorizeURLParams for creating OAuth AuthorizeURLs.

type Backend interface {
	Call(method, path, key string, params ParamsContainer, v interface{}) error
	CallRaw(method, path, key string, body *form.Values, params *Params, v interface{}) error
	CallMultipart(method, path, key, boundary string, body *bytes.Buffer, params *Params, v interface{}) error
	SetMaxNetworkRetries(maxNetworkRetries int)
}

Backend is an interface for making calls against a Stripe service. This interface exists to enable mocking for during testing if needed.

GetBackend returns one of the library's supported backends based off of the given argument.

It returns an existing default backend if one's already been created.

GetBackendWithConfig is the same as GetBackend except that it can be given a configuration struct that will configure certain aspects of the backend that's return.

BackendConfig is used to configure a new Stripe backend.

BackendImplementation is the internal implementation for making HTTP calls to Stripe.

The public use of this struct is deprecated. It will be unexported in a future version.

Call is the Backend.Call implementation for invoking Stripe APIs.

CallMultipart is the Backend.CallMultipart implementation for invoking Stripe APIs.

CallRaw is the implementation for invoking Stripe APIs internally without a backend.

Do is used by Call to execute an API request and parse the response. It uses the backend's HTTP client to execute the request and unmarshals the response into v. It also handles unmarshaling errors returned by the API.

NewRequest is used by Call to generate an http.Request. It handles encoding parameters and attaching the appropriate headers.

ResponseToError converts a stripe response to an Error.

SetMaxNetworkRetries sets max number of retries on failed requests

This function is deprecated. Please use GetBackendWithConfig instead.

SetNetworkRetriesSleep allows the normal sleep between network retries to be enabled or disabled.

This function is available for internal testing only and should never be used in production.

UnmarshalJSONVerbose unmarshals JSON, but in case of a failure logs and produces a more descriptive error.

type Backends struct {
	API, Connect, Uploads Backend
	
}

Backends are the currently supported endpoints.

NewBackends creates a new set of backends with the given HTTP client. You should only need to use this for testing purposes or on App Engine.

type Balance struct {
	Available       []*Amount `json:"available"`
	ConnectReserved []*Amount `json:"connect_reserved"`
	Livemode        bool      `json:"livemode"`
	Pending         []*Amount `json:"pending"`
}

Balance is the resource representing your Stripe balance. For more details see https://stripe.com/docs/api/#balance.

BalanceSourceType is the list of allowed values for the balance amount's source_type field keys.

List of values that BalanceSourceType can take.

BalanceTransaction is the resource representing the balance transaction. For more details see https://stripe.com/docs/api/#balance.

UnmarshalJSON handles deserialization of a Transaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type BalanceTransactionFee struct {
	Amount      int64    `json:"amount"`
	Application string   `json:"application"`
	Currency    Currency `json:"currency"`
	Description string   `json:"description"`
	Type        string   `json:"type"`
}

BalanceTransactionFee is a structure that breaks down the fees in a transaction.

BalanceTransactionList is a list of transactions as returned from a list endpoint.

type BalanceTransactionReportingCategory string

BalanceTransactionReportingCategory represents reporting categories for balance transactions.

List of values that BalanceTransactionReportingCategory can take.

BalanceTransactionSource describes the source of a balance Transaction. The Type should indicate which object is fleshed out. For more details see https://stripe.com/docs/api#retrieve_balance_transaction

UnmarshalJSON handles deserialization of a BalanceTransactionSource. This custom unmarshaling is needed because the specific type of transaction source it refers to is specified in the JSON

type BalanceTransactionSourceType string

BalanceTransactionSourceType consts represent valid balance transaction sources.

List of values that BalanceTransactionSourceType can take.

type BalanceTransactionStatus string

BalanceTransactionStatus is the list of allowed values for the balance transaction's status.

List of values that BalanceTransactionStatus can take.

type BalanceTransactionType string

BalanceTransactionType is the list of allowed values for the balance transaction's type.

List of values that BalanceTransactionType can take.

BankAccount represents a Stripe bank account.

UnmarshalJSON handles deserialization of a BankAccount. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type BankAccountAccountHolderType string

BankAccountAccountHolderType is the list of allowed values for the bank account holder type.

List of values that BankAccountAccountHolderType can take.

BankAccountList is a list object for bank accounts.

type BankAccountListParams struct {
	ListParams `form:"*"`

	
	
	Account *string `form:"-"`

	
	
	Customer *string `form:"-"`
}

BankAccountListParams is the set of parameters that can be used when listing bank accounts.

AppendTo implements custom encoding logic for BankAccountListParams so that we can send the special required `object` field up along with the other specified parameters.

type BankAccountParams struct {
	Params `form:"*"`

	
	
	Account *string `form:"-"`

	AccountHolderName  *string `form:"account_holder_name"`
	AccountHolderType  *string `form:"account_holder_type"`
	AccountNumber      *string `form:"account_number"`
	Country            *string `form:"country"`
	Currency           *string `form:"currency"`
	Customer           *string `form:"-"`
	DefaultForCurrency *bool   `form:"default_for_currency"`
	RoutingNumber      *string `form:"routing_number"`

	
	
	Token *string `form:"-"`

	
	ID *string `form:"*"`
}

BankAccountParams is the set of parameters that can be used when updating a bank account.

Note that while form annotations are used for updates, bank accounts have some unusual logic on creates that necessitates manual handling of all parameters. See AppendToAsSourceOrExternalAccount.

AppendToAsSourceOrExternalAccount appends the given BankAccountParams as either a source or external account.

It may look like an AppendTo from the form package, but it's not, and is only used in the special case where we use `bankaccount.New`. It's needed because we have some weird encoding logic here that can't be handled by the form package (and it's special enough that it wouldn't be desirable to have it do so).

This is not a pattern that we want to push forward, and this largely exists because the bank accounts endpoint is a little unusual. There is one other resource like it, which is cards.

BankAccountStatus is the list of allowed values for the bank account's status.

List of values that BankAccountStatus can take.

type BillingDetails struct {
	Address *Address `json:"address"`
	Email   string   `json:"email"`
	Name    string   `json:"name"`
	Phone   string   `json:"phone"`
}

BillingDetails represents the billing details associated with a PaymentMethod.

type BillingDetailsParams struct {
	Address *AddressParams `form:"address"`
	Email   *string        `form:"email"`
	Name    *string        `form:"name"`
	Phone   *string        `form:"phone"`
}

BillingDetailsParams is the set of parameters that can be used as billing details when creating or updating a PaymentMethod

type BitcoinReceiver struct {
	Active                bool                    `json:"active"`
	Amount                int64                   `json:"amount"`
	AmountReceived        int64                   `json:"amount_received"`
	BitcoinAmount         int64                   `json:"bitcoin_amount"`
	BitcoinAmountReceived int64                   `json:"bitcoin_amount_received"`
	BitcoinURI            string                  `json:"bitcoin_uri"`
	Created               int64                   `json:"created"`
	Currency              Currency                `json:"currency"`
	Customer              string                  `json:"customer"`
	Description           string                  `json:"description"`
	Email                 string                  `json:"email"`
	Filled                bool                    `json:"filled"`
	ID                    string                  `json:"id"`
	InboundAddress        string                  `json:"inbound_address"`
	Metadata              map[string]string       `json:"metadata"`
	Payment               string                  `json:"payment"`
	RefundAddress         string                  `json:"refund_address"`
	RejectTransactions    bool                    `json:"reject_transactions"`
	Transactions          *BitcoinTransactionList `json:"transactions"`
}

BitcoinReceiver is the resource representing a Stripe bitcoin receiver. For more details see https://stripe.com/docs/api/#bitcoin_receivers

UnmarshalJSON handles deserialization of a BitcoinReceiver. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

BitcoinReceiverList is a list of bitcoin receivers as retrieved from a list endpoint.

type BitcoinTransaction struct {
	Amount        int64    `json:"amount"`
	BitcoinAmount int64    `json:"bitcoin_amount"`
	Created       int64    `json:"created"`
	Currency      Currency `json:"currency"`
	Customer      string   `json:"customer"`
	ID            string   `json:"id"`
	Receiver      string   `json:"receiver"`
}

BitcoinTransaction is the resource representing a Stripe bitcoin transaction. For more details see https://stripe.com/docs/api/#bitcoin_receivers

UnmarshalJSON handles deserialization of a BitcoinTransaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type BitcoinTransactionListParams struct {
	ListParams `form:"*"`
	Customer   *string `form:"customer"`
	Receiver   *string `form:"-"` 
}

BitcoinTransactionListParams is the set of parameters that can be used when listing BitcoinTransactions.

Capability is the resource representing a Stripe capability. For more details see https://stripe.com/docs/api/capabilities

UnmarshalJSON handles deserialization of a Capability. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type CapabilityDisabledReason string

CapabilityDisabledReason describes why a capability is disabled.

List of values that CapabilityDisabledReason can take.

CapabilityList is a list of capabilities as retrieved from a list endpoint.

type CapabilityRequirements struct {
	CurrentDeadline     int64                       `json:"current_deadline"`
	CurrentlyDue        []string                    `json:"currently_due"`
	DisabledReason      CapabilityDisabledReason    `json:"disabled_reason"`
	Errors              []*AccountRequirementsError `json:"errors"`
	EventuallyDue       []string                    `json:"eventually_due"`
	PastDue             []string                    `json:"past_due"`
	PendingVerification []string                    `json:"pending_verification"`
}

CapabilityRequirements represents information that needs to be collected for a capability.

CapabilityStatus describes the different statuses for a capability's status.

List of values that CapabilityStatus can take.

type CaptureParams struct {
	Params                    `form:"*"`
	Amount                    *int64                    `form:"amount"`
	ApplicationFeeAmount      *int64                    `form:"application_fee_amount"`
	ExchangeRate              *float64                  `form:"exchange_rate"`
	ReceiptEmail              *string                   `form:"receipt_email"`
	StatementDescriptor       *string                   `form:"statement_descriptor"`
	StatementDescriptorSuffix *string                   `form:"statement_descriptor_suffix"`
	TransferGroup             *string                   `form:"transfer_group"`
	TransferData              *ChargeTransferDataParams `form:"transfer_data"`
}

CaptureParams is the set of parameters that can be used when capturing a charge.

Card is the resource representing a Stripe credit/debit card. For more details see https://stripe.com/docs/api#cards.

UnmarshalJSON handles deserialization of a Card. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type CardAvailablePayoutMethod string

CardAvailablePayoutMethod is a set of available payout methods for the card.

List of values that CardAvailablePayoutMethod can take.

type CardBrand

CardBrand is the list of allowed values for the card's brand.

List of values that CardBrand can take.

type CardError struct {

	
	
	DeclineCode DeclineCode `json:"decline_code,omitempty"`
	
}

CardError are the most common type of error you should expect to handle. They result when the user enters a card that can't be charged for some reason.

Error serializes the error object to JSON and returns it as a string.

CardFunding is the list of allowed values for the card's funding.

List of values that CardFunding can take.

type CardList struct {
	ListMeta
	Data []*Card `json:"data"`
}

CardList is a list object for cards.

CardListParams is the set of parameters that can be used when listing cards. For more details see https://stripe.com/docs/api#list_cards.

AppendTo implements custom encoding logic for CardListParams so that we can send the special required `object` field up along with the other specified parameters.

type CardParams struct {
	Params             `form:"*"`
	Account            *string `form:"-"`
	AddressCity        *string `form:"address_city"`
	AddressCountry     *string `form:"address_country"`
	AddressLine1       *string `form:"address_line1"`
	AddressLine2       *string `form:"address_line2"`
	AddressState       *string `form:"address_state"`
	AddressZip         *string `form:"address_zip"`
	CVC                *string `form:"cvc"`
	Currency           *string `form:"currency"`
	Customer           *string `form:"-"`
	DefaultForCurrency *bool   `form:"default_for_currency"`
	ExpMonth           *string `form:"exp_month"`
	ExpYear            *string `form:"exp_year"`
	Name               *string `form:"name"`
	Number             *string `form:"number"`
	Recipient          *string `form:"-"`
	Token              *string `form:"-"`

	
	ID string `form:"*"`
}

CardParams is the set of parameters that can be used when creating or updating a card. For more details see https://stripe.com/docs/api#create_card and https://stripe.com/docs/api#update_card.

Note that while form annotations are used for tokenization and updates, cards have some unusual logic on creates that necessitates manual handling of all parameters. See AppendToAsCardSourceOrExternalAccount.

AppendToAsCardSourceOrExternalAccount appends the given CardParams as either a card or external account.

It may look like an AppendTo from the form package, but it's not, and is only used in the special case where we use `card.New`. It's needed because we have some weird encoding logic here that can't be handled by the form package (and it's special enough that it wouldn't be desirable to have it do so).

This is not a pattern that we want to push forward, and this largely exists because the cards endpoint is a little unusual. There is one other resource like it, which is bank account.

type CardTokenizationMethod string

CardTokenizationMethod is the list of allowed values for the card's tokenization method.

List of values that CardTokenizationMethod can take.

CardVerification is the list of allowed verification responses.

List of values that CardVerification can take.

type Charge struct {
	Amount                        int64                       `json:"amount"`
	AmountRefunded                int64                       `json:"amount_refunded"`
	Application                   *Application                `json:"application"`
	ApplicationFee                *ApplicationFee             `json:"application_fee"`
	ApplicationFeeAmount          int64                       `json:"application_fee_amount"`
	AuthorizationCode             string                      `json:"authorization_code"`
	BalanceTransaction            *BalanceTransaction         `json:"balance_transaction"`
	BillingDetails                *BillingDetails             `json:"billing_details"`
	CalculatedStatementDescriptor string                      `json:"calculated_statement_descriptor"`
	Captured                      bool                        `json:"captured"`
	Created                       int64                       `json:"created"`
	Currency                      Currency                    `json:"currency"`
	Customer                      *Customer                   `json:"customer"`
	Description                   string                      `json:"description"`
	Destination                   *Account                    `json:"destination"`
	Dispute                       *Dispute                    `json:"dispute"`
	Disputed                      bool                        `json:"disputed"`
	FailureCode                   string                      `json:"failure_code"`
	FailureMessage                string                      `json:"failure_message"`
	FraudDetails                  *FraudDetails               `json:"fraud_details"`
	ID                            string                      `json:"id"`
	Invoice                       *Invoice                    `json:"invoice"`
	Level3                        ChargeLevel3                `json:"level3"`
	Livemode                      bool                        `json:"livemode"`
	Metadata                      map[string]string           `json:"metadata"`
	OnBehalfOf                    *Account                    `json:"on_behalf_of"`
	Outcome                       *ChargeOutcome              `json:"outcome"`
	Paid                          bool                        `json:"paid"`
	PaymentIntent                 string                      `json:"payment_intent"`
	PaymentMethod                 string                      `json:"payment_method"`
	PaymentMethodDetails          *ChargePaymentMethodDetails `json:"payment_method_details"`
	ReceiptEmail                  string                      `json:"receipt_email"`
	ReceiptNumber                 string                      `json:"receipt_number"`
	ReceiptURL                    string                      `json:"receipt_url"`
	Refunded                      bool                        `json:"refunded"`
	Refunds                       *RefundList                 `json:"refunds"`
	Review                        *Review                     `json:"review"`
	Shipping                      *ShippingDetails            `json:"shipping"`
	Source                        *PaymentSource              `json:"source"`
	SourceTransfer                *Transfer                   `json:"source_transfer"`
	StatementDescriptor           string                      `json:"statement_descriptor"`
	StatementDescriptorSuffix     string                      `json:"statement_descriptor_suffix"`
	Status                        string                      `json:"status"`
	Transfer                      *Transfer                   `json:"transfer"`
	TransferData                  *ChargeTransferData         `json:"transfer_data"`
	TransferGroup                 string                      `json:"transfer_group"`
}

Charge is the resource representing a Stripe charge. For more details see https://stripe.com/docs/api#charges.

package main

import (
	"log"

	stripe "github.com/stripe/stripe-go"
	"github.com/stripe/stripe-go/charge"
)

func main() {
	stripe.Key = "sk_key"

	params := &stripe.ChargeParams{}
	params.AddExpand("customer")
	params.AddExpand("application")
	params.AddExpand("balance_transaction")

	ch, err := charge.Get("ch_example_id", params)

	if err != nil {
		log.Fatal(err)
	}

	if ch.Application != nil {
		log.Fatal(err)
	}

	log.Printf("%v\n", ch.ID)
}
package main

import (
	"log"

	stripe "github.com/stripe/stripe-go"
	"github.com/stripe/stripe-go/charge"
)

func main() {
	stripe.Key = "sk_key"

	params := &stripe.ChargeParams{
		Amount:   stripe.Int64(1000),
		Currency: stripe.String(string(stripe.CurrencyUSD)),
	}
	params.SetSource("tok_visa")
	params.AddMetadata("key", "value")

	ch, err := charge.New(params)

	if err != nil {
		log.Fatal(err)
	}

	log.Printf("%v\n", ch.ID)
}

UnmarshalJSON handles deserialization of a charge. This custom unmarshaling is needed because the resulting property may be an ID or the full struct if it was expanded.

type ChargeFraudStripeReport string

ChargeFraudStripeReport is the list of allowed values for reporting fraud.

List of values that ChargeFraudStripeReport can take.

type ChargeFraudUserReport string

ChargeFraudUserReport is the list of allowed values for reporting fraud.

List of values that ChargeFraudUserReport can take.

type ChargeLevel3 struct {
	CustomerReference  string                  `json:"customer_reference"`
	LineItems          []*ChargeLevel3LineItem `json:"line_items"`
	MerchantReference  string                  `json:"merchant_reference"`
	ShippingAddressZip string                  `json:"shipping_address_zip"`
	ShippingFromZip    string                  `json:"shipping_from_zip"`
	ShippingAmount     int64                   `json:"shipping_amount"`
}

ChargeLevel3 represents the Level III data. This is in private beta and would be empty for most integrations

type ChargeLevel3LineItem struct {
	DiscountAmount     int64  `json:"discount_amount"`
	ProductCode        string `json:"product_code"`
	ProductDescription string `json:"product_description"`
	Quantity           int64  `json:"quantity"`
	TaxAmount          int64  `json:"tax_amount"`
	UnitCost           int64  `json:"unit_cost"`
}

ChargeLevel3LineItem represents a line item on level III data. This is in private beta and would be empty for most integrations

type ChargeLevel3LineItemsParams struct {
	DiscountAmount     *int64  `form:"discount_amount"`
	ProductCode        *string `form:"product_code"`
	ProductDescription *string `form:"product_description"`
	Quantity           *int64  `form:"quantity"`
	TaxAmount          *int64  `form:"tax_amount"`
	UnitCost           *int64  `form:"unit_cost"`
}

ChargeLevel3LineItemsParams is the set of parameters that represent a line item on level III data.

type ChargeLevel3Params struct {
	CustomerReference  *string                        `form:"customer_reference"`
	LineItems          []*ChargeLevel3LineItemsParams `form:"line_items"`
	MerchantReference  *string                        `form:"merchant_reference"`
	ShippingAddressZip *string                        `form:"shipping_address_zip"`
	ShippingFromZip    *string                        `form:"shipping_from_zip"`
	ShippingAmount     *int64                         `form:"shipping_amount"`
}

ChargeLevel3Params is the set of parameters that can be used for the Level III data.

ChargeList is a list of charges as retrieved from a list endpoint.

type ChargeListParams struct {
	ListParams    `form:"*"`
	Created       *int64            `form:"created"`
	CreatedRange  *RangeQueryParams `form:"created"`
	Customer      *string           `form:"customer"`
	PaymentIntent *string           `form:"payment_intent"`
	TransferGroup *string           `form:"transfer_group"`
}

ChargeListParams is the set of parameters that can be used when listing charges.

type ChargeOutcome struct {
	NetworkStatus string             `json:"network_status"`
	Reason        string             `json:"reason"`
	RiskLevel     string             `json:"risk_level"`
	RiskScore     int64              `json:"risk_score"`
	Rule          *ChargeOutcomeRule `json:"rule"`
	SellerMessage string             `json:"seller_message"`
	Type          string             `json:"type"`
}

ChargeOutcome is the charge's outcome that details whether a payment was accepted and why.

type ChargeOutcomeRule struct {
	Action    string `json:"action"`
	ID        string `json:"id"`
	Predicate string `json:"predicate"`
}

ChargeOutcomeRule tells you the Radar rule that blocked the charge, if any.

UnmarshalJSON handles deserialization of a ChargeOutcomeRule. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

ChargeParams is the set of parameters that can be used when creating or updating a charge.

SetSource adds valid sources to a ChargeParams object, returning an error for unsupported sources.

ChargePaymentMethodDetails represents the details about the PaymentMethod associated with the charge.

type ChargePaymentMethodDetailsAUBECSDebit struct {
	BSBNumber   string `json:"bsb_number"`
	Fingerprint string `json:"fingerprint"`
	Last4       string `json:"last4"`
	Mandate     string `json:"mandate"`
}

ChargePaymentMethodDetailsAUBECSDebit represents details about the AU BECS DD PaymentMethod.

type ChargePaymentMethodDetailsAchCreditTransfer struct {
	AccountNumber string `json:"account_number"`
	BankName      string `json:"bank_name"`
	RoutingNumber string `json:"routing_number"`
	SwiftCode     string `json:"swift_code"`
}

ChargePaymentMethodDetailsAchCreditTransfer represents details about the ACH Credit Transfer PaymentMethod.

type ChargePaymentMethodDetailsAchDebit struct {
	AccountHolderType BankAccountAccountHolderType `json:"account_holder_type"`
	BankName          string                       `json:"bank_name"`
	Country           string                       `json:"country"`
	Fingerprint       string                       `json:"fingerprint"`
	Last4             string                       `json:"last4"`
	RoutingNumber     string                       `json:"routing_number"`
}

ChargePaymentMethodDetailsAchDebit represents details about the ACH Debit PaymentMethod.

type ChargePaymentMethodDetailsAcssDebit struct {
	Country       string `json:"country"`
	Fingerprint   string `json:"fingerprint"`
	Last4         string `json:"last4"`
	RoutingNumber string `json:"routing_number"`
}

ChargePaymentMethodDetailsAcssDebit represents details about the ACSS Debit PaymentMethod.

type ChargePaymentMethodDetailsAlipay struct {
}

ChargePaymentMethodDetailsAlipay represents details about the Alipay PaymentMethod.

type ChargePaymentMethodDetailsBancontact struct {
	BankCode          string `json:"bank_code"`
	BankName          string `json:"bank_name"`
	Bic               string `json:"bic"`
	IbanLast4         string `json:"iban_last4"`
	PreferredLanguage string `json:"preferred_language"`
	VerifiedName      string `json:"verified_name"`
}

ChargePaymentMethodDetailsBancontact represents details about the Bancontact PaymentMethod.

type ChargePaymentMethodDetailsBitcoin struct {
	Address        string `json:"address"`
	Amount         int64  `json:"amount"`
	AmountCharged  int64  `json:"amount_charged"`
	AmountReceived int64  `json:"amount_received"`
	AmountReturned int64  `json:"amount_returned"`
	RefundAddress  string `json:"refund_address"`
}

ChargePaymentMethodDetailsBitcoin represents details about the Bitcoin PaymentMethod.

ChargePaymentMethodDetailsCard represents details about the Card PaymentMethod.

ChargePaymentMethodDetailsCardChecks represents the checks associated with the charge's Card PaymentMethod.

ChargePaymentMethodDetailsCardInstallments represents details about the installment plan chosen for this charge.

ChargePaymentMethodDetailsCardPresent represents details about the Card Present PaymentMethod.

type ChargePaymentMethodDetailsCardPresentReceipt struct {
	ApplicationCryptogram        string `json:"application_cryptogram"`
	ApplicationPreferredName     string `json:"application_preferred_name"`
	AuthorizationCode            string `json:"authorization_code"`
	AuthorizationResponseCode    string `json:"authorization_response_code"`
	CardholderVerificationMethod string `json:"cardholder_verification_method"`
	DedicatedFileName            string `json:"dedicated_file_name"`
	TerminalVerificationResults  string `json:"terminal_verification_results"`
	TransactionStatusInformation string `json:"transaction_status_information"`
}

ChargePaymentMethodDetailsCardPresentReceipt represents details about the receipt on a Card Present PaymentMethod.

type ChargePaymentMethodDetailsCardThreeDSecure struct {
	Authenticated bool   `json:"authenticated"`
	Succeeded     bool   `json:"succeeded"`
	Version       string `json:"version"`
}

ChargePaymentMethodDetailsCardThreeDSecure represents details about 3DS associated with the charge's PaymentMethod.

ChargePaymentMethodDetailsCardWallet represents the details of the card wallet if this Card PaymentMethod is part of a card wallet.

type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout struct {
}

ChargePaymentMethodDetailsCardWalletAmexExpressCheckout represents the details of the Amex Express Checkout wallet.

type ChargePaymentMethodDetailsCardWalletApplePay struct {
}

ChargePaymentMethodDetailsCardWalletApplePay represents the details of the Apple Pay wallet.

type ChargePaymentMethodDetailsCardWalletGooglePay struct {
}

ChargePaymentMethodDetailsCardWalletGooglePay represents the details of the Google Pay wallet.

type ChargePaymentMethodDetailsCardWalletMasterpass struct {
	BillingAddress  *Address `json:"billing_address"`
	Email           string   `json:"email"`
	Name            string   `json:"name"`
	ShippingAddress *Address `json:"shipping_address"`
}

ChargePaymentMethodDetailsCardWalletMasterpass represents the details of the Masterpass wallet.

type ChargePaymentMethodDetailsCardWalletSamsungPay struct {
}

ChargePaymentMethodDetailsCardWalletSamsungPay represents the details of the Samsung Pay wallet.

type ChargePaymentMethodDetailsCardWalletVisaCheckout struct {
	BillingAddress  *Address `json:"billing_address"`
	Email           string   `json:"email"`
	Name            string   `json:"name"`
	ShippingAddress *Address `json:"shipping_address"`
}

ChargePaymentMethodDetailsCardWalletVisaCheckout represents the details of the Visa Checkout wallet.

type ChargePaymentMethodDetailsEps struct {
	VerifiedName string `json:"verified_name"`
}

ChargePaymentMethodDetailsEps represents details about the EPS PaymentMethod.

ChargePaymentMethodDetailsFPX represents details about the FPX PaymentMethod.

type ChargePaymentMethodDetailsGiropay struct {
	BankCode     string `json:"bank_code"`
	BankName     string `json:"bank_name"`
	Bic          string `json:"bic"`
	VerifiedName string `json:"verified_name"`
}

ChargePaymentMethodDetailsGiropay represents details about the Giropay PaymentMethod.

type ChargePaymentMethodDetailsIdeal struct {
	Bank         string `json:"bank"`
	Bic          string `json:"bic"`
	IbanLast4    string `json:"iban_last4"`
	VerifiedName string `json:"verified_name"`
}

ChargePaymentMethodDetailsIdeal represents details about the Ideal PaymentMethod.

type ChargePaymentMethodDetailsKlarna struct {
}

ChargePaymentMethodDetailsKlarna represents details for the Klarna PaymentMethod.

type ChargePaymentMethodDetailsMultibanco struct {
	Entity    string `json:"entity"`
	Reference string `json:"reference"`
}

ChargePaymentMethodDetailsMultibanco represents details about the Multibanco PaymentMethod.

type ChargePaymentMethodDetailsP24 struct {
	Reference    string `json:"reference"`
	VerifiedName string `json:"verified_name"`
}

ChargePaymentMethodDetailsP24 represents details about the P24 PaymentMethod.

type ChargePaymentMethodDetailsSepaDebit struct {
	BankCode    string `json:"bank_code"`
	BranchCode  string `json:"branch_code"`
	Country     string `json:"country"`
	Fingerprint string `json:"fingerprint"`
	Last4       string `json:"last4"`
}

ChargePaymentMethodDetailsSepaDebit represents details about the Sepa Debit PaymentMethod.

type ChargePaymentMethodDetailsSofort struct {
	BankCode     string `json:"bank_code"`
	BankName     string `json:"bank_name"`
	Bic          string `json:"bic"`
	Country      string `json:"country"`
	IbanLast4    string `json:"iban_last4"`
	VerifiedName string `json:"verified_name"`
}

ChargePaymentMethodDetailsSofort represents details about the Sofort PaymentMethod.

type ChargePaymentMethodDetailsStripeAccount struct {
}

ChargePaymentMethodDetailsStripeAccount represents details about the StripeAccount PaymentMethod.

type ChargePaymentMethodDetailsType string

ChargePaymentMethodDetailsType is the type of the PaymentMethod associated with the Charge's payment method details.

List of values that ChargePaymentMethodDetailsType can take.

type ChargePaymentMethodDetailsWechat struct {
}

ChargePaymentMethodDetailsWechat represents details about the Wechat PaymentMethod.

type ChargeTransferData struct {
	Amount      int64    `form:"amount"`
	Destination *Account `json:"destination"`
}

ChargeTransferData represents the information for the transfer_data associated with a charge.

type ChargeTransferDataParams struct {
	Amount *int64 `form:"amount"`
	
	Destination *string `form:"destination"`
}

ChargeTransferDataParams is the set of parameters allowed for the transfer_data hash.

CheckoutSession is the resource representing a Stripe checkout session. For more details see https://stripe.com/docs/api/checkout/sessions/object

UnmarshalJSON handles deserialization of a checkout session. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

CheckoutSessionDisplayItem represents one of the items in a checkout session.

type CheckoutSessionDisplayItemCustom struct {
	Description string   `json:"description"`
	Images      []string `json:"images"`
	Name        string   `json:"name"`
}

CheckoutSessionDisplayItemCustom represents an item of type custom in a checkout session

type CheckoutSessionDisplayItemType string

CheckoutSessionDisplayItemType is the list of allowed values for the display item type.

List of values that CheckoutSessionDisplayItemType can take.

type CheckoutSessionLineItemParams struct {
	Amount      *int64    `form:"amount"`
	Currency    *string   `form:"currency"`
	Description *string   `form:"description"`
	Images      []*string `form:"images"`
	Name        *string   `form:"name"`
	Quantity    *int64    `form:"quantity"`
	TaxRates    []*string `form:"tax_rates"`
}

CheckoutSessionLineItemParams is the set of parameters allowed for a line item on a checkout session.

CheckoutSessionList is a list of sessions as retrieved from a list endpoint.

type CheckoutSessionMode string

CheckoutSessionMode is the list of allowed values for the mode on a Session.

List of values that CheckoutSessionMode can take.

type CheckoutSessionPaymentIntentDataParams struct {
	Params                    `form:"*"`
	ApplicationFeeAmount      *int64                                              `form:"application_fee_amount"`
	CaptureMethod             *string                                             `form:"capture_method"`
	Description               *string                                             `form:"description"`
	OnBehalfOf                *string                                             `form:"on_behalf_of"`
	ReceiptEmail              *string                                             `form:"receipt_email"`
	SetupFutureUsage          *string                                             `form:"setup_future_usage"`
	Shipping                  *ShippingDetailsParams                              `form:"shipping"`
	StatementDescriptor       *string                                             `form:"statement_descriptor"`
	StatementDescriptorSuffix *string                                             `form:"statement_descriptor_suffix"`
	TransferData              *CheckoutSessionPaymentIntentDataTransferDataParams `form:"transfer_data"`
}

CheckoutSessionPaymentIntentDataParams is the set of parameters allowed for the payment intent creation on a checkout session.

type CheckoutSessionPaymentIntentDataTransferDataParams struct {
	Amount      *int64  `form:"amount"`
	Destination *string `form:"destination"`
}

CheckoutSessionPaymentIntentDataTransferDataParams is the set of parameters allowed for the transfer_data hash.

type CheckoutSessionSetupIntentDataParams struct {
	Params      `form:"*"`
	Description *string `form:"description"`
	OnBehalfOf  *string `form:"on_behalf_of"`
}

CheckoutSessionSetupIntentDataParams is the set of parameters allowed for the setup intent creation on a checkout session.

type CheckoutSessionShippingAddressCollection struct {
	AllowedCountries []string `json:"allowed_countries"`
}

CheckoutSessionShippingAddressCollection is the set of parameters allowed for the shipping address collection.

type CheckoutSessionShippingAddressCollectionParams struct {
	AllowedCountries []*string `form:"allowed_countries"`
}

CheckoutSessionShippingAddressCollectionParams is the set of parameters allowed for the shipping address collection.

type CheckoutSessionSubmitType string

CheckoutSessionSubmitType is the list of allowed values for the `submit_type` of a Session.

List of values that CheckoutSessionSubmitType can take.

type CheckoutSessionSubscriptionDataItemsParams struct {
	Plan     *string   `form:"plan"`
	Quantity *int64    `form:"quantity"`
	TaxRates []*string `form:"tax_rates"`
}

CheckoutSessionSubscriptionDataItemsParams is the set of parameters allowed for one item on a checkout session associated with a subscription.

type CheckoutSessionSubscriptionDataParams struct {
	Params                `form:"*"`
	ApplicationFeePercent *float64                                      `form:"application_fee_percent"`
	DefaultTaxRates       []*string                                     `form:"default_tax_rates"`
	Items                 []*CheckoutSessionSubscriptionDataItemsParams `form:"items"`
	TrialEnd              *int64                                        `form:"trial_end"`
	TrialFromPlan         *bool                                         `form:"trial_from_plan"`
	TrialPeriodDays       *int64                                        `form:"trial_period_days"`
}

CheckoutSessionSubscriptionDataParams is the set of parameters allowed for the subscription creation on a checkout session.

CodeVerificationFlow informs of the state of a verification authentication flow.

Country is the list of supported countries

CountrySpecList is a list of country specs as retrieved from a list endpoint.

type CountrySpecListParams struct {
	ListParams `form:"*"`
}

CountrySpecListParams are the parameters allowed during CountrySpec listing.

type CountrySpecParams struct {
	Params `form:"*"`
}

CountrySpecParams are the parameters allowed during CountrySpec retrieval.

type Coupon struct {
	AmountOff        int64             `json:"amount_off"`
	Created          int64             `json:"created"`
	Currency         Currency          `json:"currency"`
	Deleted          bool              `json:"deleted"`
	Duration         CouponDuration    `json:"duration"`
	DurationInMonths int64             `json:"duration_in_months"`
	ID               string            `json:"id"`
	Livemode         bool              `json:"livemode"`
	MaxRedemptions   int64             `json:"max_redemptions"`
	Metadata         map[string]string `json:"metadata"`
	Name             string            `json:"name"`
	PercentOff       float64           `json:"percent_off"`
	RedeemBy         int64             `json:"redeem_by"`
	TimesRedeemed    int64             `json:"times_redeemed"`
	Valid            bool              `json:"valid"`
}

Coupon is the resource representing a Stripe coupon. For more details see https://stripe.com/docs/api#coupons.

UnmarshalJSON handles deserialization of a Coupon. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

CouponDuration is the list of allowed values for the coupon's duration.

List of values that CouponDuration can take.

CouponList is a list of coupons as retrieved from a list endpoint.

type CouponParams struct {
	Params           `form:"*"`
	AmountOff        *int64   `form:"amount_off"`
	Currency         *string  `form:"currency"`
	Duration         *string  `form:"duration"`
	DurationInMonths *int64   `form:"duration_in_months"`
	ID               *string  `form:"id"`
	MaxRedemptions   *int64   `form:"max_redemptions"`
	Name             *string  `form:"name"`
	PercentOff       *float64 `form:"percent_off"`
	RedeemBy         *int64   `form:"redeem_by"`
}

CouponParams is the set of parameters that can be used when creating a coupon. For more details see https://stripe.com/docs/api#create_coupon.

CreditNote is the resource representing a Stripe credit note. For more details see https://stripe.com/docs/api/credit_notes/object.

UnmarshalJSON handles deserialization of a CreditNote. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

CreditNoteLineItemList is a list of credit note line items as retrieved from a list endpoint.

type CreditNoteLineItemListParams struct {
	ListParams `form:"*"`

	
	ID *string `form:"-"` 
}

CreditNoteLineItemListParams is the set of parameters that can be used when listing credit note line items.

type CreditNoteLineItemListPreviewParams struct {
	ListParams      `form:"*"`
	Amount          *int64                  `form:"amount"`
	CreditAmount    *int64                  `form:"credit_amount"`
	Invoice         *string                 `form:"invoice"`
	Lines           []*CreditNoteLineParams `form:"lines"`
	Memo            *string                 `form:"memo"`
	OutOfBandAmount *int64                  `form:"out_of_band_amount"`
	Reason          *string                 `form:"reason"`
	Refund          *string                 `form:"refund"`
	RefundAmount    *int64                  `form:"refund_amount"`
}

CreditNoteLineItemListPreviewParams is the set of parameters that can be used when previewing a credit note's line items

type CreditNoteLineItemType string

CreditNoteLineItemType is the list of allowed values for the credit note line item's type.

List of values that CreditNoteType can take.

type CreditNoteLineParams struct {
	Amount            *int64    `form:"amount"`
	Description       *string   `form:"description"`
	InvoiceLineItem   *string   `form:"invoice_line_item"`
	Quantity          *int64    `form:"quantity"`
	TaxRates          []*string `form:"tax_rates"`
	UnitAmount        *int64    `form:"unit_amount"`
	UnitAmountDecimal *float64  `form:"unit_amount_decimal,high_precision"`
	Type              *string   `form:"type"`
}

CreditNoteLineParams is the set of parameters that can be used for a line item when creating or previewing a credit note.

CreditNoteList is a list of credit notes as retrieved from a list endpoint.

CreditNoteReason is the reason why a given credit note was created.

List of values that CreditNoteReason can take.

CreditNoteStatus is the list of allowed values for the credit note's status.

List of values that CreditNoteStatus can take.

type CreditNoteTaxAmount struct {
	Amount    int64    `json:"amount"`
	Inclusive bool     `json:"inclusive"`
	TaxRate   *TaxRate `json:"tax_rate"`
}

CreditNoteTaxAmount represent the tax amount applied to a credit note.

CreditNoteType is the list of allowed values for the credit note's type.

List of values that CreditNoteType can take.

type CreditNoteVoidParams struct {
	Params `form:"*"`
}

CreditNoteVoidParams is the set of parameters that can be used when voiding invoices.

Customer is the resource representing a Stripe customer. For more details see https://stripe.com/docs/api#customers.

package main

import (
	"log"

	stripe "github.com/stripe/stripe-go"
	"github.com/stripe/stripe-go/customer"
)

func main() {
	stripe.Key = "sk_key"

	customerDel, err := customer.Del("cus_example_id", nil)

	if err != nil {
		log.Fatal(err)
	}

	if !customerDel.Deleted {
		log.Fatal("Customer doesn't appear deleted while it should be")
	}
}

UnmarshalJSON handles deserialization of a Customer. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

CustomerBalanceTransaction is the resource representing a customer balance transaction. For more details see https://stripe.com/docs/api/customers/customer_balance_transaction_object

UnmarshalJSON handles deserialization of a CustomerBalanceTransaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

CustomerBalanceTransactionList is a list of customer balance transactions as retrieved from a list endpoint.

type CustomerBalanceTransactionType string

CustomerBalanceTransactionType is the list of allowed values for the customer's balance transaction type.

List of values that CustomerBalanceTransactionDuration can take.

type CustomerInvoiceCustomField struct {
	Name  *string `form:"name"`
	Value *string `form:"value"`
}

CustomerInvoiceCustomField represents a custom field associated with the customer's invoices.

type CustomerInvoiceCustomFieldParams struct {
	Name  *string `form:"name"`
	Value *string `form:"value"`
}

CustomerInvoiceCustomFieldParams represents the parameters associated with one custom field on the customer's invoices.

CustomerInvoiceSettings is the structure containing the default settings for invoices associated with this customer.

CustomerInvoiceSettingsParams is the structure containing the default settings for invoices associated with this customer.

CustomerList is a list of customers as retrieved from a list endpoint.

type CustomerShippingDetails struct {
	Address Address `json:"address"`
	Name    string  `json:"name"`
	Phone   string  `json:"phone"`
}

CustomerShippingDetails is the structure containing shipping information.

type CustomerShippingDetailsParams struct {
	Address *AddressParams `form:"address"`
	Name    *string        `form:"name"`
	Phone   *string        `form:"phone"`
}

CustomerShippingDetailsParams is the structure containing shipping information.

CustomerSourceParams are used to manipulate a given Stripe Customer object's payment sources. For more details see https://stripe.com/docs/api#sources

SetSource adds valid sources to a CustomerSourceParams object, returning an error for unsupported sources.

CustomerTaxExempt is the type of tax exemption associated with a customer.

List of values that CustomerTaxExempt can take.

type CustomerTaxIDDataParams struct {
	Type  *string `form:"type"`
	Value *string `form:"value"`
}

CustomerTaxIDDataParams lets you pass the tax id details associated with a Customer.

type DOB struct {
	Day   int64 `json:"day"`
	Month int64 `json:"month"`
	Year  int64 `json:"year"`
}

DOB represents a Person's date of birth.

type DOBParams struct {
	Day   *int64 `form:"day"`
	Month *int64 `form:"month"`
	Year  *int64 `form:"year"`
}

DOBParams represents a DOB during account creation/updates.

type DeauthorizeParams struct {
	Params       `form:"*"`
	ClientID     *string `form:"client_id"`
	StripeUserID *string `form:"stripe_user_id"`
}

DeauthorizeParams for deauthorizing an account.

DeclineCode is the list of reasons provided by card issuers for decline of payment.

const (
	DeclineCodeAuthenticationRequired         DeclineCode = "authentication_required"
	DeclineCodeApproveWithID                  DeclineCode = "approve_with_id"
	DeclineCodeCallIssuer                     DeclineCode = "call_issuer"
	DeclineCodeCardNotSupported               DeclineCode = "card_not_supported"
	DeclineCodeCardVelocityExceeded           DeclineCode = "card_velocity_exceeded"
	DeclineCodeCurrencyNotSupported           DeclineCode = "currency_not_supported"
	DeclineCodeDoNotHonor                     DeclineCode = "do_not_honor"
	DeclineCodeDoNotTryAgain                  DeclineCode = "do_not_try_again"
	DeclineCodeDuplicateTransaction           DeclineCode = "duplicate_transaction"
	DeclineCodeExpiredCard                    DeclineCode = "expired_card"
	DeclineCodeFraudulent                     DeclineCode = "fraudulent"
	DeclineCodeGenericDecline                 DeclineCode = "generic_decline"
	DeclineCodeIncorrectNumber                DeclineCode = "incorrect_number"
	DeclineCodeIncorrectCVC                   DeclineCode = "incorrect_cvc"
	DeclineCodeIncorrectPIN                   DeclineCode = "incorrect_pin"
	DeclineCodeIncorrectZip                   DeclineCode = "incorrect_zip"
	DeclineCodeInsufficientFunds              DeclineCode = "insufficient_funds"
	DeclineCodeInvalidAccount                 DeclineCode = "invalid_account"
	DeclineCodeInvalidAmount                  DeclineCode = "invalid_amount"
	DeclineCodeInvalidCVC                     DeclineCode = "invalid_cvc"
	DeclineCodeInvalidExpiryYear              DeclineCode = "invalid_expiry_year"
	DeclineCodeInvalidNumber                  DeclineCode = "invalid_number"
	DeclineCodeInvalidPIN                     DeclineCode = "invalid_pin"
	DeclineCodeIssuerNotAvailable             DeclineCode = "issuer_not_available"
	DeclineCodeLostCard                       DeclineCode = "lost_card"
	DeclineCodeMerchantBlacklist              DeclineCode = "merchant_blacklist"
	DeclineCodeNewAccountInformationAvailable DeclineCode = "new_account_information_available"
	DeclineCodeNoActionTaken                  DeclineCode = "no_action_taken"
	DeclineCodeNotPermitted                   DeclineCode = "not_permitted"
	DeclineCodePickupCard                     DeclineCode = "pickup_card"
	DeclineCodePINTryExceeded                 DeclineCode = "pin_try_exceeded"
	DeclineCodeProcessingError                DeclineCode = "processing_error"
	DeclineCodeReenterTransaction             DeclineCode = "reenter_transaction"
	DeclineCodeRestrictedCard                 DeclineCode = "restricted_card"
	DeclineCodeRevocationOfAllAuthorizations  DeclineCode = "revocation_of_all_authorizations"
	DeclineCodeRevocationOfAuthorization      DeclineCode = "revocation_of_authorization"
	DeclineCodeSecurityViolation              DeclineCode = "security_violation"
	DeclineCodeServiceNotAllowed              DeclineCode = "service_not_allowed"
	DeclineCodeStolenCard                     DeclineCode = "stolen_card"
	DeclineCodeStopPaymentOrder               DeclineCode = "stop_payment_order"
	DeclineCodeTestModeDecline                DeclineCode = "testmode_decline"
	DeclineCodeTransactionNotAllowed          DeclineCode = "transaction_not_allowed"
	DeclineCodeTryAgainLater                  DeclineCode = "try_again_later"
	DeclineCodeWithdrawalCountLimitExceeded   DeclineCode = "withdrawal_count_limit_exceeded"
)

List of DeclineCode values.

DeliveryEstimate represent the properties available for a shipping method's estimated delivery.

type DestinationParams struct {
	Account *string `form:"account"`
	Amount  *int64  `form:"amount"`
}

DestinationParams describes the parameters available for the destination hash when creating a charge.

type DiscountParams struct {
	Params `form:"*"`
}

DiscountParams is the set of parameters that can be used when deleting a discount.

Dispute is the resource representing a Stripe dispute. For more details see https://stripe.com/docs/api#disputes.

UnmarshalJSON handles deserialization of a Dispute. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type DisputeEvidence struct {
	AccessActivityLog            string `json:"access_activity_log"`
	BillingAddress               string `json:"billing_address"`
	CancellationPolicy           *File  `json:"cancellation_policy"`
	CancellationPolicyDisclosure string `json:"cancellation_policy_disclosure"`
	CancellationRebuttal         string `json:"cancellation_rebuttal"`
	CustomerCommunication        *File  `json:"customer_communication"`
	CustomerEmailAddress         string `json:"customer_email_address"`
	CustomerName                 string `json:"customer_name"`
	CustomerPurchaseIP           string `json:"customer_purchase_ip"`
	CustomerSignature            *File  `json:"customer_signature"`
	DuplicateChargeDocumentation *File  `json:"duplicate_charge_documentation"`
	DuplicateChargeExplanation   string `json:"duplicate_charge_explanation"`
	DuplicateChargeID            string `json:"duplicate_charge_id"`
	ProductDescription           string `json:"product_description"`
	Receipt                      *File  `json:"receipt"`
	RefundPolicy                 *File  `json:"refund_policy"`
	RefundPolicyDisclosure       string `json:"refund_policy_disclosure"`
	RefundRefusalExplanation     string `json:"refund_refusal_explanation"`
	ServiceDate                  string `json:"service_date"`
	ServiceDocumentation         *File  `json:"service_documentation"`
	ShippingAddress              string `json:"shipping_address"`
	ShippingCarrier              string `json:"shipping_carrier"`
	ShippingDate                 string `json:"shipping_date"`
	ShippingDocumentation        *File  `json:"shipping_documentation"`
	ShippingTrackingNumber       string `json:"shipping_tracking_number"`
	UncategorizedFile            *File  `json:"uncategorized_file"`
	UncategorizedText            string `json:"uncategorized_text"`
}

DisputeEvidence is the structure that contains various details about the evidence submitted for the dispute. Almost all fields are strings since there structures (i.e. address) do not typically get parsed by anyone and are thus presented as-received.

type DisputeEvidenceParams struct {
	AccessActivityLog            *string `form:"access_activity_log"`
	BillingAddress               *string `form:"billing_address"`
	CancellationPolicy           *string `form:"cancellation_policy"`
	CancellationPolicyDisclosure *string `form:"cancellation_policy_disclosure"`
	CancellationRebuttal         *string `form:"cancellation_rebuttal"`
	CustomerCommunication        *string `form:"customer_communication"`
	CustomerEmailAddress         *string `form:"customer_email_address"`
	CustomerName                 *string `form:"customer_name"`
	CustomerPurchaseIP           *string `form:"customer_purchase_ip"`
	CustomerSignature            *string `form:"customer_signature"`
	DuplicateChargeDocumentation *string `form:"duplicate_charge_documentation"`
	DuplicateChargeExplanation   *string `form:"duplicate_charge_explanation"`
	DuplicateChargeID            *string `form:"duplicate_charge_id"`
	ProductDescription           *string `form:"product_description"`
	Receipt                      *string `form:"receipt"`
	RefundPolicy                 *string `form:"refund_policy"`
	RefundPolicyDisclosure       *string `form:"refund_policy_disclosure"`
	RefundRefusalExplanation     *string `form:"refund_refusal_explanation"`
	ServiceDate                  *string `form:"service_date"`
	ServiceDocumentation         *string `form:"service_documentation"`
	ShippingAddress              *string `form:"shipping_address"`
	ShippingCarrier              *string `form:"shipping_carrier"`
	ShippingDate                 *string `form:"shipping_date"`
	ShippingDocumentation        *string `form:"shipping_documentation"`
	ShippingTrackingNumber       *string `form:"shipping_tracking_number"`
	UncategorizedFile            *string `form:"uncategorized_file"`
	UncategorizedText            *string `form:"uncategorized_text"`
}

DisputeEvidenceParams is the set of parameters that can be used when submitting evidence for disputes.

DisputeList is a list of disputes as retrieved from a list endpoint.

DisputeReason is the list of allowed values for a discount's reason.

List of values that DisputeReason can take.

DisputeStatus is the list of allowed values for a discount's status.

List of values that DisputeStatus can take.

type EphemeralKey struct {
	AssociatedObjects []struct {
		ID   string `json:"id"`
		Type string `json:"type"`
	} `json:"associated_objects"`

	Created  int64  `json:"created"`
	Expires  int64  `json:"expires"`
	ID       string `json:"id"`
	Livemode bool   `json:"livemode"`

	
	
	
	
	
	
	RawJSON []byte `json:"-"`
}

EphemeralKey is the resource representing a Stripe ephemeral key. This is used by Mobile SDKs to for example manage a Customer's payment methods.

UnmarshalJSON handles deserialization of an EphemeralKey. This custom unmarshaling is needed because we need to store the raw JSON on the object so it may be passed back to the frontend.

type EphemeralKeyParams struct {
	Params        `form:"*"`
	Customer      *string `form:"customer"`
	IssuingCard   *string `form:"issuing_card"`
	StripeVersion *string `form:"-"` 
}

EphemeralKeyParams is the set of parameters that can be used when creating an ephemeral key.

type Error struct {
	ChargeID    string      `json:"charge,omitempty"`
	Code        ErrorCode   `json:"code,omitempty"`
	DeclineCode DeclineCode `json:"decline_code,omitempty"`
	DocURL      string      `json:"doc_url,omitempty"`

	
	
	
	
	Err error `json:"-"`

	HTTPStatusCode int            `json:"status,omitempty"`
	Msg            string         `json:"message"`
	Param          string         `json:"param,omitempty"`
	PaymentIntent  *PaymentIntent `json:"payment_intent,omitempty"`
	PaymentMethod  *PaymentMethod `json:"payment_method,omitempty"`
	RequestID      string         `json:"request_id,omitempty"`
	SetupIntent    *SetupIntent   `json:"setup_intent,omitempty"`
	Source         *PaymentSource `json:"source,omitempty"`
	Type           ErrorType      `json:"type"`

	
	OAuthError            string `json:"error,omitempty"`
	OAuthErrorDescription string `json:"error_description,omitempty"`
}

Error is the response returned when a call is unsuccessful. For more details see https://stripe.com/docs/api#errors.

Error serializes the error object to JSON and returns it as a string.

ErrorCode is the list of allowed values for the error's code.

const (
	ErrorCodeAccountAlreadyExists                   ErrorCode = "account_already_exists"
	ErrorCodeAccountCountryInvalidAddress           ErrorCode = "account_country_invalid_address"
	ErrorCodeAccountInvalid                         ErrorCode = "account_invalid"
	ErrorCodeAccountNumberInvalid                   ErrorCode = "account_number_invalid"
	ErrorCodeAlipayUpgradeRequired                  ErrorCode = "alipay_upgrade_required"
	ErrorCodeAmountTooLarge                         ErrorCode = "amount_too_large"
	ErrorCodeAmountTooSmall                         ErrorCode = "amount_too_small"
	ErrorCodeAPIKeyExpired                          ErrorCode = "api_key_expired"
	ErrorCodeAuthenticationRequired                 ErrorCode = "authentication_required"
	ErrorCodeBalanceInsufficient                    ErrorCode = "balance_insufficient"
	ErrorCodeBankAccountExists                      ErrorCode = "bank_account_exists"
	ErrorCodeBankAccountUnusable                    ErrorCode = "bank_account_unusable"
	ErrorCodeBankAccountUnverified                  ErrorCode = "bank_account_unverified"
	ErrorCodeBitcoinUpgradeRequired                 ErrorCode = "bitcoin_upgrade_required"
	ErrorCodeCardDeclined                           ErrorCode = "card_declined"
	ErrorCodeChargeAlreadyCaptured                  ErrorCode = "charge_already_captured"
	ErrorCodeChargeAlreadyRefunded                  ErrorCode = "charge_already_refunded"
	ErrorCodeChargeDisputed                         ErrorCode = "charge_disputed"
	ErrorCodeChargeExceedsSourceLimit               ErrorCode = "charge_exceeds_source_limit"
	ErrorCodeChargeExpiredForCapture                ErrorCode = "charge_expired_for_capture"
	ErrorCodeCountryUnsupported                     ErrorCode = "country_unsupported"
	ErrorCodeCouponExpired                          ErrorCode = "coupon_expired"
	ErrorCodeCustomerMaxSubscriptions               ErrorCode = "customer_max_subscriptions"
	ErrorCodeEmailInvalid                           ErrorCode = "email_invalid"
	ErrorCodeExpiredCard                            ErrorCode = "expired_card"
	ErrorCodeIdempotencyKeyInUse                    ErrorCode = "idempotency_key_in_use"
	ErrorCodeIncorrectAddress                       ErrorCode = "incorrect_address"
	ErrorCodeIncorrectCVC                           ErrorCode = "incorrect_cvc"
	ErrorCodeIncorrectNumber                        ErrorCode = "incorrect_number"
	ErrorCodeIncorrectZip                           ErrorCode = "incorrect_zip"
	ErrorCodeInstantPayoutsUnsupported              ErrorCode = "instant_payouts_unsupported"
	ErrorCodeInvalidCardType                        ErrorCode = "invalid_card_type"
	ErrorCodeInvalidChargeAmount                    ErrorCode = "invalid_charge_amount"
	ErrorCodeInvalidCVC                             ErrorCode = "invalid_cvc"
	ErrorCodeInvalidExpiryMonth                     ErrorCode = "invalid_expiry_month"
	ErrorCodeInvalidExpiryYear                      ErrorCode = "invalid_expiry_year"
	ErrorCodeInvalidNumber                          ErrorCode = "invalid_number"
	ErrorCodeInvalidSourceUsage                     ErrorCode = "invalid_source_usage"
	ErrorCodeInvoiceNoCustomerLineItems             ErrorCode = "invoice_no_customer_line_items"
	ErrorCodeInvoiceNoSubscriptionLineItems         ErrorCode = "invoice_no_subscription_line_items"
	ErrorCodeInvoiceNotEditable                     ErrorCode = "invoice_not_editable"
	ErrorCodeInvoiceUpcomingNone                    ErrorCode = "invoice_upcoming_none"
	ErrorCodeLivemodeMismatch                       ErrorCode = "livemode_mismatch"
	ErrorCodeLockTimeout                            ErrorCode = "lock_timeout"
	ErrorCodeMissing                                ErrorCode = "missing"
	ErrorCodeNotAllowedOnStandardAccount            ErrorCode = "not_allowed_on_standard_account"
	ErrorCodeOrderCreationFailed                    ErrorCode = "order_creation_failed"
	ErrorCodeOrderRequiredSettings                  ErrorCode = "order_required_settings"
	ErrorCodeOrderStatusInvalid                     ErrorCode = "order_status_invalid"
	ErrorCodeOrderUpstreamTimeout                   ErrorCode = "order_upstream_timeout"
	ErrorCodeOutOfInventory                         ErrorCode = "out_of_inventory"
	ErrorCodeParameterInvalidEmpty                  ErrorCode = "parameter_invalid_empty"
	ErrorCodeParameterInvalidInteger                ErrorCode = "parameter_invalid_integer"
	ErrorCodeParameterInvalidStringBlank            ErrorCode = "parameter_invalid_string_blank"
	ErrorCodeParameterInvalidStringEmpty            ErrorCode = "parameter_invalid_string_empty"
	ErrorCodeParameterMissing                       ErrorCode = "parameter_missing"
	ErrorCodeParameterUnknown                       ErrorCode = "parameter_unknown"
	ErrorCodeParametersExclusive                    ErrorCode = "parameters_exclusive"
	ErrorCodePaymentIntentAuthenticationFailure     ErrorCode = "payment_intent_authentication_failure"
	ErrorCodePaymentIntentIncompatiblePaymentMethod ErrorCode = "payment_intent_incompatible_payment_method"
	ErrorCodePaymentIntentInvalidParameter          ErrorCode = "payment_intent_invalid_parameter"
	ErrorCodePaymentIntentPaymentAttemptFailed      ErrorCode = "payment_intent_payment_attempt_failed"
	ErrorCodePaymentIntentUnexpectedState           ErrorCode = "payment_intent_unexpected_state"
	ErrorCodePaymentMethodUnactivated               ErrorCode = "payment_method_unactivated"
	ErrorCodePaymentMethodUnexpectedState           ErrorCode = "payment_method_unexpected_state"
	ErrorCodePayoutsNotAllowed                      ErrorCode = "payouts_not_allowed"
	ErrorCodePlatformAPIKeyExpired                  ErrorCode = "platform_api_key_expired"
	ErrorCodePostalCodeInvalid                      ErrorCode = "postal_code_invalid"
	ErrorCodeProcessingError                        ErrorCode = "processing_error"
	ErrorCodeProductInactive                        ErrorCode = "product_inactive"
	ErrorCodeRateLimit                              ErrorCode = "rate_limit"
	ErrorCodeResourceAlreadyExists                  ErrorCode = "resource_already_exists"
	ErrorCodeResourceMissing                        ErrorCode = "resource_missing"
	ErrorCodeRoutingNumberInvalid                   ErrorCode = "routing_number_invalid"
	ErrorCodeSecretKeyRequired                      ErrorCode = "secret_key_required"
	ErrorCodeSepaUnsupportedAccount                 ErrorCode = "sepa_unsupported_account"
	ErrorCodeSetupAttemptFailed                     ErrorCode = "setup_attempt_failed"
	ErrorCodeSetupIntentAuthenticationFailure       ErrorCode = "setup_intent_authentication_failure"
	ErrorCodeSetupIntentUnexpectedState             ErrorCode = "setup_intent_unexpected_state"
	ErrorCodeShippingCalculationFailed              ErrorCode = "shipping_calculation_failed"
	ErrorCodeSkuInactive                            ErrorCode = "sku_inactive"
	ErrorCodeStateUnsupported                       ErrorCode = "state_unsupported"
	ErrorCodeTaxIDInvalid                           ErrorCode = "tax_id_invalid"
	ErrorCodeTaxesCalculationFailed                 ErrorCode = "taxes_calculation_failed"
	ErrorCodeTestmodeChargesOnly                    ErrorCode = "testmode_charges_only"
	ErrorCodeTLSVersionUnsupported                  ErrorCode = "tls_version_unsupported"
	ErrorCodeTokenAlreadyUsed                       ErrorCode = "token_already_used"
	ErrorCodeTokenInUse                             ErrorCode = "token_in_use"
	ErrorCodeTransfersNotAllowed                    ErrorCode = "transfers_not_allowed"
	ErrorCodeUpstreamOrderCreationFailed            ErrorCode = "upstream_order_creation_failed"
	ErrorCodeURLInvalid                             ErrorCode = "url_invalid"

	
	ErrorCodeInvalidSwipeData ErrorCode = "invalid_swipe_data"
)

List of values that ErrorCode can take.

ErrorType is the list of allowed values for the error's type.

const (
	ErrorTypeAPI            ErrorType = "api_error"
	ErrorTypeAPIConnection  ErrorType = "api_connection_error"
	ErrorTypeAuthentication ErrorType = "authentication_error"
	ErrorTypeCard           ErrorType = "card_error"
	ErrorTypeInvalidRequest ErrorType = "invalid_request_error"
	ErrorTypePermission     ErrorType = "more_permissions_required"
	ErrorTypeRateLimit      ErrorType = "rate_limit_error"
)

List of values that ErrorType can take.

type Event struct {
	Account         string        `json:"account"`
	Created         int64         `json:"created"`
	Data            *EventData    `json:"data"`
	ID              string        `json:"id"`
	Livemode        bool          `json:"livemode"`
	PendingWebhooks int64         `json:"pending_webhooks"`
	Request         *EventRequest `json:"request"`
	Type            string        `json:"type"`
}

Event is the resource representing a Stripe event. For more details see https://stripe.com/docs/api#events.

GetObjectValue returns the value from the e.Data.Object bag based on the keys hierarchy.

GetPreviousValue returns the value from the e.Data.Prev bag based on the keys hierarchy.

type EventData struct {
	
	
	
	Object             map[string]interface{} `json:"-"`
	PreviousAttributes map[string]interface{} `json:"previous_attributes"`
	Raw                json.RawMessage        `json:"object"`
}

EventData is the unmarshalled object as a map.

UnmarshalJSON handles deserialization of the EventData. This custom unmarshaling exists so that we can keep both the map and raw data.

EventList is a list of events as retrieved from a list endpoint.

type EventRequest struct {
	
	
	ID string `json:"id"`

	
	
	
	IdempotencyKey string `json:"idempotency_key"`
}

EventRequest contains information on a request that created an event.

type EvidenceDetails struct {
	DueBy           int64 `json:"due_by"`
	HasEvidence     bool  `json:"has_evidence"`
	PastDue         bool  `json:"past_due"`
	SubmissionCount int64 `json:"submission_count"`
}

EvidenceDetails is the structure representing more details about the dispute.

ExchangeRate is the resource representing the currency exchange rates at a given time.

ExchangeRateList is a list of exchange rates as retrieved from a list endpoint.

type ExchangeRateListParams struct {
	ListParams `form:"*"`
}

ExchangeRateListParams are the parameters allowed during ExchangeRate listing.

type ExchangeRateParams struct {
	Params `form:"*"`
}

ExchangeRateParams is the set of parameters that can be used when retrieving exchange rates.

ExternalAccount is an external account (a bank account or card) that's attached to an account. It contains fields that will be conditionally populated depending on its type.

UnmarshalJSON implements Unmarshaler.UnmarshalJSON.

ExternalAccountList is a list of external accounts that may be either bank accounts or cards.

type ExternalAccountType string

ExternalAccountType is the type of an external account.

List of values that ExternalAccountType can take.

type ExtraValues struct {
}

ExtraValues are extra parameters that are attached to an API request. They're implemented as a custom type so that they can have their own AppendTo implementation.

AppendTo implements custom form encoding for extra parameter values.

FeeRefund is the resource representing a Stripe application fee refund. For more details see https://stripe.com/docs/api#fee_refunds.

UnmarshalJSON handles deserialization of a FeeRefund. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

FeeRefundList is a list object for application fee refunds.

File is the resource representing a Stripe file. For more details see https://stripe.com/docs/api#file_object.

UnmarshalJSON handles deserialization of a File. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type FileFileLinkDataParams struct {
	Params    `form:"*"`
	Create    *bool  `form:"create"`
	ExpiresAt *int64 `form:"expires_at"`
}

FileFileLinkDataParams is the set of parameters allowed for the file_link_data hash.

type FileLink struct {
	Created   int64             `json:"created"`
	Expired   bool              `json:"expired"`
	ExpiresAt int64             `json:"expires_at"`
	File      *File             `json:"file"`
	ID        string            `json:"id"`
	Livemode  bool              `json:"livemode"`
	Metadata  map[string]string `json:"metadata"`
	Object    string            `json:"object"`
	URL       string            `json:"url"`
}

FileLink is the resource representing a Stripe file link. For more details see https://stripe.com/docs/api#file_links.

UnmarshalJSON handles deserialization of a file link. This custom unmarshaling is needed because the resulting property may be an ID or the full struct if it was expanded.

FileLinkList is a list of file links as retrieved from a list endpoint.

FileLinkListParams is the set of parameters that can be used when listing file links.

type FileLinkParams struct {
	Params    `form:"*"`
	ExpiresAt *int64  `form:"expires_at"`
	File      *string `form:"file"`
}

FileLinkParams is the set of parameters that can be used when creating or updating a file link.

type FileList struct {
	ListMeta
	Data []*File `json:"data"`
}

FileList is a list of files as retrieved from a list endpoint.

FileParams is the set of parameters that can be used when creating a file. For more details see https://stripe.com/docs/api#create_file.

func (*FileParams) GetBody

GetBody gets an appropriate multipart form payload to use in a request body to create a new file.

FilePurpose is the purpose of a particular file.

const (
	FilePurposeAdditionalVerification FilePurpose = "additional_verification"
	FilePurposeBusinessIcon           FilePurpose = "business_icon"
	FilePurposeBusinessLogo           FilePurpose = "business_logo"
	FilePurposeCustomerSignature      FilePurpose = "customer_signature"
	FilePurposeDisputeEvidence        FilePurpose = "dispute_evidence"
	FilePurposeFinanceReportRun       FilePurpose = "finance_report_run"
	FilePurposeIdentityDocument       FilePurpose = "identity_document"
	FilePurposePCIDocument            FilePurpose = "pci_document"
	FilePurposeSigmaScheduledQuery    FilePurpose = "sigma_scheduled_query"
	FilePurposeTaxDocumentUserUpload  FilePurpose = "tax_document_user_upload"
)

List of values that FilePurpose can take.

Filters is a structure that contains a collection of filters for list-related APIs.

AddFilter adds a new filter with a given key, op and value.

AppendTo implements custom form encoding for filters.

FraudDetails is the structure detailing fraud status.

type FraudDetailsParams struct {
	UserReport *string `form:"user_report"`
}

FraudDetailsParams provides information on the fraud details for a charge.

type IdentityVerificationStatus string

IdentityVerificationStatus describes the different statuses for identity verification.

List of values that IdentityVerificationStatus can take.

type InvalidRequestError struct {
	
}

InvalidRequestError is an error that occurs when a request contains invalid parameters.

Error serializes the error object to JSON and returns it as a string.

Inventory represents the inventory options of a SKU.

type InventoryParams struct {
	Quantity *int64  `form:"quantity"`
	Type     *string `form:"type"`
	Value    *string `form:"value"`
}

InventoryParams is the set of parameters allowed as inventory on a SKU.

type Invoice struct {
	AccountCountry               string                   `json:"account_country"`
	AccountName                  string                   `json:"account_name"`
	AmountDue                    int64                    `json:"amount_due"`
	AmountPaid                   int64                    `json:"amount_paid"`
	AmountRemaining              int64                    `json:"amount_remaining"`
	ApplicationFeeAmount         int64                    `json:"application_fee_amount"`
	AttemptCount                 int64                    `json:"attempt_count"`
	Attempted                    bool                     `json:"attempted"`
	AutoAdvance                  bool                     `json:"auto_advance"`
	BillingReason                InvoiceBillingReason     `json:"billing_reason"`
	Charge                       *Charge                  `json:"charge"`
	CollectionMethod             *InvoiceCollectionMethod `json:"collection_method"`
	Created                      int64                    `json:"created"`
	Currency                     Currency                 `json:"currency"`
	CustomFields                 []*InvoiceCustomField    `json:"custom_fields"`
	Customer                     *Customer                `json:"customer"`
	CustomerAddress              *Address                 `json:"customer_address"`
	CustomerEmail                string                   `json:"customer_email"`
	CustomerName                 *string                  `json:"customer_name"`
	CustomerPhone                *string                  `json:"customer_phone"`
	CustomerShipping             *CustomerShippingDetails `json:"customer_shipping"`
	CustomerTaxExempt            CustomerTaxExempt        `json:"customer_tax_exempt"`
	CustomerTaxIDs               []*InvoiceCustomerTaxID  `json:"customer_tax_ids"`
	DefaultPaymentMethod         *PaymentMethod           `json:"default_payment_method"`
	DefaultSource                *PaymentSource           `json:"default_source"`
	DefaultTaxRates              []*TaxRate               `json:"default_tax_rates"`
	Description                  string                   `json:"description"`
	Discount                     *Discount                `json:"discount"`
	DueDate                      int64                    `json:"due_date"`
	EndingBalance                int64                    `json:"ending_balance"`
	HostedInvoiceURL             string                   `json:"hosted_invoice_url"`
	ID                           string                   `json:"id"`
	InvoicePDF                   string                   `json:"invoice_pdf"`
	Lines                        *InvoiceLineList         `json:"lines"`
	Livemode                     bool                     `json:"livemode"`
	Metadata                     map[string]string        `json:"metadata"`
	NextPaymentAttempt           int64                    `json:"next_payment_attempt"`
	Number                       string                   `json:"number"`
	Paid                         bool                     `json:"paid"`
	PaymentIntent                *PaymentIntent           `json:"payment_intent"`
	PeriodEnd                    int64                    `json:"period_end"`
	PeriodStart                  int64                    `json:"period_start"`
	PostPaymentCreditNotesAmount int64                    `json:"post_payment_credit_notes_amount"`
	PrePaymentCreditNotesAmount  int64                    `json:"pre_payment_credit_notes_amount"`
	ReceiptNumber                string                   `json:"receipt_number"`
	StartingBalance              int64                    `json:"starting_balance"`
	StatementDescriptor          string                   `json:"statement_descriptor"`
	Status                       InvoiceStatus            `json:"status"`
	StatusTransitions            InvoiceStatusTransitions `json:"status_transitions"`
	Subscription                 *Subscription            `json:"subscription"`
	SubscriptionProrationDate    int64                    `json:"subscription_proration_date"`
	Subtotal                     int64                    `json:"subtotal"`
	Tax                          int64                    `json:"tax"`
	ThreasholdReason             *InvoiceThresholdReason  `json:"threshold_reason"`
	Total                        int64                    `json:"total"`
	TotalTaxAmounts              []*InvoiceTaxAmount      `json:"total_tax_amounts"`
	TransferData                 *InvoiceTransferData     `json:"transfer_data"`
	WebhooksDeliveredAt          int64                    `json:"webhooks_delivered_at"`

	
	TaxPercent float64 `json:"tax_percent"`
}

Invoice is the resource representing a Stripe invoice. For more details see https://stripe.com/docs/api#invoice_object.

package main

import (
	"log"

	stripe "github.com/stripe/stripe-go"
	"github.com/stripe/stripe-go/invoice"
)

func main() {
	stripe.Key = "sk_key"

	params := &stripe.InvoiceParams{
		Description: stripe.String("updated description"),
	}

	inv, err := invoice.Update("sub_example_id", params)

	if err != nil {
		log.Fatal(err)
	}

	log.Printf("%v\n", inv.Description)
}

UnmarshalJSON handles deserialization of an Invoice. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type InvoiceBillingReason string

InvoiceBillingReason is the reason why a given invoice was created

List of values that InvoiceBillingReason can take.

type InvoiceCollectionMethod string

InvoiceCollectionMethod is the type of collection method for this invoice.

List of values that InvoiceCollectionMethod can take.

type InvoiceCustomField struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

InvoiceCustomField is a structure representing a custom field on an invoice.

type InvoiceCustomFieldParams struct {
	Name  *string `form:"name"`
	Value *string `form:"value"`
}

InvoiceCustomFieldParams represents the parameters associated with one custom field on an invoice.

type InvoiceCustomerTaxID struct {
	Type  TaxIDType `json:"type"`
	Value string    `json:"value"`
}

InvoiceCustomerTaxID is a structure representing a customer tax id on an invoice.

type InvoiceFinalizeParams struct {
	Params      `form:"*"`
	AutoAdvance *bool `form:"auto_advance"`
}

InvoiceFinalizeParams is the set of parameters that can be used when finalizing invoices.

type InvoiceItem struct {
	Amount            int64             `json:"amount"`
	Currency          Currency          `json:"currency"`
	Customer          *Customer         `json:"customer"`
	Date              int64             `json:"date"`
	Deleted           bool              `json:"deleted"`
	Description       string            `json:"description"`
	Discountable      bool              `json:"discountable"`
	ID                string            `json:"id"`
	Invoice           *Invoice          `json:"invoice"`
	Livemode          bool              `json:"livemode"`
	Metadata          map[string]string `json:"metadata"`
	Period            *Period           `json:"period"`
	Plan              *Plan             `json:"plan"`
	Proration         bool              `json:"proration"`
	Quantity          int64             `json:"quantity"`
	Subscription      *Subscription     `json:"subscription"`
	TaxRates          []*TaxRate        `json:"tax_rates"`
	UnitAmount        int64             `json:"unit_amount"`
	UnitAmountDecimal float64           `json:"unit_amount_decimal,string"`
}

InvoiceItem is the resource represneting a Stripe invoice item. For more details see https://stripe.com/docs/api#invoiceitems.

UnmarshalJSON handles deserialization of an InvoiceItem. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

InvoiceItemList is a list of invoice items as retrieved from a list endpoint.

type InvoiceItemPeriodParams struct {
	End   *int64 `form:"end"`
	Start *int64 `form:"start"`
}

InvoiceItemPeriodParams represents the period associated with that invoice item.

InvoiceLineList is a list object for invoice line items.

InvoiceLineType is the list of allowed values for the invoice line's type.

List of values that InvoiceLineType can take.

InvoiceList is a list of invoices as retrieved from a list endpoint.

type InvoiceMarkUncollectibleParams struct {
	Params `form:"*"`
}

InvoiceMarkUncollectibleParams is the set of parameters that can be used when marking invoices as uncollectible.

type InvoiceParams struct {
	Params               `form:"*"`
	AutoAdvance          *bool                       `form:"auto_advance"`
	ApplicationFeeAmount *int64                      `form:"application_fee_amount"`
	CollectionMethod     *string                     `form:"collection_method"`
	CustomFields         []*InvoiceCustomFieldParams `form:"custom_fields"`
	Customer             *string                     `form:"customer"`
	DaysUntilDue         *int64                      `form:"days_until_due"`
	DefaultPaymentMethod *string                     `form:"default_payment_method"`
	DefaultSource        *string                     `form:"default_source"`
	DefaultTaxRates      []*string                   `form:"default_tax_rates"`
	Description          *string                     `form:"description"`
	DueDate              *int64                      `form:"due_date"`
	Paid                 *bool                       `form:"paid"`
	StatementDescriptor  *string                     `form:"statement_descriptor"`
	Subscription         *string                     `form:"subscription"`
	TransferData         *InvoiceTransferDataParams  `form:"transfer_data"`

	Coupon                                  *string                             `form:"coupon"`
	InvoiceItems                            []*InvoiceUpcomingInvoiceItemParams `form:"invoice_items"`
	SubscriptionBillingCycleAnchor          *int64                              `form:"subscription_billing_cycle_anchor"`
	SubscriptionBillingCycleAnchorNow       *bool                               `form:"-"` 
	SubscriptionBillingCycleAnchorUnchanged *bool                               `form:"-"` 
	SubscriptionCancelAt                    *int64                              `form:"subscription_cancel_at"`
	SubscriptionCancelAtPeriodEnd           *bool                               `form:"subscription_cancel_at_period_end"`
	SubscriptionCancelNow                   *bool                               `form:"subscription_cancel_now"`
	SubscriptionDefaultTaxRates             []*string                           `form:"subscription_default_tax_rates"`
	SubscriptionItems                       []*SubscriptionItemsParams          `form:"subscription_items"`
	SubscriptionPlan                        *string                             `form:"subscription_plan"`
	SubscriptionProrate                     *bool                               `form:"subscription_prorate"`
	SubscriptionProrationBehavior           *string                             `form:"subscription_proration_behavior"`
	SubscriptionProrationDate               *int64                              `form:"subscription_proration_date"`
	SubscriptionQuantity                    *int64                              `form:"subscription_quantity"`
	SubscriptionTrialEnd                    *int64                              `form:"subscription_trial_end"`
	SubscriptionTrialFromPlan               *bool                               `form:"subscription_trial_from_plan"`

	
	TaxPercent *float64 `form:"tax_percent"`

	
	SubscriptionTaxPercent *float64 `form:"subscription_tax_percent"`
}

InvoiceParams is the set of parameters that can be used when creating or updating an invoice. For more details see https://stripe.com/docs/api#create_invoice, https://stripe.com/docs/api#update_invoice.

AppendTo implements custom encoding logic for InvoiceParams so that the special "now" value for subscription_billing_cycle_anchor can be implemented (they're otherwise timestamps rather than strings).

type InvoicePayParams struct {
	Params        `form:"*"`
	Forgive       *bool   `form:"forgive"`
	OffSession    *bool   `form:"off_session"`
	PaidOutOfBand *bool   `form:"paid_out_of_band"`
	PaymentMethod *string `form:"payment_method"`
	Source        *string `form:"source"`
}

InvoicePayParams is the set of parameters that can be used when paying invoices. For more details, see: https://stripe.com/docs/api#pay_invoice.

type InvoiceSendParams struct {
	Params `form:"*"`
}

InvoiceSendParams is the set of parameters that can be used when sending invoices.

InvoiceStatus is the reason why a given invoice was created

List of values that InvoiceStatus can take.

type InvoiceStatusTransitions struct {
	FinalizedAt           int64 `json:"finalized_at"`
	MarkedUncollectibleAt int64 `json:"marked_uncollectible_at"`
	PaidAt                int64 `json:"paid_at"`
	VoidedAt              int64 `json:"voided_at"`
}

InvoiceStatusTransitions are the timestamps at which the invoice status was updated.

type InvoiceTaxAmount struct {
	Amount    int64    `json:"amount"`
	Inclusive bool     `json:"inclusive"`
	TaxRate   *TaxRate `json:"tax_rate"`
}

InvoiceTaxAmount is a structure representing one of the tax amounts on an invoice.

InvoiceThresholdReason is a structure representing a reason for a billing threshold.

type InvoiceThresholdReasonItemReason struct {
	LineItemIDs []string `json:"line_item_ids"`
	UsageGTE    int64    `json:"usage_gte"`
}

InvoiceThresholdReasonItemReason is a structure representing the line items that triggered an invoice.

type InvoiceTransferData struct {
	Destination *Account `json:"destination"`
}

InvoiceTransferData represents the information for the transfer_data associated with an invoice.

type InvoiceTransferDataParams struct {
	Destination *string `form:"destination"`
}

InvoiceTransferDataParams is the set of parameters allowed for the transfer_data hash.

type InvoiceUpcomingInvoiceItemPeriodParams struct {
	End   *int64 `form:"end"`
	Start *int64 `form:"start"`
}

InvoiceUpcomingInvoiceItemPeriodParams represents the period associated with that invoice item

type InvoiceVoidParams struct {
	Params `form:"*"`
}

InvoiceVoidParams is the set of parameters that can be used when voiding invoices.

IssuingAuthorization is the resource representing a Stripe issuing authorization.

UnmarshalJSON handles deserialization of an IssuingAuthorization. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type IssuingAuthorizationAuthorizationControls struct {
	AllowedCategories []string `json:"allowed_categories"`
	BlockedCategories []string `json:"blocked_categories"`
	Currency          Currency `json:"currency"`
	MaxAmount         int64    `json:"max_amount"`
	MaxApprovals      int64    `json:"max_approvals"`
}

IssuingAuthorizationAuthorizationControls is the resource representing authorization controls on an issuing authorization. This is deprecated and will be removed in the next major version

type IssuingAuthorizationAuthorizationMethod string

IssuingAuthorizationAuthorizationMethod is the list of possible values for the authorization method on an issuing authorization.

List of values that IssuingAuthorizationAuthorizationMethod can take.

IssuingAuthorizationControlsSpendingLimits is the resource representing spending limits associated with a card or cardholder.

type IssuingAuthorizationControlsSpendingLimitsParams struct {
	Amount     *int64    `form:"amount"`
	Categories []*string `form:"categories"`
	Interval   *string   `form:"interval"`
}

IssuingAuthorizationControlsSpendingLimitsParams is the set of parameters that can be used for the spending limits associated with a given issuing card or cardholder. This is deprecated and will be removed in the next major version.

IssuingAuthorizationList is a list of issuing authorizations as retrieved from a list endpoint.

type IssuingAuthorizationListParams struct {
	ListParams   `form:"*"`
	Card         *string           `form:"card"`
	Cardholder   *string           `form:"cardholder"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	Status       *string           `form:"status"`
}

IssuingAuthorizationListParams is the set of parameters that can be used when listing issuing authorizations.

type IssuingAuthorizationParams struct {
	Params `form:"*"`
	Amount *int64 `form:"amount"`

	
	
	HeldAmount *int64 `form:"held_amount"`
}

IssuingAuthorizationParams is the set of parameters that can be used when updating an issuing authorization.

type IssuingAuthorizationPendingRequest struct {
	Amount               int64    `json:"amount"`
	Currency             Currency `json:"currency"`
	IsAmountControllable bool     `json:"is_amount_controllable"`
	MerchantAmount       int64    `json:"merchant_amount"`
	MerchantCurrency     Currency `json:"merchant_currency"`
}

IssuingAuthorizationPendingRequest is the resource representing details about the pending authorization request.

IssuingAuthorizationRequestHistory is the resource representing a request history on an issuing authorization.

type IssuingAuthorizationRequestHistoryReason string

IssuingAuthorizationRequestHistoryReason is the list of possible values for the request history reason on an issuing authorization.

List of values that IssuingAuthorizationRequestHistoryReason can take.

IssuingAuthorizationRequestHistoryViolatedAuthorizationControl is the resource representing an authorizaton control that caused the authorization to fail. This is deprecated and will be removed in the next major version

type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity string

IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity is the list of possible values for the entity that owns the authorization control.

List of values that IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity can take.

type IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName string

IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName is the list of possible values for the name associated with the authorization control.

List of values that IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName can take.

type IssuingAuthorizationStatus string

IssuingAuthorizationStatus is the possible values for status for an issuing authorization.

List of values that IssuingAuthorizationStatus can take.

IssuingAuthorizationVerificationData is the resource representing verification data on an issuing authorization.

type IssuingAuthorizationVerificationDataAuthentication string

IssuingAuthorizationVerificationDataAuthentication is the list of possible values for the result of an authentication on an issuing authorization.

List of values that IssuingAuthorizationVerificationDataCheck can take.

type IssuingAuthorizationVerificationDataCheck string

IssuingAuthorizationVerificationDataCheck is the list of possible values for result of a check for verification data on an issuing authorization.

List of values that IssuingAuthorizationVerificationDataCheck can take.

IssuingAuthorizationVerificationDataThreeDSecure is the resource representing 3DS results.

type IssuingAuthorizationVerificationDataThreeDSecureResult string

IssuingAuthorizationVerificationDataThreeDSecureResult is the list of possible values for result of 3DS.

List of values that IssuingAuthorizationVerificationDataThreeDSecureResult can take.

type IssuingAuthorizationWalletProviderType string

IssuingAuthorizationWalletProviderType is the list of possible values for the authorization's wallet provider. TODO remove in the next major version

List of values that IssuingAuthorizationWalletProviderType can take.

type IssuingAuthorizationWalletType string

IssuingAuthorizationWalletType is the list of possible values for the authorization's wallet provider.

List of values that IssuingAuthorizationWalletType can take.

type IssuingBilling struct {
	Address *Address `json:"address"`

	
	Name string `json:"name"`
}

IssuingBilling is the resource representing the billing hash with the Issuing APIs.

type IssuingBillingParams struct {
	Address *AddressParams `form:"address"`

	
	Name *string `form:"name"`
}

IssuingBillingParams is the set of parameters that can be used for billing with the Issuing APIs.

IssuingCard is the resource representing a Stripe issuing card.

UnmarshalJSON handles deserialization of an IssuingCard. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type IssuingCardAuthorizationControls struct {
	AllowedCategories      []string                                      `json:"allowed_categories"`
	BlockedCategories      []string                                      `json:"blocked_categories"`
	MaxApprovals           int64                                         `json:"max_approvals"`
	SpendingLimits         []*IssuingAuthorizationControlsSpendingLimits `json:"spending_limits"`
	SpendingLimitsCurrency Currency                                      `json:"spending_limits_currency"`

	
	
	Currency  Currency `json:"currency"`
	MaxAmount int64    `json:"max_amount"`
}

IssuingCardAuthorizationControls is the resource representing authorization controls on an issuing card. TODO: Add the Cardholder version to "un-share" between Card and Cardholder in the next major version.

type IssuingCardCancellationReason string

IssuingCardCancellationReason is the list of possible values for the cancellation reason on an issuing card.

List of values that IssuingCardReplacementReason can take.

type IssuingCardDetails struct {
	Card     *IssuingCard `json:"card"`
	CVC      string       `json:"cvc"`
	ExpMonth *string      `form:"exp_month"`
	ExpYear  *string      `form:"exp_year"`
	Number   string       `json:"number"`
	Object   string       `json:"object"`
}

IssuingCardDetails is the resource representing issuing card details.

IssuingCardList is a list of issuing cards as retrieved from a list endpoint.

type IssuingCardListParams struct {
	ListParams   `form:"*"`
	Cardholder   *string           `form:"cardholder"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	ExpMonth     *int64            `form:"exp_month"`
	ExpYear      *int64            `form:"exp_year"`
	Last4        *string           `form:"last4"`
	Status       *string           `form:"status"`
	Type         *string           `form:"type"`

	
	Name   *string `form:"name"`
	Source *string `form:"source"`
}

IssuingCardListParams is the set of parameters that can be used when listing issuing cards.

IssuingCardPIN contains data about the Card's PIN.

type IssuingCardPINStatus string

IssuingCardPINStatus is the list of possible values for the status field of a Card PIN.

List of values that IssuingCardPINStatus can take.

IssuingCardParams is the set of parameters that can be used when creating or updating an issuing card.

type IssuingCardReplacementReason string

IssuingCardReplacementReason is the list of possible values for the replacement reason on an issuing card.

List of values that IssuingCardReplacementReason can take.

IssuingCardShipping is the resource representing shipping on an issuing card.

type IssuingCardShippingParams struct {
	Address *AddressParams `form:"address"`
	Name    string         `form:"name"`
	Service *string        `form:"service"`
	Type    *string        `form:"type"`

	
	
	Speed *string `form:"speed"`
}

IssuingCardShippingParams is the set of parameters that can be used for the shipping parameter.

type IssuingCardShippingService string

IssuingCardShippingService is the shipment service for a card.

List of values that IssuingCardShippingService can take.

type IssuingCardShippingSpeed string

IssuingCardShippingSpeed is the shipment speed for a card. This is deprecated, use IssuingCardShippingService instead

List of values that IssuingCardShippingSpeed can take

type IssuingCardShippingStatus string

IssuingCardShippingStatus is the list of possible values for the shipping status on an issuing card.

List of values that IssuingCardShippingStatus can take.

type IssuingCardShippingType string

IssuingCardShippingType is the list of possible values for the shipping type on an issuing card.

List of values that IssuingCardShippingType can take.

type IssuingCardSpendingControls struct {
	AllowedCategories      []string                                    `json:"allowed_categories"`
	BlockedCategories      []string                                    `json:"blocked_categories"`
	MaxApprovals           int64                                       `json:"max_approvals"`
	SpendingLimits         []*IssuingCardSpendingControlsSpendingLimit `json:"spending_limits"`
	SpendingLimitsCurrency Currency                                    `json:"spending_limits_currency"`
}

IssuingCardSpendingControls is the resource representing spending controls for an issuing card.

type IssuingCardSpendingControlsParams struct {
	AllowedCategories      []*string                                         `form:"allowed_categories"`
	BlockedCategories      []*string                                         `form:"blocked_categories"`
	MaxApprovals           *int64                                            `form:"max_approvals"`
	SpendingLimits         []*IssuingCardSpendingControlsSpendingLimitParams `form:"spending_limits"`
	SpendingLimitsCurrency *string                                           `form:"spending_limits_currency"`
}

IssuingCardSpendingControlsParams is the set of parameters that can be used to configure the spending controls for an issuing card

IssuingCardSpendingControlsSpendingLimit is the resource representing a spending limit for an issuing card.

type IssuingCardSpendingControlsSpendingLimitInterval string

IssuingCardSpendingControlsSpendingLimitInterval is the list of possible values for the interval for a spending limit on an issuing card.

List of values that IssuingCardShippingStatus can take.

type IssuingCardSpendingControlsSpendingLimitParams struct {
	Amount     *int64    `form:"amount"`
	Categories []*string `form:"categories"`
	Interval   *string   `form:"interval"`
}

IssuingCardSpendingControlsSpendingLimitParams is the set of parameters that can be used to represent a given spending limit for an issuing card.

IssuingCardStatus is the list of possible values for status on an issuing card.

List of values that IssuingCardStatus can take.

IssuingCardType is the type of an issuing card.

List of values that IssuingCardType can take.

IssuingCardholder is the resource representing a Stripe issuing cardholder.

UnmarshalJSON handles deserialization of an IssuingCardholder. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type IssuingCardholderCompany struct {
	TaxIDProvided bool `json:"tax_id_provided"`
}

IssuingCardholderCompany represents additional information about a business_entity cardholder.

type IssuingCardholderCompanyParams struct {
	TaxID *string `form:"tax_id"`
}

IssuingCardholderCompanyParams represents additional information about a `business_entity` cardholder.

IssuingCardholderIndividual represents additional information about an individual cardholder.

type IssuingCardholderIndividualDOB struct {
	Day   int64 `json:"day"`
	Month int64 `json:"month"`
	Year  int64 `json:"year"`
}

IssuingCardholderIndividualDOB represents the date of birth of the issuing card hoder individual.

type IssuingCardholderIndividualDOBParams struct {
	Day   *int64 `form:"day"`
	Month *int64 `form:"month"`
	Year  *int64 `form:"year"`
}

IssuingCardholderIndividualDOBParams represents the date of birth of the cardholder individual.

IssuingCardholderIndividualParams represents additional information about an `individual` cardholder.

IssuingCardholderIndividualVerification represents the Government-issued ID document for this cardholder

type IssuingCardholderIndividualVerificationDocument struct {
	Back  *File `json:"back"`
	Front *File `json:"front"`
}

IssuingCardholderIndividualVerificationDocument represents an identifying document, either a passport or local ID card.

type IssuingCardholderIndividualVerificationDocumentParams struct {
	Back  *string `form:"back"`
	Front *string `form:"front"`
}

IssuingCardholderIndividualVerificationDocumentParams represents an identifying document, either a passport or local ID card.

IssuingCardholderIndividualVerificationParams represents government-issued ID document for this cardholder.

IssuingCardholderList is a list of issuing cardholders as retrieved from a list endpoint.

type IssuingCardholderListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	Email        *string           `form:"email"`
	PhoneNumber  *string           `form:"phone_number"`
	Status       *string           `form:"status"`
	Type         *string           `form:"type"`

	
	
	IsDefault *bool `form:"is_default"`
}

IssuingCardholderListParams is the set of parameters that can be used when listing issuing cardholders.

IssuingCardholderParams is the set of parameters that can be used when creating or updating an issuing cardholder.

IssuingCardholderRequirements contains the verification requirements for the cardholder.

type IssuingCardholderRequirementsDisabledReason string

IssuingCardholderRequirementsDisabledReason is the possible values for the disabled reason on an issuing cardholder.

List of values that IssuingCardholderRequirementsDisabledReason can take.

IssuingCardholderSpendingControls is the resource representing spending controls for an issuing cardholder.

IssuingCardholderSpendingControlsParams is the set of parameters that can be used to configure the spending controls for an issuing cardholder

IssuingCardholderSpendingControlsSpendingLimit is the resource representing a spending limit for an issuing cardholder.

type IssuingCardholderSpendingControlsSpendingLimitInterval string

IssuingCardholderSpendingControlsSpendingLimitInterval is the list of possible values for the interval for a spending limit on an issuing cardholder.

List of values that IssuingCardShippingStatus can take.

type IssuingCardholderSpendingControlsSpendingLimitParams struct {
	Amount     *int64    `form:"amount"`
	Categories []*string `form:"categories"`
	Interval   *string   `form:"interval"`
}

IssuingCardholderSpendingControlsSpendingLimitParams is the set of parameters that can be used to represent a given spending limit for an issuing cardholder.

type IssuingCardholderStatus string

IssuingCardholderStatus is the possible values for status on an issuing cardholder.

List of values that IssuingCardholderStatus can take.

type IssuingCardholderType string

IssuingCardholderType is the type of an issuing cardholder.

List of values that IssuingCardholderType can take.

IssuingDispute is the resource representing an issuing dispute.

UnmarshalJSON handles deserialization of an IssuingDispute. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

IssuingDisputeEvidence is the resource representing evidence on an issuing dispute.

type IssuingDisputeEvidenceFraudulent struct {
	DisputeExplanation string `json:"dispute_explanation"`
	UncategorizedFile  *File  `json:"uncategorized_file"`
}

IssuingDisputeEvidenceFraudulent is the resource representing the evidence hash on an issuing dispute with the reason set as fraudulent.

type IssuingDisputeEvidenceFraudulentParams struct {
	DisputeExplanation *string `form:"dispute_explanation"`
	UncategorizedFile  *string `form:"uncategorized_file"`
}

IssuingDisputeEvidenceFraudulentParams is the subset of parameters that can be sent as evidence for an issuing dispute with the reason set as fraudulent.

type IssuingDisputeEvidenceOther struct {
	DisputeExplanation string `json:"dispute_explanation"`
	UncategorizedFile  *File  `json:"uncategorized_file"`
}

IssuingDisputeEvidenceOther is the resource representing the evidence hash on an issuing dispute with the reason set as other.

type IssuingDisputeEvidenceOtherParams struct {
	DisputeExplanation *string `form:"dispute_explanation"`
	UncategorizedFile  *string `form:"uncategorized_file"`
}

IssuingDisputeEvidenceOtherParams is the subset of parameters that can be sent as evidence for an issuing dispute with the reason set as other.

IssuingDisputeEvidenceParams is the set of parameters that can be sent as evidence for an issuing dispute.

IssuingDisputeList is a list of issuing disputes as retrieved from a list endpoint.

type IssuingDisputeListParams struct {
	ListParams          `form:"*"`
	Created             *int64            `form:"created"`
	CreatedRange        *RangeQueryParams `form:"created"`
	DisputedTransaction *string           `form:"disputed_transaction"`
	Transaction         *string           `form:"transaction"`
}

IssuingDisputeListParams is the set of parameters that can be used when listing issuing dispute.

IssuingDisputeParams is the set of parameters that can be used when creating or updating an issuing dispute.

type IssuingDisputeReason string

IssuingDisputeReason is the list of possible values for status on an issuing dispute.

List of values that IssuingDisputeReason can take.

type IssuingDisputeStatus string

IssuingDisputeStatus is the list of possible values for status on an issuing dispute.

List of values that IssuingDisputeStatus can take.

type IssuingMerchantData struct {
	Category   string `json:"category"`
	City       string `json:"city"`
	Country    string `json:"country"`
	Name       string `json:"name"`
	NetworkID  string `json:"network_id"`
	PostalCode string `json:"postal_code"`
	State      string `json:"state"`
	URL        string `json:"url"`
}

IssuingMerchantData is the resource representing merchant data on Issuing APIs.

type IssuingSpendingLimitInterval string

IssuingSpendingLimitInterval is the list of possible values for the interval of a given spending limit on an issuing card or cardholder. This is deprecated, use IssuingCardSpendingControlsSpendingLimitInterval instead

List of values that IssuingCardShippingStatus can take.

IssuingTransaction is the resource representing a Stripe issuing transaction.

UnmarshalJSON handles deserialization of an IssuingTransaction. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

IssuingTransactionList is a list of issuing transactions as retrieved from a list endpoint.

type IssuingTransactionListParams struct {
	ListParams   `form:"*"`
	Card         *string           `form:"card"`
	Cardholder   *string           `form:"cardholder"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	Dispute      *string           `form:"dispute"`
}

IssuingTransactionListParams is the set of parameters that can be used when listing issuing transactions.

type IssuingTransactionParams struct {
	Params `form:"*"`
}

IssuingTransactionParams is the set of parameters that can be used when creating or updating an issuing transaction.

type IssuingTransactionType string

IssuingTransactionType is the type of an issuing transaction.

List of values that IssuingTransactionType can take.

Iter provides a convenient interface for iterating over the elements returned from paginated list API calls. Successive calls to the Next method will step through each item in the list, fetching pages of items as needed. Iterators are not thread-safe, so they should not be consumed across multiple goroutines.

GetIter returns a new Iter for a given query and its options.

func (it *Iter) Current() interface{}

Current returns the most recent item visited by a call to Next.

Err returns the error, if any, that caused the Iter to stop. It must be inspected after Next returns false.

Meta returns the list metadata.

Next advances the Iter to the next item in the list, which will then be available through the Current method. It returns false when the iterator stops at the end of the list.

Level represents a logging level.

type LeveledLogger struct {
	
	
	
	
	
	
	
	Level Level
	
}

LeveledLogger is a leveled logger implementation.

It prints warnings and errors to `os.Stderr` and other messages to `os.Stdout`.

Debugf logs a debug message using Printf conventions.

Errorf logs a warning message using Printf conventions.

Infof logs an informational message using Printf conventions.

Warnf logs a warning message using Printf conventions.

type LeveledLoggerInterface interface {
	
	Debugf(format string, v ...interface{})

	
	Errorf(format string, v ...interface{})

	
	Infof(format string, v ...interface{})

	
	Warnf(format string, v ...interface{})
}

LeveledLoggerInterface provides a basic leveled logging interface for printing debug, informational, warning, and error messages.

It's implemented by LeveledLogger and also provides out-of-the-box compatibility with a Logrus Logger, but may require a thin shim for use with other logging libraries that you use less standard conventions like Zap.

DefaultLeveledLogger is the default logger that the library will use to log errors, warnings, and informational messages.

LeveledLoggerInterface is implemented by LeveledLogger, and one can be initialized at the desired level of logging. LeveledLoggerInterface also provides out-of-the-box compatibility with a Logrus Logger, but may require a thin shim for use with other logging libraries that use less standard conventions like Zap.

This Logger will be inherited by any backends created by default, but will be overridden if a backend is created with GetBackendWithConfig with a custom LeveledLogger set.

type ListMeta struct {
	HasMore    bool   `json:"has_more"`
	TotalCount uint32 `json:"total_count"`
	URL        string `json:"url"`
}

ListMeta is the structure that contains the common properties of List iterators. The Count property is only populated if the total_count include option is passed in (see tests for example).

type ListParams struct {
	
	
	
	
	
	
	
	
	Context context.Context `form:"-"`

	EndingBefore *string   `form:"ending_before"`
	Expand       []*string `form:"expand"`
	Filters      Filters   `form:"*"`
	Limit        *int64    `form:"limit"`

	
	
	
	
	Single bool `form:"-"` 

	StartingAfter *string `form:"starting_after"`

	
	
	
	
	StripeAccount *string `form:"-"` 
}

ListParams is the structure that contains the common properties of any *ListParams structure.

func (*ListParams) AddExpand

AddExpand appends a new field to expand.

GetListParams returns a ListParams struct (itself). It exists because any structs that embed ListParams will inherit it, and thus implement the ListParamsContainer interface.

GetParams returns ListParams as a Params struct. It exists because any structs that embed Params will inherit it, and thus implement the ParamsContainer interface.

SetStripeAccount sets a value for the Stripe-Account header.

ToParams converts a ListParams to a Params by moving over any fields that have valid targets in the new type. This is useful because fields in Params can be injected directly into an http.Request while generally ListParams is only used to build a set of parameters.

type ListParamsContainer interface {
	GetListParams() *ListParams
}

ListParamsContainer is a general interface for which all list parameter structs should comply. They achieve this by embedding a ListParams struct and inheriting its implementation of this interface.

type Mandate

Mandate is the resource representing a Mandate.

func (*Mandate) UnmarshalJSON

UnmarshalJSON handles deserialization of a Mandate. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type MandateCustomerAcceptanceOffline
type MandateCustomerAcceptanceOffline struct {
}

MandateCustomerAcceptanceOffline represents details about the customer acceptance of an offline mandate.

type MandateCustomerAcceptanceOnline
type MandateCustomerAcceptanceOnline struct {
	IPAddress string `json:"ip_address"`
	UserAgent string `json:"user_agent"`
}

MandateCustomerAcceptanceOnline represents details about the customer acceptance of an online mandate.

type MandateCustomerAcceptanceType
type MandateCustomerAcceptanceType string

MandateCustomerAcceptanceType is the list of allowed values for the type of customer acceptance for a given mandate..

List of values that MandateStatus can take.

type MandateMultiUse
type MandateMultiUse struct {
}

MandateMultiUse represents details about a multi-use mandate.

type MandateParams
type MandateParams struct {
	Params `form:"*"`
}

MandateParams is the set of parameters that can be used when retrieving a mandate.

type MandatePaymentMethodDetailsAUBECSDebit
type MandatePaymentMethodDetailsAUBECSDebit struct {
	URL string `json:"url"`
}

MandatePaymentMethodDetailsAUBECSDebit represents details about the Australia BECS debit account associated with this mandate.

type MandatePaymentMethodDetailsCard
type MandatePaymentMethodDetailsCard struct {
}

MandatePaymentMethodDetailsCard represents details about the card associated with this mandate.

type MandatePaymentMethodDetailsSepaDebit
type MandatePaymentMethodDetailsSepaDebit struct {
	Reference string `json:"reference"`
	URL       string `json:"url"`
}

MandatePaymentMethodDetailsSepaDebit represents details about the SEPA debit bank account associated with this mandate.

type MandateSingleUse
type MandateSingleUse struct {
	Amount   int64    `json:"amount"`
	Currency Currency `json:"currency"`
}

MandateSingleUse represents details about a single-use mandate.

type MandateStatus

MandateStatus is the list of allowed values for the mandate status.

List of values that MandateStatus can take.

type MandateType

MandateType is the list of allowed values for the mandate type.

List of values that MandateType can take.

OAuthScopeType is the type of OAuth scope.

List of possible values for OAuth scopes.

type OAuthStripeUserBusinessType string

OAuthStripeUserBusinessType is the business type for the Stripe oauth user.

List of supported values for business type.

type OAuthStripeUserGender string

OAuthStripeUserGender of the person who will be filling out a Stripe application. (International regulations require either male or female.)

The gender of the person who will be filling out a Stripe application. (International regulations require either male or female.)

type OAuthStripeUserParams struct {
	BlockKana          *string `form:"block_kana"`
	BlockKanji         *string `form:"block_kanji"`
	BuildingKana       *string `form:"building_kana"`
	BuildingKanji      *string `form:"building_kanji"`
	BusinessName       *string `form:"business_name"`
	BusinessType       *string `form:"business_type"`
	City               *string `form:"city"`
	Country            *string `form:"country"`
	Currency           *string `form:"currency"`
	DOBDay             *int64  `form:"dob_day"`
	DOBMonth           *int64  `form:"dob_month"`
	DOBYear            *int64  `form:"dob_year"`
	Email              *string `form:"email"`
	FirstName          *string `form:"first_name"`
	FirstNameKana      *string `form:"first_name_kana"`
	FirstNameKanji     *string `form:"first_name_kanji"`
	Gender             *string `form:"gender"`
	LastName           *string `form:"last_name"`
	LastNameKana       *string `form:"last_name_kana"`
	LastNameKanji      *string `form:"last_name_kanji"`
	PhoneNumber        *string `form:"phone_number"`
	PhysicalProduct    *bool   `form:"physical_product"`
	ProductDescription *string `form:"product_description"`
	State              *string `form:"state"`
	StreetAddress      *string `form:"street_address"`
	URL                *string `form:"url"`
	Zip                *string `form:"zip"`
}

OAuthStripeUserParams for the stripe_user OAuth Authorize params.

type OAuthTokenParams struct {
	Params             `form:"*"`
	AssertCapabilities []*string `form:"assert_capabilities"`
	ClientSecret       *string   `form:"client_secret"`
	Code               *string   `form:"code"`
	GrantType          *string   `form:"grant_type"`
	RefreshToken       *string   `form:"refresh_token"`
	Scope              *string   `form:"scope"`
}

OAuthTokenParams is the set of paramaters that can be used to request OAuthTokens.

OAuthTokenType is the type of token. This will always be "bearer."

List of possible OAuthTokenType values.

type Order struct {
	Amount                 int64             `json:"amount"`
	AmountReturned         int64             `json:"amount_returned"`
	Application            string            `json:"application"`
	ApplicationFee         int64             `json:"application_fee"`
	Charge                 *Charge           `json:"charge"`
	Created                int64             `json:"created"`
	Currency               Currency          `json:"currency"`
	Customer               Customer          `json:"customer"`
	Email                  string            `json:"email"`
	ID                     string            `json:"id"`
	Items                  []*OrderItem      `json:"items"`
	Livemode               bool              `json:"livemode"`
	Metadata               map[string]string `json:"metadata"`
	Returns                *OrderReturnList  `json:"returns"`
	SelectedShippingMethod *string           `json:"selected_shipping_method"`
	Shipping               *Shipping         `json:"shipping"`
	ShippingMethods        []*ShippingMethod `json:"shipping_methods"`
	Status                 string            `json:"status"`
	StatusTransitions      StatusTransitions `json:"status_transitions"`
	Updated                int64             `json:"updated"`
	UpstreamID             string            `json:"upstream_id"`
}

Order is the resource representing a Stripe charge. For more details see https://stripe.com/docs/api#orders.

UnmarshalJSON handles deserialization of an Order. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type OrderDeliveryEstimateType string

OrderDeliveryEstimateType represents the type of delivery estimate for shipping methods

List of values that OrderDeliveryEstimateType can take.

OrderItem is the resource representing an order item.

type OrderItemParams struct {
	Amount      *int64  `form:"amount"`
	Currency    *string `form:"currency"`
	Description *string `form:"description"`
	Parent      *string `form:"parent"`
	Quantity    *int64  `form:"quantity"`
	Type        *string `form:"type"`
}

OrderItemParams is the set of parameters describing an order item on order creation or update.

OrderItemParent describes the parent of an order item.

UnmarshalJSON handles deserialization of an OrderItemParent. This custom unmarshaling is needed because the resulting property may be an id or a full SKU struct if it was expanded.

type OrderItemParentType string

OrderItemParentType represents the type of order item parent

List of values that OrderItemParentType can take.

OrderItemType represents the type of order item

List of values that OrderItemType can take.

OrderList is a list of orders as retrieved from a list endpoint.

OrderListParams is the set of parameters that can be used when listing orders.

OrderParams is the set of parameters that can be used when creating an order.

type OrderPayParams struct {
	Params         `form:"*"`
	ApplicationFee *int64        `form:"application_fee"`
	Customer       *string       `form:"customer"`
	Email          *string       `form:"email"`
	Source         *SourceParams `form:"*"` 
}

OrderPayParams is the set of parameters that can be used when paying orders.

SetSource adds valid sources to a OrderParams object, returning an error for unsupported sources.

type OrderReturn struct {
	Amount   int64        `json:"amount"`
	Created  int64        `json:"created"`
	Currency Currency     `json:"currency"`
	ID       string       `json:"id"`
	Items    []*OrderItem `json:"items"`
	Livemode bool         `json:"livemode"`
	Order    *Order       `json:"order"`
	Refund   *Refund      `json:"refund"`
}

OrderReturn is the resource representing an order return. For more details see https://stripe.com/docs/api#order_returns.

UnmarshalJSON handles deserialization of an OrderReturn. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

OrderReturnList is a list of order returns as retrieved from a list endpoint.

OrderReturnListParams is the set of parameters that can be used when listing order returns.

OrderReturnParams is the set of parameters that can be used when returning orders.

OrderStatus represents the statuses of an order object.

List of values that OrderStatus can take.

OrderUpdateParams is the set of parameters that can be used when updating an order.

type OrderUpdateShippingParams struct {
	Carrier        *string `form:"carrier"`
	TrackingNumber *string `form:"tracking_number"`
}

OrderUpdateShippingParams is the set of parameters that can be used for the shipping hash on order update.

type PIIParams struct {
	Params   `form:"*"`
	IDNumber *string `form:"id_number"`
}

PIIParams are parameters for personal identifiable information (PII).

type PackageDimensions struct {
	Height float64 `json:"height"`
	Length float64 `json:"length"`
	Weight float64 `json:"weight"`
	Width  float64 `json:"width"`
}

PackageDimensions represents the dimension of a product or a SKU from the perspective of shipping.

type PackageDimensionsParams struct {
	Height *float64 `form:"height"`
	Length *float64 `form:"length"`
	Weight *float64 `form:"weight"`
	Width  *float64 `form:"width"`
}

PackageDimensionsParams represents the set of parameters for the the dimension of a product or a SKU from the perspective of shipping .

Params is the structure that contains the common properties of any *Params structure.

func (*Params) AddExpand

AddExpand appends a new field to expand.

AddExtra adds a new arbitrary key-value pair to the request data

AddMetadata adds a new key-value pair to the Metadata.

GetParams returns a Params struct (itself). It exists because any structs that embed Params will inherit it, and thus implement the ParamsContainer interface.

SetIdempotencyKey sets a value for the Idempotency-Key header.

SetStripeAccount sets a value for the Stripe-Account header.

type ParamsContainer interface {
	GetParams() *Params
}

ParamsContainer is a general interface for which all parameter structs should comply. They achieve this by embedding a Params struct and inheriting its implementation of this interface.

PaymentIntent is the resource representing a Stripe payout. For more details see https://stripe.com/docs/api#payment_intents.

UnmarshalJSON handles deserialization of a Payment Intent. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type PaymentIntentCancelParams struct {
	Params             `form:"*"`
	CancellationReason *string `form:"cancellation_reason"`
}

PaymentIntentCancelParams is the set of parameters that can be used when canceling a payment intent.

type PaymentIntentCancellationReason string

PaymentIntentCancellationReason is the list of allowed values for the cancelation reason.

List of values that PaymentIntentCancellationReason can take.

type PaymentIntentCaptureMethod string

PaymentIntentCaptureMethod is the list of allowed values for the capture method.

List of values that PaymentIntentCaptureMethod can take.

type PaymentIntentCaptureParams struct {
	Params                    `form:"*"`
	AmountToCapture           *int64                           `form:"amount_to_capture"`
	ApplicationFeeAmount      *int64                           `form:"application_fee_amount"`
	StatementDescriptor       *string                          `form:"statement_descriptor"`
	StatementDescriptorSuffix *string                          `form:"statement_descriptor_suffix"`
	TransferData              *PaymentIntentTransferDataParams `form:"transfer_data"`
}

PaymentIntentCaptureParams is the set of parameters that can be used when capturing a payment intent.

type PaymentIntentConfirmParams struct {
	Params                `form:"*"`
	ErrorOnRequiresAction *bool                                    `form:"error_on_requires_action"`
	Mandate               *string                                  `form:"mandate"`
	MandateData           *PaymentIntentMandateDataParams          `form:"mandate_data"`
	OffSession            *bool                                    `form:"off_session"`
	PaymentMethod         *string                                  `form:"payment_method"`
	PaymentMethodOptions  *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
	PaymentMethodTypes    []*string                                `form:"payment_method_types"`
	ReceiptEmail          *string                                  `form:"receipt_email"`
	ReturnURL             *string                                  `form:"return_url"`
	SavePaymentMethod     *bool                                    `form:"save_payment_method"`
	SetupFutureUsage      *string                                  `form:"setup_future_usage"`
	Shipping              *ShippingDetailsParams                   `form:"shipping"`
	Source                *string                                  `form:"source"`
	UseStripeSDK          *bool                                    `form:"use_stripe_sdk"`
}

PaymentIntentConfirmParams is the set of parameters that can be used when confirming a payment intent.

type PaymentIntentConfirmationMethod string

PaymentIntentConfirmationMethod is the list of allowed values for the confirmation method.

List of values that PaymentIntentConfirmationMethod can take.

PaymentIntentList is a list of payment intents as retrieved from a list endpoint.

type PaymentIntentMandateDataCustomerAcceptanceOnlineParams
type PaymentIntentMandateDataCustomerAcceptanceOnlineParams struct {
	IPAddress *string `form:"ip_address"`
	UserAgent *string `form:"user_agent"`
}

PaymentIntentMandateDataCustomerAcceptanceOnlineParams is the set of parameters for the customer acceptance of an online mandate.

type PaymentIntentMandateDataParams

PaymentIntentMandateDataParams is the set of parameters controlling the creation of the mandate associated with this PaymentIntent.

PaymentIntentNextAction represents the type of action to take on a payment intent.

type PaymentIntentNextActionRedirectToURL struct {
	ReturnURL string `json:"return_url"`
	URL       string `json:"url"`
}

PaymentIntentNextActionRedirectToURL represents the resource for the next action of type "redirect_to_url".

type PaymentIntentNextActionType string

PaymentIntentNextActionType is the list of allowed values for the next action's type.

List of values that PaymentIntentNextActionType can take.

type PaymentIntentOffSession string

PaymentIntentOffSession is the list of allowed values for types of off-session.

List of values that PaymentIntentOffSession can take.

type PaymentIntentParams struct {
	Params                    `form:"*"`
	Amount                    *int64                                   `form:"amount"`
	ApplicationFeeAmount      *int64                                   `form:"application_fee_amount"`
	CaptureMethod             *string                                  `form:"capture_method"`
	Confirm                   *bool                                    `form:"confirm"`
	ConfirmationMethod        *string                                  `form:"confirmation_method"`
	Currency                  *string                                  `form:"currency"`
	Customer                  *string                                  `form:"customer"`
	Description               *string                                  `form:"description"`
	Mandate                   *string                                  `form:"mandate"`
	MandateData               *PaymentIntentMandateDataParams          `form:"mandate_data"`
	OnBehalfOf                *string                                  `form:"on_behalf_of"`
	PaymentMethod             *string                                  `form:"payment_method"`
	PaymentMethodOptions      *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
	PaymentMethodTypes        []*string                                `form:"payment_method_types"`
	ReceiptEmail              *string                                  `form:"receipt_email"`
	ReturnURL                 *string                                  `form:"return_url"`
	SavePaymentMethod         *bool                                    `form:"save_payment_method"`
	SetupFutureUsage          *string                                  `form:"setup_future_usage"`
	Shipping                  *ShippingDetailsParams                   `form:"shipping"`
	Source                    *string                                  `form:"source"`
	StatementDescriptor       *string                                  `form:"statement_descriptor"`
	StatementDescriptorSuffix *string                                  `form:"statement_descriptor_suffix"`
	TransferData              *PaymentIntentTransferDataParams         `form:"transfer_data"`
	TransferGroup             *string                                  `form:"transfer_group"`

	
	ErrorOnRequiresAction *bool `form:"error_on_requires_action"`
	OffSession            *bool `form:"off_session"`
	UseStripeSDK          *bool `form:"use_stripe_sdk"`
}

PaymentIntentParams is the set of parameters that can be used when handling a payment intent.

PaymentIntentPaymentMethodOptions is the set of payment method-specific options associated with that payment intent.

PaymentIntentPaymentMethodOptionsCard is the set of card-specific options associated with that payment intent.

PaymentIntentPaymentMethodOptionsCardInstallments describe the installment options available for a card associated with that payment intent.

PaymentIntentPaymentMethodOptionsCardInstallmentsParams controls whether to enable installment plans for this payment intent.

PaymentIntentPaymentMethodOptionsCardInstallmentsPlan describe a specific card installment plan.

type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval string

PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval is the interval of a card installment plan.

List of values that PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval can take.

type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams struct {
	Count    *int64  `form:"count"`
	Interval *string `form:"interval"`
	Type     *string `form:"type"`
}

PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams represents details about the installment plan chosen for this payment intent.

type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType string

PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType is the type of a card installment plan.

List of values that PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType can take.

PaymentIntentPaymentMethodOptionsCardParams represents the card-specific options applied to a PaymentIntent.

type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure string

PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure is the list of allowed values controlling when to request 3D Secure on a PaymentIntent.

List of values that PaymentIntentNextActionType can take.

PaymentIntentPaymentMethodOptionsParams represents the type-specific payment method options applied to a PaymentIntent.

type PaymentIntentSetupFutureUsage string

PaymentIntentSetupFutureUsage is the list of allowed values for SetupFutureUsage.

List of values that PaymentIntentSetupFutureUsage can take.

type PaymentIntentStatus string

PaymentIntentStatus is the list of allowed values for the payment intent's status.

List of values that PaymentIntentStatus can take.

type PaymentIntentTransferData struct {
	Amount      int64    `json:"amount"`
	Destination *Account `json:"destination"`
}

PaymentIntentTransferData represents the information for the transfer associated with a payment intent.

type PaymentIntentTransferDataParams struct {
	Amount      *int64  `form:"amount"`
	Destination *string `form:"destination"`
}

PaymentIntentTransferDataParams is the set of parameters allowed for the transfer hash.

PaymentMethod is the resource representing a PaymentMethod.

UnmarshalJSON handles deserialization of a PaymentMethod. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type PaymentMethodAUBECSDebit struct {
	BSBNumber   string `json:"bsb_number"`
	Fingerprint string `json:"fingerprint"`
	Last4       string `json:"last4"`
}

PaymentMethodAUBECSDebit represents AUBECSDebit-specific properties (Australia Only).

type PaymentMethodAUBECSDebitParams struct {
	AccountNumber *string `form:"account_number"`
	BSBNumber     *string `form:"bsb_number"`
}

PaymentMethodAUBECSDebitParams is the set of parameters allowed for the `AUBECSDebit` hash when creating a PaymentMethod of type AUBECSDebit.

type PaymentMethodAttachParams struct {
	Params   `form:"*"`
	Customer *string `form:"customer"`
}

PaymentMethodAttachParams is the set of parameters that can be used when attaching a PaymentMethod to a Customer.

PaymentMethodCard represents the card-specific properties.

type PaymentMethodCardBrand
type PaymentMethodCardBrand string

PaymentMethodCardBrand is the list of allowed values for the brand property on a Card PaymentMethod.

List of values that PaymentMethodCardBrand can take.

PaymentMethodCardChecks represents the checks associated with a Card PaymentMethod.

type PaymentMethodCardNetwork string

PaymentMethodCardNetwork is the list of allowed values to represent the network used for a card-like transaction.

List of values that PaymentMethodCardNetwork can take.

type PaymentMethodCardParams struct {
	CVC      *string `form:"cvc"`
	ExpMonth *string `form:"exp_month"`
	ExpYear  *string `form:"exp_year"`
	Number   *string `form:"number"`
	Token    *string `form:"token"`
}

PaymentMethodCardParams is the set of parameters allowed for the `card` hash when creating a PaymentMethod of type card.

type PaymentMethodCardPresent struct {
}

PaymentMethodCardPresent represents the card-present-specific properties.

type PaymentMethodCardThreeDSecureUsage struct {
	Supported bool `json:"supported"`
}

PaymentMethodCardThreeDSecureUsage represents the 3DS usage for that Card PaymentMethod.

PaymentMethodCardWallet represents the details of the card wallet if this Card PaymentMethod is part of a card wallet.

type PaymentMethodCardWalletType string

PaymentMethodCardWalletType is the list of allowed values for the type a wallet can take on a Card PaymentMethod.

List of values that PaymentMethodCardWalletType can take.

type PaymentMethodDetachParams struct {
	Params `form:"*"`
}

PaymentMethodDetachParams is the set of parameters that can be used when detaching a PaymentMethod.

PaymentMethodFPX represents FPX-specific properties (Malaysia Only).

type PaymentMethodFPXAccountHolderType string

PaymentMethodFPXAccountHolderType is a list of string values that FPX AccountHolderType accepts.

List of values that PaymentMethodFPXAccountHolderType can take

type PaymentMethodFPXParams struct {
	AccountHolderType *string `form:"account_holder_type"`
	Bank              *string `form:"bank"`
}

PaymentMethodFPXParams is the set of parameters allowed for the `fpx` hash when creating a PaymentMethod of type fpx.

type PaymentMethodIdeal struct {
	Bank string `json:"bank"`
	Bic  string `json:"bic"`
}

PaymentMethodIdeal represents the iDEAL-specific properties.

type PaymentMethodIdealParams struct {
	Bank *string `form:"bank"`
}

PaymentMethodIdealParams is the set of parameters allowed for the `ideal` hash when creating a PaymentMethod of type ideal.

PaymentMethodList is a list of PaymentMethods as retrieved from a list endpoint.

type PaymentMethodListParams struct {
	ListParams `form:"*"`
	Customer   *string `form:"customer"`
	Type       *string `form:"type"`
}

PaymentMethodListParams is the set of parameters that can be used when listing PaymentMethods.

PaymentMethodParams is the set of parameters that can be used when creating or updating a PaymentMethod.

type PaymentMethodSepaDebit struct {
	BankCode    string `json:"bank_code"`
	BranchCode  string `json:"branch_code"`
	Country     string `json:"country"`
	Fingerprint string `json:"fingerprint"`
	Last4       string `json:"last4"`
}

PaymentMethodSepaDebit represents the SEPA-debit-specific properties.

type PaymentMethodSepaDebitParams struct {
	Iban *string `form:"iban"`
}

PaymentMethodSepaDebitParams is the set of parameters allowed for the `sepa_debit` hash when creating a PaymentMethod of type sepa_debit.

PaymentMethodType is the list of allowed values for the payment method type.

List of values that PaymentMethodType can take.

PaymentSource describes the payment source used to make a Charge. The Type should indicate which object is fleshed out (eg. BitcoinReceiver or Card) For more details see https://stripe.com/docs/api#retrieve_charge

MarshalJSON handles serialization of a PaymentSource. This custom marshaling is needed because the specific type of payment instrument it represents is specified by the Type

UnmarshalJSON handles deserialization of a PaymentSource. This custom unmarshaling is needed because the specific type of payment instrument it refers to is specified in the JSON

PaymentSourceType consts represent valid payment sources.

List of values that PaymentSourceType can take.

Payout is the resource representing a Stripe payout. For more details see https://stripe.com/docs/api#payouts.

UnmarshalJSON handles deserialization of a Payout. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

PayoutDestination describes the destination of a Payout. The Type should indicate which object is fleshed out For more details see https://stripe.com/docs/api/go#payout_object

UnmarshalJSON handles deserialization of a PayoutDestination. This custom unmarshaling is needed because the specific type of destination it refers to is specified in the JSON

type PayoutDestinationType string

PayoutDestinationType consts represent valid payout destinations.

List of values that PayoutDestinationType can take.

PayoutFailureCode is the list of allowed values for the payout's failure code.

List of values that PayoutFailureCode can take.

PayoutInterval describes the payout interval.

List of values that PayoutInterval can take.

PayoutList is a list of payouts as retrieved from a list endpoint.

PayoutMethodType represents the type of payout

List of values that PayoutMethodType can take.

type PayoutScheduleParams struct {
	DelayDays        *int64  `form:"delay_days"`
	DelayDaysMinimum *bool   `form:"-"` 
	Interval         *string `form:"interval"`
	MonthlyAnchor    *int64  `form:"monthly_anchor"`
	WeeklyAnchor     *string `form:"weekly_anchor"`
}

PayoutScheduleParams are the parameters allowed for payout schedules.

AppendTo implements custom encoding logic for PayoutScheduleParams so that we can send a special value for `delay_days` field if needed.

PayoutSourceType is the list of allowed values for the payout's source_type field.

List of values that PayoutSourceType can take.

PayoutStatus is the list of allowed values for the payout's status.

List of values that PayoutStatus can take.

PayoutType is the list of allowed values for the payout's type.

List of values that PayoutType can take.

type Period struct {
	End   int64 `json:"end"`
	Start int64 `json:"start"`
}

Period is a structure representing a start and end dates.

type PermissionError struct {
	
}

PermissionError results when you attempt to make an API request for which your API key doesn't have the right permissions.

Error serializes the error object to JSON and returns it as a string.

type Person struct {
	Account          string              `json:"account"`
	Address          *AccountAddress     `json:"address"`
	AddressKana      *AccountAddress     `json:"address_kana"`
	AddressKanji     *AccountAddress     `json:"address_kanji"`
	Deleted          bool                `json:"deleted"`
	DOB              *DOB                `json:"dob"`
	Email            string              `json:"email"`
	FirstName        string              `json:"first_name"`
	FirstNameKana    string              `json:"first_name_kana"`
	FirstNameKanji   string              `json:"first_name_kanji"`
	Gender           string              `json:"gender"`
	ID               string              `json:"id"`
	IDNumberProvided bool                `json:"id_number_provided"`
	LastName         string              `json:"last_name"`
	LastNameKana     string              `json:"last_name_kana"`
	LastNameKanji    string              `json:"last_name_kanji"`
	MaidenName       string              `json:"maiden_name"`
	Metadata         map[string]string   `json:"metadata"`
	Object           string              `json:"object"`
	Phone            string              `json:"phone"`
	Relationship     *Relationship       `json:"relationship"`
	Requirements     *Requirements       `json:"requirements"`
	SSNLast4Provided bool                `json:"ssn_last_4_provided"`
	Verification     *PersonVerification `json:"verification"`
}

Person is the resource representing a Stripe person. For more details see https://stripe.com/docs/api#persons.

UnmarshalJSON handles deserialization of a Person. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

PersonList is a list of persons as retrieved from a list endpoint.

PersonVerification is the structure for a person's verification details.

type PersonVerificationDetailsCode string

PersonVerificationDetailsCode is a machine-readable code specifying the verification state of a person.

List of values that IdentityVerificationDetailsCode can take.

PersonVerificationDocument represents the documents associated with a Person.

type PersonVerificationDocumentParams struct {
	Back  *string `form:"back"`
	Front *string `form:"front"`
}

PersonVerificationDocumentParams represents the parameters available for the document verifying a person's identity.

PersonVerificationParams is used to represent parameters associated with a person's verification details.

type Plan struct {
	Active          bool                `json:"active"`
	AggregateUsage  string              `json:"aggregate_usage"`
	Amount          int64               `json:"amount"`
	AmountDecimal   float64             `json:"amount_decimal,string"`
	BillingScheme   PlanBillingScheme   `json:"billing_scheme"`
	Created         int64               `json:"created"`
	Currency        Currency            `json:"currency"`
	Deleted         bool                `json:"deleted"`
	ID              string              `json:"id"`
	Interval        PlanInterval        `json:"interval"`
	IntervalCount   int64               `json:"interval_count"`
	Livemode        bool                `json:"livemode"`
	Metadata        map[string]string   `json:"metadata"`
	Nickname        string              `json:"nickname"`
	Product         *Product            `json:"product"`
	Tiers           []*PlanTier         `json:"tiers"`
	TiersMode       string              `json:"tiers_mode"`
	TransformUsage  *PlanTransformUsage `json:"transform_usage"`
	TrialPeriodDays int64               `json:"trial_period_days"`
	UsageType       PlanUsageType       `json:"usage_type"`
}

Plan is the resource representing a Stripe plan. For more details see https://stripe.com/docs/api#plans.

package main

import (
	"log"

	stripe "github.com/stripe/stripe-go"
	"github.com/stripe/stripe-go/plan"
)

func main() {
	stripe.Key = "sk_key"

	params := &stripe.PlanListParams{}
	params.Filters.AddFilter("limit", "", "3")
	params.Single = true

	it := plan.List(params)
	for it.Next() {
		log.Printf("%v ", it.Plan().Nickname)
	}
	if err := it.Err(); err != nil {
		log.Fatal(err)
	}
}

UnmarshalJSON handles deserialization of a Plan. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type PlanAggregateUsage string

PlanAggregateUsage is the list of allowed values for a plan's aggregate usage.

List of values that PlanAggregateUsage can take.

PlanBillingScheme is the list of allowed values for a plan's billing scheme.

List of values that PlanBillingScheme can take.

PlanInterval is the list of allowed values for a plan's interval.

List of values that PlanInterval can take.

type PlanList struct {
	ListMeta
	Data []*Plan `json:"data"`
}

PlanList is a list of plans as returned from a list endpoint.

type PlanTier struct {
	FlatAmount        int64   `json:"flat_amount"`
	FlatAmountDecimal float64 `json:"flat_amount_decimal,string"`
	UnitAmount        int64   `json:"unit_amount"`
	UnitAmountDecimal float64 `json:"unit_amount_decimal,string"`
	UpTo              int64   `json:"up_to"`
}

PlanTier configures tiered pricing

type PlanTierParams struct {
	Params            `form:"*"`
	FlatAmount        *int64   `form:"flat_amount"`
	FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"`
	UnitAmount        *int64   `form:"unit_amount"`
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
	UpTo              *int64   `form:"-"` 
	UpToInf           *bool    `form:"-"` 
}

PlanTierParams configures tiered pricing

AppendTo implements custom up_to serialisation logic for tiers configuration

PlanTiersMode is the list of allowed values for a plan's tiers mode.

List of values that PlanTiersMode can take.

PlanTransformUsage represents the bucket billing configuration.

type PlanTransformUsageParams struct {
	DivideBy *int64  `form:"divide_by"`
	Round    *string `form:"round"`
}

PlanTransformUsageParams represents the bucket billing configuration.

type PlanTransformUsageRound string

PlanTransformUsageRound is the list of allowed values for a plan's transform usage round logic.

List of values that PlanTransformUsageRound can take.

PlanUsageType is the list of allowed values for a plan's usage type.

List of values that PlanUsageType can take.

type Printfer interface {
	Printf(format string, v ...interface{})
}

Printfer is an interface to be implemented by Logger.

Logger controls how stripe performs logging at a package level. It is useful to customise if you need it prefixed for your application to meet other requirements.

This Logger will be inherited by any backends created by default, but will be overridden if a backend is created with GetBackendWithConfig with a custom Logger set.

Deprecated: Logging should be configured with DefaultLeveledLogger instead.

type Product struct {
	Active              bool               `json:"active"`
	Attributes          []string           `json:"attributes"`
	Caption             string             `json:"caption"`
	Created             int64              `json:"created"`
	DeactivateOn        []string           `json:"deactivate_on"`
	Description         string             `json:"description"`
	ID                  string             `json:"id"`
	Images              []string           `json:"images"`
	Livemode            bool               `json:"livemode"`
	Metadata            map[string]string  `json:"metadata"`
	Name                string             `json:"name"`
	PackageDimensions   *PackageDimensions `json:"package_dimensions"`
	Shippable           bool               `json:"shippable"`
	StatementDescriptor string             `json:"statement_descriptor"`
	Type                ProductType        `json:"type"`
	UnitLabel           string             `json:"unit_label"`
	URL                 string             `json:"url"`
	Updated             int64              `json:"updated"`
}

Product is the resource representing a Stripe product. For more details see https://stripe.com/docs/api#products.

UnmarshalJSON handles deserialization of a Product. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

ProductList is a list of products as retrieved from a list endpoint.

ProductListParams is the set of parameters that can be used when listing products.

type ProductParams struct {
	Params              `form:"*"`
	Active              *bool                    `form:"active"`
	Attributes          []*string                `form:"attributes"`
	Caption             *string                  `form:"caption"`
	DeactivateOn        []*string                `form:"deactivate_on"`
	Description         *string                  `form:"description"`
	ID                  *string                  `form:"id"`
	Images              []*string                `form:"images"`
	Name                *string                  `form:"name"`
	PackageDimensions   *PackageDimensionsParams `form:"package_dimensions"`
	Shippable           *bool                    `form:"shippable"`
	StatementDescriptor *string                  `form:"statement_descriptor"`
	Type                *string                  `form:"type"`
	UnitLabel           *string                  `form:"unit_label"`
	URL                 *string                  `form:"url"`
}

ProductParams is the set of parameters that can be used when creating or updating a product.

ProductType is the type of a product.

List of values that ProductType can take.

Query is the function used to get a page listing.

type RadarEarlyFraudWarningFraudType string

RadarEarlyFraudWarningFraudType are strings that map to the type of fraud labelled by the issuer.

List of values that RadarEarlyFraudWarningFraudType can take.

RadarEarlyFraudWarningList is a list of early fraud warnings as retrieved from a list endpoint.

RadarValueList is the resource representing a value list.

type RadarValueListItem struct {
	Created        int64  `json:"created"`
	CreatedBy      string `json:"created_by"`
	Deleted        bool   `json:"deleted"`
	ID             string `json:"id"`
	Livemode       bool   `json:"livemode"`
	Name           string `json:"name"`
	Object         string `json:"object"`
	Value          string `json:"value"`
	RadarValueList string `json:"value_list"`
}

RadarValueListItem is the resource representing a value list item.

RadarValueListItemList is a list of value list items as retrieved from a list endpoint.

type RadarValueListItemListParams struct {
	ListParams     `form:"*"`
	Created        *int64            `form:"created"`
	CreatedRange   *RangeQueryParams `form:"created"`
	RadarValueList *string           `form:"value_list"`
	Value          *string           `form:"value"`
}

RadarValueListItemListParams is the set of parameters that can be used when listing value list items.

type RadarValueListItemParams struct {
	Params         `form:"*"`
	Value          *string `form:"value"`
	RadarValueList *string `form:"value_list"`
}

RadarValueListItemParams is the set of parameters that can be used when creating a value list item.

type RadarValueListItemType string

RadarValueListItemType is the possible values for a type of value list items.

List of values that RadarValueListItemType can take.

RadarValueListList is a list of value lists as retrieved from a list endpoint.

RadarValueListListParams is the set of parameters that can be used when listing value lists.

type RadarValueListParams struct {
	Params   `form:"*"`
	Alias    *string `form:"alias"`
	ItemType *string `form:"item_type"`
	Name     *string `form:"name"`
}

RadarValueListParams is the set of parameters that can be used when creating a value list.

type RangeQueryParams struct {
	
	
	GreaterThan int64 `form:"gt"`

	
	
	GreaterThanOrEqual int64 `form:"gte"`

	
	LesserThan int64 `form:"lt"`

	
	
	LesserThanOrEqual int64 `form:"lte"`
}

RangeQueryParams are a set of generic request parameters that are used on list endpoints to filter their results by some timestamp.

type RateLimitError struct {
	
}

RateLimitError occurs when the Stripe API is hit to with too many requests too quickly and indicates that the current request has been rate limited.

Error serializes the error object to JSON and returns it as a string.

ReceiverFlow informs of the state of a receiver authentication flow.

type Recipient struct {
	ActiveAccount *BankAccount      `json:"active_account"`
	Cards         *CardList         `json:"cards"`
	Created       int64             `json:"created"`
	DefaultCard   *Card             `json:"default_card"`
	Deleted       bool              `json:"deleted"`
	Description   string            `json:"description"`
	Email         string            `json:"email"`
	ID            string            `json:"id"`
	Livemode      bool              `json:"livemode"`
	Metadata      map[string]string `json:"metadata"`
	MigratedTo    *Account          `json:"migrated_to"`
	Name          string            `json:"name"`
	Type          RecipientType     `json:"type"`
}

Recipient is the resource representing a Stripe recipient. For more details see https://stripe.com/docs/api#recipients.

UnmarshalJSON handles deserialization of a Recipient. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

RecipientList is a list of recipients as retrieved from a list endpoint.

RecipientTransfer is the resource representing a Stripe recipient_transfer. For more details see https://stripe.com/docs/api#recipient_transfers.

UnmarshalJSON handles deserialization of a RecipientTransfer. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

RecipientTransferDestination describes the destination of a RecipientTransfer. The Type should indicate which object is fleshed out For more details see https://stripe.com/docs/api/go#recipient_transfer_object

UnmarshalJSON handles deserialization of a RecipientTransferDestination. This custom unmarshaling is needed because the specific type of destination it refers to is specified in the JSON

type RecipientTransferDestinationType string

RecipientTransferDestinationType consts represent valid recipient_transfer destinations.

List of values that RecipientTransferDestinationType can take.

type RecipientTransferFailureCode string

RecipientTransferFailureCode is the list of allowed values for the recipient_transfer's failure code.

List of values that RecipientTransferFailureCode can take.

type RecipientTransferMethodType string

RecipientTransferMethodType represents the type of recipient_transfer

List of values that RecipientTransferMethodType can take.

type RecipientTransferSourceType string

RecipientTransferSourceType is the list of allowed values for the recipient_transfer's source_type field.

List of values that RecipientTransferSourceType can take.

type RecipientTransferStatus string

RecipientTransferStatus is the list of allowed values for the recipient_transfer's status.

List of values that RecipientTransferStatus can take.

type RecipientTransferType string

RecipientTransferType is the list of allowed values for the recipient_transfer's type.

List of values that RecipientTransferType can take.

RecipientType is the list of allowed values for the recipient's type.

List of values that RecipientType can take.

RedirectFlow informs of the state of a redirect authentication flow.

type RedirectParams struct {
	ReturnURL *string `form:"return_url"`
}

RedirectParams is the set of parameters allowed for the redirect hash on source creation or update.

Refund is the resource representing a Stripe refund. For more details see https://stripe.com/docs/api#refunds.

UnmarshalJSON handles deserialization of a Refund. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type RefundFailureReason string

RefundFailureReason is, if set, the reason the refund failed.

List of values that RefundFailureReason can take.

RefundList is a list object for refunds.

type RefundParams struct {
	Params               `form:"*"`
	Amount               *int64  `form:"amount"`
	Charge               *string `form:"charge"`
	PaymentIntent        *string `form:"payment_intent"`
	Reason               *string `form:"reason"`
	RefundApplicationFee *bool   `form:"refund_application_fee"`
	ReverseTransfer      *bool   `form:"reverse_transfer"`
}

RefundParams is the set of parameters that can be used when refunding a charge. For more details see https://stripe.com/docs/api#refund.

RefundReason is, if set, the reason the refund is being made

const (
	RefundReasonDuplicate               RefundReason = "duplicate"
	RefundReasonExpiredUncapturedCharge RefundReason = "expired_uncaptured_charge"
	RefundReasonFraudulent              RefundReason = "fraudulent"
	RefundReasonRequestedByCustomer     RefundReason = "requested_by_customer"
)

List of values that RefundReason can take.

RefundStatus is the status of the refund.

List of values that RefundStatus can take.

type Relationship struct {
	Director         bool    `json:"director"`
	Executive        bool    `json:"executive"`
	Owner            bool    `json:"owner"`
	PercentOwnership float64 `json:"percent_ownership"`
	Representative   bool    `json:"representative"`
	Title            string  `json:"title"`
}

Relationship represents how the Person relates to the business.

type RelationshipListParams struct {
	Director       *bool `form:"director"`
	Executive      *bool `form:"executive"`
	Owner          *bool `form:"owner"`
	Representative *bool `form:"representative"`
}

RelationshipListParams is used to filter persons by the relationship

type RelationshipParams struct {
	Director         *bool    `form:"director"`
	Executive        *bool    `form:"executive"`
	Owner            *bool    `form:"owner"`
	PercentOwnership *float64 `form:"percent_ownership"`
	Representative   *bool    `form:"representative"`
	Title            *string  `form:"title"`
}

RelationshipParams is used to set the relationship between an account and a person.

ReportRun is the resource representing a report run.

ReportRunList is a list of report runs as retrieved from a list endpoint.

ReportRunListParams is the set of parameters that can be used when listing report runs.

type ReportRunParameters struct {
	Columns           []string `json:"columns"`
	ConnectedAccount  string   `json:"connected_account"`
	Currency          Currency `json:"currency"`
	IntervalEnd       int64    `json:"interval_end"`
	IntervalStart     int64    `json:"interval_start"`
	Payout            string   `json:"payout"`
	ReportingCategory string   `json:"reporting_category"`
	Timezone          string   `json:"timezone"`
}

ReportRunParameters describes the parameters hash on a report run.

type ReportRunParametersParams struct {
	Columns           []*string `form:"columns"`
	ConnectedAccount  *string   `form:"connected_account"`
	Currency          *string   `form:"currency"`
	IntervalEnd       *int64    `form:"interval_end"`
	IntervalStart     *int64    `form:"interval_start"`
	Payout            *string   `form:"payout"`
	ReportingCategory *string   `form:"reporting_category"`
	Timezone          *string   `form:"timezone"`
}

ReportRunParametersParams is the set of parameters that can be used when creating a report run.

ReportRunParams is the set of parameters that can be used when creating a report run.

ReportRunStatus is the possible values for status on a report run.

List of values that ReportRunStatus can take.

type ReportType struct {
	DefaultColumns     []string `json:"default_columns"`
	Created            int64    `json:"created"`
	DataAvailableEnd   int64    `json:"data_available_end"`
	DataAvailableStart int64    `json:"data_available_start"`
	ID                 string   `json:"id"`
	Name               string   `json:"name"`
	Object             string   `json:"object"`
	Updated            int64    `json:"updated"`
	Version            int64    `json:"version"`
}

ReportType is the resource representing a report type.

ReportTypeList is a list of report types as retrieved from a list endpoint.

type ReportTypeListParams struct {
	ListParams `form:"*"`
}

ReportTypeListParams is the set of parameters that can be used when listing report types.

type ReportTypeParams struct {
	Params `form:"*"`
}

ReportTypeParams is the set of parameters that can be used when retrieving a report type.

type Requirements struct {
	CurrentlyDue        []string                    `json:"currently_due"`
	Errors              []*AccountRequirementsError `json:"errors"`
	EventuallyDue       []string                    `json:"eventually_due"`
	PastDue             []string                    `json:"past_due"`
	PendingVerification []string                    `json:"pending_verification"`
}

Requirements represents what's missing to verify a Person.

type Reversal struct {
	Amount                   int64               `json:"amount"`
	BalanceTransaction       *BalanceTransaction `json:"balance_transaction"`
	Created                  int64               `json:"created"`
	Currency                 Currency            `json:"currency"`
	Description              string              `json:"description"`
	DestinationPaymentRefund *Refund             `json:"destination_payment_refund"`
	ID                       string              `json:"id"`
	Metadata                 map[string]string   `json:"metadata"`
	SourceRefund             *Refund             `json:"source_refund"`
	Transfer                 string              `json:"transfer"`
}

Reversal represents a transfer reversal.

UnmarshalJSON handles deserialization of a Reversal. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

ReversalList is a list of object for reversals.

type ReversalListParams struct {
	ListParams `form:"*"`
	Transfer   *string `form:"-"` 
}

ReversalListParams is the set of parameters that can be used when listing reversals.

type ReversalParams struct {
	Params               `form:"*"`
	Amount               *int64  `form:"amount"`
	Description          *string `form:"description"`
	RefundApplicationFee *bool   `form:"refund_application_fee"`
	Transfer             *string `form:"-"` 
}

ReversalParams is the set of parameters that can be used when reversing a transfer.

Review is the resource representing a Radar review. For more details see https://stripe.com/docs/api#reviews.

UnmarshalJSON handles deserialization of a Review. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type ReviewApproveParams struct {
	Params `form:"*"`
}

ReviewApproveParams is the set of parameters that can be used when approving a review.

type ReviewClosedReason string

ReviewClosedReason describes the reason why the review is closed.

List of values that ReviewClosedReason can take.

type ReviewIPAddressLocation struct {
	City      string  `json:"city"`
	Country   string  `json:"country"`
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
	Region    string  `json:"region"`
}

ReviewIPAddressLocation represents information about the IP associated with a review.

ReviewList is a list of reviews as retrieved from a list endpoint.

ReviewListParams is the set of parameters that can be used when listing reviews.

type ReviewOpenedReason string

ReviewOpenedReason describes the reason why the review is opened.

List of values that ReviewOpenedReason can take.

type ReviewParams struct {
	Params `form:"*"`
}

ReviewParams is the set of parameters that can be used when approving a review.

ReviewReasonType describes the reason why the review is open or closed.

List of values that ReviewReasonType can take.

type ReviewSession struct {
	Browser  string `json:"browser"`
	Device   string `json:"device"`
	Platform string `json:"platform"`
	Version  string `json:"version"`
}

ReviewSession represents information about the browser session associated with a review.

SKU is the resource representing a SKU. For more details see https://stripe.com/docs/api#skus.

UnmarshalJSON handles deserialization of a SKU. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

SKUInventoryType describe's the possible value for inventory type

List of values that SKUInventoryType can take.

SKUInventoryValue describe's the possible value for inventory value

List of values that SKUInventoryValue can take.

type SKUList struct {
	ListMeta
	Data []*SKU `json:"data"`
}

SKUList is a list of SKUs as returned from a list endpoint.

type SKUListParams struct {
	ListParams `form:"*"`
	Active     *bool             `form:"active"`
	Attributes map[string]string `form:"attributes"`
	IDs        []*string         `form:"ids"`
	InStock    *bool             `form:"in_stock"`
	Product    *string           `form:"product"`
}

SKUListParams is the set of parameters that can be used when listing SKUs.

SKUParams is the set of parameters allowed on SKU creation or update.

SetupIntent is the resource representing a Stripe payout. For more details see https://stripe.com/docs/api#payment_intents.

UnmarshalJSON handles deserialization of a SetupIntent. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type SetupIntentCancelParams struct {
	Params             `form:"*"`
	CancellationReason *string `form:"cancellation_reason"`
}

SetupIntentCancelParams is the set of parameters that can be used when canceling a setup intent.

type SetupIntentCancellationReason string

SetupIntentCancellationReason is the list of allowed values for the cancelation reason.

List of values that SetupIntentCancellationReason can take.

SetupIntentConfirmParams is the set of parameters that can be used when confirming a setup intent.

SetupIntentList is a list of setup intents as retrieved from a list endpoint.

type SetupIntentMandateDataCustomerAcceptanceOnlineParams
type SetupIntentMandateDataCustomerAcceptanceOnlineParams struct {
	IPAddress *string `form:"ip_address"`
	UserAgent *string `form:"user_agent"`
}

SetupIntentMandateDataCustomerAcceptanceOnlineParams is the set of parameters for the customer acceptance of an online mandate.

type SetupIntentMandateDataParams

SetupIntentMandateDataParams is the set of parameters controlling the creation of the mandate associated with this SetupIntent.

SetupIntentNextAction represents the type of action to take on a setup intent.

type SetupIntentNextActionRedirectToURL struct {
	ReturnURL string `json:"return_url"`
	URL       string `json:"url"`
}

SetupIntentNextActionRedirectToURL represents the resource for the next action of type "redirect_to_url".

type SetupIntentNextActionType string

SetupIntentNextActionType is the list of allowed values for the next action's type.

List of values that SetupIntentNextActionType can take.

SetupIntentParams is the set of parameters that can be used when handling a setup intent.

SetupIntentPaymentMethodOptions represents the type-specific payment method options applied to a SetupIntent.

SetupIntentPaymentMethodOptionsCard represents the card-specific options applied to a SetupIntent.

type SetupIntentPaymentMethodOptionsCardParams struct {
	MOTO                *bool   `form:"moto"`
	RequestThreeDSecure *string `form:"request_three_d_secure"`
}

SetupIntentPaymentMethodOptionsCardParams represents the card-specific options applied to a SetupIntent.

type SetupIntentPaymentMethodOptionsCardRequestThreeDSecure string

SetupIntentPaymentMethodOptionsCardRequestThreeDSecure is the list of allowed values controlling when to request 3D Secure on a SetupIntent.

List of values that SetupIntentNextActionType can take.

SetupIntentPaymentMethodOptionsParams represents the type-specific payment method options applied to a SetupIntent.

type SetupIntentSingleUseParams struct {
	Amount   *int64  `form:"amount"`
	Currency *string `form:"currency"`
}

SetupIntentSingleUseParams represents the single-use mandate-specific parameters.

SetupIntentStatus is the list of allowed values for the setup intent's status.

List of values that SetupIntentStatus can take.

SetupIntentUsage is the list of allowed values for the setup intent's usage.

List of values that SetupIntentUsage can take.

type Shipping struct {
	Address        *Address `json:"address"`
	Carrier        string   `json:"carrier"`
	Name           string   `json:"name"`
	Phone          string   `json:"phone"`
	TrackingNumber string   `json:"tracking_number"`
}

Shipping describes the shipping hash on an order.

type ShippingDetails struct {
	Address        *Address `json:"address"`
	Carrier        string   `json:"carrier"`
	Name           string   `json:"name"`
	Phone          string   `json:"phone"`
	TrackingNumber string   `json:"tracking_number"`
}

ShippingDetails is the structure containing shipping information.

type ShippingDetailsParams struct {
	Address        *AddressParams `form:"address"`
	Carrier        *string        `form:"carrier"`
	Name           *string        `form:"name"`
	Phone          *string        `form:"phone"`
	TrackingNumber *string        `form:"tracking_number"`
}

ShippingDetailsParams is the structure containing shipping information as parameters

type ShippingMethod struct {
	Amount           int64             `json:"amount"`
	ID               string            `json:"id"`
	Currency         Currency          `json:"currency"`
	DeliveryEstimate *DeliveryEstimate `json:"delivery_estimate"`
	Description      string            `json:"description"`
}

ShippingMethod describes a shipping method as available on an order.

type ShippingParams struct {
	Address *AddressParams `form:"address"`
	Name    *string        `form:"name"`
	Phone   *string        `form:"phone"`
}

ShippingParams is the set of parameters that can be used for the shipping hash on order creation.

type SigmaScheduledQueryRun struct {
	Created              int64                        `json:"created"`
	DataLoadTime         int64                        `json:"data_load_time"`
	Error                string                       `json:"error"`
	File                 *File                        `json:"file"`
	ID                   string                       `json:"id"`
	Livemode             bool                         `json:"livemode"`
	Object               string                       `json:"object"`
	ResultAvailableUntil int64                        `json:"result_available_until"`
	SQL                  string                       `json:"sql"`
	Status               SigmaScheduledQueryRunStatus `json:"status"`
	Query                string                       `json:"query"`
}

SigmaScheduledQueryRun is the resource representing a scheduled query run.

UnmarshalJSON handles deserialization of an SigmaScheduledQueryRun. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

SigmaScheduledQueryRunList is a list of scheduled query runs as retrieved from a list endpoint.

type SigmaScheduledQueryRunListParams struct {
	ListParams `form:"*"`
}

SigmaScheduledQueryRunListParams is the set of parameters that can be used when listing scheduled query runs.

type SigmaScheduledQueryRunParams struct {
	Params `form:"*"`
}

SigmaScheduledQueryRunParams is the set of parameters that can be used when updating a scheduled query run.

type SigmaScheduledQueryRunStatus string

SigmaScheduledQueryRunStatus is the possible values for status for a scheduled query run.

List of values that SigmaScheduledQueryRunStatus can take.

Source is the resource representing a Source. For more details see https://stripe.com/docs/api#sources.

UnmarshalJSON handles deserialization of an Source. This custom unmarshaling is needed to extract the type specific data (accessible under `TypeData`) but stored in JSON under a hash named after the `type` of the source.

type SourceCodeVerificationFlowStatus string

SourceCodeVerificationFlowStatus represents the possible statuses of a code verification flow.

List of values that SourceCodeVerificationFlowStatus can take.

SourceFlow represents the possible flows of a source object.

List of values that SourceFlow can take.

SourceList is a list object for cards.

type SourceListParams struct {
	ListParams `form:"*"`
	Customer   *string `form:"-"` 
}

SourceListParams are used to enumerate the payment sources that are attached to a Customer.

type SourceMandateAcceptanceOfflineParams
type SourceMandateAcceptanceOfflineParams struct {
	ContactEmail *string `form:"contact_email"`
}

SourceMandateAcceptanceOfflineParams describes the set of parameters for offline accepted mandate

type SourceMandateAcceptanceOnlineParams
type SourceMandateAcceptanceOnlineParams struct {
	Date      *int64  `form:"date"`
	IP        *string `form:"ip"`
	UserAgent *string `form:"user_agent"`
}

SourceMandateAcceptanceOnlineParams describes the set of parameters for online accepted mandate

type SourceMandateAcceptanceParams

SourceMandateAcceptanceParams describes the set of parameters allowed for the `acceptance` hash on source creation or update.

type SourceMandateAcceptanceStatus
type SourceMandateAcceptanceStatus string

SourceMandateAcceptanceStatus represents the possible failure reasons of a redirect flow.

List of values that SourceMandateAcceptanceStatus can take.

type SourceMandateNotificationMethod
type SourceMandateNotificationMethod string

SourceMandateNotificationMethod represents the possible methods of notification for a mandate.

List of values that SourceMandateNotificationMethod can take.

type SourceMandateParams

SourceMandateParams describes the set of parameters allowed for the `mandate` hash on source creation or update.

type SourceObjectDetachParams struct {
	Params   `form:"*"`
	Customer *string `form:"-"`
}

SourceObjectDetachParams is the set of parameters that can be used when detaching a source from a customer.

SourceObjectParams is the set of parameters allowed on source creation or update.

AppendTo implements custom encoding logic for SourceObjectParams so that the special "TypeData" value for is sent as the correct parameter based on the Source type

type SourceOrderItemsParams struct {
	Amount      *int64  `form:"amount"`
	Currency    *string `form:"currency"`
	Description *string `form:"description"`
	Parent      *string `form:"parent"`
	Quantity    *int64  `form:"quantity"`
	Type        *string `form:"type"`
}

SourceOrderItemsParams is the set of parameters allowed for the items on a source order for a source.

SourceOrderParams is the set of parameters allowed for the source order of a source.

type SourceOwner struct {
	Address         *Address `json:"address,omitempty"`
	Email           string   `json:"email"`
	Name            string   `json:"name"`
	Phone           string   `json:"phone"`
	VerifiedAddress *Address `json:"verified_address,omitempty"`
	VerifiedEmail   string   `json:"verified_email"`
	VerifiedName    string   `json:"verified_name"`
	VerifiedPhone   string   `json:"verified_phone"`
}

SourceOwner describes the owner hash on a source.

type SourceOwnerParams struct {
	Address *AddressParams `form:"address"`
	Email   *string        `form:"email"`
	Name    *string        `form:"name"`
	Phone   *string        `form:"phone"`
}

SourceOwnerParams is the set of parameters allowed for the owner hash on source creation or update.

type SourceParams struct {
	Card  *CardParams `form:"-"`
	Token *string     `form:"source"`
}

SourceParams is a union struct used to describe an arbitrary payment source.

SourceParamsFor creates SourceParams objects around supported payment sources, returning errors if not.

Currently supported source types are Card (CardParams) and Tokens/IDs (string), where Tokens could be single use card tokens or bitcoin receiver ids

AppendTo implements custom encoding logic for SourceParams.

type SourceReceiverParams struct {
	RefundAttributesMethod *string `form:"refund_attributes_method"`
}

SourceReceiverParams is the set of parameters allowed for the `receiver` hash on source creation or update.

type SourceRedirectFlowFailureReason string

SourceRedirectFlowFailureReason represents the possible failure reasons of a redirect flow.

List of values that SourceRedirectFlowFailureReason can take.

type SourceRedirectFlowStatus string

SourceRedirectFlowStatus represents the possible statuses of a redirect flow.

List of values that SourceRedirectFlowStatus can take.

type SourceRefundAttributesMethod string

SourceRefundAttributesMethod are the possible method to retrieve a receiver's refund attributes.

List of values that SourceRefundAttributesMethod can take.

type SourceRefundAttributesStatus string

SourceRefundAttributesStatus are the possible status of a receiver's refund attributes.

List of values that SourceRefundAttributesStatus can take.

SourceSourceOrder describes a source order for a source.

type SourceSourceOrderItemType string

SourceSourceOrderItemType describes the type of source order items on source orders for sources.

The list of possible values for source order item types.

SourceSourceOrderItems describes the items on source orders for sources.

SourceStatus represents the possible statuses of a source object.

List of values that SourceStatus can take.

type SourceTransaction struct {
	Amount       int64    `json:"amount"`
	Created      int64    `json:"created"`
	Currency     Currency `json:"currency"`
	CustomerData string   `json:"customer_data"`
	ID           string   `json:"id"`
	Livemode     bool     `json:"livemode"`
	Source       string   `json:"source"`
	Type         string   `json:"type"`
	TypeData     map[string]interface{}
}

SourceTransaction is the resource representing a Stripe source transaction.

UnmarshalJSON handles deserialization of a SourceTransaction. This custom unmarshaling is needed to extract the type specific data (accessible under `TypeData`) but stored in JSON under a hash named after the `type` of the source transaction.

SourceTransactionList is a list object for SourceTransactions.

type SourceTransactionListParams struct {
	ListParams `form:"*"`
	Source     *string `form:"-"` 
}

SourceTransactionListParams is the set of parameters that can be used when listing SourceTransactions.

SourceUsage represents the possible usages of a source object.

List of values that SourceUsage can take.

type StatusTransitions struct {
	Canceled  int64 `json:"canceled"`
	Fulfilled int64 `json:"fulfilled"`
	Paid      int64 `json:"paid"`
	Returned  int64 `json:"returned"`
}

StatusTransitions are the timestamps at which the order status was updated.

StatusTransitionsFilterParams are parameters that can used to filter on status_transition when listing orders.

Subscription is the resource representing a Stripe subscription. For more details see https://stripe.com/docs/api#subscriptions.

UnmarshalJSON handles deserialization of a Subscription. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type SubscriptionBillingThresholds struct {
	AmountGTE               int64 `json:"amount_gte"`
	ResetBillingCycleAnchor bool  `json:"reset_billing_cycle_anchor"`
}

SubscriptionBillingThresholds is a structure representing the billing thresholds for a subscription.

type SubscriptionBillingThresholdsParams struct {
	AmountGTE               *int64 `form:"amount_gte"`
	ResetBillingCycleAnchor *bool  `form:"reset_billing_cycle_anchor"`
}

SubscriptionBillingThresholdsParams is a structure representing the parameters allowed to control billing thresholds for a subscription.

type SubscriptionCollectionMethod string

SubscriptionCollectionMethod is the type of collection method for this subscription's invoices.

List of values that SubscriptionCollectionMethod can take.

type SubscriptionItemBillingThresholds struct {
	UsageGTE int64 `form:"usage_gte"`
}

SubscriptionItemBillingThresholds is a structure representing the billing thresholds for a subscription item.

type SubscriptionItemBillingThresholdsParams struct {
	UsageGTE *int64 `form:"usage_gte"`
}

SubscriptionItemBillingThresholdsParams is a structure representing the parameters allowed to control billing thresholds for a subscription item.

SubscriptionItemList is a list of invoice items as retrieved from a list endpoint.

SubscriptionList is a list object for subscriptions.

type SubscriptionParams struct {
	Params                      `form:"*"`
	ApplicationFeePercent       *float64                                      `form:"application_fee_percent"`
	BackdateStartDate           *int64                                        `form:"backdate_start_date"`
	BillingCycleAnchor          *int64                                        `form:"billing_cycle_anchor"`
	BillingCycleAnchorNow       *bool                                         `form:"-"` 
	BillingCycleAnchorUnchanged *bool                                         `form:"-"` 
	BillingThresholds           *SubscriptionBillingThresholdsParams          `form:"billing_thresholds"`
	CancelAt                    *int64                                        `form:"cancel_at"`
	CancelAtPeriodEnd           *bool                                         `form:"cancel_at_period_end"`
	Card                        *CardParams                                   `form:"card"`
	CollectionMethod            *string                                       `form:"collection_method"`
	Coupon                      *string                                       `form:"coupon"`
	Customer                    *string                                       `form:"customer"`
	DaysUntilDue                *int64                                        `form:"days_until_due"`
	DefaultPaymentMethod        *string                                       `form:"default_payment_method"`
	DefaultSource               *string                                       `form:"default_source"`
	DefaultTaxRates             []*string                                     `form:"default_tax_rates"`
	Items                       []*SubscriptionItemsParams                    `form:"items"`
	OffSession                  *bool                                         `form:"off_session"`
	OnBehalfOf                  *string                                       `form:"on_behalf_of"`
	PauseCollection             *SubscriptionPauseCollectionParams            `form:"pause_collection"`
	PaymentBehavior             *string                                       `form:"payment_behavior"`
	PendingInvoiceItemInterval  *SubscriptionPendingInvoiceItemIntervalParams `form:"pending_invoice_item_interval"`
	Plan                        *string                                       `form:"plan"`
	Prorate                     *bool                                         `form:"prorate"`
	ProrationBehavior           *string                                       `form:"proration_behavior"`
	ProrationDate               *int64                                        `form:"proration_date"`
	Quantity                    *int64                                        `form:"quantity"`
	TrialEnd                    *int64                                        `form:"trial_end"`
	TransferData                *SubscriptionTransferDataParams               `form:"transfer_data"`
	TrialEndNow                 *bool                                         `form:"-"` 
	TrialFromPlan               *bool                                         `form:"trial_from_plan"`
	TrialPeriodDays             *int64                                        `form:"trial_period_days"`

	
	TaxPercent *float64 `form:"tax_percent"`
}

SubscriptionParams is the set of parameters that can be used when creating or updating a subscription. For more details see https://stripe.com/docs/api#create_subscription and https://stripe.com/docs/api#update_subscription.

AppendTo implements custom encoding logic for SubscriptionParams so that the special "now" value for billing_cycle_anchor and trial_end can be implemented (they're otherwise timestamps rather than strings).

SubscriptionPauseCollection if specified, payment collection for this subscription will be paused.

type SubscriptionPauseCollectionBehavior string

SubscriptionPauseCollectionBehavior is the payment collection behavior a paused subscription.

List of values that SubscriptionPauseCollectionBehavior can take.

type SubscriptionPauseCollectionParams struct {
	Behavior  *string `form:"behavior"`
	ResumesAt *int64  `form:"resumes_at"`
}

SubscriptionPauseCollectionParams is the set of parameters allowed for the pause_collection hash.

type SubscriptionPaymentBehavior string

SubscriptionPaymentBehavior lets you control the behavior of subscription creation in case of a failed payment.

List of values that SubscriptionPaymentBehavior can take.

SubscriptionPendingInvoiceItemInterval represents the interval at which to invoice pending invoice items.

type SubscriptionPendingInvoiceItemIntervalInterval string

SubscriptionPendingInvoiceItemIntervalInterval controls the interval at which pending invoice items should be invoiced.

List of values that SubscriptionPendingInvoiceItemIntervalInterval can take.

type SubscriptionPendingInvoiceItemIntervalParams struct {
	Interval      *string `form:"interval"`
	IntervalCount *int64  `form:"interval_count"`
}

SubscriptionPendingInvoiceItemIntervalParams is the set of parameters allowed for the transfer_data hash.

type SubscriptionPendingUpdate struct {
	BillingCycleAnchor int64               `json:"billing_cycle_anchor"`
	ExpiresAt          int64               `json:"expires_at"`
	SubscriptionItems  []*SubscriptionItem `json:"subscription_items"`
	TrialEnd           int64               `json:"trial_end"`
	TrialFromPlan      bool                `json:"trial_from_plan"`
}

SubscriptionPendingUpdate represents deferred changes that will be applied when latest invoice is paid.

type SubscriptionProrationBehavior string

SubscriptionProrationBehavior determines how to handle prorations when billing cycles change.

List of values that SubscriptionProrationBehavior can take.

SubscriptionSchedule is the resource representing a Stripe subscription schedule.

UnmarshalJSON handles deserialization of a SubscriptionSchedule. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type SubscriptionScheduleCancelParams struct {
	Params     `form:"*"`
	InvoiceNow *bool `form:"invoice_now"`
	Prorate    *bool `form:"prorate"`
}

SubscriptionScheduleCancelParams is the set of parameters that can be used when canceling a subscription schedule.

type SubscriptionScheduleCurrentPhase struct {
	EndDate   int64 `json:"end_date"`
	StartDate int64 `json:"start_date"`
}

SubscriptionScheduleCurrentPhase is a structure the current phase's period.

SubscriptionScheduleDefaultSettings is a structure representing the subscription schedule’s default settings.

SubscriptionScheduleDefaultSettingsParams is the set of parameters representing the subscription schedule’s default settings.

type SubscriptionScheduleEndBehavior string

SubscriptionScheduleEndBehavior describe what happens to a schedule when it ends.

List of values that SubscriptionScheduleEndBehavior can take.

type SubscriptionScheduleInvoiceSettings struct {
	DaysUntilDue int64 `json:"days_until_due"`
}

SubscriptionScheduleInvoiceSettings is a structure representing the settings applied to invoices associated with a subscription schedule.

type SubscriptionScheduleInvoiceSettingsParams struct {
	DaysUntilDue *int64 `form:"days_until_due"`
}

SubscriptionScheduleInvoiceSettingsParams is a structure representing the parameters allowed to control invoice settings on invoices associated with a subscription schedule.

SubscriptionScheduleList is a list object for subscription schedules.

SubscriptionScheduleListParams is the set of parameters that can be used when listing subscription schedules.

SubscriptionScheduleParams is the set of parameters that can be used when creating or updating a subscription schedule.

AppendTo implements custom encoding logic for SubscriptionScheduleParams so that the special "now" value for start_date can be implemented (they're otherwise timestamps rather than strings).

SubscriptionSchedulePhase is a structure a phase of a subscription schedule.

SubscriptionSchedulePhaseItem represents plan details for a given phase

SubscriptionSchedulePhaseItemParams is a structure representing the parameters allowed to control a specic plan on a phase on a subscription schedule.

SubscriptionSchedulePhaseParams is a structure representing the parameters allowed to control a phase on a subscription schedule.

type SubscriptionScheduleReleaseParams struct {
	Params             `form:"*"`
	PreserveCancelDate *bool `form:"preserve_cancel_date"`
}

SubscriptionScheduleReleaseParams is the set of parameters that can be used when releasing a subscription schedule.

type SubscriptionScheduleRenewalInterval struct {
	Interval PlanInterval `form:"interval"`
	Length   int64        `form:"length"`
}

SubscriptionScheduleRenewalInterval represents the interval and duration of a schedule.

type SubscriptionScheduleStatus string

SubscriptionScheduleStatus is the list of allowed values for the schedule's status.

List of values that SubscriptionScheduleStatus can take.

type SubscriptionStatus string

SubscriptionStatus is the list of allowed values for the subscription's status.

List of values that SubscriptionStatus can take.

type SubscriptionTransferData struct {
	Destination *Account `json:"destination"`
}

SubscriptionTransferData represents the information for the transfer_data associated with a subscription.

type SubscriptionTransferDataParams struct {
	Destination *string `form:"destination"`
}

SubscriptionTransferDataParams is the set of parameters allowed for the transfer_data hash.

SupportedBackend is an enumeration of supported Stripe endpoints. Currently supported values are "api" and "uploads".

TaxID is the resource representing a customer's tax id. For more details see https://stripe.com/docs/api/customers/tax_id_object

UnmarshalJSON handles deserialization of a TaxID. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

TaxIDList is a list of tax ids as retrieved from a list endpoint.

TaxIDType is the list of allowed values for the tax id's type..

List of values that TaxIDType can take.

TaxIDVerification represents the verification details of a customer's tax id.

type TaxIDVerificationStatus string

TaxIDVerificationStatus is the list of allowed values for the tax id's verification status..

List of values that TaxIDDuration can take.

type TaxRate struct {
	Active       bool              `json:"active"`
	Created      int64             `json:"created"`
	Description  string            `json:"description"`
	DisplayName  string            `json:"display_name"`
	ID           string            `json:"id"`
	Inclusive    bool              `json:"inclusive"`
	Jurisdiction string            `json:"jurisdiction"`
	Livemode     bool              `json:"livemode"`
	Metadata     map[string]string `json:"metadata"`
	Object       string            `json:"object"`
	Percentage   float64           `json:"percentage"`
}

TaxRate is the resource representing a Stripe tax rate. For more details see https://stripe.com/docs/api/tax_rates/object.

UnmarshalJSON handles deserialization of a TaxRate. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

TaxRateList is a list of tax rates as retrieved from a list endpoint.

type TaxRateParams struct {
	Params       `form:"*"`
	Active       *bool    `form:"active"`
	Description  *string  `form:"description"`
	DisplayName  *string  `form:"display_name"`
	Inclusive    *bool    `form:"inclusive"`
	Jurisdiction *string  `form:"jurisdiction"`
	Percentage   *float64 `form:"percentage"`
}

TaxRateParams is the set of parameters that can be used when creating a tax rate. For more details see https://stripe.com/docs/api/tax_rates/create.

type TaxRatePercentageRangeQueryParams struct {
	GreaterThan        float64 `form:"gt"`
	GreaterThanOrEqual float64 `form:"gte"`
	LesserThan         float64 `form:"lt"`
	LesserThanOrEqual  float64 `form:"lte"`
}

TaxRatePercentageRangeQueryParams are used to filter tax rates by specific percentage values.

type TerminalConnectionToken struct {
	Location string `json:"location"`
	Object   string `json:"object"`
	Secret   string `json:"secret"`
}

TerminalConnectionToken is the resource representing a Stripe terminal connection token.

type TerminalConnectionTokenParams struct {
	Params   `form:"*"`
	Location string `form:"location"`
}

TerminalConnectionTokenParams is the set of parameters that can be used when creating a terminal connection token.

TerminalLocation is the resource representing a Stripe terminal location.

TerminalLocationList is a list of terminal readers as retrieved from a list endpoint.

type TerminalLocationListParams struct {
	ListParams `form:"*"`
}

TerminalLocationListParams is the set of parameters that can be used when listing temrinal locations.

TerminalLocationParams is the set of parameters that can be used when creating or updating a terminal location.

type TerminalReader struct {
	Deleted         bool              `json:"deleted"`
	DeviceSwVersion string            `json:"device_sw_version"`
	DeviceType      string            `json:"device_type"`
	ID              string            `json:"id"`
	IPAddress       string            `json:"ip_address"`
	Label           string            `json:"label"`
	Livemode        bool              `json:"livemode"`
	Location        string            `json:"location"`
	Metadata        map[string]string `json:"metadata"`
	Object          string            `json:"object"`
	SerialNumber    string            `json:"serial_number"`
	Status          string            `json:"status"`
}

TerminalReader is the resource representing a Stripe terminal reader.

type TerminalReaderGetParams struct {
	Params `form:"*"`
}

TerminalReaderGetParams is the set of parameters that can be used to get a terminal reader.

TerminalReaderList is a list of terminal readers as retrieved from a list endpoint.

type TerminalReaderListParams struct {
	ListParams `form:"*"`
	DeviceType *string `form:"device_type"`
	Location   *string `form:"location"`
	Status     *string `form:"status"`
}

TerminalReaderListParams is the set of parameters that can be used when listing temrinal readers.

type TerminalReaderParams struct {
	Params           `form:"*"`
	Label            *string `form:"label"`
	Location         *string `form:"location"`
	RegistrationCode *string `form:"registration_code"`
}

TerminalReaderParams is the set of parameters that can be used for creating or updating a terminal reader.

type ThreeDSecureParams struct {
	Params    `form:"*"`
	Amount    *int64  `form:"amount"`
	Card      *string `form:"card"`
	Currency  *string `form:"currency"`
	Customer  *string `form:"customer"`
	ReturnURL *string `form:"return_url"`
}

ThreeDSecureParams is the set of parameters that can be used when creating a 3DS object.

type ThreeDSecureStatus string

ThreeDSecureStatus represents the possible statuses of a ThreeDSecure object.

TokenType is the list of allowed values for a token's type.

List of values that TokenType can take.

type Topup struct {
	Amount                   int64               `json:"amount"`
	ArrivalDate              int64               `json:"arrival_date"`
	BalanceTransaction       *BalanceTransaction `json:"balance_transaction"`
	Created                  int64               `json:"created"`
	Currency                 Currency            `json:"currency"`
	Description              string              `json:"description"`
	ExpectedAvailabilityDate int64               `json:"expected_availability_date"`
	FailureCode              string              `json:"failure_code"`
	FailureMessage           string              `json:"failure_message"`
	ID                       string              `json:"id"`
	Livemode                 bool                `json:"livemode"`
	Source                   *PaymentSource      `json:"source"`
	StatementDescriptor      string              `json:"statement_descriptor"`
	Status                   string              `json:"status"`
	TransferGroup            string              `json:"transfer_group"`
}

Topup is the resource representing a Stripe top-up. For more details see https://stripe.com/docs/api#topups.

TopupList is a list of top-ups as retrieved from a list endpoint.

Transfer is the resource representing a Stripe transfer. For more details see https://stripe.com/docs/api#transfers.

UnmarshalJSON handles deserialization of a Transfer. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

type TransferDestination struct {
	Account *Account `json:"-"`
	ID      string   `json:"id"`
}

TransferDestination describes the destination of a Transfer. The Type should indicate which object is fleshed out For more details see https://stripe.com/docs/api/go#transfer_object

UnmarshalJSON handles deserialization of a TransferDestination. This custom unmarshaling is needed because the specific type of destination it refers to is specified in the JSON

TransferList is a list of transfers as retrieved from a list endpoint.

type TransferSourceType string

TransferSourceType is the list of allowed values for the transfer's source_type field.

List of values that TransferSourceType can take.

type UsageRecordParams struct {
	Params           `form:"*"`
	Action           *string `form:"action"`
	Quantity         *int64  `form:"quantity"`
	SubscriptionItem *string `form:"-"` 
	Timestamp        *int64  `form:"timestamp"`
}

UsageRecordParams create a usage record for a specified subscription item and date, and fills it with a quantity.

UsageRecordSummaryList is a list of usage record summaries as retrieved from a list endpoint.

type UsageRecordSummaryListParams struct {
	ListParams       `form:"*"`
	SubscriptionItem *string `form:"-"` 
}

UsageRecordSummaryListParams is the set of parameters that can be used when listing charges.

type VerificationDocumentDetailsCode string

VerificationDocumentDetailsCode is a machine-readable code specifying the verification state of a document associated with a person.

List of values that IdentityVerificationDetailsCode can take.

type WebhookEndpoint struct {
	APIVersion    string   `json:"api_version"`
	Application   string   `json:"application"`
	Connect       bool     `json:"connect"`
	Created       int64    `json:"created"`
	Deleted       bool     `json:"deleted"`
	Description   string   `json:"description"`
	EnabledEvents []string `json:"enabled_events"`
	ID            string   `json:"id"`
	Livemode      bool     `json:"livemode"`
	Object        string   `json:"object"`
	Secret        string   `json:"secret"`
	Status        string   `json:"status"`
	URL           string   `json:"url"`
}

WebhookEndpoint is the resource representing a Stripe webhook endpoint. For more details see https://stripe.com/docs/api#webhook_endpoints.

UnmarshalJSON handles deserialization of a WebhookEndpoint. This custom unmarshaling is needed because the resulting property may be an id or the full struct if it was expanded.

WebhookEndpointList is a list of webhook endpoints as retrieved from a list endpoint.

type WebhookEndpointParams struct {
	Params        `form:"*"`
	Connect       *bool     `form:"connect"`
	Description   *string   `form:"description"`
	Disabled      *bool     `form:"disabled"`
	EnabledEvents []*string `form:"enabled_events"`
	URL           *string   `form:"url"`

	
	
	APIVersion *string `form:"api_version"`
}

WebhookEndpointParams is the set of parameters that can be used when creating a webhook endpoint. For more details see https://stripe.com/docs/api#create_webhook_endpoint.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4