stripe

package module
v73.0.0-...-5525a96 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 26 Imported by: 0

README

Go Stripe

Go Reference Build Status Coverage Status

The official Stripe Go client library.

Installation

Make sure your project is using Go Modules (it will have a go.mod file in its root if it already is):

go mod init

Then, reference stripe-go in a Go program with import:

import (
	"github.com/stripe/stripe-go/v73"
	"github.com/stripe/stripe-go/v73/customer"
)

Run any of the normal go commands (build/install/test). The Go toolchain will resolve and fetch the stripe-go module automatically.

Alternatively, you can also explicitly go get the package into a project:

go get -u github.com/stripe/stripe-go/v73

Documentation

For a comprehensive list of examples, check out the API documentation.

See video demonstrations covering how to use the library.

For details on all the functionality in this library, see the Go documentation.

Below are a few simple examples:

Customers
params := &stripe.CustomerParams{
	Description:      stripe.String("Stripe Developer"),
	Email:            stripe.String("gostripe@stripe.com"),
	PreferredLocales: stripe.StringSlice([]string{"en", "es"}),
}

c, err := customer.New(params)
PaymentIntents
params := &stripe.PaymentIntentListParams{
	Customer: stripe.String(customer.ID),
}

i := paymentintent.List(params)
for i.Next() {
	pi := i.PaymentIntent()
}

if err := i.Err(); err != nil {
	// handle
}
Events
i := event.List(nil)
for i.Next() {
	e := i.Event()

	// access event data via e.GetObjectValue("resource_name_based_on_type", "resource_property_name")
	// alternatively you can access values via e.Data.Object["resource_name_based_on_type"].(map[string]interface{})["resource_property_name"]

	// access previous attributes via e.GetPreviousValue("resource_name_based_on_type", "resource_property_name")
	// alternatively you can access values via e.Data.PrevPreviousAttributes["resource_name_based_on_type"].(map[string]interface{})["resource_property_name"]
}

Alternatively, you can use the event.Data.Raw property to unmarshal to the appropriate struct.

Authentication with Connect

There are two ways of authenticating requests when performing actions on behalf of a connected account, one that uses the Stripe-Account header containing an account's ID, and one that uses the account's keys. Usually the former is the recommended approach. See the documentation for more information.

To use the Stripe-Account approach, use SetStripeAccount() on a ListParams or Params class. For example:

// For a list request
listParams := &stripe.CustomerListParams{}
listParams.SetStripeAccount("acct_123")
// For any other kind of request
params := &stripe.CustomerParams{}
params.SetStripeAccount("acct_123")

To use a key, pass it to API's Init function:


import (
	"github.com/stripe/stripe-go/v73"
	"github.com/stripe/stripe-go/v73/client"
)

stripe := &client.API{}
stripe.Init("access_token", nil)
Google AppEngine

If you're running the client in a Google AppEngine environment, you'll need to create a per-request Stripe client since the http.DefaultClient is not available. Here's a sample handler:

import (
	"fmt"
	"net/http"

	"google.golang.org/appengine"
	"google.golang.org/appengine/urlfetch"

	"github.com/stripe/stripe-go/v73"
	"github.com/stripe/stripe-go/v73/client"
)

func handler(w http.ResponseWriter, r *http.Request) {
	c := appengine.NewContext(r)
	httpClient := urlfetch.Client(c)

	sc := client.New("sk_test_123", stripe.NewBackends(httpClient))

	params := &stripe.CustomerParams{
		Description: stripe.String("Stripe Developer"),
		Email:       stripe.String("gostripe@stripe.com"),
	}
	customer, err := sc.Customers.New(params)
	if err != nil {
		fmt.Fprintf(w, "Could not create customer: %v", err)
	}
	fmt.Fprintf(w, "Customer created: %v", customer.ID)
}

Usage

While some resources may contain more/less APIs, the following pattern is applied throughout the library for a given $resource$:

Without a Client

If you're only dealing with a single key, you can simply import the packages required for the resources you're interacting with without the need to create a client.

import (
	"github.com/stripe/stripe-go/v73"
	"github.com/stripe/stripe-go/v73/$resource$"
)

// Setup
stripe.Key = "sk_key"

// Set backend (optional, useful for mocking)
// stripe.SetBackend("api", backend)

// Create
resource, err := $resource$.New(&stripe.$Resource$Params{})

// Get
resource, err = $resource$.Get(id, &stripe.$Resource$Params{})

// Update
resource, err = $resource$.Update(id, &stripe.$Resource$Params{})

// Delete
resourceDeleted, err := $resource$.Del(id, &stripe.$Resource$Params{})

// List
i := $resource$.List(&stripe.$Resource$ListParams{})
for i.Next() {
	resource := i.$Resource$()
}

if err := i.Err(); err != nil {
	// handle
}
With a Client

If you're dealing with multiple keys, it is recommended you use client.API. This allows you to create as many clients as needed, each with their own individual key.

import (
	"github.com/stripe/stripe-go/v73"
	"github.com/stripe/stripe-go/v73/client"
)

// Setup
sc := &client.API{}
sc.Init("sk_key", nil) // the second parameter overrides the backends used if needed for mocking

// Create
$resource$, err := sc.$Resource$s.New(&stripe.$Resource$Params{})

// Get
$resource$, err = sc.$Resource$s.Get(id, &stripe.$Resource$Params{})

// Update
$resource$, err = sc.$Resource$s.Update(id, &stripe.$Resource$Params{})

// Delete
$resource$Deleted, err := sc.$Resource$s.Del(id, &stripe.$Resource$Params{})

// List
i := sc.$Resource$s.List(&stripe.$Resource$ListParams{})
for i.Next() {
	$resource$ := i.$Resource$()
}

if err := i.Err(); err != nil {
	// handle
}
Accessing the Last Response

Use LastResponse on any APIResource to look at the API response that generated the current object:

c, err := coupon.New(...)
requestID := coupon.LastResponse.RequestID

Similarly, for List operations, the last response is available on the list object attached to the iterator:

it := coupon.List(...)
for it.Next() {
    // Last response *NOT* on the individual iterator object
    // it.Coupon().LastResponse // wrong

    // But rather on the list object, also accessible through the iterator
    requestID := it.CouponList().LastResponse.RequestID
}

See the definition of APIResponse for available fields.

Note that where API resources are nested in other API resources, only LastResponse on the top-level resource is set.

Automatic Retries

The library automatically retries requests on intermittent failures like on a connection error, timeout, or on certain API responses like a status 409 Conflict. Idempotency keys are always added to requests to make any such subsequent retries safe.

By default, it will perform up to two retries. That number can be configured with MaxNetworkRetries:

import (
	"github.com/stripe/stripe-go/v73"
	"github.com/stripe/stripe-go/v73/client"
)

config := &stripe.BackendConfig{
    MaxNetworkRetries: stripe.Int64(0), // Zero retries
}

sc := &client.API{}
sc.Init("sk_key", &stripe.Backends{
    API:     stripe.GetBackendWithConfig(stripe.APIBackend, config),
    Uploads: stripe.GetBackendWithConfig(stripe.UploadsBackend, config),
})

coupon, err := sc.Coupons.New(...)
Configuring Logging

By default, the library logs error messages only (which are sent to stderr). Configure default logging using the global DefaultLeveledLogger variable:

stripe.DefaultLeveledLogger = &stripe.LeveledLogger{
    Level: stripe.LevelInfo,
}

Or on a per-backend basis:

config := &stripe.BackendConfig{
    LeveledLogger: &stripe.LeveledLogger{
        Level: stripe.LevelInfo,
    },
}

It's possible to use non-Stripe leveled loggers as well. Stripe expects loggers to comply to the following interface:

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

Some loggers like Logrus and Zap's SugaredLogger support this interface out-of-the-box so it's possible to set DefaultLeveledLogger to a *logrus.Logger or *zap.SugaredLogger directly. For others it may be necessary to write a thin shim layer to support them.

Expanding Objects

All expandable objects in stripe-go take the form of a full resource struct, but unless expansion is requested, only the ID field of that struct is populated. Expansion is requested by calling AddExpand on parameter structs. For example:

//
// *Without* expansion
//
c, _ := charge.Get("ch_123", nil)

c.Customer.ID    // Only ID is populated
c.Customer.Name  // All other fields are always empty

//
// With expansion
//
p := &stripe.ChargeParams{}
p.AddExpand("customer")
c, _ = charge.Get("ch_123", p)

c.Customer.ID    // ID is still available
c.Customer.Name  // Name is now also available (if it had a value)
How to use undocumented parameters and properties

stripe-go is a typed library and it supports all public properties or parameters.

Stripe sometimes launches private beta features which introduce new properties or parameters that are not immediately public. These will not have typed accessors in the stripe-go library but can still be used.

Parameters

To pass undocumented parameters to Stripe using stripe-go you need to use the AddExtra() method, as shown below:


	params := &stripe.CustomerParams{
		Email: stripe.String("jenny.rosen@example.com")
	}

	params.AddExtra("secret_feature_enabled", "true")
	params.AddExtra("secret_parameter[primary]","primary value")
	params.AddExtra("secret_parameter[secondary]","secondary value")

	customer, err := customer.Create(params)
Properties

You can access undocumented properties returned by Stripe by querying the raw response JSON object. An example of this is shown below:

customer, _ = customer.Get("cus_1234", nil);

var rawData map[string]interface{}
_ = json.Unmarshal(customer.LastResponse.RawJSON, &rawData)

secret_feature_enabled, _ := string(rawData["secret_feature_enabled"].(bool))

secret_parameter, ok := rawData["secret_parameter"].(map[string]interface{})
if ok {
	primary := secret_parameter["primary"].(string)
	secondary := secret_parameter["secondary"].(string)
} 
Webhook signing

Stripe can optionally sign the webhook events it sends to your endpoint, allowing you to validate that they were not sent by a third-party. You can read more about it here.

Testing Webhook signing

You can use stripe.webhook.GenerateTestSignedPayload to mock webhook events that come from Stripe:

payload := map[string]interface{}{
	"id":          "evt_test_webhook",
	"object":      "event",
	"api_version": stripe.APIVersion,
}
testSecret := "whsec_test_secret"

payloadBytes, err := json.Marshal(payload)

signedPayload := GenerateTestSignedPayload(&UnsignedPayload{payload: payloadBytes, secret: testSecret})
event, err := ConstructEvent(signedPayload.payload, signedPayload.header, signedPayload.secret)

if event.ID = payload.id {
	// Do something with the mocked signed event
} else {
	// Handle invalid event payload
}
Writing a Plugin

If you're writing a plugin that uses the library, we'd appreciate it if you identified using stripe.SetAppInfo:

stripe.SetAppInfo(&stripe.AppInfo{
	Name:    "MyAwesomePlugin",
	URL:     "https://myawesomeplugin.info",
	Version: "1.2.34",
})

This information is passed along when the library makes calls to the Stripe API. Note that while Name is always required, URL and Version are optional.

Request latency telemetry

By default, the library sends request latency telemetry to Stripe. These numbers help Stripe improve the overall latency of its API for all users.

You can disable this behavior if you prefer:

config := &stripe.BackendConfig{
	EnableTelemetry: stripe.Bool(false),
}
Beta SDKs

Stripe has features in the beta phase that can be accessed via the beta version of this package. We would love for you to try these and share feedback with us before these features reach the stable phase. To install a beta version of stripe-go use the commit notation of the go get command to point to a beta tag:

go get -u github.com/stripe/stripe-go/v73@v73.3.0-beta.1

Note There can be breaking changes between beta versions.

We highly recommend keeping an eye on when the beta feature you are interested in goes from beta to stable so that you can move from using a beta version of the SDK to the stable version.

If your beta feature requires a Stripe-Version header to be sent, use the stripe.APIVersion field to set it:

Note The APIVersion can only be set in beta versions of the library.

stripe.APIVersion += "; feature_beta=v3"

Support

New features and bug fixes are released on the latest major version of the Stripe Go client library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.

Development

Pull requests from the community are welcome. If you submit one, please keep the following guidelines in mind:

  1. Code must be go fmt compliant.
  2. All types, structs and funcs should be documented.
  3. Ensure that make test succeeds.

Test

The test suite needs testify's require package to run:

github.com/stretchr/testify/require

Before running the tests, make sure to grab all of the package's dependencies:

go get -t -v

It also depends on stripe-mock, so make sure to fetch and run it from a background terminal (stripe-mock's README also contains instructions for installing via Homebrew and other methods):

go get -u github.com/stripe/stripe-mock
stripe-mock

Run all tests:

make test

Run tests for one package:

go test ./invoice

Run a single test:

go test ./invoice -run TestInvoiceGet

For any requests, bug or comments, please open an issue or submit a pull request.

Documentation

Overview

Package stripe provides the binding for Stripe REST APIs.

Index

Examples

Constants

View Source
const (
	EndingBefore  = "ending_before"
	StartingAfter = "starting_after"
)

Contains constants for the names of parameters used for pagination in list APIs.

View Source
const (
	// APIVersion is the currently supported API version
	APIVersion string = apiVersion

	// APIBackend is a constant representing the API service backend.
	APIBackend SupportedBackend = "api"

	// APIURL is the URL of the API service backend.
	APIURL string = "https://api.stripe.com"

	// ClientVersion is the version of the stripe-go library being used.
	ClientVersion string = clientversion

	// ConnectURL is the URL for OAuth.
	ConnectURL string = "https://connect.stripe.com"

	// ConnectBackend is a constant representing the connect service backend for
	// OAuth.
	ConnectBackend SupportedBackend = "connect"

	// DefaultMaxNetworkRetries is the default maximum number of retries made
	// by a Stripe client.
	DefaultMaxNetworkRetries int64 = 2

	// UnknownPlatform is the string returned as the system name if we couldn't get
	// one from `uname`.
	UnknownPlatform string = "unknown platform"

	// UploadsBackend is a constant representing the uploads service backend.
	UploadsBackend SupportedBackend = "uploads"

	// UploadsURL is the URL of the uploads service backend.
	UploadsURL string = "https://files.stripe.com"
)
View Source
const (
	UsageRecordActionIncrement string = "increment"
	UsageRecordActionSet       string = "set"
)

Possible values for the action parameter on usage record creation.

View Source
const (
	Page = "page"
)

Contains constants for the names of parameters used for pagination in search APIs.

Variables

View Source
var EnableTelemetry = true

EnableTelemetry is a global override for enabling client telemetry, which sends request performance metrics to Stripe via the `X-Stripe-Client-Telemetry` header. If set to true, all clients will send telemetry metrics. Defaults to true.

Telemetry can also be disabled on a per-client basis by instead creating a `BackendConfig` with `EnableTelemetry: false`.

Key is the Stripe API key used globally in the binding.

Functions

func Bool

func Bool(v bool) *bool

Bool returns a pointer to the bool value passed in.

func BoolSlice

func BoolSlice(v []bool) []*bool

BoolSlice returns a slice of bool pointers given a slice of bools.

func BoolValue

func BoolValue(v *bool) bool

BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.

func Float64

func Float64(v float64) *float64

Float64 returns a pointer to the float64 value passed in.

func Float64Slice

func Float64Slice(v []float64) []*float64

Float64Slice returns a slice of float64 pointers given a slice of float64s.

func Float64Value

func Float64Value(v *float64) float64

Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.

func FormatURLPath

func FormatURLPath(format string, params ...string) string

FormatURLPath takes a format string (of the kind used in the fmt package) representing a URL path with a number of parameters that belong in the path and returns a formatted string.

This is mostly a pass through to Sprintf. It exists to make it it impossible to accidentally provide a parameter type that would be formatted improperly; for example, a string pointer instead of a string.

It also URL-escapes every given parameter. This usually isn't necessary for a standard Stripe ID, but is needed in places where user-provided IDs are allowed, like in coupons or plans. We apply it broadly for extra safety.

func Int64

func Int64(v int64) *int64

Int64 returns a pointer to the int64 value passed in.

func Int64Slice

func Int64Slice(v []int64) []*int64

Int64Slice returns a slice of int64 pointers given a slice of int64s.

func Int64Value

func Int64Value(v *int64) int64

Int64Value returns the value of the int64 pointer passed in or 0 if the pointer is nil.

func NewIdempotencyKey

func NewIdempotencyKey() string

NewIdempotencyKey generates a new idempotency key that can be used on a request.

func ParseID

func ParseID(data []byte) (string, bool)

ParseID attempts to parse a string scalar from a given JSON value which is still encoded as []byte. If the value was a string, it returns the string along with true as the second return value. If not, false is returned as the second return value.

The purpose of this function is to detect whether a given value in a response from the Stripe API is a string ID or an expanded object.

func SetAppInfo

func SetAppInfo(info *AppInfo)

SetAppInfo sets app information. See AppInfo.

func SetBackend

func SetBackend(backend SupportedBackend, b Backend)

SetBackend sets the backend used in the binding.

func SetHTTPClient

func SetHTTPClient(client *http.Client)

SetHTTPClient overrides the default HTTP client. This is useful if you're running in a Google AppEngine environment where the http.DefaultClient is not available.

func String

func String(v string) *string

String returns a pointer to the string value passed in.

func StringSlice

func StringSlice(v []string) []*string

StringSlice returns a slice of string pointers given a slice of strings.

func StringValue

func StringValue(v *string) string

StringValue returns the value of the string pointer passed in or "" if the pointer is nil.

Types

type APIError

type APIError struct {
	// contains filtered or unexported fields
}

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

func (*APIError) Error

func (e *APIError) Error() string

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

type APIResource

type APIResource struct {
	LastResponse *APIResponse `json:"-"`
}

APIResource is a type assigned to structs that may come from Stripe API endpoints and contains facilities common to all of them.

func (*APIResource) SetLastResponse

func (r *APIResource) SetLastResponse(response *APIResponse)

SetLastResponse sets the HTTP response that returned the API resource.

type APIResponse

type APIResponse struct {
	// Header contain a map of all HTTP header keys to values. Its behavior and
	// caveats are identical to that of http.Header.
	Header http.Header

	// IdempotencyKey contains the idempotency key used with this request.
	// Idempotency keys are a Stripe-specific concept that helps guarantee that
	// requests that fail and need to be retried are not duplicated.
	IdempotencyKey string

	// RawJSON contains the response body as raw bytes.
	RawJSON []byte

	// RequestID contains a string that uniquely identifies the Stripe request.
	// Used for debugging or support purposes.
	RequestID string

	// Status is a status code and message. e.g. "200 OK"
	Status string

	// StatusCode is a status code as integer. e.g. 200
	StatusCode int
}

APIResponse encapsulates some common features of a response from the Stripe API.

type APIStream

type APIStream struct {
	LastResponse *StreamingAPIResponse
}

APIStream is a type assigned to streaming responses that may come from Stripe API

func (*APIStream) SetLastResponse

func (r *APIStream) SetLastResponse(response *StreamingAPIResponse)

SetLastResponse sets the HTTP response that returned the API resource.

type Account

type Account struct {
	APIResource
	// Business information about the account.
	BusinessProfile *AccountBusinessProfile `json:"business_profile"`
	// The business type.
	BusinessType AccountBusinessType  `json:"business_type"`
	Capabilities *AccountCapabilities `json:"capabilities"`
	// Whether the account can create live charges.
	ChargesEnabled bool               `json:"charges_enabled"`
	Company        *AccountCompany    `json:"company"`
	Controller     *AccountController `json:"controller"`
	// The account's country.
	Country string `json:"country"`
	// Time at which the account was connected. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts).
	DefaultCurrency Currency `json:"default_currency"`
	Deleted         bool     `json:"deleted"`
	// Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.
	DetailsSubmitted bool `json:"details_submitted"`
	// An email address associated with the account. You can treat this as metadata: it is not used for authentication or messaging account holders.
	Email string `json:"email"`
	// External accounts (bank accounts and debit cards) currently attached to this account
	ExternalAccounts   *AccountExternalAccountList `json:"external_accounts"`
	FutureRequirements *AccountFutureRequirements  `json:"future_requirements"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// This is an object representing a person associated with a Stripe account.
	//
	// A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
	// See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.
	//
	// Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).
	Individual *Person `json:"individual"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Whether Stripe can send payouts to this account.
	PayoutsEnabled bool                 `json:"payouts_enabled"`
	Requirements   *AccountRequirements `json:"requirements"`
	// Options for customizing how the account functions within Stripe.
	Settings      *AccountSettings      `json:"settings"`
	TOSAcceptance *AccountTOSAcceptance `json:"tos_acceptance"`
	// The Stripe account type. Can be `standard`, `express`, or `custom`.
	Type AccountType `json:"type"`
}

This is an object representing a Stripe account. You can retrieve it to see properties on the account like its current e-mail address or if the account is enabled yet to make live charges.

Some properties, marked below, are available only to platforms that want to [create and manage Express or Custom accounts](https://stripe.com/docs/connect/accounts).

func (*Account) UnmarshalJSON

func (a *Account) UnmarshalJSON(data []byte) error

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 AccountBusinessProfile

type AccountBusinessProfile struct {
	// [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
	MCC string `json:"mcc"`
	// The customer-facing business name.
	Name string `json:"name"`
	// Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes.
	ProductDescription string `json:"product_description"`
	// A publicly available mailing address for sending support issues to.
	SupportAddress *Address `json:"support_address"`
	// A publicly available email address for sending support issues to.
	SupportEmail string `json:"support_email"`
	// A publicly available phone number to call with support issues.
	SupportPhone string `json:"support_phone"`
	// A publicly available website for handling support issues.
	SupportURL string `json:"support_url"`
	// The business's publicly available website.
	URL string `json:"url"`
}

Business information about the account.

type AccountBusinessProfileParams

type AccountBusinessProfileParams struct {
	// [The merchant category code for the account](https://stripe.com/docs/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
	MCC *string `form:"mcc"`
	// The customer-facing business name.
	Name *string `form:"name"`
	// Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes.
	ProductDescription *string `form:"product_description"`
	// A publicly available mailing address for sending support issues to.
	SupportAddress *AddressParams `form:"support_address"`
	// A publicly available email address for sending support issues to.
	SupportEmail *string `form:"support_email"`
	// A publicly available phone number to call with support issues.
	SupportPhone *string `form:"support_phone"`
	// A publicly available website for handling support issues.
	SupportURL *string `form:"support_url"`
	// The business's publicly available website.
	URL *string `form:"url"`
}

Business information about the account.

type AccountBusinessType

type AccountBusinessType string

The business type.

const (
	AccountBusinessTypeCompany          AccountBusinessType = "company"
	AccountBusinessTypeGovernmentEntity AccountBusinessType = "government_entity"
	AccountBusinessTypeIndividual       AccountBusinessType = "individual"
	AccountBusinessTypeNonProfit        AccountBusinessType = "non_profit"
)

List of values that AccountBusinessType can take

type AccountCapabilities

type AccountCapabilities struct {
	// The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges.
	ACSSDebitPayments AccountCapabilityStatus `json:"acss_debit_payments"`
	// The status of the Affirm capability of the account, or whether the account can directly process Affirm charges.
	AffirmPayments AccountCapabilityStatus `json:"affirm_payments"`
	// The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges.
	AfterpayClearpayPayments AccountCapabilityStatus `json:"afterpay_clearpay_payments"`
	// The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges.
	AUBECSDebitPayments AccountCapabilityStatus `json:"au_becs_debit_payments"`
	// The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges.
	BACSDebitPayments AccountCapabilityStatus `json:"bacs_debit_payments"`
	// The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges.
	BancontactPayments AccountCapabilityStatus `json:"bancontact_payments"`
	// The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges.
	BankTransferPayments AccountCapabilityStatus `json:"bank_transfer_payments"`
	// The status of the blik payments capability of the account, or whether the account can directly process blik charges.
	BLIKPayments AccountCapabilityStatus `json:"blik_payments"`
	// The status of the boleto payments capability of the account, or whether the account can directly process boleto charges.
	BoletoPayments AccountCapabilityStatus `json:"boleto_payments"`
	// The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards
	CardIssuing AccountCapabilityStatus `json:"card_issuing"`
	// The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges.
	CardPayments AccountCapabilityStatus `json:"card_payments"`
	// The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency.
	CartesBancairesPayments AccountCapabilityStatus `json:"cartes_bancaires_payments"`
	// The status of the EPS payments capability of the account, or whether the account can directly process EPS charges.
	EPSPayments AccountCapabilityStatus `json:"eps_payments"`
	// The status of the FPX payments capability of the account, or whether the account can directly process FPX charges.
	FPXPayments AccountCapabilityStatus `json:"fpx_payments"`
	// The status of the giropay payments capability of the account, or whether the account can directly process giropay charges.
	GiropayPayments AccountCapabilityStatus `json:"giropay_payments"`
	// The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges.
	GrabpayPayments AccountCapabilityStatus `json:"grabpay_payments"`
	// The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges.
	IDEALPayments AccountCapabilityStatus `json:"ideal_payments"`
	// The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency.
	JCBPayments AccountCapabilityStatus `json:"jcb_payments"`
	// The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges.
	KlarnaPayments AccountCapabilityStatus `json:"klarna_payments"`
	// The status of the konbini payments capability of the account, or whether the account can directly process konbini charges.
	KonbiniPayments AccountCapabilityStatus `json:"konbini_payments"`
	// The status of the legacy payments capability of the account.
	LegacyPayments AccountCapabilityStatus `json:"legacy_payments"`
	// The status of the link_payments capability of the account, or whether the account can directly process Link charges.
	LinkPayments AccountCapabilityStatus `json:"link_payments"`
	// The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges.
	OXXOPayments AccountCapabilityStatus `json:"oxxo_payments"`
	// The status of the P24 payments capability of the account, or whether the account can directly process P24 charges.
	P24Payments AccountCapabilityStatus `json:"p24_payments"`
	// The status of the paynow payments capability of the account, or whether the account can directly process paynow charges.
	PayNowPayments AccountCapabilityStatus `json:"paynow_payments"`
	// The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.
	PromptPayPayments AccountCapabilityStatus `json:"promptpay_payments"`
	// The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges.
	SEPADebitPayments AccountCapabilityStatus `json:"sepa_debit_payments"`
	// The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges.
	SofortPayments AccountCapabilityStatus `json:"sofort_payments"`
	// The status of the tax reporting 1099-K (US) capability of the account.
	TaxReportingUS1099K AccountCapabilityStatus `json:"tax_reporting_us_1099_k"`
	// The status of the tax reporting 1099-MISC (US) capability of the account.
	TaxReportingUS1099MISC AccountCapabilityStatus `json:"tax_reporting_us_1099_misc"`
	// The status of the transfers capability of the account, or whether your platform can transfer funds to the account.
	Transfers AccountCapabilityStatus `json:"transfers"`
	// The status of the banking capability, or whether the account can have bank accounts.
	Treasury AccountCapabilityStatus `json:"treasury"`
	// The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges.
	USBankAccountACHPayments AccountCapabilityStatus `json:"us_bank_account_ach_payments"`
}

type AccountCapabilitiesACSSDebitPaymentsParams

type AccountCapabilitiesACSSDebitPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The acss_debit_payments capability.

type AccountCapabilitiesAUBECSDebitPaymentsParams

type AccountCapabilitiesAUBECSDebitPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The au_becs_debit_payments capability.

type AccountCapabilitiesAffirmPaymentsParams

type AccountCapabilitiesAffirmPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The affirm_payments capability.

type AccountCapabilitiesAfterpayClearpayPaymentsParams

type AccountCapabilitiesAfterpayClearpayPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The afterpay_clearpay_payments capability.

type AccountCapabilitiesBACSDebitPaymentsParams

type AccountCapabilitiesBACSDebitPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The bacs_debit_payments capability.

type AccountCapabilitiesBLIKPaymentsParams

type AccountCapabilitiesBLIKPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The blik_payments capability.

type AccountCapabilitiesBancontactPaymentsParams

type AccountCapabilitiesBancontactPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The bancontact_payments capability.

type AccountCapabilitiesBankTransferPaymentsParams

type AccountCapabilitiesBankTransferPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The bank_transfer_payments capability.

type AccountCapabilitiesBoletoPaymentsParams

type AccountCapabilitiesBoletoPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The boleto_payments capability.

type AccountCapabilitiesCardIssuingParams

type AccountCapabilitiesCardIssuingParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The card_issuing capability.

type AccountCapabilitiesCardPaymentsParams

type AccountCapabilitiesCardPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The card_payments capability.

type AccountCapabilitiesCartesBancairesPaymentsParams

type AccountCapabilitiesCartesBancairesPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The cartes_bancaires_payments capability.

type AccountCapabilitiesEPSPaymentsParams

type AccountCapabilitiesEPSPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The eps_payments capability.

type AccountCapabilitiesFPXPaymentsParams

type AccountCapabilitiesFPXPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The fpx_payments capability.

type AccountCapabilitiesGiropayPaymentsParams

type AccountCapabilitiesGiropayPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The giropay_payments capability.

type AccountCapabilitiesGrabpayPaymentsParams

type AccountCapabilitiesGrabpayPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The grabpay_payments capability.

type AccountCapabilitiesIDEALPaymentsParams

type AccountCapabilitiesIDEALPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The ideal_payments capability.

type AccountCapabilitiesJCBPaymentsParams

type AccountCapabilitiesJCBPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The jcb_payments capability.

type AccountCapabilitiesKlarnaPaymentsParams

type AccountCapabilitiesKlarnaPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The klarna_payments capability.

type AccountCapabilitiesKonbiniPaymentsParams

type AccountCapabilitiesKonbiniPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The konbini_payments capability.

type AccountCapabilitiesLegacyPaymentsParams

type AccountCapabilitiesLegacyPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The legacy_payments capability.

type AccountCapabilitiesLinkPaymentsParams

type AccountCapabilitiesLinkPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The link_payments capability.

type AccountCapabilitiesOXXOPaymentsParams

type AccountCapabilitiesOXXOPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The oxxo_payments capability.

type AccountCapabilitiesP24PaymentsParams

type AccountCapabilitiesP24PaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The p24_payments capability.

type AccountCapabilitiesParams

type AccountCapabilitiesParams struct {
	// The acss_debit_payments capability.
	ACSSDebitPayments *AccountCapabilitiesACSSDebitPaymentsParams `form:"acss_debit_payments"`
	// The affirm_payments capability.
	AffirmPayments *AccountCapabilitiesAffirmPaymentsParams `form:"affirm_payments"`
	// The afterpay_clearpay_payments capability.
	AfterpayClearpayPayments *AccountCapabilitiesAfterpayClearpayPaymentsParams `form:"afterpay_clearpay_payments"`
	// The au_becs_debit_payments capability.
	AUBECSDebitPayments *AccountCapabilitiesAUBECSDebitPaymentsParams `form:"au_becs_debit_payments"`
	// The bacs_debit_payments capability.
	BACSDebitPayments *AccountCapabilitiesBACSDebitPaymentsParams `form:"bacs_debit_payments"`
	// The bancontact_payments capability.
	BancontactPayments *AccountCapabilitiesBancontactPaymentsParams `form:"bancontact_payments"`
	// The bank_transfer_payments capability.
	BankTransferPayments *AccountCapabilitiesBankTransferPaymentsParams `form:"bank_transfer_payments"`
	// The blik_payments capability.
	BLIKPayments *AccountCapabilitiesBLIKPaymentsParams `form:"blik_payments"`
	// The boleto_payments capability.
	BoletoPayments *AccountCapabilitiesBoletoPaymentsParams `form:"boleto_payments"`
	// The card_issuing capability.
	CardIssuing *AccountCapabilitiesCardIssuingParams `form:"card_issuing"`
	// The card_payments capability.
	CardPayments *AccountCapabilitiesCardPaymentsParams `form:"card_payments"`
	// The cartes_bancaires_payments capability.
	CartesBancairesPayments *AccountCapabilitiesCartesBancairesPaymentsParams `form:"cartes_bancaires_payments"`
	// The eps_payments capability.
	EPSPayments *AccountCapabilitiesEPSPaymentsParams `form:"eps_payments"`
	// The fpx_payments capability.
	FPXPayments *AccountCapabilitiesFPXPaymentsParams `form:"fpx_payments"`
	// The giropay_payments capability.
	GiropayPayments *AccountCapabilitiesGiropayPaymentsParams `form:"giropay_payments"`
	// The grabpay_payments capability.
	GrabpayPayments *AccountCapabilitiesGrabpayPaymentsParams `form:"grabpay_payments"`
	// The ideal_payments capability.
	IDEALPayments *AccountCapabilitiesIDEALPaymentsParams `form:"ideal_payments"`
	// The jcb_payments capability.
	JCBPayments *AccountCapabilitiesJCBPaymentsParams `form:"jcb_payments"`
	// The klarna_payments capability.
	KlarnaPayments *AccountCapabilitiesKlarnaPaymentsParams `form:"klarna_payments"`
	// The konbini_payments capability.
	KonbiniPayments *AccountCapabilitiesKonbiniPaymentsParams `form:"konbini_payments"`
	// The legacy_payments capability.
	LegacyPayments *AccountCapabilitiesLegacyPaymentsParams `form:"legacy_payments"`
	// The link_payments capability.
	LinkPayments *AccountCapabilitiesLinkPaymentsParams `form:"link_payments"`
	// The oxxo_payments capability.
	OXXOPayments *AccountCapabilitiesOXXOPaymentsParams `form:"oxxo_payments"`
	// The p24_payments capability.
	P24Payments *AccountCapabilitiesP24PaymentsParams `form:"p24_payments"`
	// The paynow_payments capability.
	PayNowPayments *AccountCapabilitiesPayNowPaymentsParams `form:"paynow_payments"`
	// The promptpay_payments capability.
	PromptPayPayments *AccountCapabilitiesPromptPayPaymentsParams `form:"promptpay_payments"`
	// The sepa_debit_payments capability.
	SEPADebitPayments *AccountCapabilitiesSEPADebitPaymentsParams `form:"sepa_debit_payments"`
	// The sofort_payments capability.
	SofortPayments *AccountCapabilitiesSofortPaymentsParams `form:"sofort_payments"`
	// The tax_reporting_us_1099_k capability.
	TaxReportingUS1099K *AccountCapabilitiesTaxReportingUS1099KParams `form:"tax_reporting_us_1099_k"`
	// The tax_reporting_us_1099_misc capability.
	TaxReportingUS1099MISC *AccountCapabilitiesTaxReportingUS1099MISCParams `form:"tax_reporting_us_1099_misc"`
	// The transfers capability.
	Transfers *AccountCapabilitiesTransfersParams `form:"transfers"`
	// The treasury capability.
	Treasury *AccountCapabilitiesTreasuryParams `form:"treasury"`
	// The us_bank_account_ach_payments capability.
	USBankAccountACHPayments *AccountCapabilitiesUSBankAccountACHPaymentsParams `form:"us_bank_account_ach_payments"`
}

Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive.

type AccountCapabilitiesPayNowPaymentsParams

type AccountCapabilitiesPayNowPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The paynow_payments capability.

type AccountCapabilitiesPromptPayPaymentsParams

type AccountCapabilitiesPromptPayPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The promptpay_payments capability.

type AccountCapabilitiesSEPADebitPaymentsParams

type AccountCapabilitiesSEPADebitPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The sepa_debit_payments capability.

type AccountCapabilitiesSofortPaymentsParams

type AccountCapabilitiesSofortPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The sofort_payments capability.

type AccountCapabilitiesTaxReportingUS1099KParams

type AccountCapabilitiesTaxReportingUS1099KParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The tax_reporting_us_1099_k capability.

type AccountCapabilitiesTaxReportingUS1099MISCParams

type AccountCapabilitiesTaxReportingUS1099MISCParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The tax_reporting_us_1099_misc capability.

type AccountCapabilitiesTransfersParams

type AccountCapabilitiesTransfersParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The transfers capability.

type AccountCapabilitiesTreasuryParams

type AccountCapabilitiesTreasuryParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The treasury capability.

type AccountCapabilitiesUSBankAccountACHPaymentsParams

type AccountCapabilitiesUSBankAccountACHPaymentsParams struct {
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

The us_bank_account_ach_payments capability.

type AccountCapabilityStatus

type AccountCapabilityStatus string

The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges.

const (
	AccountCapabilityStatusActive   AccountCapabilityStatus = "active"
	AccountCapabilityStatusInactive AccountCapabilityStatus = "inactive"
	AccountCapabilityStatusPending  AccountCapabilityStatus = "pending"
)

List of values that AccountCapabilityStatus can take

type AccountCompany

type AccountCompany struct {
	Address *Address `json:"address"`
	// The Kana variation of the company's primary address (Japan only).
	AddressKana *AccountCompanyAddressKana `json:"address_kana"`
	// The Kanji variation of the company's primary address (Japan only).
	AddressKanji *AccountCompanyAddressKanji `json:"address_kanji"`
	// Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided).
	DirectorsProvided bool `json:"directors_provided"`
	// Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided.
	ExecutivesProvided bool `json:"executives_provided"`
	// The company's legal name.
	Name string `json:"name"`
	// The Kana variation of the company's legal name (Japan only).
	NameKana string `json:"name_kana"`
	// The Kanji variation of the company's legal name (Japan only).
	NameKanji string `json:"name_kanji"`
	// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
	OwnershipDeclaration *AccountCompanyOwnershipDeclaration `json:"ownership_declaration"`
	// Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together).
	OwnersProvided bool `json:"owners_provided"`
	// The company's phone number (used for verification).
	Phone string `json:"phone"`
	// The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
	Structure AccountCompanyStructure `json:"structure"`
	// Whether the company's business ID number was provided.
	TaxIDProvided bool `json:"tax_id_provided"`
	// The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
	TaxIDRegistrar string `json:"tax_id_registrar"`
	// Whether the company's business VAT number was provided.
	VATIDProvided bool `json:"vat_id_provided"`
	// Information on the verification state of the company.
	Verification *AccountCompanyVerification `json:"verification"`
}

type AccountCompanyAddressKana

type AccountCompanyAddressKana struct {
	// City/Ward.
	City string `json:"city"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country string `json:"country"`
	// Block/Building number.
	Line1 string `json:"line1"`
	// Building details.
	Line2 string `json:"line2"`
	// ZIP or postal code.
	PostalCode string `json:"postal_code"`
	// Prefecture.
	State string `json:"state"`
	// Town/cho-me.
	Town string `json:"town"`
}

The Kana variation of the company's primary address (Japan only).

type AccountCompanyAddressKanaParams

type AccountCompanyAddressKanaParams struct {
	// City or ward.
	City *string `form:"city"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country *string `form:"country"`
	// Block or building number.
	Line1 *string `form:"line1"`
	// Building details.
	Line2 *string `form:"line2"`
	// Postal code.
	PostalCode *string `form:"postal_code"`
	// Prefecture.
	State *string `form:"state"`
	// Town or cho-me.
	Town *string `form:"town"`
}

The Kana variation of the company's primary address (Japan only).

type AccountCompanyAddressKanji

type AccountCompanyAddressKanji struct {
	// City/Ward.
	City string `json:"city"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country string `json:"country"`
	// Block/Building number.
	Line1 string `json:"line1"`
	// Building details.
	Line2 string `json:"line2"`
	// ZIP or postal code.
	PostalCode string `json:"postal_code"`
	// Prefecture.
	State string `json:"state"`
	// Town/cho-me.
	Town string `json:"town"`
}

The Kanji variation of the company's primary address (Japan only).

type AccountCompanyAddressKanjiParams

type AccountCompanyAddressKanjiParams struct {
	// City or ward.
	City *string `form:"city"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country *string `form:"country"`
	// Block or building number.
	Line1 *string `form:"line1"`
	// Building details.
	Line2 *string `form:"line2"`
	// Postal code.
	PostalCode *string `form:"postal_code"`
	// Prefecture.
	State *string `form:"state"`
	// Town or cho-me.
	Town *string `form:"town"`
}

The Kanji variation of the company's primary address (Japan only).

type AccountCompanyOwnershipDeclaration

type AccountCompanyOwnershipDeclaration struct {
	// The Unix timestamp marking when the beneficial owner attestation was made.
	Date int64 `json:"date"`
	// The IP address from which the beneficial owner attestation was made.
	IP string `json:"ip"`
	// The user-agent string from the browser where the beneficial owner attestation was made.
	UserAgent string `json:"user_agent"`
}

This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.

type AccountCompanyOwnershipDeclarationParams

type AccountCompanyOwnershipDeclarationParams struct {
	// The Unix timestamp marking when the beneficial owner attestation was made.
	Date *int64 `form:"date"`
	// The IP address from which the beneficial owner attestation was made.
	IP *string `form:"ip"`
	// The user agent of the browser from which the beneficial owner attestation was made.
	UserAgent *string `form:"user_agent"`
}

This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.

type AccountCompanyParams

type AccountCompanyParams struct {
	// The company's primary address.
	Address *AddressParams `form:"address"`
	// The Kana variation of the company's primary address (Japan only).
	AddressKana *AccountCompanyAddressKanaParams `form:"address_kana"`
	// The Kanji variation of the company's primary address (Japan only).
	AddressKanji *AccountCompanyAddressKanjiParams `form:"address_kanji"`
	// Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided.
	DirectorsProvided *bool `form:"directors_provided"`
	// Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.executive` requirement.
	ExecutivesProvided *bool `form:"executives_provided"`
	// The company's legal name.
	Name *string `form:"name"`
	// The Kana variation of the company's legal name (Japan only).
	NameKana *string `form:"name_kana"`
	// The Kanji variation of the company's legal name (Japan only).
	NameKanji *string `form:"name_kanji"`
	// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
	OwnershipDeclaration *AccountCompanyOwnershipDeclarationParams `form:"ownership_declaration"`
	// This parameter can only be used on Token creation.
	OwnershipDeclarationShownAndSigned *bool `form:"ownership_declaration_shown_and_signed"`
	// Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://stripe.com/docs/api/persons) for accounts with a `relationship.owner` requirement.
	OwnersProvided *bool `form:"owners_provided"`
	// The company's phone number (used for verification).
	Phone *string `form:"phone"`
	// The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
	RegistrationNumber *string `form:"registration_number"`
	// The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.
	Structure *string `form:"structure"`
	// The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
	TaxID *string `form:"tax_id"`
	// The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
	TaxIDRegistrar *string `form:"tax_id_registrar"`
	// The VAT number of the company.
	VATID *string `form:"vat_id"`
	// Information on the verification state of the company.
	Verification *AccountCompanyVerificationParams `form:"verification"`
}

Information about the company or business. This field is available for any `business_type`.

type AccountCompanyStructure

type AccountCompanyStructure string

The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details.

const (
	AccountCompanyStructureFreeZoneEstablishment              AccountCompanyStructure = "free_zone_establishment"
	AccountCompanyStructureFreeZoneLLC                        AccountCompanyStructure = "free_zone_llc"
	AccountCompanyStructureGovernmentInstrumentality          AccountCompanyStructure = "government_instrumentality"
	AccountCompanyStructureGovernmentalUnit                   AccountCompanyStructure = "governmental_unit"
	AccountCompanyStructureIncorporatedNonProfit              AccountCompanyStructure = "incorporated_non_profit"
	AccountCompanyStructureLimitedLiabilityPartnership        AccountCompanyStructure = "limited_liability_partnership"
	AccountCompanyStructureLLC                                AccountCompanyStructure = "llc"
	AccountCompanyStructureMultiMemberLLC                     AccountCompanyStructure = "multi_member_llc"
	AccountCompanyStructurePrivateCompany                     AccountCompanyStructure = "private_company"
	AccountCompanyStructurePrivateCorporation                 AccountCompanyStructure = "private_corporation"
	AccountCompanyStructurePrivatePartnership                 AccountCompanyStructure = "private_partnership"
	AccountCompanyStructurePublicCompany                      AccountCompanyStructure = "public_company"
	AccountCompanyStructurePublicCorporation                  AccountCompanyStructure = "public_corporation"
	AccountCompanyStructurePublicPartnership                  AccountCompanyStructure = "public_partnership"
	AccountCompanyStructureSingleMemberLLC                    AccountCompanyStructure = "single_member_llc"
	AccountCompanyStructureSoleEstablishment                  AccountCompanyStructure = "sole_establishment"
	AccountCompanyStructureSoleProprietorship                 AccountCompanyStructure = "sole_proprietorship"
	AccountCompanyStructureTaxExemptGovernmentInstrumentality AccountCompanyStructure = "tax_exempt_government_instrumentality"
	AccountCompanyStructureUnincorporatedAssociation          AccountCompanyStructure = "unincorporated_association"
	AccountCompanyStructureUnincorporatedNonProfit            AccountCompanyStructure = "unincorporated_non_profit"
)

List of values that AccountCompanyStructure can take

type AccountCompanyVerification

type AccountCompanyVerification struct {
	Document *AccountCompanyVerificationDocument `json:"document"`
}

Information on the verification state of the company.

type AccountCompanyVerificationDocument

type AccountCompanyVerificationDocument struct {
	// The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.
	Back *File `json:"back"`
	// A user-displayable string describing the verification state of this document.
	Details string `json:"details"`
	// One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document.
	DetailsCode AccountCompanyVerificationDocumentDetailsCode `json:"details_code"`
	// The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`.
	Front *File `json:"front"`
}

type AccountCompanyVerificationDocumentDetailsCode

type AccountCompanyVerificationDocumentDetailsCode string

One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document.

const (
	AccountCompanyVerificationDocumentDetailsCodeDocumentCorrupt        AccountCompanyVerificationDocumentDetailsCode = "document_corrupt"
	AccountCompanyVerificationDocumentDetailsCodeDocumentFailedCopy     AccountCompanyVerificationDocumentDetailsCode = "document_failed_copy"
	AccountCompanyVerificationDocumentDetailsCodeDocumentFailedOther    AccountCompanyVerificationDocumentDetailsCode = "document_failed_other"
	AccountCompanyVerificationDocumentDetailsCodeDocumentFailedTestMode AccountCompanyVerificationDocumentDetailsCode = "document_failed_test_mode"
	AccountCompanyVerificationDocumentDetailsCodeDocumentFraudulent     AccountCompanyVerificationDocumentDetailsCode = "document_fraudulent"
	AccountCompanyVerificationDocumentDetailsCodeDocumentInvalid        AccountCompanyVerificationDocumentDetailsCode = "document_invalid"
	AccountCompanyVerificationDocumentDetailsCodeDocumentManipulated    AccountCompanyVerificationDocumentDetailsCode = "document_manipulated"
	AccountCompanyVerificationDocumentDetailsCodeDocumentNotReadable    AccountCompanyVerificationDocumentDetailsCode = "document_not_readable"
	AccountCompanyVerificationDocumentDetailsCodeDocumentNotUploaded    AccountCompanyVerificationDocumentDetailsCode = "document_not_uploaded"
	AccountCompanyVerificationDocumentDetailsCodeDocumentTooLarge       AccountCompanyVerificationDocumentDetailsCode = "document_too_large"
)

List of values that AccountCompanyVerificationDocumentDetailsCode can take

type AccountCompanyVerificationDocumentParams

type AccountCompanyVerificationDocumentParams struct {
	// The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
	Back *string `form:"back"`
	// The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
	Front *string `form:"front"`
}

A document verifying the business.

type AccountCompanyVerificationParams

type AccountCompanyVerificationParams struct {
	// A document verifying the business.
	Document *AccountCompanyVerificationDocumentParams `form:"document"`
}

Information on the verification state of the company.

type AccountController

type AccountController struct {
	// `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null.
	IsController bool `json:"is_controller"`
	// The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself.
	Type AccountControllerType `json:"type"`
}

type AccountControllerType

type AccountControllerType string

The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself.

const (
	AccountControllerTypeAccount     AccountControllerType = "account"
	AccountControllerTypeApplication AccountControllerType = "application"
)

List of values that AccountControllerType can take

type AccountDocumentsBankAccountOwnershipVerificationParams

type AccountDocumentsBankAccountOwnershipVerificationParams struct {
	// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
	Files []*string `form:"files"`
}

One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check.

type AccountDocumentsCompanyLicenseParams

type AccountDocumentsCompanyLicenseParams struct {
	// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
	Files []*string `form:"files"`
}

One or more documents that demonstrate proof of a company's license to operate.

type AccountDocumentsCompanyMemorandumOfAssociationParams

type AccountDocumentsCompanyMemorandumOfAssociationParams struct {
	// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
	Files []*string `form:"files"`
}

One or more documents showing the company's Memorandum of Association.

type AccountDocumentsCompanyMinisterialDecreeParams

type AccountDocumentsCompanyMinisterialDecreeParams struct {
	// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
	Files []*string `form:"files"`
}

(Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.

type AccountDocumentsCompanyRegistrationVerificationParams

type AccountDocumentsCompanyRegistrationVerificationParams struct {
	// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
	Files []*string `form:"files"`
}

One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.

type AccountDocumentsCompanyTaxIDVerificationParams

type AccountDocumentsCompanyTaxIDVerificationParams struct {
	// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
	Files []*string `form:"files"`
}

One or more documents that demonstrate proof of a company's tax ID.

type AccountDocumentsParams

type AccountDocumentsParams struct {
	// One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a voided check.
	BankAccountOwnershipVerification *AccountDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"`
	// One or more documents that demonstrate proof of a company's license to operate.
	CompanyLicense *AccountDocumentsCompanyLicenseParams `form:"company_license"`
	// One or more documents showing the company's Memorandum of Association.
	CompanyMemorandumOfAssociation *AccountDocumentsCompanyMemorandumOfAssociationParams `form:"company_memorandum_of_association"`
	// (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
	CompanyMinisterialDecree *AccountDocumentsCompanyMinisterialDecreeParams `form:"company_ministerial_decree"`
	// One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
	CompanyRegistrationVerification *AccountDocumentsCompanyRegistrationVerificationParams `form:"company_registration_verification"`
	// One or more documents that demonstrate proof of a company's tax ID.
	CompanyTaxIDVerification *AccountDocumentsCompanyTaxIDVerificationParams `form:"company_tax_id_verification"`
	// One or more documents showing the company's proof of registration with the national business registry.
	ProofOfRegistration *AccountDocumentsProofOfRegistrationParams `form:"proof_of_registration"`
}

Documents that may be submitted to satisfy various informational requests.

type AccountDocumentsProofOfRegistrationParams

type AccountDocumentsProofOfRegistrationParams struct {
	// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
	Files []*string `form:"files"`
}

One or more documents showing the company's proof of registration with the national business registry.

type AccountExternalAccount

type AccountExternalAccount struct {
	ID   string                     `json:"id"`
	Type AccountExternalAccountType `json:"object"`

	BankAccount *BankAccount `json:"-"`
	Card        *Card        `json:"-"`
}

func (*AccountExternalAccount) UnmarshalJSON

func (a *AccountExternalAccount) UnmarshalJSON(data []byte) error

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

type AccountExternalAccountList

type AccountExternalAccountList struct {
	APIResource
	ListMeta

	// Values contains any external accounts (bank accounts and/or cards)
	// currently attached to this account.
	Data []*AccountExternalAccount `json:"data"`
}

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

type AccountExternalAccountParams

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.

func (*AccountExternalAccountParams) AppendTo

func (p *AccountExternalAccountParams) AppendTo(body *form.Values, keyParts []string)

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 AccountExternalAccountType

type AccountExternalAccountType string
const (
	AccountExternalAccountTypeBankAccount AccountExternalAccountType = "bank_account"
	AccountExternalAccountTypeCard        AccountExternalAccountType = "card"
)

List of values that AccountExternalAccountType can take

type AccountFutureRequirements

type AccountFutureRequirements struct {
	// Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
	Alternatives []*AccountFutureRequirementsAlternative `json:"alternatives"`
	// Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning.
	CurrentDeadline int64 `json:"current_deadline"`
	// Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
	CurrentlyDue []string `json:"currently_due"`
	// This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.
	DisabledReason string `json:"disabled_reason"`
	// Fields that are `currently_due` and need to be collected again because validation or verification failed.
	Errors []*AccountFutureRequirementsError `json:"errors"`
	// Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.
	EventuallyDue []string `json:"eventually_due"`
	// Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.
	PastDue []string `json:"past_due"`
	// Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.
	PendingVerification []string `json:"pending_verification"`
}

type AccountFutureRequirementsAlternative

type AccountFutureRequirementsAlternative struct {
	// Fields that can be provided to satisfy all fields in `original_fields_due`.
	AlternativeFieldsDue []string `json:"alternative_fields_due"`
	// Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
	OriginalFieldsDue []string `json:"original_fields_due"`
}

Fields that are due and can be satisfied by providing the corresponding alternative fields instead.

type AccountFutureRequirementsError

type AccountFutureRequirementsError struct {
	// The code for the type of error.
	Code string `json:"code"`
	// An informative message that indicates the error type and provides additional details about the error.
	Reason string `json:"reason"`
	// The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
	Requirement string `json:"requirement"`
}

Fields that are `currently_due` and need to be collected again because validation or verification failed.

type AccountLink struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The timestamp at which this account link will expire.
	ExpiresAt int64 `json:"expires_at"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The URL for the account link.
	URL string `json:"url"`
}

Account Links are the means by which a Connect platform grants a connected account permission to access Stripe-hosted applications, such as Connect Onboarding.

Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding).

type AccountLinkCollect

type AccountLinkCollect string

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

const (
	AccountLinkCollectCurrentlyDue  AccountLinkCollect = "currently_due"
	AccountLinkCollectEventuallyDue AccountLinkCollect = "eventually_due"
)

List of values that AccountLinkCollect can take.

type AccountLinkParams

type AccountLinkParams struct {
	Params `form:"*"`
	// The identifier of the account to create an account link for.
	Account *string `form:"account"`
	// Which information the platform needs to collect from the user. One of `currently_due` or `eventually_due`. Default is `currently_due`.
	Collect *string `form:"collect"`
	// The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
	RefreshURL *string `form:"refresh_url"`
	// The URL that the user will be redirected to upon leaving or completing the linked flow.
	ReturnURL *string `form:"return_url"`
	// The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.
	Type *string `form:"type"`
}

Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.

type AccountLinkType

type AccountLinkType string

AccountLinkType is the type of an account link.

const (
	AccountLinkTypeAccountOnboarding AccountLinkType = "account_onboarding"
	AccountLinkTypeAccountUpdate     AccountLinkType = "account_update"
)

List of values that AccountLinkType can take.

type AccountList

type AccountList struct {
	APIResource
	ListMeta
	Data []*Account `json:"data"`
}

AccountList is a list of Accounts as retrieved from a list endpoint.

type AccountListParams

type AccountListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
}

Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty.

type AccountParams

type AccountParams struct {
	Params `form:"*"`
	// An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account.
	AccountToken *string `form:"account_token"`
	// Business information about the account.
	BusinessProfile *AccountBusinessProfileParams `form:"business_profile"`
	// The business type.
	BusinessType *string `form:"business_type"`
	// Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive.
	Capabilities *AccountCapabilitiesParams `form:"capabilities"`
	// Information about the company or business. This field is available for any `business_type`.
	Company *AccountCompanyParams `form:"company"`
	// The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported.
	Country *string `form:"country"`
	// Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts).
	DefaultCurrency *string `form:"default_currency"`
	// Documents that may be submitted to satisfy various informational requests.
	Documents *AccountDocumentsParams `form:"documents"`
	// The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.
	Email *string `form:"email"`
	// A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.
	//
	// By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs.
	ExternalAccount *AccountExternalAccountParams `form:"external_account"`
	// Information about the person represented by the account. This field is null unless `business_type` is set to `individual`.
	Individual *PersonParams `form:"individual"`
	// Options for customizing how the account functions within Stripe.
	Settings *AccountSettingsParams `form:"settings"`
	// Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance).
	TOSAcceptance *AccountTOSAcceptanceParams `form:"tos_acceptance"`
	// The type of Stripe account to create. May be one of `custom`, `express` or `standard`.
	Type *string `form:"type"`
}

Retrieves the details of an account.

type AccountRejectParams

type AccountRejectParams struct {
	Params `form:"*"`
	// The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`.
	Reason *string `form:"reason"`
}

With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.

Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.

type AccountRequirements

type AccountRequirements struct {
	// Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
	Alternatives []*AccountRequirementsAlternative `json:"alternatives"`
	// Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected.
	CurrentDeadline int64 `json:"current_deadline"`
	// Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
	CurrentlyDue []string `json:"currently_due"`
	// If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.
	DisabledReason AccountRequirementsDisabledReason `json:"disabled_reason"`
	// Fields that are `currently_due` and need to be collected again because validation or verification failed.
	Errors []*AccountRequirementsError `json:"errors"`
	// Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.
	EventuallyDue []string `json:"eventually_due"`
	// Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account.
	PastDue []string `json:"past_due"`
	// Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.
	PendingVerification []string `json:"pending_verification"`
}

type AccountRequirementsAlternative

type AccountRequirementsAlternative struct {
	// Fields that can be provided to satisfy all fields in `original_fields_due`.
	AlternativeFieldsDue []string `json:"alternative_fields_due"`
	// Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
	OriginalFieldsDue []string `json:"original_fields_due"`
}

Fields that are due and can be satisfied by providing the corresponding alternative fields instead.

type AccountRequirementsDisabledReason

type AccountRequirementsDisabledReason string

If the account is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.

const (
	AccountRequirementsDisabledReasonFieldsNeeded           AccountRequirementsDisabledReason = "fields_needed"
	AccountRequirementsDisabledReasonListed                 AccountRequirementsDisabledReason = "listed"
	AccountRequirementsDisabledReasonOther                  AccountRequirementsDisabledReason = "other"
	AccountRequirementsDisabledReasonRejectedFraud          AccountRequirementsDisabledReason = "rejected.fraud"
	AccountRequirementsDisabledReasonRejectedListed         AccountRequirementsDisabledReason = "rejected.listed"
	AccountRequirementsDisabledReasonRejectedOther          AccountRequirementsDisabledReason = "rejected.other"
	AccountRequirementsDisabledReasonRejectedTermsOfService AccountRequirementsDisabledReason = "rejected.terms_of_service"
	AccountRequirementsDisabledReasonUnderReview            AccountRequirementsDisabledReason = "under_review"
)

List of values that AccountRequirementsDisabledReason can take

type AccountRequirementsError

type AccountRequirementsError struct {
	// The code for the type of error.
	Code string `json:"code"`
	// An informative message that indicates the error type and provides additional details about the error.
	Reason string `json:"reason"`
	// The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
	Requirement string `json:"requirement"`
}

Fields that are `currently_due` and need to be collected again because validation or verification failed.

type AccountSettings

type AccountSettings struct {
	BACSDebitPayments *AccountSettingsBACSDebitPayments `json:"bacs_debit_payments"`
	Branding          *AccountSettingsBranding          `json:"branding"`
	CardIssuing       *AccountSettingsCardIssuing       `json:"card_issuing"`
	CardPayments      *AccountSettingsCardPayments      `json:"card_payments"`
	Dashboard         *AccountSettingsDashboard         `json:"dashboard"`
	Payments          *AccountSettingsPayments          `json:"payments"`
	Payouts           *AccountSettingsPayouts           `json:"payouts"`
	SEPADebitPayments *AccountSettingsSEPADebitPayments `json:"sepa_debit_payments"`
	Treasury          *AccountSettingsTreasury          `json:"treasury"`
}

Options for customizing how the account functions within Stripe.

type AccountSettingsBACSDebitPayments

type AccountSettingsBACSDebitPayments struct {
	// The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this will appear on the mandate, and as the statement descriptor.
	DisplayName string `json:"display_name"`
}

type AccountSettingsBACSDebitPaymentsParams

type AccountSettingsBACSDebitPaymentsParams struct {
	DisplayName *string `form:"display_name"`
}

type AccountSettingsBranding

type AccountSettingsBranding struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
	Icon *File `json:"icon"`
	Logo *File `json:"logo"`
	// A CSS hex color value representing the primary branding color for this account
	PrimaryColor string `json:"primary_color"`
	// A CSS hex color value representing the secondary branding color for this account
	SecondaryColor string `json:"secondary_color"`
}

type AccountSettingsBrandingParams

type AccountSettingsBrandingParams struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px.
	Icon *string `form:"icon"`
	Logo *string `form:"logo"`
	// A CSS hex color value representing the primary branding color for this account.
	PrimaryColor *string `form:"primary_color"`
	// A CSS hex color value representing the secondary branding color for this account.
	SecondaryColor *string `form:"secondary_color"`
}

Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.

type AccountSettingsCardIssuing

type AccountSettingsCardIssuing struct {
	TOSAcceptance *AccountSettingsCardIssuingTOSAcceptance `json:"tos_acceptance"`
}

type AccountSettingsCardIssuingParams

type AccountSettingsCardIssuingParams struct {
	// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance).
	TOSAcceptance *AccountSettingsCardIssuingTOSAcceptanceParams `form:"tos_acceptance"`
}

Settings specific to the account's use of the Card Issuing product.

type AccountSettingsCardIssuingTOSAcceptance

type AccountSettingsCardIssuingTOSAcceptance struct {
	// The Unix timestamp marking when the account representative accepted the service agreement.
	Date int64 `json:"date"`
	// The IP address from which the account representative accepted the service agreement.
	IP string `json:"ip"`
	// The user agent of the browser from which the account representative accepted the service agreement.
	UserAgent string `json:"user_agent"`
}

type AccountSettingsCardIssuingTOSAcceptanceParams

type AccountSettingsCardIssuingTOSAcceptanceParams struct {
	// The Unix timestamp marking when the account representative accepted the service agreement.
	Date *int64 `form:"date"`
	// The IP address from which the account representative accepted the service agreement.
	IP *string `form:"ip"`
	// The user agent of the browser from which the account representative accepted the service agreement.
	UserAgent *string `form:"user_agent"`
}

Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance).

type AccountSettingsCardPayments

type AccountSettingsCardPayments struct {
	DeclineOn *AccountSettingsCardPaymentsDeclineOn `json:"decline_on"`
	// The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
	StatementDescriptorPrefix string `json:"statement_descriptor_prefix"`
	// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
	StatementDescriptorPrefixKana string `json:"statement_descriptor_prefix_kana"`
	// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
	StatementDescriptorPrefixKanji string `json:"statement_descriptor_prefix_kanji"`
}

type AccountSettingsCardPaymentsDeclineOn

type AccountSettingsCardPaymentsDeclineOn struct {
	// Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
	AVSFailure bool `json:"avs_failure"`
	// Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
	CVCFailure bool `json:"cvc_failure"`
}

type AccountSettingsCardPaymentsDeclineOnParams

type AccountSettingsCardPaymentsDeclineOnParams struct {
	// Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification.
	AVSFailure *bool `form:"avs_failure"`
	// Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification.
	CVCFailure *bool `form:"cvc_failure"`
}

Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.

type AccountSettingsCardPaymentsParams

type AccountSettingsCardPaymentsParams struct {
	// Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
	DeclineOn *AccountSettingsCardPaymentsDeclineOnParams `form:"decline_on"`
	// The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion.
	StatementDescriptorPrefix *string `form:"statement_descriptor_prefix"`
	// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
	StatementDescriptorPrefixKana *string `form:"statement_descriptor_prefix_kana"`
	// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
	StatementDescriptorPrefixKanji *string `form:"statement_descriptor_prefix_kanji"`
}

Settings specific to card charging on the account.

type AccountSettingsDashboard

type AccountSettingsDashboard struct {
	// The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts.
	DisplayName string `json:"display_name"`
	// The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones).
	Timezone string `json:"timezone"`
}

type AccountSettingsParams

type AccountSettingsParams struct {
	BACSDebitPayments *AccountSettingsBACSDebitPaymentsParams `form:"bacs_debit_payments"`
	// Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
	Branding *AccountSettingsBrandingParams `form:"branding"`
	// Settings specific to the account's use of the Card Issuing product.
	CardIssuing *AccountSettingsCardIssuingParams `form:"card_issuing"`
	// Settings specific to card charging on the account.
	CardPayments *AccountSettingsCardPaymentsParams `form:"card_payments"`
	// Settings that apply across payment methods for charging on the account.
	Payments *AccountSettingsPaymentsParams `form:"payments"`
	// Settings specific to the account's payouts.
	Payouts *AccountSettingsPayoutsParams `form:"payouts"`
	// Settings specific to the account's Treasury FinancialAccounts.
	Treasury *AccountSettingsTreasuryParams `form:"treasury"`
}

Options for customizing how the account functions within Stripe.

type AccountSettingsPayments

type AccountSettingsPayments struct {
	// The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge.
	StatementDescriptor string `json:"statement_descriptor"`
	// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only)
	StatementDescriptorKana string `json:"statement_descriptor_kana"`
	// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only)
	StatementDescriptorKanji string `json:"statement_descriptor_kanji"`
	// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion.
	StatementDescriptorPrefixKana string `json:"statement_descriptor_prefix_kana"`
	// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion.
	StatementDescriptorPrefixKanji string `json:"statement_descriptor_prefix_kanji"`
}

type AccountSettingsPaymentsParams

type AccountSettingsPaymentsParams struct {
	// The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge.
	StatementDescriptor *string `form:"statement_descriptor"`
	// The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only).
	StatementDescriptorKana *string `form:"statement_descriptor_kana"`
	// The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only).
	StatementDescriptorKanji *string `form:"statement_descriptor_kanji"`
}

Settings that apply across payment methods for charging on the account.

type AccountSettingsPayouts

type AccountSettingsPayouts struct {
	// A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`.
	DebitNegativeBalances bool                            `json:"debit_negative_balances"`
	Schedule              *AccountSettingsPayoutsSchedule `json:"schedule"`
	// The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
	StatementDescriptor string `json:"statement_descriptor"`
}

type AccountSettingsPayoutsParams

type AccountSettingsPayoutsParams struct {
	// A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances).
	DebitNegativeBalances *bool `form:"debit_negative_balances"`
	// Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation.
	Schedule *AccountSettingsPayoutsScheduleParams `form:"schedule"`
	// The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
	StatementDescriptor *string `form:"statement_descriptor"`
}

Settings specific to the account's payouts.

type AccountSettingsPayoutsSchedule

type AccountSettingsPayoutsSchedule struct {
	// The number of days charges for the account will be held before being paid out.
	DelayDays int64 `json:"delay_days"`
	// How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.
	Interval AccountSettingsPayoutsScheduleInterval `json:"interval"`
	// The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.
	MonthlyAnchor int64 `json:"monthly_anchor"`
	// The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly.
	WeeklyAnchor string `json:"weekly_anchor"`
}

type AccountSettingsPayoutsScheduleInterval

type AccountSettingsPayoutsScheduleInterval string

How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.

const (
	AccountSettingsPayoutsScheduleIntervalDaily   AccountSettingsPayoutsScheduleInterval = "daily"
	AccountSettingsPayoutsScheduleIntervalManual  AccountSettingsPayoutsScheduleInterval = "manual"
	AccountSettingsPayoutsScheduleIntervalMonthly AccountSettingsPayoutsScheduleInterval = "monthly"
	AccountSettingsPayoutsScheduleIntervalWeekly  AccountSettingsPayoutsScheduleInterval = "weekly"
)

List of values that AccountSettingsPayoutsScheduleInterval can take

type AccountSettingsPayoutsScheduleParams

type AccountSettingsPayoutsScheduleParams struct {
	// The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter does not apply when the `interval` is `manual`.
	DelayDays        *int64 `form:"delay_days"`
	DelayDaysMinimum *bool  `form:"-"` // See custom AppendTo
	// How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
	Interval *string `form:"interval"`
	// The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
	MonthlyAnchor *int64 `form:"monthly_anchor"`
	// The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
	WeeklyAnchor *string `form:"weekly_anchor"`
}

Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation.

func (*AccountSettingsPayoutsScheduleParams) AppendTo

func (a *AccountSettingsPayoutsScheduleParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for AccountSettingsPayoutsScheduleParams.

type AccountSettingsSEPADebitPayments

type AccountSettingsSEPADebitPayments struct {
	// SEPA creditor identifier that identifies the company making the payment.
	CreditorID string `json:"creditor_id"`
}

type AccountSettingsTreasury

type AccountSettingsTreasury struct {
	TOSAcceptance *AccountSettingsTreasuryTOSAcceptance `json:"tos_acceptance"`
}

type AccountSettingsTreasuryParams

type AccountSettingsTreasuryParams struct {
	// Details on the account's acceptance of the Stripe Treasury Services Agreement.
	TOSAcceptance *AccountSettingsTreasuryTOSAcceptanceParams `form:"tos_acceptance"`
}

Settings specific to the account's Treasury FinancialAccounts.

type AccountSettingsTreasuryTOSAcceptance

type AccountSettingsTreasuryTOSAcceptance struct {
	// The Unix timestamp marking when the account representative accepted the service agreement.
	Date int64 `json:"date"`
	// The IP address from which the account representative accepted the service agreement.
	IP string `json:"ip"`
	// The user agent of the browser from which the account representative accepted the service agreement.
	UserAgent string `json:"user_agent"`
}

type AccountSettingsTreasuryTOSAcceptanceParams

type AccountSettingsTreasuryTOSAcceptanceParams struct {
	// The Unix timestamp marking when the account representative accepted the service agreement.
	Date *int64 `form:"date"`
	// The IP address from which the account representative accepted the service agreement.
	IP *string `form:"ip"`
	// The user agent of the browser from which the account representative accepted the service agreement.
	UserAgent *string `form:"user_agent"`
}

Details on the account's acceptance of the Stripe Treasury Services Agreement.

type AccountTOSAcceptance

type AccountTOSAcceptance struct {
	// The Unix timestamp marking when the account representative accepted their service agreement
	Date int64 `json:"date"`
	// The IP address from which the account representative accepted their service agreement
	IP string `json:"ip"`
	// The user's service agreement type
	ServiceAgreement AccountTOSAcceptanceServiceAgreement `json:"service_agreement"`
	// The user agent of the browser from which the account representative accepted their service agreement
	UserAgent string `json:"user_agent"`
}

type AccountTOSAcceptanceParams

type AccountTOSAcceptanceParams struct {
	// The Unix timestamp marking when the account representative accepted their service agreement.
	Date *int64 `form:"date"`
	// The IP address from which the account representative accepted their service agreement.
	IP *string `form:"ip"`
	// The user's service agreement type.
	ServiceAgreement *string `form:"service_agreement"`
	// The user agent of the browser from which the account representative accepted their service agreement.
	UserAgent *string `form:"user_agent"`
}

Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance).

type AccountTOSAcceptanceServiceAgreement

type AccountTOSAcceptanceServiceAgreement string

The user's service agreement type

const (
	AccountTOSAcceptanceServiceAgreementFull      AccountTOSAcceptanceServiceAgreement = "full"
	AccountTOSAcceptanceServiceAgreementRecipient AccountTOSAcceptanceServiceAgreement = "recipient"
)

List of values that AccountTOSAcceptanceServiceAgreement can take

type AccountType

type AccountType string

The Stripe account type. Can be `standard`, `express`, or `custom`.

const (
	AccountTypeCustom   AccountType = "custom"
	AccountTypeExpress  AccountType = "express"
	AccountTypeStandard AccountType = "standard"
)

List of values that AccountType can take

type Address

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

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.

type Amount

type Amount struct {
	// Balance amount.
	Amount int64 `json:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency    Currency                    `json:"currency"`
	SourceTypes map[BalanceSourceType]int64 `json:"source_types"`
}

Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property.

type AppInfo

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 {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created    int64  `json:"created"`
	Deleted    bool   `json:"deleted"`
	DomainName string `json:"domain_name"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
}

type ApplePayDomainList

type ApplePayDomainList struct {
	APIResource
	ListMeta
	Data []*ApplePayDomain `json:"data"`
}

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

type ApplePayDomainListParams

type ApplePayDomainListParams struct {
	ListParams `form:"*"`
	DomainName *string `form:"domain_name"`
}

List apple pay domains.

type ApplePayDomainParams

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

Create an apple pay domain.

type Application

type Application struct {
	Deleted bool `json:"deleted"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The name of the application.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
}

func (*Application) UnmarshalJSON

func (a *Application) UnmarshalJSON(data []byte) error

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

type ApplicationFee struct {
	APIResource
	// ID of the Stripe account this fee was taken from.
	Account *Account `json:"account"`
	// Amount earned, in %s.
	Amount int64 `json:"amount"`
	// Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued)
	AmountRefunded int64 `json:"amount_refunded"`
	// ID of the Connect application that earned the fee.
	Application *Application `json:"application"`
	// Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).
	BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
	// ID of the charge that the application fee was taken from.
	Charge *Charge `json:"charge"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter.
	OriginatingTransaction *Charge `json:"originating_transaction"`
	// Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.
	Refunded bool `json:"refunded"`
	// A list of refunds that have been applied to the fee.
	Refunds *FeeRefundList `json:"refunds"`
}

func (*ApplicationFee) UnmarshalJSON

func (a *ApplicationFee) UnmarshalJSON(data []byte) error

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.

type ApplicationFeeList

type ApplicationFeeList struct {
	APIResource
	ListMeta
	Data []*ApplicationFee `json:"data"`
}

ApplicationFeeList is a list of ApplicationFees as retrieved from a list endpoint.

type ApplicationFeeListParams

type ApplicationFeeListParams struct {
	ListParams `form:"*"`
	// Only return application fees for the charge specified by this charge ID.
	Charge       *string           `form:"charge"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
}

Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.

type ApplicationFeeParams

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

Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.

type AppsSecret

type AppsSecret struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// If true, indicates that this secret has been deleted
	Deleted bool `json:"deleted"`
	// The Unix timestamp for the expiry time of the secret, after which the secret deletes.
	ExpiresAt int64 `json:"expires_at"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// A name for the secret that's unique within the scope.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The plaintext secret value to be stored.
	Payload string           `json:"payload"`
	Scope   *AppsSecretScope `json:"scope"`
}

Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.

The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control.

All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key.

A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.

Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects).

type AppsSecretDeleteWhereParams

type AppsSecretDeleteWhereParams struct {
	Params `form:"*"`
	// A name for the secret that's unique within the scope.
	Name *string `form:"name"`
	// Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
	Scope *AppsSecretDeleteWhereScopeParams `form:"scope"`
}

Deletes a secret from the secret store by name and scope.

type AppsSecretDeleteWhereScopeParams

type AppsSecretDeleteWhereScopeParams struct {
	// The secret scope type.
	Type *string `form:"type"`
	// The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
	User *string `form:"user"`
}

Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

type AppsSecretFindParams

type AppsSecretFindParams struct {
	Params `form:"*"`
	// A name for the secret that's unique within the scope.
	Name *string `form:"name"`
	// Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
	Scope *AppsSecretFindScopeParams `form:"scope"`
}

Finds a secret in the secret store by name and scope.

type AppsSecretFindScopeParams

type AppsSecretFindScopeParams struct {
	// The secret scope type.
	Type *string `form:"type"`
	// The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
	User *string `form:"user"`
}

Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

type AppsSecretList

type AppsSecretList struct {
	APIResource
	ListMeta
	Data []*AppsSecret `json:"data"`
}

AppsSecretList is a list of Secrets as retrieved from a list endpoint.

type AppsSecretListParams

type AppsSecretListParams struct {
	ListParams `form:"*"`
	// Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
	Scope *AppsSecretListScopeParams `form:"scope"`
}

List all secrets stored on the given scope.

type AppsSecretListScopeParams

type AppsSecretListScopeParams struct {
	// The secret scope type.
	Type *string `form:"type"`
	// The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
	User *string `form:"user"`
}

Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

type AppsSecretParams

type AppsSecretParams struct {
	Params `form:"*"`
	// The Unix timestamp for the expiry time of the secret, after which the secret deletes.
	ExpiresAt *int64 `form:"expires_at"`
	// A name for the secret that's unique within the scope.
	Name *string `form:"name"`
	// The plaintext secret value to be stored.
	Payload *string `form:"payload"`
	// Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
	Scope *AppsSecretScopeParams `form:"scope"`
}

Create or replace a secret in the secret store.

type AppsSecretScope

type AppsSecretScope struct {
	// The secret scope type.
	Type AppsSecretScopeType `json:"type"`
	// The user ID, if type is set to "user"
	User string `json:"user"`
}

type AppsSecretScopeParams

type AppsSecretScopeParams struct {
	// The secret scope type.
	Type *string `form:"type"`
	// The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
	User *string `form:"user"`
}

Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.

type AppsSecretScopeType

type AppsSecretScopeType string

The secret scope type.

const (
	AppsSecretScopeTypeAccount AppsSecretScopeType = "account"
	AppsSecretScopeTypeUser    AppsSecretScopeType = "user"
)

List of values that AppsSecretScopeType can take

type AuthorizeURLParams

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 is not sent as a parameter, but is used to modify the authorize URL
	// path to use the express OAuth path.
	Express *bool `form:"-"`
}

AuthorizeURLParams for creating OAuth AuthorizeURLs.

type Backend

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

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

func GetBackend

func GetBackend(backendType SupportedBackend) Backend

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.

func GetBackendWithConfig

func GetBackendWithConfig(backendType SupportedBackend, config *BackendConfig) Backend

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.

type BackendConfig

type BackendConfig struct {
	// EnableTelemetry allows request metrics (request id and duration) to be sent
	// to Stripe in subsequent requests via the `X-Stripe-Client-Telemetry` header.
	//
	// This value is a pointer to allow us to differentiate an unset versus
	// empty value. Use stripe.Bool for an easy way to set this value.
	//
	// Defaults to false.
	EnableTelemetry *bool

	// HTTPClient is an HTTP client instance to use when making API requests.
	//
	// If left unset, it'll be set to a default HTTP client for the package.
	HTTPClient *http.Client

	// LeveledLogger is the logger that the backend 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.
	//
	// Defaults to DefaultLeveledLogger.
	//
	// To set a logger that logs nothing, set this to a stripe.LeveledLogger
	// with a Level of LevelNull (simply setting this field to nil will not
	// work).
	LeveledLogger LeveledLoggerInterface

	// MaxNetworkRetries sets maximum number of times that the library will
	// retry requests that appear to have failed due to an intermittent
	// problem.
	//
	// This value is a pointer to allow us to differentiate an unset versus
	// empty value. Use stripe.Int64 for an easy way to set this value.
	//
	// Defaults to DefaultMaxNetworkRetries (2).
	MaxNetworkRetries *int64

	// URL is the base URL to use for API paths.
	//
	// This value is a pointer to allow us to differentiate an unset versus
	// empty value. Use stripe.String for an easy way to set this value.
	//
	// If left empty, it'll be set to the default for the SupportedBackend.
	URL *string
}

BackendConfig is used to configure a new Stripe backend.

type BackendImplementation

type BackendImplementation struct {
	Type              SupportedBackend
	URL               string
	HTTPClient        *http.Client
	LeveledLogger     LeveledLoggerInterface
	MaxNetworkRetries int64
	// contains filtered or unexported fields
}

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.

func (*BackendImplementation) Call

func (s *BackendImplementation) Call(method, path, key string, params ParamsContainer, v LastResponseSetter) error

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

func (*BackendImplementation) CallMultipart

func (s *BackendImplementation) CallMultipart(method, path, key, boundary string, body *bytes.Buffer, params *Params, v LastResponseSetter) error

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

func (*BackendImplementation) CallRaw

func (s *BackendImplementation) CallRaw(method, path, key string, form *form.Values, params *Params, v LastResponseSetter) error

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

func (*BackendImplementation) CallStreaming

func (s *BackendImplementation) CallStreaming(method, path, key string, params ParamsContainer, v StreamingLastResponseSetter) error

CallStreaming is the Backend.Call implementation for invoking Stripe APIs without buffering the response into memory.

func (*BackendImplementation) Do

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.

func (*BackendImplementation) DoStreaming

DoStreaming is used by CallStreaming to execute an API request. It uses the backend's HTTP client to execure the request. In successful cases, it sets a StreamingLastResponse onto v, but in unsuccessful cases handles unmarshaling errors returned by the API.

func (*BackendImplementation) NewRequest

func (s *BackendImplementation) NewRequest(method, path, key, contentType string, params *Params) (*http.Request, error)

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

func (*BackendImplementation) ResponseToError

func (s *BackendImplementation) ResponseToError(res *http.Response, resBody []byte) error

ResponseToError converts a stripe response to an Error.

func (*BackendImplementation) SetMaxNetworkRetries

func (s *BackendImplementation) SetMaxNetworkRetries(maxNetworkRetries int64)

SetMaxNetworkRetries sets max number of retries on failed requests

This function is deprecated. Please use GetBackendWithConfig instead.

func (*BackendImplementation) SetNetworkRetriesSleep

func (s *BackendImplementation) SetNetworkRetriesSleep(sleep bool)

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.

func (*BackendImplementation) UnmarshalJSONVerbose

func (s *BackendImplementation) UnmarshalJSONVerbose(statusCode int, body []byte, v interface{}) error

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

type Backends

type Backends struct {
	API, Connect, Uploads Backend
	// contains filtered or unexported fields
}

Backends are the currently supported endpoints.

func NewBackends

func NewBackends(httpClient *http.Client) *Backends

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

type Balance struct {
	APIResource
	// Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property.
	Available []*Amount `json:"available"`
	// Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the `source_types` property.
	ConnectReserved []*Amount `json:"connect_reserved"`
	// Funds that can be paid out using Instant Payouts.
	InstantAvailable []*Amount       `json:"instant_available"`
	Issuing          *BalanceIssuing `json:"issuing"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Funds that are not yet available in the balance, due to the 7-day rolling pay cycle. The pending balance for each currency, and for each payment type, can be found in the `source_types` property.
	Pending []*Amount `json:"pending"`
}

This is an object representing your Stripe balance. You can retrieve it to see the balance currently on your Stripe account.

You can also retrieve the balance history, which contains a list of [transactions](https://stripe.com/docs/reporting/balance-transaction-types) that contributed to the balance (charges, payouts, and so forth).

The available and pending amounts for each currency are broken down further by payment source types.

Related guide: [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances).

type BalanceIssuing

type BalanceIssuing struct {
	// Funds that are available for use.
	Available []*Amount `json:"available"`
}

type BalanceParams

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

Retrieves the current account balance, based on the authentication that was used to make the request.

For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances).

type BalanceSourceType

type BalanceSourceType string

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

const (
	BalanceSourceTypeBankAccount BalanceSourceType = "bank_account"
	BalanceSourceTypeCard        BalanceSourceType = "card"
	BalanceSourceTypeFPX         BalanceSourceType = "fpx"
)

List of values that BalanceSourceType can take.

type BalanceTransaction

type BalanceTransaction struct {
	APIResource
	// Gross amount of the transaction, in %s.
	Amount int64 `json:"amount"`
	// The date the transaction's net funds will become available in the Stripe balance.
	AvailableOn int64 `json:"available_on"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`.
	ExchangeRate float64 `json:"exchange_rate"`
	// Fees (in %s) paid for this transaction.
	Fee int64 `json:"fee"`
	// Detailed breakdown of fees (in %s) paid for this transaction.
	FeeDetails []*BalanceTransactionFeeDetail `json:"fee_details"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Net amount of the transaction, in %s.
	Net int64 `json:"net"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// [Learn more](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective.
	ReportingCategory BalanceTransactionReportingCategory `json:"reporting_category"`
	// The Stripe object to which this transaction is related.
	Source *BalanceTransactionSource `json:"source"`
	// If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`.
	Status BalanceTransactionStatus `json:"status"`
	// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.
	Type BalanceTransactionType `json:"type"`
}

Balance transactions represent funds moving through your Stripe account. They're created for every type of transaction that comes into or flows out of your Stripe account balance.

Related guide: [Balance Transaction Types](https://stripe.com/docs/reports/balance-transaction-types).

func (*BalanceTransaction) UnmarshalJSON

func (b *BalanceTransaction) UnmarshalJSON(data []byte) error

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

type BalanceTransactionFeeDetail

type BalanceTransactionFeeDetail struct {
	// Amount of the fee, in cents.
	Amount int64 `json:"amount"`
	// ID of the Connect application that earned the fee.
	Application string `json:"application"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// Type of the fee, one of: `application_fee`, `stripe_fee` or `tax`.
	Type string `json:"type"`
}

Detailed breakdown of fees (in %s) paid for this transaction.

type BalanceTransactionList

type BalanceTransactionList struct {
	APIResource
	ListMeta
	Data []*BalanceTransaction `json:"data"`
}

BalanceTransactionList is a list of BalanceTransactions as retrieved from a list endpoint.

type BalanceTransactionListParams

type BalanceTransactionListParams struct {
	ListParams `form:"*"`
	// This parameter is deprecated and we recommend listing by created and filtering in memory instead.
	AvailableOn *int64 `form:"available_on"`
	// This parameter is deprecated and we recommend listing by created and filtering in memory instead.
	AvailableOnRange *RangeQueryParams `form:"available_on"`
	Created          *int64            `form:"created"`
	CreatedRange     *RangeQueryParams `form:"created"`
	// Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.
	Payout *string `form:"payout"`
	// Only returns the original transaction.
	Source *string `form:"source"`
	// Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
	Type *string `form:"type"`
}

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.

type BalanceTransactionParams

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

Retrieves the balance transaction with the given ID.

Note that this endpoint previously used the path /v1/balance/history/:id.

type BalanceTransactionReportingCategory

type BalanceTransactionReportingCategory string

[Learn more](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective.

const (
	BalanceTransactionReportingCategoryAdvance                     BalanceTransactionReportingCategory = "advance"
	BalanceTransactionReportingCategoryAdvanceFunding              BalanceTransactionReportingCategory = "advance_funding"
	BalanceTransactionReportingCategoryCharge                      BalanceTransactionReportingCategory = "charge"
	BalanceTransactionReportingCategoryChargeFailure               BalanceTransactionReportingCategory = "charge_failure"
	BalanceTransactionReportingCategoryConnectCollectionTransfer   BalanceTransactionReportingCategory = "connect_collection_transfer"
	BalanceTransactionReportingCategoryConnectReservedFunds        BalanceTransactionReportingCategory = "connect_reserved_funds"
	BalanceTransactionReportingCategoryDispute                     BalanceTransactionReportingCategory = "dispute"
	BalanceTransactionReportingCategoryDisputeReversal             BalanceTransactionReportingCategory = "dispute_reversal"
	BalanceTransactionReportingCategoryFee                         BalanceTransactionReportingCategory = "fee"
	BalanceTransactionReportingCategoryIssuingAuthorizationHold    BalanceTransactionReportingCategory = "issuing_authorization_hold"
	BalanceTransactionReportingCategoryIssuingAuthorizationRelease BalanceTransactionReportingCategory = "issuing_authorization_release"
	BalanceTransactionReportingCategoryIssuingTransaction          BalanceTransactionReportingCategory = "issuing_transaction"
	BalanceTransactionReportingCategoryOtherAdjustment             BalanceTransactionReportingCategory = "other_adjustment"
	BalanceTransactionReportingCategoryPartialCaptureReversal      BalanceTransactionReportingCategory = "partial_capture_reversal"
	BalanceTransactionReportingCategoryPayout                      BalanceTransactionReportingCategory = "payout"
	BalanceTransactionReportingCategoryPayoutReversal              BalanceTransactionReportingCategory = "payout_reversal"
	BalanceTransactionReportingCategoryPlatformEarning             BalanceTransactionReportingCategory = "platform_earning"
	BalanceTransactionReportingCategoryPlatformEarningRefund       BalanceTransactionReportingCategory = "platform_earning_refund"
	BalanceTransactionReportingCategoryRefund                      BalanceTransactionReportingCategory = "refund"
	BalanceTransactionReportingCategoryRefundFailure               BalanceTransactionReportingCategory = "refund_failure"
	BalanceTransactionReportingCategoryRiskReservedFunds           BalanceTransactionReportingCategory = "risk_reserved_funds"
	BalanceTransactionReportingCategoryTax                         BalanceTransactionReportingCategory = "tax"
	BalanceTransactionReportingCategoryTopup                       BalanceTransactionReportingCategory = "topup"
	BalanceTransactionReportingCategoryTopupReversal               BalanceTransactionReportingCategory = "topup_reversal"
	BalanceTransactionReportingCategoryTransfer                    BalanceTransactionReportingCategory = "transfer"
	BalanceTransactionReportingCategoryTransferReversal            BalanceTransactionReportingCategory = "transfer_reversal"
)

List of values that BalanceTransactionReportingCategory can take

type BalanceTransactionSource

type BalanceTransactionSource struct {
	ID   string                       `json:"id"`
	Type BalanceTransactionSourceType `json:"object"`

	ApplicationFee            *ApplicationFee            `json:"-"`
	Charge                    *Charge                    `json:"-"`
	ConnectCollectionTransfer *ConnectCollectionTransfer `json:"-"`
	Dispute                   *Dispute                   `json:"-"`
	FeeRefund                 *FeeRefund                 `json:"-"`
	IssuingAuthorization      *IssuingAuthorization      `json:"-"`
	IssuingDispute            *IssuingDispute            `json:"-"`
	IssuingTransaction        *IssuingTransaction        `json:"-"`
	Payout                    *Payout                    `json:"-"`
	Refund                    *Refund                    `json:"-"`
	Topup                     *Topup                     `json:"-"`
	Transfer                  *Transfer                  `json:"-"`
	TransferReversal          *TransferReversal          `json:"-"`
}

func (*BalanceTransactionSource) UnmarshalJSON

func (b *BalanceTransactionSource) UnmarshalJSON(data []byte) error

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

type BalanceTransactionSourceType

type BalanceTransactionSourceType string
const (
	BalanceTransactionSourceTypeApplicationFee            BalanceTransactionSourceType = "application_fee"
	BalanceTransactionSourceTypeCharge                    BalanceTransactionSourceType = "charge"
	BalanceTransactionSourceTypeConnectCollectionTransfer BalanceTransactionSourceType = "connect_collection_transfer"
	BalanceTransactionSourceTypeDispute                   BalanceTransactionSourceType = "dispute"
	BalanceTransactionSourceTypeFeeRefund                 BalanceTransactionSourceType = "fee_refund"
	BalanceTransactionSourceTypeIssuingAuthorization      BalanceTransactionSourceType = "issuing.authorization"
	BalanceTransactionSourceTypeIssuingDispute            BalanceTransactionSourceType = "issuing.dispute"
	BalanceTransactionSourceTypeIssuingTransaction        BalanceTransactionSourceType = "issuing.transaction"
	BalanceTransactionSourceTypePayout                    BalanceTransactionSourceType = "payout"
	BalanceTransactionSourceTypeRefund                    BalanceTransactionSourceType = "refund"
	BalanceTransactionSourceTypeTopup                     BalanceTransactionSourceType = "topup"
	BalanceTransactionSourceTypeTransfer                  BalanceTransactionSourceType = "transfer"
	BalanceTransactionSourceTypeTransferReversal          BalanceTransactionSourceType = "transfer_reversal"
)

List of values that BalanceTransactionSourceType can take

type BalanceTransactionStatus

type BalanceTransactionStatus string

If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`.

const (
	BalanceTransactionStatusAvailable BalanceTransactionStatus = "available"
	BalanceTransactionStatusPending   BalanceTransactionStatus = "pending"
)

List of values that BalanceTransactionStatus can take

type BalanceTransactionType

type BalanceTransactionType string

Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.

const (
	BalanceTransactionTypeAdjustment                  BalanceTransactionType = "adjustment"
	BalanceTransactionTypeAdvance                     BalanceTransactionType = "advance"
	BalanceTransactionTypeAdvanceFunding              BalanceTransactionType = "advance_funding"
	BalanceTransactionTypeAnticipationRepayment       BalanceTransactionType = "anticipation_repayment"
	BalanceTransactionTypeApplicationFee              BalanceTransactionType = "application_fee"
	BalanceTransactionTypeApplicationFeeRefund        BalanceTransactionType = "application_fee_refund"
	BalanceTransactionTypeCharge                      BalanceTransactionType = "charge"
	BalanceTransactionTypeConnectCollectionTransfer   BalanceTransactionType = "connect_collection_transfer"
	BalanceTransactionTypeContribution                BalanceTransactionType = "contribution"
	BalanceTransactionTypeIssuingAuthorizationHold    BalanceTransactionType = "issuing_authorization_hold"
	BalanceTransactionTypeIssuingAuthorizationRelease BalanceTransactionType = "issuing_authorization_release"
	BalanceTransactionTypeIssuingDispute              BalanceTransactionType = "issuing_dispute"
	BalanceTransactionTypeIssuingTransaction          BalanceTransactionType = "issuing_transaction"
	BalanceTransactionTypePayment                     BalanceTransactionType = "payment"
	BalanceTransactionTypePaymentFailureRefund        BalanceTransactionType = "payment_failure_refund"
	BalanceTransactionTypePaymentRefund               BalanceTransactionType = "payment_refund"
	BalanceTransactionTypePayout                      BalanceTransactionType = "payout"
	BalanceTransactionTypePayoutCancel                BalanceTransactionType = "payout_cancel"
	BalanceTransactionTypePayoutFailure               BalanceTransactionType = "payout_failure"
	BalanceTransactionTypeRefund                      BalanceTransactionType = "refund"
	BalanceTransactionTypeRefundFailure               BalanceTransactionType = "refund_failure"
	BalanceTransactionTypeReserveTransaction          BalanceTransactionType = "reserve_transaction"
	BalanceTransactionTypeReservedFunds               BalanceTransactionType = "reserved_funds"
	BalanceTransactionTypeStripeFee                   BalanceTransactionType = "stripe_fee"
	BalanceTransactionTypeStripeFxFee                 BalanceTransactionType = "stripe_fx_fee"
	BalanceTransactionTypeTaxFee                      BalanceTransactionType = "tax_fee"
	BalanceTransactionTypeTopup                       BalanceTransactionType = "topup"
	BalanceTransactionTypeTopupReversal               BalanceTransactionType = "topup_reversal"
	BalanceTransactionTypeTransfer                    BalanceTransactionType = "transfer"
	BalanceTransactionTypeTransferCancel              BalanceTransactionType = "transfer_cancel"
	BalanceTransactionTypeTransferFailure             BalanceTransactionType = "transfer_failure"
	BalanceTransactionTypeTransferRefund              BalanceTransactionType = "transfer_refund"
)

List of values that BalanceTransactionType can take

type BankAccount

type BankAccount struct {
	APIResource
	// The ID of the account that the bank account is associated with.
	Account *Account `json:"account"`
	// The name of the person or business that owns the bank account.
	AccountHolderName string `json:"account_holder_name"`
	// The type of entity that holds the account. This can be either `individual` or `company`.
	AccountHolderType BankAccountAccountHolderType `json:"account_holder_type"`
	// The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
	AccountType string `json:"account_type"`
	// A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout.
	AvailablePayoutMethods []BankAccountAvailablePayoutMethod `json:"available_payout_methods"`
	// Name of the bank associated with the routing number (e.g., `WELLS FARGO`).
	BankName string `json:"bank_name"`
	// Two-letter ISO code representing the country the bank account is located in.
	Country string `json:"country"`
	// Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
	Currency Currency `json:"currency"`
	// The ID of the customer that the bank account is associated with.
	Customer *Customer `json:"customer"`
	// Whether this bank account is the default external account for its currency.
	DefaultForCurrency bool `json:"default_for_currency"`
	Deleted            bool `json:"deleted"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The last four digits of the bank account number.
	Last4 string `json:"last4"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The routing transit number for the bank account.
	RoutingNumber string `json:"routing_number"`
	// For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.
	//
	// For external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.
	Status BankAccountStatus `json:"status"`
}

These bank accounts are payment methods on `Customer` objects.

On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts). They can be bank accounts or debit cards as well, and are documented in the links above.

Related guide: [Bank Debits and Transfers](https://stripe.com/docs/payments/bank-debits-transfers).

func (*BankAccount) UnmarshalJSON

func (b *BankAccount) UnmarshalJSON(data []byte) error

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

type BankAccountAccountHolderType string

The type of entity that holds the account. This can be either `individual` or `company`.

const (
	BankAccountAccountHolderTypeCompany    BankAccountAccountHolderType = "company"
	BankAccountAccountHolderTypeIndividual BankAccountAccountHolderType = "individual"
)

List of values that BankAccountAccountHolderType can take

type BankAccountAvailablePayoutMethod

type BankAccountAvailablePayoutMethod string

A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout.

const (
	BankAccountAvailablePayoutMethodInstant  BankAccountAvailablePayoutMethod = "instant"
	BankAccountAvailablePayoutMethodStandard BankAccountAvailablePayoutMethod = "standard"
)

List of values that BankAccountAvailablePayoutMethod can take

type BankAccountList

type BankAccountList struct {
	APIResource
	ListMeta
	Data []*BankAccount `json:"data"`
}

BankAccountList is a list of BankAccounts as retrieved from a list endpoint.

type BankAccountListParams

type BankAccountListParams struct {
	ListParams `form:"*"`
	// The identifier of the parent account under which the bank accounts are
	// nested. Either Account or Customer should be populated.
	Account *string `form:"-"` // Included in URL
	// The identifier of the parent customer under which the bank accounts are
	// nested. Either Account or Customer should be populated.
	Customer *string `form:"-"` // Included in URL
}

func (*BankAccountListParams) AppendTo

func (p *BankAccountListParams) AppendTo(body *form.Values, keyParts []string)

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

type BankAccountParams struct {
	Params   `form:"*"`
	Customer *string `form:"-"` // Included in URL
	// Token is a token referencing an external account like one returned from
	// Stripe.js.
	Token *string `form:"-"` // Included in URL
	// Account is the identifier of the parent account under which bank
	// accounts are nested.
	Account *string `form:"-"` // Included in URL
	// The name of the person or business that owns the bank account.
	AccountHolderName *string `form:"account_holder_name"`
	// The type of entity that holds the account. This can be either `individual` or `company`.
	AccountHolderType *string `form:"account_holder_type"`
	// The account number for the bank account, in string form. Must be a checking account.
	AccountNumber *string `form:"account_number"`
	// The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
	AccountType *string `form:"account_type"`
	// City/District/Suburb/Town/Village.
	AddressCity *string `form:"address_city"`
	// Billing address country, if provided when creating card.
	AddressCountry *string `form:"address_country"`
	// Address line 1 (Street address/PO Box/Company name).
	AddressLine1 *string `form:"address_line1"`
	// Address line 2 (Apartment/Suite/Unit/Building).
	AddressLine2 *string `form:"address_line2"`
	// State/County/Province/Region.
	AddressState *string `form:"address_state"`
	// ZIP or postal code.
	AddressZip *string `form:"address_zip"`
	// The country in which the bank account is located.
	Country *string `form:"country"`
	// The currency the bank account is in. This must be a country/currency pairing that [Stripe supports](https://stripe.com/docs/payouts).
	Currency *string `form:"currency"`
	// When set to true, this becomes the default external account for its currency.
	DefaultForCurrency *bool `form:"default_for_currency"`
	// Two digit number representing the card's expiration month.
	ExpMonth *string `form:"exp_month"`
	// Four digit number representing the card's expiration year.
	ExpYear *string `form:"exp_year"`
	// Cardholder name.
	Name *string `form:"name"`
	// The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required.
	RoutingNumber *string `form:"routing_number"`
	// ID is used when tokenizing a bank account for shared customers
	ID *string `form:"*"`
}

Updates the metadata, account holder name, account holder type of a bank account belonging to a [Custom account](https://stripe.com/docs/connect/custom-accounts), and optionally sets it as the default for its currency. Other bank account details are not editable by design.

You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.

func (*BankAccountParams) AppendToAsSourceOrExternalAccount

func (a *BankAccountParams) AppendToAsSourceOrExternalAccount(body *form.Values)

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.

type BankAccountStatus

type BankAccountStatus string

For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a transfer sent to this bank account fails, we'll set the status to `errored` and will not continue to send transfers until the bank details are updated.

For external accounts, possible values are `new` and `errored`. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.

const (
	BankAccountStatusErrored            BankAccountStatus = "errored"
	BankAccountStatusNew                BankAccountStatus = "new"
	BankAccountStatusValidated          BankAccountStatus = "validated"
	BankAccountStatusVerificationFailed BankAccountStatus = "verification_failed"
	BankAccountStatusVerified           BankAccountStatus = "verified"
)

List of values that BankAccountStatus can take

type BillingPortalConfiguration

type BillingPortalConfiguration struct {
	APIResource
	// Whether the configuration is active and can be used to create portal sessions.
	Active bool `json:"active"`
	// ID of the Connect Application that created the configuration.
	Application     *Application                               `json:"application"`
	BusinessProfile *BillingPortalConfigurationBusinessProfile `json:"business_profile"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
	DefaultReturnURL string                              `json:"default_return_url"`
	Features         *BillingPortalConfigurationFeatures `json:"features"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
	IsDefault bool `json:"is_default"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode  bool                                 `json:"livemode"`
	LoginPage *BillingPortalConfigurationLoginPage `json:"login_page"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Time at which the object was last updated. Measured in seconds since the Unix epoch.
	Updated int64 `json:"updated"`
}

A portal configuration describes the functionality and behavior of a portal session.

func (*BillingPortalConfiguration) UnmarshalJSON

func (b *BillingPortalConfiguration) UnmarshalJSON(data []byte) error

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

type BillingPortalConfigurationBusinessProfile

type BillingPortalConfigurationBusinessProfile struct {
	// The messaging shown to customers in the portal.
	Headline string `json:"headline"`
	// A link to the business's publicly available privacy policy.
	PrivacyPolicyURL string `json:"privacy_policy_url"`
	// A link to the business's publicly available terms of service.
	TermsOfServiceURL string `json:"terms_of_service_url"`
}

type BillingPortalConfigurationBusinessProfileParams

type BillingPortalConfigurationBusinessProfileParams struct {
	// The messaging shown to customers in the portal.
	Headline *string `form:"headline"`
	// A link to the business's publicly available privacy policy.
	PrivacyPolicyURL *string `form:"privacy_policy_url"`
	// A link to the business's publicly available terms of service.
	TermsOfServiceURL *string `form:"terms_of_service_url"`
}

The business information shown to customers in the portal.

type BillingPortalConfigurationFeatures

type BillingPortalConfigurationFeatures struct {
	CustomerUpdate      *BillingPortalConfigurationFeaturesCustomerUpdate      `json:"customer_update"`
	InvoiceHistory      *BillingPortalConfigurationFeaturesInvoiceHistory      `json:"invoice_history"`
	PaymentMethodUpdate *BillingPortalConfigurationFeaturesPaymentMethodUpdate `json:"payment_method_update"`
	SubscriptionCancel  *BillingPortalConfigurationFeaturesSubscriptionCancel  `json:"subscription_cancel"`
	SubscriptionPause   *BillingPortalConfigurationFeaturesSubscriptionPause   `json:"subscription_pause"`
	SubscriptionUpdate  *BillingPortalConfigurationFeaturesSubscriptionUpdate  `json:"subscription_update"`
}

type BillingPortalConfigurationFeaturesCustomerUpdate

type BillingPortalConfigurationFeaturesCustomerUpdate struct {
	// The types of customer updates that are supported. When empty, customers are not updateable.
	AllowedUpdates []BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate `json:"allowed_updates"`
	// Whether the feature is enabled.
	Enabled bool `json:"enabled"`
}

type BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate

type BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate string

The types of customer updates that are supported. When empty, customers are not updateable.

const (
	BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateAddress  BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "address"
	BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateEmail    BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "email"
	BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdatePhone    BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "phone"
	BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateShipping BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "shipping"
	BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateTaxID    BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "tax_id"
)

List of values that BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate can take

type BillingPortalConfigurationFeaturesCustomerUpdateParams

type BillingPortalConfigurationFeaturesCustomerUpdateParams struct {
	// The types of customer updates that are supported. When empty, customers are not updateable.
	AllowedUpdates []*string `form:"allowed_updates"`
	// Whether the feature is enabled.
	Enabled *bool `form:"enabled"`
}

Information about updating the customer details in the portal.

type BillingPortalConfigurationFeaturesInvoiceHistory

type BillingPortalConfigurationFeaturesInvoiceHistory struct {
	// Whether the feature is enabled.
	Enabled bool `json:"enabled"`
}

type BillingPortalConfigurationFeaturesInvoiceHistoryParams

type BillingPortalConfigurationFeaturesInvoiceHistoryParams struct {
	// Whether the feature is enabled.
	Enabled *bool `form:"enabled"`
}

Information about showing the billing history in the portal.

type BillingPortalConfigurationFeaturesParams

type BillingPortalConfigurationFeaturesParams struct {
	// Information about updating the customer details in the portal.
	CustomerUpdate *BillingPortalConfigurationFeaturesCustomerUpdateParams `form:"customer_update"`
	// Information about showing the billing history in the portal.
	InvoiceHistory *BillingPortalConfigurationFeaturesInvoiceHistoryParams `form:"invoice_history"`
	// Information about updating payment methods in the portal.
	PaymentMethodUpdate *BillingPortalConfigurationFeaturesPaymentMethodUpdateParams `form:"payment_method_update"`
	// Information about canceling subscriptions in the portal.
	SubscriptionCancel *BillingPortalConfigurationFeaturesSubscriptionCancelParams `form:"subscription_cancel"`
	// Information about pausing subscriptions in the portal.
	SubscriptionPause *BillingPortalConfigurationFeaturesSubscriptionPauseParams `form:"subscription_pause"`
	// Information about updating subscriptions in the portal.
	SubscriptionUpdate *BillingPortalConfigurationFeaturesSubscriptionUpdateParams `form:"subscription_update"`
}

Information about the features available in the portal.

type BillingPortalConfigurationFeaturesPaymentMethodUpdate

type BillingPortalConfigurationFeaturesPaymentMethodUpdate struct {
	// Whether the feature is enabled.
	Enabled bool `json:"enabled"`
}

type BillingPortalConfigurationFeaturesPaymentMethodUpdateParams

type BillingPortalConfigurationFeaturesPaymentMethodUpdateParams struct {
	// Whether the feature is enabled.
	Enabled *bool `form:"enabled"`
}

Information about updating payment methods in the portal.

type BillingPortalConfigurationFeaturesSubscriptionCancel

type BillingPortalConfigurationFeaturesSubscriptionCancel struct {
	CancellationReason *BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReason `json:"cancellation_reason"`
	// Whether the feature is enabled.
	Enabled bool `json:"enabled"`
	// Whether to cancel subscriptions immediately or at the end of the billing period.
	Mode BillingPortalConfigurationFeaturesSubscriptionCancelMode `json:"mode"`
	// Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`.
	ProrationBehavior BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior `json:"proration_behavior"`
}

type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReason

type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReason struct {
	// Whether the feature is enabled.
	Enabled bool `json:"enabled"`
	// Which cancellation reasons will be given as options to the customer.
	Options []BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption `json:"options"`
}

type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption

type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption string

Which cancellation reasons will be given as options to the customer.

const (
	BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionCustomerService BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "customer_service"
	BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionLowQuality      BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "low_quality"
	BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionMissingFeatures BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "missing_features"
	BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionOther           BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "other"
	BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionSwitchedService BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "switched_service"
	BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionTooComplex      BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "too_complex"
	BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionTooExpensive    BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "too_expensive"
	BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOptionUnused          BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption = "unused"
)

List of values that BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonOption can take

type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonParams

type BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonParams struct {
	// Whether the feature is enabled.
	Enabled *bool `form:"enabled"`
	// Which cancellation reasons will be given as options to the customer.
	Options []*string `form:"options"`
}

Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer

type BillingPortalConfigurationFeaturesSubscriptionCancelMode

type BillingPortalConfigurationFeaturesSubscriptionCancelMode string

Whether to cancel subscriptions immediately or at the end of the billing period.

const (
	BillingPortalConfigurationFeaturesSubscriptionCancelModeAtPeriodEnd BillingPortalConfigurationFeaturesSubscriptionCancelMode = "at_period_end"
	BillingPortalConfigurationFeaturesSubscriptionCancelModeImmediately BillingPortalConfigurationFeaturesSubscriptionCancelMode = "immediately"
)

List of values that BillingPortalConfigurationFeaturesSubscriptionCancelMode can take

type BillingPortalConfigurationFeaturesSubscriptionCancelParams

type BillingPortalConfigurationFeaturesSubscriptionCancelParams struct {
	// Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
	CancellationReason *BillingPortalConfigurationFeaturesSubscriptionCancelCancellationReasonParams `form:"cancellation_reason"`
	// Whether the feature is enabled.
	Enabled *bool `form:"enabled"`
	// Whether to cancel subscriptions immediately or at the end of the billing period.
	Mode *string `form:"mode"`
	// Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period.
	ProrationBehavior *string `form:"proration_behavior"`
}

Information about canceling subscriptions in the portal.

type BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior

type BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior string

Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`.

const (
	BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorAlwaysInvoice    BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "always_invoice"
	BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorCreateProrations BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "create_prorations"
	BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehaviorNone             BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior = "none"
)

List of values that BillingPortalConfigurationFeaturesSubscriptionCancelProrationBehavior can take

type BillingPortalConfigurationFeaturesSubscriptionPause

type BillingPortalConfigurationFeaturesSubscriptionPause struct {
	// Whether the feature is enabled.
	Enabled bool `json:"enabled"`
}

type BillingPortalConfigurationFeaturesSubscriptionPauseParams

type BillingPortalConfigurationFeaturesSubscriptionPauseParams struct {
	// Whether the feature is enabled.
	Enabled *bool `form:"enabled"`
}

Information about pausing subscriptions in the portal.

type BillingPortalConfigurationFeaturesSubscriptionUpdate

type BillingPortalConfigurationFeaturesSubscriptionUpdate struct {
	// The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.
	DefaultAllowedUpdates []BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate `json:"default_allowed_updates"`
	// Whether the feature is enabled.
	Enabled bool `json:"enabled"`
	// The list of products that support subscription updates.
	Products []*BillingPortalConfigurationFeaturesSubscriptionUpdateProduct `json:"products"`
	// Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
	ProrationBehavior BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior `json:"proration_behavior"`
}

type BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate

type BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate string

The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.

const (
	BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdatePrice         BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate = "price"
	BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdatePromotionCode BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate = "promotion_code"
	BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdateQuantity      BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate = "quantity"
)

List of values that BillingPortalConfigurationFeaturesSubscriptionUpdateDefaultAllowedUpdate can take

type BillingPortalConfigurationFeaturesSubscriptionUpdateParams

type BillingPortalConfigurationFeaturesSubscriptionUpdateParams struct {
	// The types of subscription updates that are supported. When empty, subscriptions are not updateable.
	DefaultAllowedUpdates []*string `form:"default_allowed_updates"`
	// Whether the feature is enabled.
	Enabled *bool `form:"enabled"`
	// The list of products that support subscription updates.
	Products []*BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams `form:"products"`
	// Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
	ProrationBehavior *string `form:"proration_behavior"`
}

Information about updating subscriptions in the portal.

type BillingPortalConfigurationFeaturesSubscriptionUpdateProduct

type BillingPortalConfigurationFeaturesSubscriptionUpdateProduct struct {
	// The list of price IDs which, when subscribed to, a subscription can be updated.
	Prices []string `json:"prices"`
	// The product ID.
	Product string `json:"product"`
}

The list of products that support subscription updates.

type BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams

type BillingPortalConfigurationFeaturesSubscriptionUpdateProductParams struct {
	// The list of price IDs for the product that a subscription can be updated to.
	Prices []*string `form:"prices"`
	// The product id.
	Product *string `form:"product"`
}

The list of products that support subscription updates.

type BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior

type BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior string

Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.

const (
	BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehaviorAlwaysInvoice    BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior = "always_invoice"
	BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehaviorCreateProrations BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior = "create_prorations"
	BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehaviorNone             BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior = "none"
)

List of values that BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior can take

type BillingPortalConfigurationList

type BillingPortalConfigurationList struct {
	APIResource
	ListMeta
	Data []*BillingPortalConfiguration `json:"data"`
}

BillingPortalConfigurationList is a list of Configurations as retrieved from a list endpoint.

type BillingPortalConfigurationListParams

type BillingPortalConfigurationListParams struct {
	ListParams `form:"*"`
	// Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations).
	Active *bool `form:"active"`
	// Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration).
	IsDefault *bool `form:"is_default"`
}

Returns a list of configurations that describe the functionality of the customer portal.

type BillingPortalConfigurationLoginPage

type BillingPortalConfigurationLoginPage struct {
	// If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal.
	//
	// If `false`, the previously generated `url`, if any, will be deactivated.
	Enabled bool `json:"enabled"`
	// A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal.
	URL string `json:"url"`
}

type BillingPortalConfigurationLoginPageParams

type BillingPortalConfigurationLoginPageParams struct {
	// Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
	//
	// Set to `false` to deactivate the `login_page.url`.
	Enabled *bool `form:"enabled"`
}

The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).

type BillingPortalConfigurationParams

type BillingPortalConfigurationParams struct {
	Params `form:"*"`
	// Whether the configuration is active and can be used to create portal sessions.
	Active *bool `form:"active"`
	// The business information shown to customers in the portal.
	BusinessProfile *BillingPortalConfigurationBusinessProfileParams `form:"business_profile"`
	// The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
	DefaultReturnURL *string `form:"default_return_url"`
	// Information about the features available in the portal.
	Features *BillingPortalConfigurationFeaturesParams `form:"features"`
	// The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
	LoginPage *BillingPortalConfigurationLoginPageParams `form:"login_page"`
}

Creates a configuration that describes the functionality and behavior of a PortalSession

type BillingPortalSession

type BillingPortalSession struct {
	APIResource
	// The configuration used by this session, describing the features available.
	Configuration *BillingPortalConfiguration `json:"configuration"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The ID of the customer for this session.
	Customer string `json:"customer"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used.
	Locale string `json:"locale"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
	OnBehalfOf string `json:"on_behalf_of"`
	// The URL to redirect customers to when they click on the portal's link to return to your website.
	ReturnURL string `json:"return_url"`
	// The short-lived URL of the session that gives customers access to the customer portal.
	URL string `json:"url"`
}

The Billing customer portal is a Stripe-hosted UI for subscription and billing management.

A portal configuration describes the functionality and features that you want to provide to your customers through the portal.

A portal session describes the instantiation of the customer portal for a particular customer. By visiting the session's URL, the customer can manage their subscriptions and billing details. For security reasons, sessions are short-lived and will expire if the customer does not visit the URL. Create sessions on-demand when customers intend to manage their subscriptions and billing details.

Learn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal).

type BillingPortalSessionParams

type BillingPortalSessionParams struct {
	Params `form:"*"`
	// The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.
	Configuration *string `form:"configuration"`
	// The ID of an existing customer.
	Customer *string `form:"customer"`
	// The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used.
	Locale *string `form:"locale"`
	// The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
	OnBehalfOf *string `form:"on_behalf_of"`
	// The default URL to redirect customers to when they click on the portal's link to return to your website.
	ReturnURL *string `form:"return_url"`
}

Creates a session of the customer portal.

type Capability

type Capability struct {
	APIResource
	// The account for which the capability enables functionality.
	Account            *Account                      `json:"account"`
	FutureRequirements *CapabilityFutureRequirements `json:"future_requirements"`
	// The identifier for the capability.
	ID string `json:"id"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Whether the capability has been requested.
	Requested bool `json:"requested"`
	// Time at which the capability was requested. Measured in seconds since the Unix epoch.
	RequestedAt  int64                   `json:"requested_at"`
	Requirements *CapabilityRequirements `json:"requirements"`
	// The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`.
	Status CapabilityStatus `json:"status"`
}

This is an object representing a capability for a Stripe account.

Related guide: [Account capabilities](https://stripe.com/docs/connect/account-capabilities).

type CapabilityDisabledReason

type CapabilityDisabledReason string

If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.

`rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service:

- [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses)

If you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.

const (
	CapabilityDisabledReasonPendingOnboarding        CapabilityDisabledReason = "pending.onboarding"
	CapabilityDisabledReasonPendingReview            CapabilityDisabledReason = "pending.review"
	CapabilityDisabledReasonRejectedFraud            CapabilityDisabledReason = "rejected_fraud"
	CapabilityDisabledReasonRejectedListed           CapabilityDisabledReason = "rejected.listed"
	CapabilityDisabledReasonRejectedOther            CapabilityDisabledReason = "rejected.other"
	CapabilityDisabledReasonRequirementsFieldsNeeded CapabilityDisabledReason = "requirement.fields_needed"
)

List of values that CapabilityDisabledReason can take

type CapabilityFutureRequirements

type CapabilityFutureRequirements struct {
	// Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
	Alternatives []*CapabilityFutureRequirementsAlternative `json:"alternatives"`
	// Date on which `future_requirements` merges with the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning.
	CurrentDeadline int64 `json:"current_deadline"`
	// Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
	CurrentlyDue []string `json:"currently_due"`
	// This is typed as a string for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is empty because fields in `future_requirements` will never disable the account.
	DisabledReason string `json:"disabled_reason"`
	// Fields that are `currently_due` and need to be collected again because validation or verification failed.
	Errors []*CapabilityFutureRequirementsError `json:"errors"`
	// Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well.
	EventuallyDue []string `json:"eventually_due"`
	// Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.
	PastDue []string `json:"past_due"`
	// Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.
	PendingVerification []string `json:"pending_verification"`
}

type CapabilityFutureRequirementsAlternative

type CapabilityFutureRequirementsAlternative struct {
	// Fields that can be provided to satisfy all fields in `original_fields_due`.
	AlternativeFieldsDue []string `json:"alternative_fields_due"`
	// Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
	OriginalFieldsDue []string `json:"original_fields_due"`
}

Fields that are due and can be satisfied by providing the corresponding alternative fields instead.

type CapabilityFutureRequirementsError

type CapabilityFutureRequirementsError struct {
	// The code for the type of error.
	Code string `json:"code"`
	// An informative message that indicates the error type and provides additional details about the error.
	Reason string `json:"reason"`
	// The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
	Requirement string `json:"requirement"`
}

Fields that are `currently_due` and need to be collected again because validation or verification failed.

type CapabilityList

type CapabilityList struct {
	APIResource
	ListMeta
	Data []*Capability `json:"data"`
}

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

type CapabilityListParams

type CapabilityListParams struct {
	ListParams `form:"*"`
	Account    *string `form:"-"` // Included in URL
}

Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.

type CapabilityParams

type CapabilityParams struct {
	Params  `form:"*"`
	Account *string `form:"-"` // Included in URL
	// Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
	Requested *bool `form:"requested"`
}

Retrieves information about the specified Account Capability.

type CapabilityRequirements

type CapabilityRequirements struct {
	// Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
	Alternatives []*CapabilityRequirementsAlternative `json:"alternatives"`
	// Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.
	CurrentDeadline int64 `json:"current_deadline"`
	// Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.
	CurrentlyDue []string `json:"currently_due"`
	// If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.
	//
	// `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service:
	//
	// - [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses)
	//
	// If you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
	DisabledReason CapabilityDisabledReason `json:"disabled_reason"`
	// Fields that are `currently_due` and need to be collected again because validation or verification failed.
	Errors []*AccountRequirementsError `json:"errors"`
	// Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.
	EventuallyDue []string `json:"eventually_due"`
	// Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account.
	PastDue []string `json:"past_due"`
	// Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.
	PendingVerification []string `json:"pending_verification"`
}

type CapabilityRequirementsAlternative

type CapabilityRequirementsAlternative struct {
	// Fields that can be provided to satisfy all fields in `original_fields_due`.
	AlternativeFieldsDue []string `json:"alternative_fields_due"`
	// Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
	OriginalFieldsDue []string `json:"original_fields_due"`
}

Fields that are due and can be satisfied by providing the corresponding alternative fields instead.

type CapabilityStatus

type CapabilityStatus string

The status of the capability. Can be `active`, `inactive`, `pending`, or `unrequested`.

const (
	CapabilityStatusActive      CapabilityStatus = "active"
	CapabilityStatusDisabled    CapabilityStatus = "disabled"
	CapabilityStatusInactive    CapabilityStatus = "inactive"
	CapabilityStatusPending     CapabilityStatus = "pending"
	CapabilityStatusUnrequested CapabilityStatus = "unrequested"
)

List of values that CapabilityStatus can take

type Card

type Card struct {
	APIResource
	// The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.
	Account *Account `json:"account"`
	// City/District/Suburb/Town/Village.
	AddressCity string `json:"address_city"`
	// Billing address country, if provided when creating card.
	AddressCountry string `json:"address_country"`
	// Address line 1 (Street address/PO Box/Company name).
	AddressLine1 string `json:"address_line1"`
	// If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
	AddressLine1Check CardAddressLine1Check `json:"address_line1_check"`
	// Address line 2 (Apartment/Suite/Unit/Building).
	AddressLine2 string `json:"address_line2"`
	// State/County/Province/Region.
	AddressState string `json:"address_state"`
	// ZIP or postal code.
	AddressZip string `json:"address_zip"`
	// If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
	AddressZipCheck CardAddressZipCheck `json:"address_zip_check"`
	// A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.
	AvailablePayoutMethods []CardAvailablePayoutMethod `json:"available_payout_methods"`
	// Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.
	Brand CardBrand `json:"brand"`
	// Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
	Country string `json:"country"`
	// Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
	Currency Currency `json:"currency"`
	// The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
	Customer *Customer `json:"customer"`
	// If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).
	CVCCheck CardCVCCheck `json:"cvc_check"`
	// Whether this card is the default external account for its currency.
	DefaultForCurrency bool `json:"default_for_currency"`
	Deleted            bool `json:"deleted"`
	// Description is a succinct summary of the card's information.
	//
	// Please note that this field is for internal use only and is not returned
	// as part of standard API requests.
	// A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
	Description string `json:"description"`
	// (For tokenized numbers only.) The last four digits of the device account number.
	DynamicLast4 string `json:"dynamic_last4"`
	// Two-digit number representing the card's expiration month.
	ExpMonth int64 `json:"exp_month"`
	// Four-digit number representing the card's expiration year.
	ExpYear int64 `json:"exp_year"`
	// Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
	//
	// *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*
	Fingerprint string `json:"fingerprint"`
	// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
	Funding CardFunding `json:"funding"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// IIN is the card's "Issuer Identification Number".
	//
	// Please note that this field is for internal use only and is not returned
	// as part of standard API requests.
	// Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
	IIN string `json:"iin"`
	// Issuer is a bank or financial institution that provides the card.
	//
	// Please note that this field is for internal use only and is not returned
	// as part of standard API requests.
	// The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
	Issuer string `json:"issuer"`
	// The last four digits of the card.
	Last4 string `json:"last4"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// Cardholder name.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated.
	Status string `json:"status"`
	// If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null.
	TokenizationMethod CardTokenizationMethod `json:"tokenization_method"`
}

You can store multiple cards on a customer in order to charge the customer later. You can also store multiple debit cards on a recipient in order to transfer to those cards later.

Related guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards).

func (*Card) UnmarshalJSON

func (c *Card) UnmarshalJSON(data []byte) error

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 CardAddressLine1Check

type CardAddressLine1Check string

If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.

const (
	CardAddressLine1CheckFail        CardAddressLine1Check = "fail"
	CardAddressLine1CheckPass        CardAddressLine1Check = "pass"
	CardAddressLine1CheckUnavailable CardAddressLine1Check = "unavailable"
	CardAddressLine1CheckUnchecked   CardAddressLine1Check = "unchecked"
)

List of values that CardAddressLine1Check can take

type CardAddressZipCheck

type CardAddressZipCheck string

If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.

const (
	CardAddressZipCheckFail        CardAddressZipCheck = "fail"
	CardAddressZipCheckPass        CardAddressZipCheck = "pass"
	CardAddressZipCheckUnavailable CardAddressZipCheck = "unavailable"
	CardAddressZipCheckUnchecked   CardAddressZipCheck = "unchecked"
)

List of values that CardAddressZipCheck can take

type CardAvailablePayoutMethod

type CardAvailablePayoutMethod string

A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.

const (
	CardAvailablePayoutMethodInstant  CardAvailablePayoutMethod = "instant"
	CardAvailablePayoutMethodStandard CardAvailablePayoutMethod = "standard"
)

List of values that CardAvailablePayoutMethod can take

type CardBrand

type CardBrand string

Card brand. Can be `American Express`, `Diners Club`, `Discover`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.

const (
	CardBrandAmericanExpress CardBrand = "American Express"
	CardBrandDiscover        CardBrand = "Discover"
	CardBrandDinersClub      CardBrand = "Diners Club"
	CardBrandJCB             CardBrand = "JCB"
	CardBrandMasterCard      CardBrand = "MasterCard"
	CardBrandUnknown         CardBrand = "Unknown"
	CardBrandUnionPay        CardBrand = "UnionPay"
	CardBrandVisa            CardBrand = "Visa"
)

List of values that CardBrand can take

type CardCVCCheck

type CardCVCCheck string

If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).

const (
	CardCVCCheckFail        CardCVCCheck = "fail"
	CardCVCCheckPass        CardCVCCheck = "pass"
	CardCVCCheckUnavailable CardCVCCheck = "unavailable"
	CardCVCCheckUnchecked   CardCVCCheck = "unchecked"
)

List of values that CardCVCCheck can take

type CardError

type CardError struct {

	// DeclineCode is a code indicating a card issuer's reason for declining a
	// card (if they provided one).
	DeclineCode DeclineCode `json:"decline_code,omitempty"`
	// contains filtered or unexported fields
}

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.

func (*CardError) Error

func (e *CardError) Error() string

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

type CardFunding

type CardFunding string

Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.

const (
	CardFundingCredit  CardFunding = "credit"
	CardFundingDebit   CardFunding = "debit"
	CardFundingPrepaid CardFunding = "prepaid"
	CardFundingUnknown CardFunding = "unknown"
)

List of values that CardFunding can take

type CardList

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

CardList is a list of Cards as retrieved from a list endpoint.

type CardListParams

type CardListParams struct {
	ListParams `form:"*"`
	Account    *string `form:"-"` // Included in URL
	Customer   *string `form:"-"` // Included in URL
}

func (*CardListParams) AppendTo

func (p *CardListParams) AppendTo(body *form.Values, keyParts []string)

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 CardOwnerParams

type CardOwnerParams struct {
	// Owner's address.
	Address *AddressParams `form:"address"`
	// Owner's email address.
	Email *string `form:"email"`
	// Owner's full name.
	Name *string `form:"name"`
	// Owner's phone number.
	Phone *string `form:"phone"`
}

type CardParams

type CardParams struct {
	Params   `form:"*"`
	Account  *string `form:"-"` // Included in URL
	Token    *string `form:"-"` // Included in URL
	Customer *string `form:"-"` // Included in URL
	// The name of the person or business that owns the bank account.
	AccountHolderName *string `form:"account_holder_name"`
	// The type of entity that holds the account. This can be either `individual` or `company`.
	AccountHolderType *string `form:"account_holder_type"`
	// City/District/Suburb/Town/Village.
	AddressCity *string `form:"address_city"`
	// Billing address country, if provided when creating card.
	AddressCountry *string `form:"address_country"`
	// Address line 1 (Street address/PO Box/Company name).
	AddressLine1 *string `form:"address_line1"`
	// Address line 2 (Apartment/Suite/Unit/Building).
	AddressLine2 *string `form:"address_line2"`
	// State/County/Province/Region.
	AddressState *string `form:"address_state"`
	// ZIP or postal code.
	AddressZip *string `form:"address_zip"`
	// Required when adding a card to an account (not applicable to customers or recipients). The card (which must be a debit card) can be used as a transfer destination for funds in this currency.
	Currency *string `form:"currency"`
	// Card security code. Highly recommended to always include this value, but it's required only for accounts based in European countries.
	CVC *string `form:"cvc"`
	// Applicable only on accounts (not customers or recipients). If you set this to `true` (or if this is the first external account being added in this currency), this card will become the default external account for its currency.
	DefaultForCurrency *bool `form:"default_for_currency"`
	// Two digit number representing the card's expiration month.
	ExpMonth *string `form:"exp_month"`
	// Four digit number representing the card's expiration year.
	ExpYear *string `form:"exp_year"`
	// Cardholder name.
	Name *string `form:"name"`
	// The card number, as a string without any separators.
	Number *string          `form:"number"`
	Owner  *CardOwnerParams `form:"owner"`
	// ID is used when tokenizing a card for shared customers
	ID string `form:"*"`
}

Update a specified source for a given customer.

func (*CardParams) AppendToAsCardSourceOrExternalAccount

func (c *CardParams) AppendToAsCardSourceOrExternalAccount(body *form.Values, keyParts []string)

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

type CardTokenizationMethod string

If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null.

const (
	CardTokenizationMethodAndroidPay CardTokenizationMethod = "android_pay"
	CardTokenizationMethodApplePay   CardTokenizationMethod = "apple_pay"
)

List of values that CardTokenizationMethod can take

type CashBalance

type CashBalance struct {
	APIResource
	// A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	Available map[string]int64 `json:"available"`
	// The ID of the customer whose cash balance this object represents.
	Customer string `json:"customer"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object   string               `json:"object"`
	Settings *CashBalanceSettings `json:"settings"`
}

A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.

type CashBalanceParams

type CashBalanceParams struct {
	Params `form:"*"`
	// A hash of settings for this cash balance.
	Settings *CashBalanceSettingsParams `form:"settings"`
	Customer *string                    `form:"-"` // Included in URL
}

Retrieves a customer's cash balance.

type CashBalanceSettings

type CashBalanceSettings struct {
	// The configuration for how funds that land in the customer cash balance are reconciled.
	ReconciliationMode CashBalanceSettingsReconciliationMode `json:"reconciliation_mode"`
}

type CashBalanceSettingsParams

type CashBalanceSettingsParams struct {
	// Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic` or `manual`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
	ReconciliationMode *string `form:"reconciliation_mode"`
}

A hash of settings for this cash balance.

type CashBalanceSettingsReconciliationMode

type CashBalanceSettingsReconciliationMode string

The configuration for how funds that land in the customer cash balance are reconciled.

const (
	CashBalanceSettingsReconciliationModeAutomatic CashBalanceSettingsReconciliationMode = "automatic"
	CashBalanceSettingsReconciliationModeManual    CashBalanceSettingsReconciliationMode = "manual"
)

List of values that CashBalanceSettingsReconciliationMode can take

type Charge

type Charge struct {
	APIResource
	// Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
	Amount int64 `json:"amount"`
	// Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).
	AmountCaptured int64 `json:"amount_captured"`
	// Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).
	AmountRefunded int64 `json:"amount_refunded"`
	// ID of the Connect application that created the charge.
	Application *Application `json:"application"`
	// The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.
	ApplicationFee *ApplicationFee `json:"application_fee"`
	// The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details.
	ApplicationFeeAmount int64 `json:"application_fee_amount"`
	// Authorization code on the charge.
	AuthorizationCode string `json:"authorization_code"`
	// ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
	BalanceTransaction *BalanceTransaction   `json:"balance_transaction"`
	BillingDetails     *ChargeBillingDetails `json:"billing_details"`
	// The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined.
	CalculatedStatementDescriptor string `json:"calculated_statement_descriptor"`
	// If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
	Captured bool `json:"captured"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// ID of the customer this charge is for if one exists.
	Customer *Customer `json:"customer"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.
	Destination *Account `json:"destination"`
	// Details about the dispute if the charge has been disputed.
	Dispute *Dispute `json:"dispute"`
	// Whether the charge has been disputed.
	Disputed bool `json:"disputed"`
	// ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
	FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"`
	// Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes).
	FailureCode string `json:"failure_code"`
	// Message to user further explaining reason for charge failure if available.
	FailureMessage string `json:"failure_message"`
	// Information on fraud assessments for the charge.
	FraudDetails *ChargeFraudDetails `json:"fraud_details"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// ID of the invoice this charge is for if one exists.
	Invoice *Invoice      `json:"invoice"`
	Level3  *ChargeLevel3 `json:"level3"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details.
	OnBehalfOf *Account `json:"on_behalf_of"`
	// Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.
	Outcome *ChargeOutcome `json:"outcome"`
	// `true` if the charge succeeded, or was successfully authorized for later capture.
	Paid bool `json:"paid"`
	// ID of the PaymentIntent associated with this charge, if one exists.
	PaymentIntent *PaymentIntent `json:"payment_intent"`
	// ID of the payment method used in this charge.
	PaymentMethod string `json:"payment_method"`
	// Details about the payment method at the time of the transaction.
	PaymentMethodDetails *ChargePaymentMethodDetails `json:"payment_method_details"`
	// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
	RadarOptions *ChargeRadarOptions `json:"radar_options"`
	// This is the email address that the receipt for this charge was sent to.
	ReceiptEmail string `json:"receipt_email"`
	// This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent.
	ReceiptNumber string `json:"receipt_number"`
	// This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
	ReceiptURL string `json:"receipt_url"`
	// Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
	Refunded bool `json:"refunded"`
	// A list of refunds that have been applied to the charge.
	Refunds *RefundList `json:"refunds"`
	// ID of the review associated with this charge if one exists.
	Review *Review `json:"review"`
	// Shipping information for the charge.
	Shipping *ShippingDetails `json:"shipping"`
	// This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead.
	Source *PaymentSource `json:"source"`
	// The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
	SourceTransfer *Transfer `json:"source_transfer"`
	// For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters.
	StatementDescriptor string `json:"statement_descriptor"`
	// Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
	StatementDescriptorSuffix string `json:"statement_descriptor_suffix"`
	// The status of the payment is either `succeeded`, `pending`, or `failed`.
	Status ChargeStatus `json:"status"`
	// ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter).
	Transfer *Transfer `json:"transfer"`
	// An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
	TransferData *ChargeTransferData `json:"transfer_data"`
	// A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.
	TransferGroup string `json:"transfer_group"`
}

To charge a credit or a debit card, you create a `Charge` object. You can retrieve and refund individual charges as well as list all charges. Charges are identified by a unique, random ID.

Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges).

Example (Get)
package main

import (
	"log"

	stripe "github.com/stripe/stripe-go/v73"
	"github.com/stripe/stripe-go/v73/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)
}
Output:

Example (New)
package main

import (
	"log"

	stripe "github.com/stripe/stripe-go/v73"
	"github.com/stripe/stripe-go/v73/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)
}
Output:

func (*Charge) UnmarshalJSON

func (c *Charge) UnmarshalJSON(data []byte) error

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 ChargeBillingDetails

type ChargeBillingDetails struct {
	// Billing address.
	Address *Address `json:"address"`
	// Email address.
	Email string `json:"email"`
	// Full name.
	Name string `json:"name"`
	// Billing phone number (including extension).
	Phone string `json:"phone"`
}

type ChargeCaptureParams

type ChargeCaptureParams struct {
	Params `form:"*"`
	// The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded.
	Amount *int64 `form:"amount"`
	// An application fee to add on to this charge.
	ApplicationFee *int64 `form:"application_fee"`
	// An application fee amount to add on to this charge, which must be less than or equal to the original amount.
	ApplicationFeeAmount *int64   `form:"application_fee_amount"`
	ExchangeRate         *float64 `form:"exchange_rate"`
	// The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
	ReceiptEmail *string `form:"receipt_email"`
	// For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters.
	StatementDescriptor *string `form:"statement_descriptor"`
	// Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
	StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
	// An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
	TransferData *ChargeCaptureTransferDataParams `form:"transfer_data"`
	// A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.
	TransferGroup *string `form:"transfer_group"`
}

Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you [created a charge](https://stripe.com/docs/api#create_charge) with the capture option set to false.

Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)). If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable.

type ChargeCaptureTransferDataParams

type ChargeCaptureTransferDataParams struct {
	// The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
	Amount *int64 `form:"amount"`
}

An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.

type ChargeDestinationParams

type ChargeDestinationParams struct {
	// ID of an existing, connected Stripe account.
	Account *string `form:"account"`
	// The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount.
	Amount *int64 `form:"amount"`
}

type ChargeFraudDetails

type ChargeFraudDetails struct {
	// Assessments from Stripe. If set, the value is `fraudulent`.
	StripeReport ChargeFraudStripeReport `json:"stripe_report"`
	// Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.
	UserReport ChargeFraudUserReport `json:"user_report"`
}

Information on fraud assessments for the charge.

type ChargeFraudDetailsParams

type ChargeFraudDetailsParams struct {
	// Either `safe` or `fraudulent`.
	UserReport *string `form:"user_report"`
}

A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.

type ChargeFraudStripeReport

type ChargeFraudStripeReport string

Assessments from Stripe. If set, the value is `fraudulent`.

const (
	ChargeFraudStripeReportFraudulent ChargeFraudStripeReport = "fraudulent"
)

List of values that ChargeFraudStripeReport can take

type ChargeFraudUserReport

type ChargeFraudUserReport string

Assessments reported by you. If set, possible values of are `safe` and `fraudulent`.

const (
	ChargeFraudUserReportFraudulent ChargeFraudUserReport = "fraudulent"
	ChargeFraudUserReportSafe       ChargeFraudUserReport = "safe"
)

List of values that ChargeFraudUserReport can take

type ChargeLevel3

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

type ChargeLevel3LineItem

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"`
}

type ChargeLevel3LineItemParams

type ChargeLevel3LineItemParams 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"`
}

type ChargeLevel3Params

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

type ChargeList

type ChargeList struct {
	APIResource
	ListMeta
	Data []*Charge `json:"data"`
}

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

type ChargeListParams

type ChargeListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return charges for the customer specified by this customer ID.
	Customer *string `form:"customer"`
	// Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.
	PaymentIntent *string `form:"payment_intent"`
	// Only return charges for this transfer group.
	TransferGroup *string `form:"transfer_group"`
}

Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first.

type ChargeOutcome

type ChargeOutcome struct {
	// Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement.
	NetworkStatus string `json:"network_status"`
	// An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.
	Reason string `json:"reason"`
	// Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar.
	RiskLevel string `json:"risk_level"`
	// Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.
	RiskScore int64 `json:"risk_score"`
	// The ID of the Radar rule that matched the payment, if applicable.
	Rule *ChargeOutcomeRule `json:"rule"`
	// A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer.
	SellerMessage string `json:"seller_message"`
	// Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details.
	Type string `json:"type"`
}

Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details.

type ChargeOutcomeRule

type ChargeOutcomeRule struct {
	// The action taken on the payment.
	Action string `json:"action"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The predicate to evaluate the payment against.
	Predicate string `json:"predicate"`
}

The ID of the Radar rule that matched the payment, if applicable.

func (*ChargeOutcomeRule) UnmarshalJSON

func (c *ChargeOutcomeRule) UnmarshalJSON(data []byte) error

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.

type ChargeParams

type ChargeParams struct {
	Params `form:"*"`
	// Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
	Amount         *int64 `form:"amount"`
	ApplicationFee *int64 `form:"application_fee"`
	// A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees).
	ApplicationFeeAmount *int64 `form:"application_fee_amount"`
	// Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation.
	Capture *bool `form:"capture"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.
	Customer *string `form:"customer"`
	// An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing.
	Description  *string                  `form:"description"`
	Destination  *ChargeDestinationParams `form:"destination"`
	ExchangeRate *float64                 `form:"exchange_rate"`
	// A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms.
	FraudDetails *ChargeFraudDetailsParams `form:"fraud_details"`
	Level3       *ChargeLevel3Params       `form:"level3"`
	// The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of).
	OnBehalfOf *string `form:"on_behalf_of"`
	// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
	RadarOptions *ChargeRadarOptionsParams `form:"radar_options"`
	// This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.
	ReceiptEmail *string `form:"receipt_email"`
	// Shipping information for the charge. Helps prevent fraud on charges for physical goods.
	Shipping *ShippingDetailsParams     `form:"shipping"`
	Source   *PaymentSourceSourceParams `form:"*"` // PaymentSourceSourceParams has custom encoding so brought to top level with "*"
	// For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers' statements. Must contain at least one letter, maximum 22 characters.
	StatementDescriptor *string `form:"statement_descriptor"`
	// Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
	StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
	// An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.
	TransferData *ChargeTransferDataParams `form:"transfer_data"`
	// A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.
	TransferGroup *string `form:"transfer_group"`
}

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won't actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

func (*ChargeParams) SetSource

func (p *ChargeParams) SetSource(sp interface{}) error

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

type ChargePaymentMethodDetails

type ChargePaymentMethodDetails struct {
	ACHCreditTransfer  *ChargePaymentMethodDetailsACHCreditTransfer  `json:"ach_credit_transfer"`
	ACHDebit           *ChargePaymentMethodDetailsACHDebit           `json:"ach_debit"`
	ACSSDebit          *ChargePaymentMethodDetailsACSSDebit          `json:"acss_debit"`
	Affirm             *ChargePaymentMethodDetailsAffirm             `json:"affirm"`
	AfterpayClearpay   *ChargePaymentMethodDetailsAfterpayClearpay   `json:"afterpay_clearpay"`
	Alipay             *ChargePaymentMethodDetailsAlipay             `json:"alipay"`
	AUBECSDebit        *ChargePaymentMethodDetailsAUBECSDebit        `json:"au_becs_debit"`
	BACSDebit          *ChargePaymentMethodDetailsBACSDebit          `json:"bacs_debit"`
	Bancontact         *ChargePaymentMethodDetailsBancontact         `json:"bancontact"`
	BLIK               *ChargePaymentMethodDetailsBLIK               `json:"blik"`
	Boleto             *ChargePaymentMethodDetailsBoleto             `json:"boleto"`
	Card               *ChargePaymentMethodDetailsCard               `json:"card"`
	CardPresent        *ChargePaymentMethodDetailsCardPresent        `json:"card_present"`
	CustomerBalance    *ChargePaymentMethodDetailsCustomerBalance    `json:"customer_balance"`
	EPS                *ChargePaymentMethodDetailsEPS                `json:"eps"`
	FPX                *ChargePaymentMethodDetailsFPX                `json:"fpx"`
	Giropay            *ChargePaymentMethodDetailsGiropay            `json:"giropay"`
	Grabpay            *ChargePaymentMethodDetailsGrabpay            `json:"grabpay"`
	IDEAL              *ChargePaymentMethodDetailsIDEAL              `json:"ideal"`
	InteracPresent     *ChargePaymentMethodDetailsInteracPresent     `json:"interac_present"`
	Klarna             *ChargePaymentMethodDetailsKlarna             `json:"klarna"`
	Konbini            *ChargePaymentMethodDetailsKonbini            `json:"konbini"`
	Link               *ChargePaymentMethodDetailsLink               `json:"link"`
	Multibanco         *ChargePaymentMethodDetailsMultibanco         `json:"multibanco"`
	OXXO               *ChargePaymentMethodDetailsOXXO               `json:"oxxo"`
	P24                *ChargePaymentMethodDetailsP24                `json:"p24"`
	PayNow             *ChargePaymentMethodDetailsPayNow             `json:"paynow"`
	PromptPay          *ChargePaymentMethodDetailsPromptPay          `json:"promptpay"`
	SEPACreditTransfer *ChargePaymentMethodDetailsSEPACreditTransfer `json:"sepa_credit_transfer"`
	SEPADebit          *ChargePaymentMethodDetailsSEPADebit          `json:"sepa_debit"`
	Sofort             *ChargePaymentMethodDetailsSofort             `json:"sofort"`
	StripeAccount      *ChargePaymentMethodDetailsStripeAccount      `json:"stripe_account"`
	// The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`.
	// An additional hash is included on `payment_method_details` with a name matching this value.
	// It contains information specific to the payment method.
	Type          ChargePaymentMethodDetailsType           `json:"type"`
	USBankAccount *ChargePaymentMethodDetailsUSBankAccount `json:"us_bank_account"`
	WeChat        *ChargePaymentMethodDetailsWeChat        `json:"wechat"`
	WeChatPay     *ChargePaymentMethodDetailsWeChatPay     `json:"wechat_pay"`
}

Details about the payment method at the time of the transaction.

type ChargePaymentMethodDetailsACHCreditTransfer

type ChargePaymentMethodDetailsACHCreditTransfer struct {
	// Account number to transfer funds to.
	AccountNumber string `json:"account_number"`
	// Name of the bank associated with the routing number.
	BankName string `json:"bank_name"`
	// Routing transit number for the bank account to transfer funds to.
	RoutingNumber string `json:"routing_number"`
	// SWIFT code of the bank associated with the routing number.
	SwiftCode string `json:"swift_code"`
}

type ChargePaymentMethodDetailsACHDebit

type ChargePaymentMethodDetailsACHDebit struct {
	// Type of entity that holds the account. This can be either `individual` or `company`.
	AccountHolderType BankAccountAccountHolderType `json:"account_holder_type"`
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Two-letter ISO code representing the country the bank account is located in.
	Country string `json:"country"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
	// Routing transit number of the bank account.
	RoutingNumber string `json:"routing_number"`
}

type ChargePaymentMethodDetailsACSSDebit

type ChargePaymentMethodDetailsACSSDebit struct {
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Institution number of the bank account
	InstitutionNumber string `json:"institution_number"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
	// ID of the mandate used to make this payment.
	Mandate string `json:"mandate"`
	// Transit number of the bank account.
	TransitNumber string `json:"transit_number"`
}

type ChargePaymentMethodDetailsAUBECSDebit

type ChargePaymentMethodDetailsAUBECSDebit struct {
	// Bank-State-Branch number of the bank account.
	BSBNumber string `json:"bsb_number"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
	// ID of the mandate used to make this payment.
	Mandate string `json:"mandate"`
}

type ChargePaymentMethodDetailsAffirm

type ChargePaymentMethodDetailsAffirm struct{}

type ChargePaymentMethodDetailsAfterpayClearpay

type ChargePaymentMethodDetailsAfterpayClearpay struct {
	// Order identifier shown to the merchant in Afterpay's online portal.
	Reference string `json:"reference"`
}

type ChargePaymentMethodDetailsAlipay

type ChargePaymentMethodDetailsAlipay struct {
	// Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
	BuyerID string `json:"buyer_id"`
	// Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Transaction ID of this particular Alipay transaction.
	TransactionID string `json:"transaction_id"`
}

type ChargePaymentMethodDetailsBACSDebit

type ChargePaymentMethodDetailsBACSDebit struct {
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
	// ID of the mandate used to make this payment.
	Mandate string `json:"mandate"`
	// Sort code of the bank account. (e.g., `10-20-30`)
	SortCode string `json:"sort_code"`
}

type ChargePaymentMethodDetailsBLIK

type ChargePaymentMethodDetailsBLIK struct{}

type ChargePaymentMethodDetailsBancontact

type ChargePaymentMethodDetailsBancontact struct {
	// Bank code of bank associated with the bank account.
	BankCode string `json:"bank_code"`
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Bank Identifier Code of the bank associated with the bank account.
	BIC string `json:"bic"`
	// The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
	GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"`
	// The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
	GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"`
	// Last four characters of the IBAN.
	IBANLast4 string `json:"iban_last4"`
	// Preferred language of the Bancontact authorization page that the customer is redirected to.
	// Can be one of `en`, `de`, `fr`, or `nl`
	PreferredLanguage string `json:"preferred_language"`
	// Owner's verified full name. Values are verified or provided by Bancontact directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	VerifiedName string `json:"verified_name"`
}

type ChargePaymentMethodDetailsBoleto

type ChargePaymentMethodDetailsBoleto struct {
	// The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers)
	TaxID string `json:"tax_id"`
}

type ChargePaymentMethodDetailsCard

type ChargePaymentMethodDetailsCard struct {
	// Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Brand PaymentMethodCardBrand `json:"brand"`
	// Check results by Card networks on Card address and CVC at time of payment.
	Checks *ChargePaymentMethodDetailsCardChecks `json:"checks"`
	// Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
	Country string `json:"country"`
	// Two-digit number representing the card's expiration month.
	ExpMonth int64 `json:"exp_month"`
	// Four-digit number representing the card's expiration year.
	ExpYear int64 `json:"exp_year"`
	// Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
	//
	// *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*
	Fingerprint string `json:"fingerprint"`
	// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
	Funding CardFunding `json:"funding"`
	// Installment details for this payment (Mexico only).
	//
	// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
	Installments *ChargePaymentMethodDetailsCardInstallments `json:"installments"`
	// The last four digits of the card.
	Last4 string `json:"last4"`
	// ID of the mandate used to make this payment or created by it.
	Mandate string `json:"mandate"`
	// True if this payment was marked as MOTO and out of scope for SCA.
	MOTO bool `json:"moto"`
	// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Network ChargePaymentMethodDetailsCardNetwork `json:"network"`
	// Populated if this transaction used 3D Secure authentication.
	ThreeDSecure *ChargePaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"`
	// If this Card is part of a card wallet, this contains the details of the card wallet.
	Wallet *ChargePaymentMethodDetailsCardWallet `json:"wallet"`
	// Please note that the fields below are for internal use only and are not returned
	// as part of standard API requests.
	// A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
	Description string `json:"description"`
	// Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
	IIN string `json:"iin"`
	// The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
	Issuer string `json:"issuer"`
}

type ChargePaymentMethodDetailsCardChecks

type ChargePaymentMethodDetailsCardChecks struct {
	// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
	AddressLine1Check ChargePaymentMethodDetailsCardChecksAddressLine1Check `json:"address_line1_check"`
	// If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
	AddressPostalCodeCheck ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck `json:"address_postal_code_check"`
	// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
	CVCCheck ChargePaymentMethodDetailsCardChecksCVCCheck `json:"cvc_check"`
}

Check results by Card networks on Card address and CVC at time of payment.

type ChargePaymentMethodDetailsCardChecksAddressLine1Check

type ChargePaymentMethodDetailsCardChecksAddressLine1Check string

If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.

const (
	ChargePaymentMethodDetailsCardChecksAddressLine1CheckFail        ChargePaymentMethodDetailsCardChecksAddressLine1Check = "fail"
	ChargePaymentMethodDetailsCardChecksAddressLine1CheckPass        ChargePaymentMethodDetailsCardChecksAddressLine1Check = "pass"
	ChargePaymentMethodDetailsCardChecksAddressLine1CheckUnavailable ChargePaymentMethodDetailsCardChecksAddressLine1Check = "unavailable"
	ChargePaymentMethodDetailsCardChecksAddressLine1CheckUnchecked   ChargePaymentMethodDetailsCardChecksAddressLine1Check = "unchecked"
)

List of values that ChargePaymentMethodDetailsCardChecksAddressLine1Check can take

type ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck

type ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck string

If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.

const (
	ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheckFail        ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck = "fail"
	ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheckPass        ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck = "pass"
	ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheckUnavailable ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck = "unavailable"
	ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheckUnchecked   ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck = "unchecked"
)

List of values that ChargePaymentMethodDetailsCardChecksAddressPostalCodeCheck can take

type ChargePaymentMethodDetailsCardChecksCVCCheck

type ChargePaymentMethodDetailsCardChecksCVCCheck string

If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.

const (
	ChargePaymentMethodDetailsCardChecksCVCCheckFail        ChargePaymentMethodDetailsCardChecksCVCCheck = "fail"
	ChargePaymentMethodDetailsCardChecksCVCCheckPass        ChargePaymentMethodDetailsCardChecksCVCCheck = "pass"
	ChargePaymentMethodDetailsCardChecksCVCCheckUnavailable ChargePaymentMethodDetailsCardChecksCVCCheck = "unavailable"
	ChargePaymentMethodDetailsCardChecksCVCCheckUnchecked   ChargePaymentMethodDetailsCardChecksCVCCheck = "unchecked"
)

List of values that ChargePaymentMethodDetailsCardChecksCVCCheck can take

type ChargePaymentMethodDetailsCardInstallments

type ChargePaymentMethodDetailsCardInstallments struct {
	// Installment plan selected for the payment.
	Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"plan"`
}

Installment details for this payment (Mexico only).

For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).

type ChargePaymentMethodDetailsCardNetwork

type ChargePaymentMethodDetailsCardNetwork string

Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.

const (
	ChargePaymentMethodDetailsCardNetworkAmex            ChargePaymentMethodDetailsCardNetwork = "amex"
	ChargePaymentMethodDetailsCardNetworkCartesBancaires ChargePaymentMethodDetailsCardNetwork = "cartes_bancaires"
	ChargePaymentMethodDetailsCardNetworkDiners          ChargePaymentMethodDetailsCardNetwork = "diners"
	ChargePaymentMethodDetailsCardNetworkDiscover        ChargePaymentMethodDetailsCardNetwork = "discover"
	ChargePaymentMethodDetailsCardNetworkInterac         ChargePaymentMethodDetailsCardNetwork = "interac"
	ChargePaymentMethodDetailsCardNetworkJCB             ChargePaymentMethodDetailsCardNetwork = "jcb"
	ChargePaymentMethodDetailsCardNetworkMastercard      ChargePaymentMethodDetailsCardNetwork = "mastercard"
	ChargePaymentMethodDetailsCardNetworkUnionpay        ChargePaymentMethodDetailsCardNetwork = "unionpay"
	ChargePaymentMethodDetailsCardNetworkVisa            ChargePaymentMethodDetailsCardNetwork = "visa"
	ChargePaymentMethodDetailsCardNetworkUnknown         ChargePaymentMethodDetailsCardNetwork = "unknown"
)

List of values that ChargePaymentMethodDetailsCardNetwork can take

type ChargePaymentMethodDetailsCardPresent

type ChargePaymentMethodDetailsCardPresent struct {
	// The authorized amount
	AmountAuthorized int64 `json:"amount_authorized"`
	// Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Brand PaymentMethodCardBrand `json:"brand"`
	// When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured.
	CaptureBefore int64 `json:"capture_before"`
	// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
	CardholderName string `json:"cardholder_name"`
	// Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
	Country string `json:"country"`
	// Authorization response cryptogram.
	EmvAuthData string `json:"emv_auth_data"`
	// Two-digit number representing the card's expiration month.
	ExpMonth int64 `json:"exp_month"`
	// Four-digit number representing the card's expiration year.
	ExpYear int64 `json:"exp_year"`
	// Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
	//
	// *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*
	Fingerprint string `json:"fingerprint"`
	// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
	Funding CardFunding `json:"funding"`
	// ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.
	GeneratedCard string `json:"generated_card"`
	// Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support).
	IncrementalAuthorizationSupported bool `json:"incremental_authorization_supported"`
	// The last four digits of the card.
	Last4 string `json:"last4"`
	// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Network ChargePaymentMethodDetailsCardPresentNetwork `json:"network"`
	// Defines whether the authorized amount can be over-captured or not
	OvercaptureSupported bool `json:"overcapture_supported"`
	// How card details were read in this transaction.
	ReadMethod string `json:"read_method"`
	// A collection of fields required to be displayed on receipts. Only required for EMV transactions.
	Receipt *ChargePaymentMethodDetailsCardPresentReceipt `json:"receipt"`
	// Please note that the fields below are for internal use only and are not returned
	// as part of standard API requests.
	// A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
	Description string `json:"description"`
	// Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
	IIN string `json:"iin"`
	// The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
	Issuer string `json:"issuer"`
}

type ChargePaymentMethodDetailsCardPresentNetwork

type ChargePaymentMethodDetailsCardPresentNetwork string

Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.

const (
	ChargePaymentMethodDetailsCardPresentNetworkAmex            ChargePaymentMethodDetailsCardPresentNetwork = "amex"
	ChargePaymentMethodDetailsCardPresentNetworkCartesBancaires ChargePaymentMethodDetailsCardPresentNetwork = "cartes_bancaires"
	ChargePaymentMethodDetailsCardPresentNetworkDiners          ChargePaymentMethodDetailsCardPresentNetwork = "diners"
	ChargePaymentMethodDetailsCardPresentNetworkDiscover        ChargePaymentMethodDetailsCardPresentNetwork = "discover"
	ChargePaymentMethodDetailsCardPresentNetworkInterac         ChargePaymentMethodDetailsCardPresentNetwork = "interac"
	ChargePaymentMethodDetailsCardPresentNetworkJCB             ChargePaymentMethodDetailsCardPresentNetwork = "jcb"
	ChargePaymentMethodDetailsCardPresentNetworkMastercard      ChargePaymentMethodDetailsCardPresentNetwork = "mastercard"
	ChargePaymentMethodDetailsCardPresentNetworkUnionpay        ChargePaymentMethodDetailsCardPresentNetwork = "unionpay"
	ChargePaymentMethodDetailsCardPresentNetworkVisa            ChargePaymentMethodDetailsCardPresentNetwork = "visa"
	ChargePaymentMethodDetailsCardPresentNetworkUnknown         ChargePaymentMethodDetailsCardPresentNetwork = "unknown"
)

List of values that ChargePaymentMethodDetailsCardPresentNetwork can take

type ChargePaymentMethodDetailsCardPresentReceipt

type ChargePaymentMethodDetailsCardPresentReceipt struct {
	// The type of account being debited or credited
	AccountType ChargePaymentMethodDetailsCardPresentReceiptAccountType `json:"account_type"`
	// EMV tag 9F26, cryptogram generated by the integrated circuit chip.
	ApplicationCryptogram string `json:"application_cryptogram"`
	// Mnenomic of the Application Identifier.
	ApplicationPreferredName string `json:"application_preferred_name"`
	// Identifier for this transaction.
	AuthorizationCode string `json:"authorization_code"`
	// EMV tag 8A. A code returned by the card issuer.
	AuthorizationResponseCode string `json:"authorization_response_code"`
	// How the cardholder verified ownership of the card.
	CardholderVerificationMethod string `json:"cardholder_verification_method"`
	// EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
	DedicatedFileName string `json:"dedicated_file_name"`
	// The outcome of a series of EMV functions performed by the card reader.
	TerminalVerificationResults string `json:"terminal_verification_results"`
	// An indication of various EMV functions performed during the transaction.
	TransactionStatusInformation string `json:"transaction_status_information"`
}

A collection of fields required to be displayed on receipts. Only required for EMV transactions.

type ChargePaymentMethodDetailsCardPresentReceiptAccountType

type ChargePaymentMethodDetailsCardPresentReceiptAccountType string

The type of account being debited or credited

const (
	ChargePaymentMethodDetailsCardPresentReceiptAccountTypeChecking ChargePaymentMethodDetailsCardPresentReceiptAccountType = "checking"
	ChargePaymentMethodDetailsCardPresentReceiptAccountTypeCredit   ChargePaymentMethodDetailsCardPresentReceiptAccountType = "credit"
	ChargePaymentMethodDetailsCardPresentReceiptAccountTypePrepaid  ChargePaymentMethodDetailsCardPresentReceiptAccountType = "prepaid"
	ChargePaymentMethodDetailsCardPresentReceiptAccountTypeUnknown  ChargePaymentMethodDetailsCardPresentReceiptAccountType = "unknown"
)

List of values that ChargePaymentMethodDetailsCardPresentReceiptAccountType can take

type ChargePaymentMethodDetailsCardThreeDSecure

type ChargePaymentMethodDetailsCardThreeDSecure struct {
	// For authenticated transactions: how the customer was authenticated by
	// the issuing bank.
	AuthenticationFlow ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow `json:"authentication_flow"`
	// Indicates the outcome of 3D Secure authentication.
	Result ChargePaymentMethodDetailsCardThreeDSecureResult `json:"result"`
	// Additional information about why 3D Secure succeeded or failed based
	// on the `result`.
	ResultReason ChargePaymentMethodDetailsCardThreeDSecureResultReason `json:"result_reason"`
	// The version of 3D Secure that was used.
	Version string `json:"version"`
}

Populated if this transaction used 3D Secure authentication.

type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow

type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow string

For authenticated transactions: how the customer was authenticated by the issuing bank.

const (
	ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlowChallenge    ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "challenge"
	ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlowFrictionless ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "frictionless"
)

List of values that ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow can take

type ChargePaymentMethodDetailsCardThreeDSecureResult

type ChargePaymentMethodDetailsCardThreeDSecureResult string

Indicates the outcome of 3D Secure authentication.

const (
	ChargePaymentMethodDetailsCardThreeDSecureResultAttemptAcknowledged ChargePaymentMethodDetailsCardThreeDSecureResult = "attempt_acknowledged"
	ChargePaymentMethodDetailsCardThreeDSecureResultAuthenticated       ChargePaymentMethodDetailsCardThreeDSecureResult = "authenticated"
	ChargePaymentMethodDetailsCardThreeDSecureResultExempted            ChargePaymentMethodDetailsCardThreeDSecureResult = "exempted"
	ChargePaymentMethodDetailsCardThreeDSecureResultFailed              ChargePaymentMethodDetailsCardThreeDSecureResult = "failed"
	ChargePaymentMethodDetailsCardThreeDSecureResultNotSupported        ChargePaymentMethodDetailsCardThreeDSecureResult = "not_supported"
	ChargePaymentMethodDetailsCardThreeDSecureResultProcessingError     ChargePaymentMethodDetailsCardThreeDSecureResult = "processing_error"
)

List of values that ChargePaymentMethodDetailsCardThreeDSecureResult can take

type ChargePaymentMethodDetailsCardThreeDSecureResultReason

type ChargePaymentMethodDetailsCardThreeDSecureResultReason string

Additional information about why 3D Secure succeeded or failed based on the `result`.

const (
	ChargePaymentMethodDetailsCardThreeDSecureResultReasonAbandoned           ChargePaymentMethodDetailsCardThreeDSecureResultReason = "abandoned"
	ChargePaymentMethodDetailsCardThreeDSecureResultReasonBypassed            ChargePaymentMethodDetailsCardThreeDSecureResultReason = "bypassed"
	ChargePaymentMethodDetailsCardThreeDSecureResultReasonCanceled            ChargePaymentMethodDetailsCardThreeDSecureResultReason = "canceled"
	ChargePaymentMethodDetailsCardThreeDSecureResultReasonCardNotEnrolled     ChargePaymentMethodDetailsCardThreeDSecureResultReason = "card_not_enrolled"
	ChargePaymentMethodDetailsCardThreeDSecureResultReasonNetworkNotSupported ChargePaymentMethodDetailsCardThreeDSecureResultReason = "network_not_supported"
	ChargePaymentMethodDetailsCardThreeDSecureResultReasonProtocolError       ChargePaymentMethodDetailsCardThreeDSecureResultReason = "protocol_error"
	ChargePaymentMethodDetailsCardThreeDSecureResultReasonRejected            ChargePaymentMethodDetailsCardThreeDSecureResultReason = "rejected"
)

List of values that ChargePaymentMethodDetailsCardThreeDSecureResultReason can take

type ChargePaymentMethodDetailsCardWallet

type ChargePaymentMethodDetailsCardWallet struct {
	AmexExpressCheckout *ChargePaymentMethodDetailsCardWalletAmexExpressCheckout `json:"amex_express_checkout"`
	ApplePay            *ChargePaymentMethodDetailsCardWalletApplePay            `json:"apple_pay"`
	// (For tokenized numbers only.) The last four digits of the device account number.
	DynamicLast4 string                                          `json:"dynamic_last4"`
	GooglePay    *ChargePaymentMethodDetailsCardWalletGooglePay  `json:"google_pay"`
	Masterpass   *ChargePaymentMethodDetailsCardWalletMasterpass `json:"masterpass"`
	SamsungPay   *ChargePaymentMethodDetailsCardWalletSamsungPay `json:"samsung_pay"`
	// The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
	Type         PaymentMethodCardWalletType                       `json:"type"`
	VisaCheckout *ChargePaymentMethodDetailsCardWalletVisaCheckout `json:"visa_checkout"`
}

If this Card is part of a card wallet, this contains the details of the card wallet.

type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout

type ChargePaymentMethodDetailsCardWalletAmexExpressCheckout struct{}

type ChargePaymentMethodDetailsCardWalletApplePay

type ChargePaymentMethodDetailsCardWalletApplePay struct{}

type ChargePaymentMethodDetailsCardWalletGooglePay

type ChargePaymentMethodDetailsCardWalletGooglePay struct{}

type ChargePaymentMethodDetailsCardWalletMasterpass

type ChargePaymentMethodDetailsCardWalletMasterpass struct {
	// Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	BillingAddress *Address `json:"billing_address"`
	// Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	Email string `json:"email"`
	// Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	Name string `json:"name"`
	// Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	ShippingAddress *Address `json:"shipping_address"`
}

type ChargePaymentMethodDetailsCardWalletSamsungPay

type ChargePaymentMethodDetailsCardWalletSamsungPay struct{}

type ChargePaymentMethodDetailsCardWalletVisaCheckout

type ChargePaymentMethodDetailsCardWalletVisaCheckout struct {
	// Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	BillingAddress *Address `json:"billing_address"`
	// Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	Email string `json:"email"`
	// Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	Name string `json:"name"`
	// Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	ShippingAddress *Address `json:"shipping_address"`
}

type ChargePaymentMethodDetailsCustomerBalance

type ChargePaymentMethodDetailsCustomerBalance struct{}

type ChargePaymentMethodDetailsEPS

type ChargePaymentMethodDetailsEPS struct {
	// The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
	Bank string `json:"bank"`
	// Owner's verified full name. Values are verified or provided by EPS directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	// EPS rarely provides this information so the attribute is usually empty.
	VerifiedName string `json:"verified_name"`
}

type ChargePaymentMethodDetailsFPX

type ChargePaymentMethodDetailsFPX struct {
	// Account holder type, if provided. Can be one of `individual` or `company`.
	AccountHolderType PaymentMethodFPXAccountHolderType `json:"account_holder_type"`
	// The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`.
	Bank string `json:"bank"`
	// Unique transaction id generated by FPX for every request from the merchant
	TransactionID string `json:"transaction_id"`
}

type ChargePaymentMethodDetailsGiropay

type ChargePaymentMethodDetailsGiropay struct {
	// Bank code of bank associated with the bank account.
	BankCode string `json:"bank_code"`
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Bank Identifier Code of the bank associated with the bank account.
	BIC string `json:"bic"`
	// Owner's verified full name. Values are verified or provided by Giropay directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	// Giropay rarely provides this information so the attribute is usually empty.
	VerifiedName string `json:"verified_name"`
}

type ChargePaymentMethodDetailsGrabpay

type ChargePaymentMethodDetailsGrabpay struct {
	// Unique transaction id generated by GrabPay
	TransactionID string `json:"transaction_id"`
}

type ChargePaymentMethodDetailsIDEAL

type ChargePaymentMethodDetailsIDEAL struct {
	// The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`.
	Bank string `json:"bank"`
	// The Bank Identifier Code of the customer's bank.
	BIC string `json:"bic"`
	// The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
	GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"`
	// The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
	GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"`
	// Last four characters of the IBAN.
	IBANLast4 string `json:"iban_last4"`
	// Owner's verified full name. Values are verified or provided by iDEAL directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	VerifiedName string `json:"verified_name"`
}

type ChargePaymentMethodDetailsInteracPresent

type ChargePaymentMethodDetailsInteracPresent struct {
	// Card brand. Can be `interac`, `mastercard` or `visa`.
	Brand string `json:"brand"`
	// The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay.
	CardholderName string `json:"cardholder_name"`
	// Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
	Country string `json:"country"`
	// Authorization response cryptogram.
	EmvAuthData string `json:"emv_auth_data"`
	// Two-digit number representing the card's expiration month.
	ExpMonth int64 `json:"exp_month"`
	// Four-digit number representing the card's expiration year.
	ExpYear int64 `json:"exp_year"`
	// Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
	//
	// *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*
	Fingerprint string `json:"fingerprint"`
	// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
	Funding string `json:"funding"`
	// ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.
	GeneratedCard string `json:"generated_card"`
	// The last four digits of the card.
	Last4 string `json:"last4"`
	// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Network string `json:"network"`
	// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
	PreferredLocales []string `json:"preferred_locales"`
	// How card details were read in this transaction.
	ReadMethod string `json:"read_method"`
	// A collection of fields required to be displayed on receipts. Only required for EMV transactions.
	Receipt *ChargePaymentMethodDetailsInteracPresentReceipt `json:"receipt"`
	// Please note that the fields below are for internal use only and are not returned
	// as part of standard API requests.
	// A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
	Description string `json:"description"`
	// Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
	IIN string `json:"iin"`
	// The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
	Issuer string `json:"issuer"`
}

type ChargePaymentMethodDetailsInteracPresentReceipt

type ChargePaymentMethodDetailsInteracPresentReceipt struct {
	// The type of account being debited or credited
	AccountType string `json:"account_type"`
	// EMV tag 9F26, cryptogram generated by the integrated circuit chip.
	ApplicationCryptogram string `json:"application_cryptogram"`
	// Mnenomic of the Application Identifier.
	ApplicationPreferredName string `json:"application_preferred_name"`
	// Identifier for this transaction.
	AuthorizationCode string `json:"authorization_code"`
	// EMV tag 8A. A code returned by the card issuer.
	AuthorizationResponseCode string `json:"authorization_response_code"`
	// How the cardholder verified ownership of the card.
	CardholderVerificationMethod string `json:"cardholder_verification_method"`
	// EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
	DedicatedFileName string `json:"dedicated_file_name"`
	// The outcome of a series of EMV functions performed by the card reader.
	TerminalVerificationResults string `json:"terminal_verification_results"`
	// An indication of various EMV functions performed during the transaction.
	TransactionStatusInformation string `json:"transaction_status_information"`
}

A collection of fields required to be displayed on receipts. Only required for EMV transactions.

type ChargePaymentMethodDetailsKlarna

type ChargePaymentMethodDetailsKlarna struct {
	// The Klarna payment method used for this transaction.
	// Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`
	PaymentMethodCategory ChargePaymentMethodDetailsKlarnaPaymentMethodCategory `json:"payment_method_category"`
	// Preferred language of the Klarna authorization page that the customer is redirected to.
	// Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH`
	PreferredLocale string `json:"preferred_locale"`
}

type ChargePaymentMethodDetailsKlarnaPaymentMethodCategory

type ChargePaymentMethodDetailsKlarnaPaymentMethodCategory string

The Klarna payment method used for this transaction. Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments`

const (
	ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayLater          ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_later"
	ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayNow            ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_now"
	ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayWithFinancing  ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_with_financing"
	ChargePaymentMethodDetailsKlarnaPaymentMethodCategoryPayInInstallments ChargePaymentMethodDetailsKlarnaPaymentMethodCategory = "pay_in_installments"
)

List of values that ChargePaymentMethodDetailsKlarnaPaymentMethodCategory can take

type ChargePaymentMethodDetailsKonbini

type ChargePaymentMethodDetailsKonbini struct {
	// If the payment succeeded, this contains the details of the convenience store where the payment was completed.
	Store *ChargePaymentMethodDetailsKonbiniStore `json:"store"`
}

type ChargePaymentMethodDetailsKonbiniStore

type ChargePaymentMethodDetailsKonbiniStore struct {
	// The name of the convenience store chain where the payment was completed.
	Chain ChargePaymentMethodDetailsKonbiniStoreChain `json:"chain"`
}

If the payment succeeded, this contains the details of the convenience store where the payment was completed.

type ChargePaymentMethodDetailsKonbiniStoreChain

type ChargePaymentMethodDetailsKonbiniStoreChain string

The name of the convenience store chain where the payment was completed.

const (
	ChargePaymentMethodDetailsKonbiniStoreChainFamilyMart ChargePaymentMethodDetailsKonbiniStoreChain = "familymart"
	ChargePaymentMethodDetailsKonbiniStoreChainLawson     ChargePaymentMethodDetailsKonbiniStoreChain = "lawson"
	ChargePaymentMethodDetailsKonbiniStoreChainMinistop   ChargePaymentMethodDetailsKonbiniStoreChain = "ministop"
	ChargePaymentMethodDetailsKonbiniStoreChainSeicomart  ChargePaymentMethodDetailsKonbiniStoreChain = "seicomart"
)

List of values that ChargePaymentMethodDetailsKonbiniStoreChain can take

type ChargePaymentMethodDetailsLink struct{}

type ChargePaymentMethodDetailsMultibanco

type ChargePaymentMethodDetailsMultibanco struct {
	// Entity number associated with this Multibanco payment.
	Entity string `json:"entity"`
	// Reference number associated with this Multibanco payment.
	Reference string `json:"reference"`
}

type ChargePaymentMethodDetailsOXXO

type ChargePaymentMethodDetailsOXXO struct {
	// OXXO reference number
	Number string `json:"number"`
}

type ChargePaymentMethodDetailsP24

type ChargePaymentMethodDetailsP24 struct {
	// The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`.
	Bank string `json:"bank"`
	// Unique reference for this Przelewy24 payment.
	Reference string `json:"reference"`
	// Owner's verified full name. Values are verified or provided by Przelewy24 directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	// Przelewy24 rarely provides this information so the attribute is usually empty.
	VerifiedName string `json:"verified_name"`
}

type ChargePaymentMethodDetailsPayNow

type ChargePaymentMethodDetailsPayNow struct {
	// Reference number associated with this PayNow payment
	Reference string `json:"reference"`
}

type ChargePaymentMethodDetailsPromptPay

type ChargePaymentMethodDetailsPromptPay struct {
	// Bill reference generated by PromptPay
	Reference string `json:"reference"`
}

type ChargePaymentMethodDetailsSEPACreditTransfer

type ChargePaymentMethodDetailsSEPACreditTransfer struct {
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Bank Identifier Code of the bank associated with the bank account.
	BIC string `json:"bic"`
	// IBAN of the bank account to transfer funds to.
	IBAN string `json:"iban"`
}

type ChargePaymentMethodDetailsSEPADebit

type ChargePaymentMethodDetailsSEPADebit struct {
	// Bank code of bank associated with the bank account.
	BankCode string `json:"bank_code"`
	// Branch code of bank associated with the bank account.
	BranchCode string `json:"branch_code"`
	// Two-letter ISO code representing the country the bank account is located in.
	Country string `json:"country"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Last four characters of the IBAN.
	Last4 string `json:"last4"`
	// ID of the mandate used to make this payment.
	Mandate string `json:"mandate"`
}

type ChargePaymentMethodDetailsSofort

type ChargePaymentMethodDetailsSofort struct {
	// Bank code of bank associated with the bank account.
	BankCode string `json:"bank_code"`
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Bank Identifier Code of the bank associated with the bank account.
	BIC string `json:"bic"`
	// Two-letter ISO code representing the country the bank account is located in.
	Country string `json:"country"`
	// The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
	GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"`
	// The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
	GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"`
	// Last four characters of the IBAN.
	IBANLast4 string `json:"iban_last4"`
	// Preferred language of the SOFORT authorization page that the customer is redirected to.
	// Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl`
	PreferredLanguage string `json:"preferred_language"`
	// Owner's verified full name. Values are verified or provided by SOFORT directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	VerifiedName string `json:"verified_name"`
}

type ChargePaymentMethodDetailsStripeAccount

type ChargePaymentMethodDetailsStripeAccount struct{}

type ChargePaymentMethodDetailsType

type ChargePaymentMethodDetailsType string

The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. An additional hash is included on `payment_method_details` with a name matching this value. It contains information specific to the payment method.

const (
	ChargePaymentMethodDetailsTypeACHCreditTransfer ChargePaymentMethodDetailsType = "ach_credit_transfer"
	ChargePaymentMethodDetailsTypeACHDebit          ChargePaymentMethodDetailsType = "ach_debit"
	ChargePaymentMethodDetailsTypeACSSDebit         ChargePaymentMethodDetailsType = "acss_debit"
	ChargePaymentMethodDetailsTypeAlipay            ChargePaymentMethodDetailsType = "alipay"
	ChargePaymentMethodDetailsTypeAUBECSDebit       ChargePaymentMethodDetailsType = "au_becs_debit"
	ChargePaymentMethodDetailsTypeBACSDebit         ChargePaymentMethodDetailsType = "bacs_debit"
	ChargePaymentMethodDetailsTypeBancontact        ChargePaymentMethodDetailsType = "bancontact"
	ChargePaymentMethodDetailsTypeCard              ChargePaymentMethodDetailsType = "card"
	ChargePaymentMethodDetailsTypeCardPresent       ChargePaymentMethodDetailsType = "card_present"
	ChargePaymentMethodDetailsTypeEPS               ChargePaymentMethodDetailsType = "eps"
	ChargePaymentMethodDetailsTypeFPX               ChargePaymentMethodDetailsType = "fpx"
	ChargePaymentMethodDetailsTypeGiropay           ChargePaymentMethodDetailsType = "giropay"
	ChargePaymentMethodDetailsTypeGrabpay           ChargePaymentMethodDetailsType = "grabpay"
	ChargePaymentMethodDetailsTypeIDEAL             ChargePaymentMethodDetailsType = "ideal"
	ChargePaymentMethodDetailsTypeInteracPresent    ChargePaymentMethodDetailsType = "interac_present"
	ChargePaymentMethodDetailsTypeKlarna            ChargePaymentMethodDetailsType = "klarna"
	ChargePaymentMethodDetailsTypeMultibanco        ChargePaymentMethodDetailsType = "multibanco"
	ChargePaymentMethodDetailsTypeP24               ChargePaymentMethodDetailsType = "p24"
	ChargePaymentMethodDetailsTypeSEPADebit         ChargePaymentMethodDetailsType = "sepa_debit"
	ChargePaymentMethodDetailsTypeSofort            ChargePaymentMethodDetailsType = "sofort"
	ChargePaymentMethodDetailsTypeStripeAccount     ChargePaymentMethodDetailsType = "stripe_account"
	ChargePaymentMethodDetailsTypeWeChat            ChargePaymentMethodDetailsType = "wechat"
)

List of values that ChargePaymentMethodDetailsType can take

type ChargePaymentMethodDetailsUSBankAccount

type ChargePaymentMethodDetailsUSBankAccount struct {
	// Account holder type: individual or company.
	AccountHolderType ChargePaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"`
	// Account type: checkings or savings. Defaults to checking if omitted.
	AccountType ChargePaymentMethodDetailsUSBankAccountAccountType `json:"account_type"`
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
	// Routing number of the bank account.
	RoutingNumber string `json:"routing_number"`
}

type ChargePaymentMethodDetailsUSBankAccountAccountHolderType

type ChargePaymentMethodDetailsUSBankAccountAccountHolderType string

Account holder type: individual or company.

const (
	ChargePaymentMethodDetailsUSBankAccountAccountHolderTypeCompany    ChargePaymentMethodDetailsUSBankAccountAccountHolderType = "company"
	ChargePaymentMethodDetailsUSBankAccountAccountHolderTypeIndividual ChargePaymentMethodDetailsUSBankAccountAccountHolderType = "individual"
)

List of values that ChargePaymentMethodDetailsUSBankAccountAccountHolderType can take

type ChargePaymentMethodDetailsUSBankAccountAccountType

type ChargePaymentMethodDetailsUSBankAccountAccountType string

Account type: checkings or savings. Defaults to checking if omitted.

const (
	ChargePaymentMethodDetailsUSBankAccountAccountTypeChecking ChargePaymentMethodDetailsUSBankAccountAccountType = "checking"
	ChargePaymentMethodDetailsUSBankAccountAccountTypeSavings  ChargePaymentMethodDetailsUSBankAccountAccountType = "savings"
)

List of values that ChargePaymentMethodDetailsUSBankAccountAccountType can take

type ChargePaymentMethodDetailsWeChat

type ChargePaymentMethodDetailsWeChat struct{}

type ChargePaymentMethodDetailsWeChatPay

type ChargePaymentMethodDetailsWeChatPay struct {
	// Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Transaction ID of this particular WeChat Pay transaction.
	TransactionID string `json:"transaction_id"`
}

type ChargeRadarOptions

type ChargeRadarOptions struct {
	// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
	Session string `json:"session"`
}

Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.

type ChargeRadarOptionsParams

type ChargeRadarOptionsParams struct {
	// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
	Session *string `form:"session"`
}

Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.

type ChargeSearchParams

type ChargeSearchParams struct {
	SearchParams `form:"*"`
	// A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
	Page *string `form:"page"`
}

Search for charges you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

type ChargeSearchResult

type ChargeSearchResult struct {
	APIResource
	SearchMeta
	Data []*Charge `json:"data"`
}

ChargeSearchResult is a list of Charge search results as retrieved from a search endpoint.

type ChargeStatus

type ChargeStatus string

The status of the payment is either `succeeded`, `pending`, or `failed`.

const (
	ChargeStatusFailed    ChargeStatus = "failed"
	ChargeStatusPending   ChargeStatus = "pending"
	ChargeStatusSucceeded ChargeStatus = "succeeded"
)

List of values that ChargeStatus can take

type ChargeTransferData

type ChargeTransferData struct {
	// The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
	Amount int64 `json:"amount"`
	// ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request.
	Destination *Account `json:"destination"`
}

An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.

type ChargeTransferDataParams

type ChargeTransferDataParams struct {
	// The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account.
	Amount *int64 `form:"amount"`
	// This parameter can only be used on Charge creation.
	// ID of an existing, connected Stripe account.
	Destination *string `form:"destination"`
}

An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details.

type CheckoutSession

type CheckoutSession struct {
	APIResource
	// When set, provides configuration for actions to take if this Checkout Session expires.
	AfterExpiration *CheckoutSessionAfterExpiration `json:"after_expiration"`
	// Enables user redeemable promotion codes.
	AllowPromotionCodes bool `json:"allow_promotion_codes"`
	// Total of all items before discounts or taxes are applied.
	AmountSubtotal int64 `json:"amount_subtotal"`
	// Total of all items after discounts and taxes are applied.
	AmountTotal  int64                        `json:"amount_total"`
	AutomaticTax *CheckoutSessionAutomaticTax `json:"automatic_tax"`
	// Describes whether Checkout should collect the customer's billing address.
	BillingAddressCollection CheckoutSessionBillingAddressCollection `json:"billing_address_collection"`
	// The URL the customer will be directed to if they decide to cancel payment and return to your website.
	CancelURL string `json:"cancel_url"`
	// A unique string to reference the Checkout Session. This can be a
	// customer ID, a cart ID, or similar, and can be used to reconcile the
	// Session with your internal systems.
	ClientReferenceID string `json:"client_reference_id"`
	// Results of `consent_collection` for this session.
	Consent *CheckoutSessionConsent `json:"consent"`
	// When set, provides configuration for the Checkout Session to gather active consent from customers.
	ConsentCollection *CheckoutSessionConsentCollection `json:"consent_collection"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// The ID of the customer for this Session.
	// For Checkout Sessions in `payment` or `subscription` mode, Checkout
	// will create a new customer object based on information provided
	// during the payment flow unless an existing customer was provided when
	// the Session was created.
	Customer *Customer `json:"customer"`
	// Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
	CustomerCreation CheckoutSessionCustomerCreation `json:"customer_creation"`
	// The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.
	CustomerDetails *CheckoutSessionCustomerDetails `json:"customer_details"`
	// If provided, this value will be used when the Customer object is created.
	// If not provided, customers will be asked to enter their email address.
	// Use this parameter to prefill customer data if you already have an email
	// on file. To access information about the customer once the payment flow is
	// complete, use the `customer` attribute.
	CustomerEmail string `json:"customer_email"`
	// The timestamp at which the Checkout Session will expire.
	ExpiresAt int64 `json:"expires_at"`
	// Unique identifier for the object. Used to pass to `redirectToCheckout`
	// in Stripe.js.
	ID string `json:"id"`
	// The line items purchased by the customer.
	LineItems *LineItemList `json:"line_items"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
	Locale string `json:"locale"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// The mode of the Checkout Session.
	Mode CheckoutSessionMode `json:"mode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The ID of the PaymentIntent for Checkout Sessions in `payment` mode.
	PaymentIntent *PaymentIntent `json:"payment_intent"`
	// The ID of the Payment Link that created this Session.
	PaymentLink *PaymentLink `json:"payment_link"`
	// Configure whether a Checkout Session should collect a payment method.
	PaymentMethodCollection CheckoutSessionPaymentMethodCollection `json:"payment_method_collection"`
	// Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.
	PaymentMethodOptions *CheckoutSessionPaymentMethodOptions `json:"payment_method_options"`
	// A list of the types of payment methods (e.g. card) this Checkout
	// Session is allowed to accept.
	PaymentMethodTypes []string `json:"payment_method_types"`
	// The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`.
	// You can use this value to decide when to fulfill your customer's order.
	PaymentStatus         CheckoutSessionPaymentStatus          `json:"payment_status"`
	PhoneNumberCollection *CheckoutSessionPhoneNumberCollection `json:"phone_number_collection"`
	// The ID of the original expired Checkout Session that triggered the recovery flow.
	RecoveredFrom string `json:"recovered_from"`
	// The ID of the SetupIntent for Checkout Sessions in `setup` mode.
	SetupIntent *SetupIntent `json:"setup_intent"`
	// When set, provides configuration for Checkout to collect a shipping address from a customer.
	ShippingAddressCollection *CheckoutSessionShippingAddressCollection `json:"shipping_address_collection"`
	// The details of the customer cost of shipping, including the customer chosen ShippingRate.
	ShippingCost *CheckoutSessionShippingCost `json:"shipping_cost"`
	// Shipping information for this Checkout Session.
	ShippingDetails *ShippingDetails `json:"shipping_details"`
	// The shipping rate options applied to this Session.
	ShippingOptions []*CheckoutSessionShippingOption `json:"shipping_options"`
	// The status of the Checkout Session, one of `open`, `complete`, or `expired`.
	Status CheckoutSessionStatus `json:"status"`
	// Describes the type of transaction being performed by Checkout in order to customize
	// relevant text on the page, such as the submit button. `submit_type` can only be
	// specified on Checkout Sessions in `payment` mode, but not Checkout Sessions
	// in `subscription` or `setup` mode.
	SubmitType CheckoutSessionSubmitType `json:"submit_type"`
	// The ID of the subscription for Checkout Sessions in `subscription` mode.
	Subscription *Subscription `json:"subscription"`
	// The URL the customer will be directed to after the payment or
	// subscription creation is successful.
	SuccessURL      string                          `json:"success_url"`
	TaxIDCollection *CheckoutSessionTaxIDCollection `json:"tax_id_collection"`
	// Tax and discount details for the computed total amount.
	TotalDetails *CheckoutSessionTotalDetails `json:"total_details"`
	// The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you're using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it'll use `checkout.stripe.com.`
	URL string `json:"url"`
}

A Checkout Session represents your customer's session as they pay for one-time purchases or subscriptions through [Checkout](https://stripe.com/docs/payments/checkout) or [Payment Links](https://stripe.com/docs/payments/payment-links). We recommend creating a new Session each time your customer attempts to pay.

Once payment is successful, the Checkout Session will contain a reference to the Customer(https://stripe.com/docs/api/customers), and either the successful PaymentIntent(https://stripe.com/docs/api/payment_intents) or an active Subscription(https://stripe.com/docs/api/subscriptions).

You can create a Checkout Session on your server and pass its ID to the client to begin Checkout.

Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart).

type CheckoutSessionAfterExpiration

type CheckoutSessionAfterExpiration struct {
	// When set, configuration used to recover the Checkout Session on expiry.
	Recovery *CheckoutSessionAfterExpirationRecovery `json:"recovery"`
}

When set, provides configuration for actions to take if this Checkout Session expires.

type CheckoutSessionAfterExpirationParams

type CheckoutSessionAfterExpirationParams struct {
	// Configure a Checkout Session that can be used to recover an expired session.
	Recovery *CheckoutSessionAfterExpirationRecoveryParams `form:"recovery"`
}

Configure actions after a Checkout Session has expired.

type CheckoutSessionAfterExpirationRecovery

type CheckoutSessionAfterExpirationRecovery struct {
	// Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
	AllowPromotionCodes bool `json:"allow_promotion_codes"`
	// If `true`, a recovery url will be generated to recover this Checkout Session if it
	// expires before a transaction is completed. It will be attached to the
	// Checkout Session object upon expiration.
	Enabled bool `json:"enabled"`
	// The timestamp at which the recovery URL will expire.
	ExpiresAt int64 `json:"expires_at"`
	// URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session
	URL string `json:"url"`
}

When set, configuration used to recover the Checkout Session on expiry.

type CheckoutSessionAfterExpirationRecoveryParams

type CheckoutSessionAfterExpirationRecoveryParams struct {
	// Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false`
	AllowPromotionCodes *bool `form:"allow_promotion_codes"`
	// If `true`, a recovery URL will be generated to recover this Checkout Session if it
	// expires before a successful transaction is completed. It will be attached to the
	// Checkout Session object upon expiration.
	Enabled *bool `form:"enabled"`
}

Configure a Checkout Session that can be used to recover an expired session.

type CheckoutSessionAutomaticTax

type CheckoutSessionAutomaticTax struct {
	// Indicates whether automatic tax is enabled for the session
	Enabled bool `json:"enabled"`
	// The status of the most recent automated tax calculation for this session.
	Status CheckoutSessionAutomaticTaxStatus `json:"status"`
}

type CheckoutSessionAutomaticTaxParams

type CheckoutSessionAutomaticTaxParams struct {
	// Set to true to enable automatic taxes.
	Enabled *bool `form:"enabled"`
}

Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.

type CheckoutSessionAutomaticTaxStatus

type CheckoutSessionAutomaticTaxStatus string

The status of the most recent automated tax calculation for this session.

const (
	CheckoutSessionAutomaticTaxStatusComplete               CheckoutSessionAutomaticTaxStatus = "complete"
	CheckoutSessionAutomaticTaxStatusFailed                 CheckoutSessionAutomaticTaxStatus = "failed"
	CheckoutSessionAutomaticTaxStatusRequiresLocationInputs CheckoutSessionAutomaticTaxStatus = "requires_location_inputs"
)

List of values that CheckoutSessionAutomaticTaxStatus can take

type CheckoutSessionBillingAddressCollection

type CheckoutSessionBillingAddressCollection string

Describes whether Checkout should collect the customer's billing address.

const (
	CheckoutSessionBillingAddressCollectionAuto     CheckoutSessionBillingAddressCollection = "auto"
	CheckoutSessionBillingAddressCollectionRequired CheckoutSessionBillingAddressCollection = "required"
)

List of values that CheckoutSessionBillingAddressCollection can take

type CheckoutSessionConsent

type CheckoutSessionConsent struct {
	// If `opt_in`, the customer consents to receiving promotional communications
	// from the merchant about this Checkout Session.
	Promotions CheckoutSessionConsentPromotions `json:"promotions"`
}

Results of `consent_collection` for this session.

type CheckoutSessionConsentCollection

type CheckoutSessionConsentCollection struct {
	// If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
	// Session will determine whether to display an option to opt into promotional communication
	// from the merchant depending on the customer's locale. Only available to US merchants.
	Promotions CheckoutSessionConsentCollectionPromotions `json:"promotions"`
}

When set, provides configuration for the Checkout Session to gather active consent from customers.

type CheckoutSessionConsentCollectionParams

type CheckoutSessionConsentCollectionParams struct {
	// If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
	// Session will determine whether to display an option to opt into promotional communication
	// from the merchant depending on the customer's locale. Only available to US merchants.
	Promotions *string `form:"promotions"`
}

Configure fields for the Checkout Session to gather active consent from customers.

type CheckoutSessionConsentCollectionPromotions

type CheckoutSessionConsentCollectionPromotions string

If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer's locale. Only available to US merchants.

const (
	CheckoutSessionConsentCollectionPromotionsAuto CheckoutSessionConsentCollectionPromotions = "auto"
	CheckoutSessionConsentCollectionPromotionsNone CheckoutSessionConsentCollectionPromotions = "none"
)

List of values that CheckoutSessionConsentCollectionPromotions can take

type CheckoutSessionConsentPromotions

type CheckoutSessionConsentPromotions string

If `opt_in`, the customer consents to receiving promotional communications from the merchant about this Checkout Session.

const (
	CheckoutSessionConsentPromotionsOptIn  CheckoutSessionConsentPromotions = "opt_in"
	CheckoutSessionConsentPromotionsOptOut CheckoutSessionConsentPromotions = "opt_out"
)

List of values that CheckoutSessionConsentPromotions can take

type CheckoutSessionCustomerCreation

type CheckoutSessionCustomerCreation string

Configure whether a Checkout Session creates a Customer when the Checkout Session completes.

const (
	CheckoutSessionCustomerCreationAlways     CheckoutSessionCustomerCreation = "always"
	CheckoutSessionCustomerCreationIfRequired CheckoutSessionCustomerCreation = "if_required"
)

List of values that CheckoutSessionCustomerCreation can take

type CheckoutSessionCustomerDetails

type CheckoutSessionCustomerDetails struct {
	// The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.
	Address *Address `json:"address"`
	// The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry.
	// Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form.
	Email string `json:"email"`
	// The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022.
	Name string `json:"name"`
	// The customer's phone number after a completed Checkout Session.
	Phone string `json:"phone"`
	// The customer's tax exempt status after a completed Checkout Session.
	TaxExempt CheckoutSessionCustomerDetailsTaxExempt `json:"tax_exempt"`
	// The customer's tax IDs after a completed Checkout Session.
	TaxIDs []*CheckoutSessionCustomerDetailsTaxID `json:"tax_ids"`
}

The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.

type CheckoutSessionCustomerDetailsTaxExempt

type CheckoutSessionCustomerDetailsTaxExempt string

The customer's tax exempt status after a completed Checkout Session.

const (
	CheckoutSessionCustomerDetailsTaxExemptExempt  CheckoutSessionCustomerDetailsTaxExempt = "exempt"
	CheckoutSessionCustomerDetailsTaxExemptNone    CheckoutSessionCustomerDetailsTaxExempt = "none"
	CheckoutSessionCustomerDetailsTaxExemptReverse CheckoutSessionCustomerDetailsTaxExempt = "reverse"
)

List of values that CheckoutSessionCustomerDetailsTaxExempt can take

type CheckoutSessionCustomerDetailsTaxID

type CheckoutSessionCustomerDetailsTaxID struct {
	// The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown`
	Type CheckoutSessionCustomerDetailsTaxIDType `json:"type"`
	// The value of the tax ID.
	Value string `json:"value"`
}

The customer's tax IDs after a completed Checkout Session.

type CheckoutSessionCustomerDetailsTaxIDType

type CheckoutSessionCustomerDetailsTaxIDType string

The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown`

const (
	CheckoutSessionCustomerDetailsTaxIDTypeAETRN    CheckoutSessionCustomerDetailsTaxIDType = "ae_trn"
	CheckoutSessionCustomerDetailsTaxIDTypeAUABN    CheckoutSessionCustomerDetailsTaxIDType = "au_abn"
	CheckoutSessionCustomerDetailsTaxIDTypeAUARN    CheckoutSessionCustomerDetailsTaxIDType = "au_arn"
	CheckoutSessionCustomerDetailsTaxIDTypeBGUIC    CheckoutSessionCustomerDetailsTaxIDType = "bg_uic"
	CheckoutSessionCustomerDetailsTaxIDTypeBRCNPJ   CheckoutSessionCustomerDetailsTaxIDType = "br_cnpj"
	CheckoutSessionCustomerDetailsTaxIDTypeBRCPF    CheckoutSessionCustomerDetailsTaxIDType = "br_cpf"
	CheckoutSessionCustomerDetailsTaxIDTypeCABN     CheckoutSessionCustomerDetailsTaxIDType = "ca_bn"
	CheckoutSessionCustomerDetailsTaxIDTypeCAGSTHST CheckoutSessionCustomerDetailsTaxIDType = "ca_gst_hst"
	CheckoutSessionCustomerDetailsTaxIDTypeCAPSTBC  CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_bc"
	CheckoutSessionCustomerDetailsTaxIDTypeCAPSTMB  CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_mb"
	CheckoutSessionCustomerDetailsTaxIDTypeCAPSTSK  CheckoutSessionCustomerDetailsTaxIDType = "ca_pst_sk"
	CheckoutSessionCustomerDetailsTaxIDTypeCAQST    CheckoutSessionCustomerDetailsTaxIDType = "ca_qst"
	CheckoutSessionCustomerDetailsTaxIDTypeCHVAT    CheckoutSessionCustomerDetailsTaxIDType = "ch_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeCLTIN    CheckoutSessionCustomerDetailsTaxIDType = "cl_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeESCIF    CheckoutSessionCustomerDetailsTaxIDType = "es_cif"
	CheckoutSessionCustomerDetailsTaxIDTypeEUOSSVAT CheckoutSessionCustomerDetailsTaxIDType = "eu_oss_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeEUVAT    CheckoutSessionCustomerDetailsTaxIDType = "eu_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeGBVAT    CheckoutSessionCustomerDetailsTaxIDType = "gb_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeGEVAT    CheckoutSessionCustomerDetailsTaxIDType = "ge_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeHKBR     CheckoutSessionCustomerDetailsTaxIDType = "hk_br"
	CheckoutSessionCustomerDetailsTaxIDTypeHUTIN    CheckoutSessionCustomerDetailsTaxIDType = "hu_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeIDNPWP   CheckoutSessionCustomerDetailsTaxIDType = "id_npwp"
	CheckoutSessionCustomerDetailsTaxIDTypeILVAT    CheckoutSessionCustomerDetailsTaxIDType = "il_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeINGST    CheckoutSessionCustomerDetailsTaxIDType = "in_gst"
	CheckoutSessionCustomerDetailsTaxIDTypeISVAT    CheckoutSessionCustomerDetailsTaxIDType = "is_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeJPCN     CheckoutSessionCustomerDetailsTaxIDType = "jp_cn"
	CheckoutSessionCustomerDetailsTaxIDTypeJPRN     CheckoutSessionCustomerDetailsTaxIDType = "jp_rn"
	CheckoutSessionCustomerDetailsTaxIDTypeKRBRN    CheckoutSessionCustomerDetailsTaxIDType = "kr_brn"
	CheckoutSessionCustomerDetailsTaxIDTypeLIUID    CheckoutSessionCustomerDetailsTaxIDType = "li_uid"
	CheckoutSessionCustomerDetailsTaxIDTypeMXRFC    CheckoutSessionCustomerDetailsTaxIDType = "mx_rfc"
	CheckoutSessionCustomerDetailsTaxIDTypeMYFRP    CheckoutSessionCustomerDetailsTaxIDType = "my_frp"
	CheckoutSessionCustomerDetailsTaxIDTypeMYITN    CheckoutSessionCustomerDetailsTaxIDType = "my_itn"
	CheckoutSessionCustomerDetailsTaxIDTypeMYSST    CheckoutSessionCustomerDetailsTaxIDType = "my_sst"
	CheckoutSessionCustomerDetailsTaxIDTypeNOVAT    CheckoutSessionCustomerDetailsTaxIDType = "no_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeNZGST    CheckoutSessionCustomerDetailsTaxIDType = "nz_gst"
	CheckoutSessionCustomerDetailsTaxIDTypeRUINN    CheckoutSessionCustomerDetailsTaxIDType = "ru_inn"
	CheckoutSessionCustomerDetailsTaxIDTypeRUKPP    CheckoutSessionCustomerDetailsTaxIDType = "ru_kpp"
	CheckoutSessionCustomerDetailsTaxIDTypeSAVAT    CheckoutSessionCustomerDetailsTaxIDType = "sa_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeSGGST    CheckoutSessionCustomerDetailsTaxIDType = "sg_gst"
	CheckoutSessionCustomerDetailsTaxIDTypeSGUEN    CheckoutSessionCustomerDetailsTaxIDType = "sg_uen"
	CheckoutSessionCustomerDetailsTaxIDTypeSITIN    CheckoutSessionCustomerDetailsTaxIDType = "si_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeTHVAT    CheckoutSessionCustomerDetailsTaxIDType = "th_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeTWVAT    CheckoutSessionCustomerDetailsTaxIDType = "tw_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeUAVAT    CheckoutSessionCustomerDetailsTaxIDType = "ua_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeUnknown  CheckoutSessionCustomerDetailsTaxIDType = "unknown"
	CheckoutSessionCustomerDetailsTaxIDTypeUSEIN    CheckoutSessionCustomerDetailsTaxIDType = "us_ein"
	CheckoutSessionCustomerDetailsTaxIDTypeZAVAT    CheckoutSessionCustomerDetailsTaxIDType = "za_vat"
)

List of values that CheckoutSessionCustomerDetailsTaxIDType can take

type CheckoutSessionCustomerUpdateParams

type CheckoutSessionCustomerUpdateParams struct {
	// Describes whether Checkout saves the billing address onto `customer.address`.
	// To always collect a full billing address, use `billing_address_collection`. Defaults to `never`.
	Address *string `form:"address"`
	// Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`.
	Name *string `form:"name"`
	// Describes whether Checkout saves shipping information onto `customer.shipping`.
	// To collect shipping information, use `shipping_address_collection`. Defaults to `never`.
	Shipping *string `form:"shipping"`
}

Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.

type CheckoutSessionDiscountParams

type CheckoutSessionDiscountParams struct {
	// The ID of the coupon to apply to this Session.
	Coupon *string `form:"coupon"`
	// The ID of a promotion code to apply to this Session.
	PromotionCode *string `form:"promotion_code"`
}

The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.

type CheckoutSessionExpireParams

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

A Session can be expired when it is in one of these statuses: open

After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired.

type CheckoutSessionLineItemAdjustableQuantityParams

type CheckoutSessionLineItemAdjustableQuantityParams struct {
	// Set to true if the quantity can be adjusted to any non-negative integer. By default customers will be able to remove the line item by setting the quantity to 0.
	Enabled *bool `form:"enabled"`
	// The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999.
	Maximum *int64 `form:"maximum"`
	// The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
	Minimum *int64 `form:"minimum"`
}

When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.

type CheckoutSessionLineItemParams

type CheckoutSessionLineItemParams struct {
	// When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
	AdjustableQuantity *CheckoutSessionLineItemAdjustableQuantityParams `form:"adjustable_quantity"`
	// [Deprecated] The amount to be collected per unit of the line item. If specified, must also pass `currency` and `name`.
	Amount *int64 `form:"amount"`
	// [Deprecated] Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Required if `amount` is passed.
	Currency *string `form:"currency"`
	// [Deprecated] The description for the line item, to be displayed on the Checkout page.
	Description *string `form:"description"`
	// The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU.
	DynamicTaxRates []*string `form:"dynamic_tax_rates"`
	// [Deprecated] A list of image URLs representing this line item. Each image can be up to 5 MB in size. If passing `price` or `price_data`, specify images on the associated product instead.
	Images []*string `form:"images"`
	// [Deprecated] The name for the item to be displayed on the Checkout page. Required if `amount` is passed.
	Name *string `form:"name"`
	// The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required.
	Price *string `form:"price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
	PriceData *CheckoutSessionLineItemPriceDataParams `form:"price_data"`
	// The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`.
	Quantity *int64 `form:"quantity"`
	// The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
	TaxRates []*string `form:"tax_rates"`
}

A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).

For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.

For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.

type CheckoutSessionLineItemPriceDataParams

type CheckoutSessionLineItemPriceDataParams struct {
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// The ID of the product that this price will belong to. One of `product` or `product_data` is required.
	Product *string `form:"product"`
	// Data used to generate a new product object inline. One of `product` or `product_data` is required.
	ProductData *CheckoutSessionLineItemPriceDataProductDataParams `form:"product_data"`
	// The recurring components of a price such as `interval` and `interval_count`.
	Recurring *CheckoutSessionLineItemPriceDataRecurringParams `form:"recurring"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior *string `form:"tax_behavior"`
	// A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.

type CheckoutSessionLineItemPriceDataProductDataParams

type CheckoutSessionLineItemPriceDataProductDataParams struct {
	// The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
	Description *string `form:"description"`
	// A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
	Images []*string `form:"images"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// The product's name, meant to be displayable to the customer.
	Name *string `form:"name"`
	// A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
	TaxCode *string `form:"tax_code"`
}

Data used to generate a new product object inline. One of `product` or `product_data` is required.

type CheckoutSessionLineItemPriceDataRecurringParams

type CheckoutSessionLineItemPriceDataRecurringParams struct {
	// Specifies billing frequency. Either `day`, `week`, `month` or `year`.
	Interval *string `form:"interval"`
	// The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
	IntervalCount *int64 `form:"interval_count"`
}

The recurring components of a price such as `interval` and `interval_count`.

type CheckoutSessionList

type CheckoutSessionList struct {
	APIResource
	ListMeta
	Data []*CheckoutSession `json:"data"`
}

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

type CheckoutSessionListCustomerDetailsParams

type CheckoutSessionListCustomerDetailsParams struct {
	// Customer's email address.
	Email *string `form:"email"`
}

Only return the Checkout Sessions for the Customer details specified.

type CheckoutSessionListLineItemsParams

type CheckoutSessionListLineItemsParams struct {
	ListParams `form:"*"`
	Session    *string `form:"-"` // Included in URL
}

When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

type CheckoutSessionListParams

type CheckoutSessionListParams struct {
	ListParams `form:"*"`
	// Only return the Checkout Sessions for the Customer specified.
	Customer *string `form:"customer"`
	// Only return the Checkout Sessions for the Customer details specified.
	CustomerDetails *CheckoutSessionListCustomerDetailsParams `form:"customer_details"`
	// Only return the Checkout Session for the PaymentIntent specified.
	PaymentIntent *string `form:"payment_intent"`
	// Only return the Checkout Session for the subscription specified.
	Subscription *string `form:"subscription"`
}

Returns a list of Checkout Sessions.

type CheckoutSessionMode

type CheckoutSessionMode string

The mode of the Checkout Session.

const (
	CheckoutSessionModePayment      CheckoutSessionMode = "payment"
	CheckoutSessionModeSetup        CheckoutSessionMode = "setup"
	CheckoutSessionModeSubscription CheckoutSessionMode = "subscription"
)

List of values that CheckoutSessionMode can take

type CheckoutSessionParams

type CheckoutSessionParams struct {
	Params `form:"*"`
	// Configure actions after a Checkout Session has expired.
	AfterExpiration *CheckoutSessionAfterExpirationParams `form:"after_expiration"`
	// Enables user redeemable promotion codes.
	AllowPromotionCodes *bool `form:"allow_promotion_codes"`
	// Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
	AutomaticTax *CheckoutSessionAutomaticTaxParams `form:"automatic_tax"`
	// Specify whether Checkout should collect the customer's billing address.
	BillingAddressCollection *string `form:"billing_address_collection"`
	// The URL the customer will be directed to if they decide to cancel payment and return to your website.
	CancelURL *string `form:"cancel_url"`
	// A unique string to reference the Checkout Session. This can be a
	// customer ID, a cart ID, or similar, and can be used to reconcile the
	// session with your internal systems.
	ClientReferenceID *string `form:"client_reference_id"`
	// Configure fields for the Checkout Session to gather active consent from customers.
	ConsentCollection *CheckoutSessionConsentCollectionParams `form:"consent_collection"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// ID of an existing Customer, if one exists. In `payment` mode, the customer's most recent card
	// payment method will be used to prefill the email, name, card details, and billing address
	// on the Checkout page. In `subscription` mode, the customer's [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method)
	// will be used if it's a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details.
	//
	// If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout.
	// If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer.
	//
	// If blank for Checkout Sessions in `payment` or `subscription` mode, Checkout will create a new Customer object based on information provided during the payment flow.
	//
	// You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse.
	Customer *string `form:"customer"`
	// Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation.
	//
	// When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout
	// with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details).
	//
	// Sessions that don't create Customers instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq)
	// in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions.
	//
	// Can only be set in `payment` and `setup` mode.
	CustomerCreation *string `form:"customer_creation"`
	// If provided, this value will be used when the Customer object is created.
	// If not provided, customers will be asked to enter their email address.
	// Use this parameter to prefill customer data if you already have an email
	// on file. To access information about the customer once a session is
	// complete, use the `customer` field.
	CustomerEmail *string `form:"customer_email"`
	// Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.
	CustomerUpdate *CheckoutSessionCustomerUpdateParams `form:"customer_update"`
	// The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
	Discounts []*CheckoutSessionDiscountParams `form:"discounts"`
	// The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.
	ExpiresAt *int64 `form:"expires_at"`
	// A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
	//
	// For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
	//
	// For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only.
	LineItems []*CheckoutSessionLineItemParams `form:"line_items"`
	// The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used.
	Locale *string `form:"locale"`
	// The mode of the Checkout Session. Required when using prices or `setup` mode. Pass `subscription` if the Checkout Session includes at least one recurring item.
	Mode *string `form:"mode"`
	// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
	PaymentIntentData *CheckoutSessionPaymentIntentDataParams `form:"payment_intent_data"`
	// Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.
	// This may occur if the Checkout Session includes a free trial or a discount.
	//
	// Can only be set in `subscription` mode.
	//
	// If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
	PaymentMethodCollection *string `form:"payment_method_collection"`
	// Payment-method-specific configuration.
	PaymentMethodOptions *CheckoutSessionPaymentMethodOptionsParams `form:"payment_method_options"`
	// A list of the types of payment methods (e.g., `card`) this Checkout Session can accept.
	//
	// Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
	//
	// Read more about the supported payment methods and their requirements in our [payment
	// method details guide](https://stripe.com/docs/payments/checkout/payment-methods).
	//
	// If multiple payment methods are passed, Checkout will dynamically reorder them to
	// prioritize the most relevant payment methods based on the customer's location and
	// other characteristics.
	PaymentMethodTypes []*string `form:"payment_method_types"`
	// Controls phone number collection settings for the session.
	//
	// We recommend that you review your privacy policy and check with your legal contacts
	// before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).
	PhoneNumberCollection *CheckoutSessionPhoneNumberCollectionParams `form:"phone_number_collection"`
	// A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
	SetupIntentData *CheckoutSessionSetupIntentDataParams `form:"setup_intent_data"`
	// When set, provides configuration for Checkout to collect a shipping address from a customer.
	ShippingAddressCollection *CheckoutSessionShippingAddressCollectionParams `form:"shipping_address_collection"`
	// The shipping rate options to apply to this Session.
	ShippingOptions []*CheckoutSessionShippingOptionParams `form:"shipping_options"`
	// [Deprecated] The shipping rate to apply to this Session. Only up to one may be specified.
	ShippingRates []*string `form:"shipping_rates"`
	// Describes the type of transaction being performed by Checkout in order to customize
	// relevant text on the page, such as the submit button. `submit_type` can only be
	// specified on Checkout Sessions in `payment` mode, but not Checkout Sessions
	// in `subscription` or `setup` mode.
	SubmitType *string `form:"submit_type"`
	// A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
	SubscriptionData *CheckoutSessionSubscriptionDataParams `form:"subscription_data"`
	// The URL to which Stripe should send customers when payment or setup
	// is complete.
	// If you'd like to use information from the successful Checkout Session on your page,
	// read the guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
	SuccessURL *string `form:"success_url"`
	// Controls tax ID collection settings for the session.
	TaxIDCollection *CheckoutSessionTaxIDCollectionParams `form:"tax_id_collection"`
}

Creates a Session object.

type CheckoutSessionPaymentIntentDataParams

type CheckoutSessionPaymentIntentDataParams struct {
	// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
	ApplicationFeeAmount *int64 `form:"application_fee_amount"`
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod *string `form:"capture_method"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// The Stripe account ID for which these funds are intended. For details,
	// see the PaymentIntents [use case for connected
	// accounts](https://stripe.com/docs/payments/connected-accounts).
	OnBehalfOf *string `form:"on_behalf_of"`
	// Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
	ReceiptEmail *string `form:"receipt_email"`
	// Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment
	// method collected by this Checkout Session.
	//
	// When setting this to `on_session`, Checkout will show a notice to the
	// customer that their payment details will be saved.
	//
	// When setting this to `off_session`, Checkout will show a notice to the
	// customer that their payment details will be saved and used for future
	// payments.
	//
	// If a Customer has been provided or Checkout creates a new Customer,
	// Checkout will attach the payment method to the Customer.
	//
	// If Checkout does not create a Customer, the payment method is not attached
	// to a Customer. To reuse the payment method, you can retrieve it from the
	// Checkout Session's PaymentIntent.
	//
	// When processing card payments, Checkout also uses `setup_future_usage`
	// to dynamically optimize your payment flow and comply with regional
	// legislation and network rules, such as SCA.
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Shipping information for this payment.
	Shipping *ShippingDetailsParams `form:"shipping"`
	// Extra information about the payment. This will appear on your
	// customer's statement when this payment succeeds in creating a charge.
	StatementDescriptor *string `form:"statement_descriptor"`
	// Provides information about the charge that customers see on their statements. Concatenated with the
	// prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete
	// statement descriptor. Maximum 22 characters for the concatenated descriptor.
	StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
	// The parameters used to automatically create a Transfer when the payment succeeds.
	// For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
	TransferData *CheckoutSessionPaymentIntentDataTransferDataParams `form:"transfer_data"`
	// A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
	TransferGroup *string `form:"transfer_group"`
}

A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.

type CheckoutSessionPaymentIntentDataTransferDataParams

type CheckoutSessionPaymentIntentDataTransferDataParams struct {
	// The amount that will be transferred automatically when a charge succeeds.
	Amount *int64 `form:"amount"`
	// If specified, successful charges will be attributed to the destination
	// account for tax reporting, and the funds from charges will be transferred
	// to the destination account. The ID of the resulting transfer will be
	// returned on the successful charge's `transfer` field.
	Destination *string `form:"destination"`
}

The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).

type CheckoutSessionPaymentMethodCollection

type CheckoutSessionPaymentMethodCollection string

Configure whether a Checkout Session should collect a payment method.

const (
	CheckoutSessionPaymentMethodCollectionAlways     CheckoutSessionPaymentMethodCollection = "always"
	CheckoutSessionPaymentMethodCollectionIfRequired CheckoutSessionPaymentMethodCollection = "if_required"
)

List of values that CheckoutSessionPaymentMethodCollection can take

type CheckoutSessionPaymentMethodOptions

type CheckoutSessionPaymentMethodOptions struct {
	ACSSDebit        *CheckoutSessionPaymentMethodOptionsACSSDebit        `json:"acss_debit"`
	Affirm           *CheckoutSessionPaymentMethodOptionsAffirm           `json:"affirm"`
	AfterpayClearpay *CheckoutSessionPaymentMethodOptionsAfterpayClearpay `json:"afterpay_clearpay"`
	Alipay           *CheckoutSessionPaymentMethodOptionsAlipay           `json:"alipay"`
	AUBECSDebit      *CheckoutSessionPaymentMethodOptionsAUBECSDebit      `json:"au_becs_debit"`
	BACSDebit        *CheckoutSessionPaymentMethodOptionsBACSDebit        `json:"bacs_debit"`
	Bancontact       *CheckoutSessionPaymentMethodOptionsBancontact       `json:"bancontact"`
	Boleto           *CheckoutSessionPaymentMethodOptionsBoleto           `json:"boleto"`
	Card             *CheckoutSessionPaymentMethodOptionsCard             `json:"card"`
	CustomerBalance  *CheckoutSessionPaymentMethodOptionsCustomerBalance  `json:"customer_balance"`
	EPS              *CheckoutSessionPaymentMethodOptionsEPS              `json:"eps"`
	FPX              *CheckoutSessionPaymentMethodOptionsFPX              `json:"fpx"`
	Giropay          *CheckoutSessionPaymentMethodOptionsGiropay          `json:"giropay"`
	Grabpay          *CheckoutSessionPaymentMethodOptionsGrabpay          `json:"grabpay"`
	IDEAL            *CheckoutSessionPaymentMethodOptionsIDEAL            `json:"ideal"`
	Klarna           *CheckoutSessionPaymentMethodOptionsKlarna           `json:"klarna"`
	Konbini          *CheckoutSessionPaymentMethodOptionsKonbini          `json:"konbini"`
	OXXO             *CheckoutSessionPaymentMethodOptionsOXXO             `json:"oxxo"`
	P24              *CheckoutSessionPaymentMethodOptionsP24              `json:"p24"`
	PayNow           *CheckoutSessionPaymentMethodOptionsPayNow           `json:"paynow"`
	SEPADebit        *CheckoutSessionPaymentMethodOptionsSEPADebit        `json:"sepa_debit"`
	Sofort           *CheckoutSessionPaymentMethodOptionsSofort           `json:"sofort"`
	USBankAccount    *CheckoutSessionPaymentMethodOptionsUSBankAccount    `json:"us_bank_account"`
}

Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession.

type CheckoutSessionPaymentMethodOptionsACSSDebit

type CheckoutSessionPaymentMethodOptionsACSSDebit struct {
	Currency       string                                                      `json:"currency"`
	MandateOptions *CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage `json:"setup_future_usage"`
	// Bank account verification method.
	VerificationMethod CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"`
}

type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptions

type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptions struct {
	// A URL for custom mandate text
	CustomMandateURL string `json:"custom_mandate_url"`
	// List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.
	DefaultFor []CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor `json:"default_for"`
	// Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
	IntervalDescription string `json:"interval_description"`
	// Payment schedule for the mandate.
	PaymentSchedule CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule `json:"payment_schedule"`
	// Transaction type of the mandate.
	TransactionType CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"`
}

type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor

type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor string

List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode.

const (
	CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultForInvoice      CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "invoice"
	CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultForSubscription CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "subscription"
)

List of values that CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor can take

type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsParams

type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsParams struct {
	// A URL for custom mandate text to render during confirmation step.
	// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
	// or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
	CustomMandateURL *string `form:"custom_mandate_url"`
	// List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode.
	DefaultFor []*string `form:"default_for"`
	// Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
	IntervalDescription *string `form:"interval_description"`
	// Payment schedule for the mandate.
	PaymentSchedule *string `form:"payment_schedule"`
	// Transaction type of the mandate.
	TransactionType *string `form:"transaction_type"`
}

Additional fields for Mandate creation

type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule

type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule string

Payment schedule for the mandate.

const (
	CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleCombined CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "combined"
	CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleInterval CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "interval"
	CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleSporadic CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "sporadic"
)

List of values that CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule can take

type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType

type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string

Transaction type of the mandate.

const (
	CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business"
	CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal"
)

List of values that CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take

type CheckoutSessionPaymentMethodOptionsACSSDebitParams

type CheckoutSessionPaymentMethodOptionsACSSDebitParams struct {
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). This is only accepted for Checkout Sessions in `setup` mode.
	Currency *string `form:"currency"`
	// Additional fields for Mandate creation
	MandateOptions *CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Verification method for the intent
	VerificationMethod *string `form:"verification_method"`
}

contains details about the ACSS Debit payment method options.

type CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage = "off_session"
	CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsageOnSession  CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage = "on_session"
)

List of values that CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod

type CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod string

Bank account verification method.

const (
	CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethodAutomatic     CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod = "automatic"
	CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethodInstant       CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod = "instant"
	CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits"
)

List of values that CheckoutSessionPaymentMethodOptionsACSSDebitVerificationMethod can take

type CheckoutSessionPaymentMethodOptionsAUBECSDebit

type CheckoutSessionPaymentMethodOptionsAUBECSDebit struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsAUBECSDebitParams

type CheckoutSessionPaymentMethodOptionsAUBECSDebitParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the AU Becs Debit payment method options.

type CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsAffirm

type CheckoutSessionPaymentMethodOptionsAffirm struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsAffirmParams

type CheckoutSessionPaymentMethodOptionsAffirmParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Affirm payment method options.

type CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsAffirmSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsAfterpayClearpay

type CheckoutSessionPaymentMethodOptionsAfterpayClearpay struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsAfterpayClearpayParams

type CheckoutSessionPaymentMethodOptionsAfterpayClearpayParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Afterpay Clearpay payment method options.

type CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage

type CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsAfterpayClearpaySetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsAlipay

type CheckoutSessionPaymentMethodOptionsAlipay struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsAlipayParams

type CheckoutSessionPaymentMethodOptionsAlipayParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Alipay payment method options.

type CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage

type CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsBACSDebit

type CheckoutSessionPaymentMethodOptionsBACSDebit struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsBACSDebitParams

type CheckoutSessionPaymentMethodOptionsBACSDebitParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Bacs Debit payment method options.

type CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage = "off_session"
	CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsageOnSession  CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage = "on_session"
)

List of values that CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsBancontact

type CheckoutSessionPaymentMethodOptionsBancontact struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsBancontactParams

type CheckoutSessionPaymentMethodOptionsBancontactParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Bancontact payment method options.

type CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsBancontactSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsBoleto

type CheckoutSessionPaymentMethodOptionsBoleto struct {
	// The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.
	ExpiresAfterDays int64 `json:"expires_after_days"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsBoletoParams

type CheckoutSessionPaymentMethodOptionsBoletoParams struct {
	// The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
	ExpiresAfterDays *int64 `form:"expires_after_days"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Boleto payment method options.

type CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage = "off_session"
	CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsageOnSession  CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage = "on_session"
)

List of values that CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsCard

type CheckoutSessionPaymentMethodOptionsCard struct {
	Installments *CheckoutSessionPaymentMethodOptionsCardInstallments `json:"installments"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage `json:"setup_future_usage"`
	// Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
	StatementDescriptorSuffixKana string `json:"statement_descriptor_suffix_kana"`
	// Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
	StatementDescriptorSuffixKanji string `json:"statement_descriptor_suffix_kanji"`
}

type CheckoutSessionPaymentMethodOptionsCardInstallments

type CheckoutSessionPaymentMethodOptionsCardInstallments struct {
	// Indicates if installments are enabled
	Enabled bool `json:"enabled"`
}

type CheckoutSessionPaymentMethodOptionsCardInstallmentsParams

type CheckoutSessionPaymentMethodOptionsCardInstallmentsParams struct {
	// Setting to true enables installments for this PaymentIntent.
	// This will cause the response to contain a list of available installment plans.
	// Setting to false will prevent any selected plan from applying to a charge.
	Enabled *bool `form:"enabled"`
	// The selected installment plan to use for this payment attempt.
	// This parameter can only be provided during confirmation.
	Plan *CheckoutSessionPaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"`
}

Installment options for card payments

type CheckoutSessionPaymentMethodOptionsCardInstallmentsPlanParams

type CheckoutSessionPaymentMethodOptionsCardInstallmentsPlanParams struct {
	// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
	Count *int64 `form:"count"`
	// For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
	// One of `month`.
	Interval *string `form:"interval"`
	// Type of installment plan, one of `fixed_count`.
	Type *string `form:"type"`
}

The selected installment plan to use for this payment attempt. This parameter can only be provided during confirmation.

type CheckoutSessionPaymentMethodOptionsCardParams

type CheckoutSessionPaymentMethodOptionsCardParams struct {
	// Installment options for card payments
	Installments *CheckoutSessionPaymentMethodOptionsCardInstallmentsParams `form:"installments"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
	StatementDescriptorSuffixKana *string `form:"statement_descriptor_suffix_kana"`
	// Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
	StatementDescriptorSuffixKanji *string `form:"statement_descriptor_suffix_kanji"`
}

contains details about the Card payment method options.

type CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "off_session"
	CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageOnSession  CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "on_session"
)

List of values that CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsCustomerBalance

type CheckoutSessionPaymentMethodOptionsCustomerBalance struct {
	BankTransfer *CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransfer `json:"bank_transfer"`
	// The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
	FundingType CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransfer

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransfer struct {
	EUBankTransfer *CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer `json:"eu_bank_transfer"`
	// List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
	//
	// Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
	RequestedAddressTypes []CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType `json:"requested_address_types"`
	// The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
	Type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType `json:"type"`
}

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer struct {
	// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
	Country string `json:"country"`
}

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams struct {
	// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
	Country *string `form:"country"`
}

Configuration for eu_bank_transfer funding type.

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferParams

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferParams struct {
	// Configuration for eu_bank_transfer funding type.
	EUBankTransfer *CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
	// List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
	//
	// Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
	RequestedAddressTypes []*string `form:"requested_address_types"`
	// The list of bank transfer types that this PaymentIntent is allowed to use for funding. Permitted values include: `us_bank_account`, `eu_bank_account`, `id_bank_account`, `gb_bank_account`, `jp_bank_account`, `mx_bank_account`, `eu_bank_transfer`, `gb_bank_transfer`, `id_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
	Type *string `form:"type"`
}

Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType string

List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.

Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.

const (
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeIBAN     CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "iban"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSEPA     CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sepa"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSortCode CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sort_code"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSpei     CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "spei"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeZengin   CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "zengin"
)

List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType can take

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType string

The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.

const (
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeEUBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "eu_bank_transfer"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeGBBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "gb_bank_transfer"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeJPBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "jp_bank_transfer"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeMXBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "mx_bank_transfer"
)

List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType can take

type CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType

type CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType string

The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.

const (
	CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingTypeBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType = "bank_transfer"
)

List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceFundingType can take

type CheckoutSessionPaymentMethodOptionsCustomerBalanceParams

type CheckoutSessionPaymentMethodOptionsCustomerBalanceParams struct {
	// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
	BankTransfer *CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"`
	// The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
	FundingType *string `form:"funding_type"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Customer Balance payment method options.

type CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsCustomerBalanceSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsEPS

type CheckoutSessionPaymentMethodOptionsEPS struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsEPSParams

type CheckoutSessionPaymentMethodOptionsEPSParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the EPS payment method options.

type CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsEPSSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsFPX

type CheckoutSessionPaymentMethodOptionsFPX struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsFPXParams

type CheckoutSessionPaymentMethodOptionsFPXParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the FPX payment method options.

type CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsFPXSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsGiropay

type CheckoutSessionPaymentMethodOptionsGiropay struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsGiropayParams

type CheckoutSessionPaymentMethodOptionsGiropayParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Giropay payment method options.

type CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage

type CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsGiropaySetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsGrabpay

type CheckoutSessionPaymentMethodOptionsGrabpay struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsGrabpayParams

type CheckoutSessionPaymentMethodOptionsGrabpayParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Grabpay payment method options.

type CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage

type CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsGrabpaySetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsIDEAL

type CheckoutSessionPaymentMethodOptionsIDEAL struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsIDEALParams

type CheckoutSessionPaymentMethodOptionsIDEALParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Ideal payment method options.

type CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsKlarna

type CheckoutSessionPaymentMethodOptionsKlarna struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsKlarnaParams

type CheckoutSessionPaymentMethodOptionsKlarnaParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Klarna payment method options.

type CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage = "off_session"
	CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsageOnSession  CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage = "on_session"
)

List of values that CheckoutSessionPaymentMethodOptionsKlarnaSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsKonbini

type CheckoutSessionPaymentMethodOptionsKonbini struct {
	// The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.
	ExpiresAfterDays int64 `json:"expires_after_days"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsKonbiniParams

type CheckoutSessionPaymentMethodOptionsKonbiniParams struct {
	// The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
	ExpiresAfterDays *int64 `form:"expires_after_days"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Konbini payment method options.

type CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsOXXO

type CheckoutSessionPaymentMethodOptionsOXXO struct {
	// The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
	ExpiresAfterDays int64 `json:"expires_after_days"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsOXXOParams

type CheckoutSessionPaymentMethodOptionsOXXOParams struct {
	// The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
	ExpiresAfterDays *int64 `form:"expires_after_days"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the OXXO payment method options.

type CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsOXXOSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsP24

type CheckoutSessionPaymentMethodOptionsP24 struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsP24Params

type CheckoutSessionPaymentMethodOptionsP24Params struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Confirm that the payer has accepted the P24 terms and conditions.
	TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"`
}

contains details about the P24 payment method options.

type CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage

type CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsP24SetupFutureUsageNone CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsP24SetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsParams

type CheckoutSessionPaymentMethodOptionsParams struct {
	// contains details about the ACSS Debit payment method options.
	ACSSDebit *CheckoutSessionPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
	// contains details about the Affirm payment method options.
	Affirm *CheckoutSessionPaymentMethodOptionsAffirmParams `form:"affirm"`
	// contains details about the Afterpay Clearpay payment method options.
	AfterpayClearpay *CheckoutSessionPaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"`
	// contains details about the Alipay payment method options.
	Alipay *CheckoutSessionPaymentMethodOptionsAlipayParams `form:"alipay"`
	// contains details about the AU Becs Debit payment method options.
	AUBECSDebit *CheckoutSessionPaymentMethodOptionsAUBECSDebitParams `form:"au_becs_debit"`
	// contains details about the Bacs Debit payment method options.
	BACSDebit *CheckoutSessionPaymentMethodOptionsBACSDebitParams `form:"bacs_debit"`
	// contains details about the Bancontact payment method options.
	Bancontact *CheckoutSessionPaymentMethodOptionsBancontactParams `form:"bancontact"`
	// contains details about the Boleto payment method options.
	Boleto *CheckoutSessionPaymentMethodOptionsBoletoParams `form:"boleto"`
	// contains details about the Card payment method options.
	Card *CheckoutSessionPaymentMethodOptionsCardParams `form:"card"`
	// contains details about the Customer Balance payment method options.
	CustomerBalance *CheckoutSessionPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
	// contains details about the EPS payment method options.
	EPS *CheckoutSessionPaymentMethodOptionsEPSParams `form:"eps"`
	// contains details about the FPX payment method options.
	FPX *CheckoutSessionPaymentMethodOptionsFPXParams `form:"fpx"`
	// contains details about the Giropay payment method options.
	Giropay *CheckoutSessionPaymentMethodOptionsGiropayParams `form:"giropay"`
	// contains details about the Grabpay payment method options.
	Grabpay *CheckoutSessionPaymentMethodOptionsGrabpayParams `form:"grabpay"`
	// contains details about the Ideal payment method options.
	IDEAL *CheckoutSessionPaymentMethodOptionsIDEALParams `form:"ideal"`
	// contains details about the Klarna payment method options.
	Klarna *CheckoutSessionPaymentMethodOptionsKlarnaParams `form:"klarna"`
	// contains details about the Konbini payment method options.
	Konbini *CheckoutSessionPaymentMethodOptionsKonbiniParams `form:"konbini"`
	// contains details about the OXXO payment method options.
	OXXO *CheckoutSessionPaymentMethodOptionsOXXOParams `form:"oxxo"`
	// contains details about the P24 payment method options.
	P24 *CheckoutSessionPaymentMethodOptionsP24Params `form:"p24"`
	// contains details about the PayNow payment method options.
	PayNow *CheckoutSessionPaymentMethodOptionsPayNowParams `form:"paynow"`
	// contains details about the Sepa Debit payment method options.
	SEPADebit *CheckoutSessionPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
	// contains details about the Sofort payment method options.
	Sofort *CheckoutSessionPaymentMethodOptionsSofortParams `form:"sofort"`
	// contains details about the Us Bank Account payment method options.
	USBankAccount *CheckoutSessionPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
	// contains details about the WeChat Pay payment method options.
	WeChatPay *CheckoutSessionPaymentMethodOptionsWeChatPayParams `form:"wechat_pay"`
}

Payment-method-specific configuration.

type CheckoutSessionPaymentMethodOptionsPayNow

type CheckoutSessionPaymentMethodOptionsPayNow struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsPayNowParams

type CheckoutSessionPaymentMethodOptionsPayNowParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Confirm that the payer has accepted the P24 terms and conditions.
	TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"`
}

contains details about the PayNow payment method options.

type CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsSEPADebit

type CheckoutSessionPaymentMethodOptionsSEPADebit struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsSEPADebitParams

type CheckoutSessionPaymentMethodOptionsSEPADebitParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Sepa Debit payment method options.

type CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "off_session"
	CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageOnSession  CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "on_session"
)

List of values that CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsSofort

type CheckoutSessionPaymentMethodOptionsSofort struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsSofortParams

type CheckoutSessionPaymentMethodOptionsSofortParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Sofort payment method options.

type CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsUSBankAccount

type CheckoutSessionPaymentMethodOptionsUSBankAccount struct {
	FinancialConnections *CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage `json:"setup_future_usage"`
	// Bank account verification method.
	VerificationMethod CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"`
}

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections struct {
	// The list of permissions to request. The `payment_method` permission must be included.
	Permissions []CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"`
	// For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
	ReturnURL string `json:"return_url"`
}

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsParams

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
	// The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
	Permissions []*string `form:"permissions"`
}

Additional fields for Financial Connections Session creation

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string

The list of permissions to request. The `payment_method` permission must be included.

const (
	CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances      CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances"
	CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership     CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "ownership"
	CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method"
	CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions  CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions"
)

List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take

type CheckoutSessionPaymentMethodOptionsUSBankAccountParams

type CheckoutSessionPaymentMethodOptionsUSBankAccountParams struct {
	// Additional fields for Financial Connections Session creation
	FinancialConnections *CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Verification method for the intent
	VerificationMethod *string `form:"verification_method"`
}

contains details about the Us Bank Account payment method options.

type CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage = "off_session"
	CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsageOnSession  CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage = "on_session"
)

List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod

type CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod string

Bank account verification method.

const (
	CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic"
	CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethodInstant   CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod = "instant"
)

List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod can take

type CheckoutSessionPaymentMethodOptionsWeChatPayParams

type CheckoutSessionPaymentMethodOptionsWeChatPayParams struct {
	// The app ID registered with WeChat Pay. Only required when client is ios or android.
	AppID *string `form:"app_id"`
	// The client type that the end customer will pay from
	Client *string `form:"client"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the WeChat Pay payment method options.

type CheckoutSessionPaymentStatus

type CheckoutSessionPaymentStatus string

The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. You can use this value to decide when to fulfill your customer's order.

const (
	CheckoutSessionPaymentStatusNoPaymentRequired CheckoutSessionPaymentStatus = "no_payment_required"
	CheckoutSessionPaymentStatusPaid              CheckoutSessionPaymentStatus = "paid"
	CheckoutSessionPaymentStatusUnpaid            CheckoutSessionPaymentStatus = "unpaid"
)

List of values that CheckoutSessionPaymentStatus can take

type CheckoutSessionPhoneNumberCollection

type CheckoutSessionPhoneNumberCollection struct {
	// Indicates whether phone number collection is enabled for the session
	Enabled bool `json:"enabled"`
}

type CheckoutSessionPhoneNumberCollectionParams

type CheckoutSessionPhoneNumberCollectionParams struct {
	// Set to `true` to enable phone number collection.
	Enabled *bool `form:"enabled"`
}

Controls phone number collection settings for the session.

We recommend that you review your privacy policy and check with your legal contacts before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers).

type CheckoutSessionSetupIntentDataParams

type CheckoutSessionSetupIntentDataParams struct {
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// The Stripe account for which the setup is intended.
	OnBehalfOf *string `form:"on_behalf_of"`
}

A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.

type CheckoutSessionShippingAddressCollection

type CheckoutSessionShippingAddressCollection struct {
	// An array of two-letter ISO country codes representing which countries Checkout should provide as options for
	// shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.
	AllowedCountries []string `json:"allowed_countries"`
}

When set, provides configuration for Checkout to collect a shipping address from a customer.

type CheckoutSessionShippingAddressCollectionParams

type CheckoutSessionShippingAddressCollectionParams struct {
	// An array of two-letter ISO country codes representing which countries Checkout should provide as options for
	// shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.
	AllowedCountries []*string `form:"allowed_countries"`
}

When set, provides configuration for Checkout to collect a shipping address from a customer.

type CheckoutSessionShippingCost

type CheckoutSessionShippingCost struct {
	// Total shipping cost before any discounts or taxes are applied.
	AmountSubtotal int64 `json:"amount_subtotal"`
	// Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
	AmountTax int64 `json:"amount_tax"`
	// Total shipping cost after discounts and taxes are applied.
	AmountTotal int64 `json:"amount_total"`
	// The ID of the ShippingRate for this order.
	ShippingRate *ShippingRate `json:"shipping_rate"`
	// The taxes applied to the shipping rate.
	Taxes []*CheckoutSessionShippingCostTax `json:"taxes"`
}

The details of the customer cost of shipping, including the customer chosen ShippingRate.

type CheckoutSessionShippingCostTax

type CheckoutSessionShippingCostTax struct {
	// Amount of tax applied for this rate.
	Amount int64 `json:"amount"`
	// Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
	//
	// Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).
	Rate *TaxRate `json:"rate"`
}

The taxes applied to the shipping rate.

type CheckoutSessionShippingOption

type CheckoutSessionShippingOption struct {
	// A non-negative integer in cents representing how much to charge.
	ShippingAmount int64 `json:"shipping_amount"`
	// The shipping rate.
	ShippingRate *ShippingRate `json:"shipping_rate"`
}

The shipping rate options applied to this Session.

type CheckoutSessionShippingOptionParams

type CheckoutSessionShippingOptionParams struct {
	// The ID of the Shipping Rate to use for this shipping option.
	ShippingRate *string `form:"shipping_rate"`
	// Parameters to be passed to Shipping Rate creation for this shipping option
	ShippingRateData *CheckoutSessionShippingOptionShippingRateDataParams `form:"shipping_rate_data"`
}

The shipping rate options to apply to this Session.

type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMaximumParams

type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMaximumParams struct {
	// A unit of time.
	Unit *string `form:"unit"`
	// Must be greater than 0.
	Value *int64 `form:"value"`
}

The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.

type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMinimumParams

type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMinimumParams struct {
	// A unit of time.
	Unit *string `form:"unit"`
	// Must be greater than 0.
	Value *int64 `form:"value"`
}

The lower bound of the estimated range. If empty, represents no lower bound.

type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateParams

type CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateParams struct {
	// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
	Maximum *CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMaximumParams `form:"maximum"`
	// The lower bound of the estimated range. If empty, represents no lower bound.
	Minimum *CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateMinimumParams `form:"minimum"`
}

The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.

type CheckoutSessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsParams

type CheckoutSessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsParams struct {
	// A non-negative integer in cents representing how much to charge.
	Amount *int64 `form:"amount"`
	// Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
	TaxBehavior *string `form:"tax_behavior"`
}

Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

type CheckoutSessionShippingOptionShippingRateDataFixedAmountParams

type CheckoutSessionShippingOptionShippingRateDataFixedAmountParams struct {
	// A non-negative integer in cents representing how much to charge.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
	CurrencyOptions map[string]*CheckoutSessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsParams `form:"currency_options"`
}

Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.

type CheckoutSessionShippingOptionShippingRateDataParams

type CheckoutSessionShippingOptionShippingRateDataParams struct {
	// The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
	DeliveryEstimate *CheckoutSessionShippingOptionShippingRateDataDeliveryEstimateParams `form:"delivery_estimate"`
	// The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
	DisplayName *string `form:"display_name"`
	// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
	FixedAmount *CheckoutSessionShippingOptionShippingRateDataFixedAmountParams `form:"fixed_amount"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
	TaxBehavior *string `form:"tax_behavior"`
	// A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
	TaxCode *string `form:"tax_code"`
	// The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.
	Type *string `form:"type"`
}

Parameters to be passed to Shipping Rate creation for this shipping option

type CheckoutSessionStatus

type CheckoutSessionStatus string

The status of the Checkout Session, one of `open`, `complete`, or `expired`.

const (
	CheckoutSessionStatusComplete CheckoutSessionStatus = "complete"
	CheckoutSessionStatusExpired  CheckoutSessionStatus = "expired"
	CheckoutSessionStatusOpen     CheckoutSessionStatus = "open"
)

List of values that CheckoutSessionStatus can take

type CheckoutSessionSubmitType

type CheckoutSessionSubmitType string

Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. `submit_type` can only be specified on Checkout Sessions in `payment` mode, but not Checkout Sessions in `subscription` or `setup` mode.

const (
	CheckoutSessionSubmitTypeAuto   CheckoutSessionSubmitType = "auto"
	CheckoutSessionSubmitTypeBook   CheckoutSessionSubmitType = "book"
	CheckoutSessionSubmitTypeDonate CheckoutSessionSubmitType = "donate"
	CheckoutSessionSubmitTypePay    CheckoutSessionSubmitType = "pay"
)

List of values that CheckoutSessionSubmitType can take

type CheckoutSessionSubscriptionDataItemParams

type CheckoutSessionSubscriptionDataItemParams struct {
	// Plan ID for this item.
	Plan *string `form:"plan"`
	// The quantity of the subscription item being purchased. Quantity should not be defined when `recurring.usage_type=metered`.
	Quantity *int64 `form:"quantity"`
	// The tax rates which apply to this item. When set, the `default_tax_rates`
	// on `subscription_data` do not apply to this item.
	TaxRates []*string `form:"tax_rates"`
}

A list of items, each with an attached plan, that the customer is subscribing to. Prefer using `line_items`.

type CheckoutSessionSubscriptionDataParams

type CheckoutSessionSubscriptionDataParams struct {
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
	ApplicationFeePercent *float64 `form:"application_fee_percent"`
	// The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.
	Coupon *string `form:"coupon"`
	// The tax rates that will apply to any subscription item that does not have
	// `tax_rates` set. Invoices created will have their `default_tax_rates` populated
	// from the subscription.
	DefaultTaxRates []*string `form:"default_tax_rates"`
	// The subscription's description, meant to be displayable to the customer.
	// Use this field to optionally store an explanation of the subscription
	// for rendering in Stripe hosted surfaces.
	Description *string `form:"description"`
	// A list of items, each with an attached plan, that the customer is subscribing to. Prefer using `line_items`.
	Items []*CheckoutSessionSubscriptionDataItemParams `form:"items"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
	TransferData *CheckoutSessionSubscriptionDataTransferDataParams `form:"transfer_data"`
	// Unix timestamp representing the end of the trial period the customer
	// will get before being charged for the first time. Has to be at least
	// 48 hours in the future.
	TrialEnd *int64 `form:"trial_end"`
	// Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` on `subscription_data` is preferred. Defaults to `false`.
	TrialFromPlan *bool `form:"trial_from_plan"`
	// Integer representing the number of trial period days before the
	// customer is charged for the first time. Has to be at least 1.
	TrialPeriodDays *int64 `form:"trial_period_days"`
}

A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.

type CheckoutSessionSubscriptionDataTransferDataParams

type CheckoutSessionSubscriptionDataTransferDataParams struct {
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
	AmountPercent *float64 `form:"amount_percent"`
	// ID of an existing, connected Stripe account.
	Destination *string `form:"destination"`
}

If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.

type CheckoutSessionTaxIDCollection

type CheckoutSessionTaxIDCollection struct {
	// Indicates whether tax ID collection is enabled for the session
	Enabled bool `json:"enabled"`
}

type CheckoutSessionTaxIDCollectionParams

type CheckoutSessionTaxIDCollectionParams struct {
	// Set to true to enable Tax ID collection.
	Enabled *bool `form:"enabled"`
}

Controls tax ID collection settings for the session.

type CheckoutSessionTotalDetails

type CheckoutSessionTotalDetails struct {
	// This is the sum of all the discounts.
	AmountDiscount int64 `json:"amount_discount"`
	// This is the sum of all the shipping amounts.
	AmountShipping int64 `json:"amount_shipping"`
	// This is the sum of all the tax amounts.
	AmountTax int64                                 `json:"amount_tax"`
	Breakdown *CheckoutSessionTotalDetailsBreakdown `json:"breakdown"`
}

Tax and discount details for the computed total amount.

type CheckoutSessionTotalDetailsBreakdown

type CheckoutSessionTotalDetailsBreakdown struct {
	// The aggregated discounts.
	Discounts []*CheckoutSessionTotalDetailsBreakdownDiscount `json:"discounts"`
	// The aggregated tax amounts by rate.
	Taxes []*CheckoutSessionTotalDetailsBreakdownTax `json:"taxes"`
}

type CheckoutSessionTotalDetailsBreakdownDiscount

type CheckoutSessionTotalDetailsBreakdownDiscount struct {
	// The amount discounted.
	Amount int64 `json:"amount"`
	// A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
	// It contains information about when the discount began, when it will end, and what it is applied to.
	//
	// Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
	Discount *Discount `json:"discount"`
}

The aggregated discounts.

type CheckoutSessionTotalDetailsBreakdownTax

type CheckoutSessionTotalDetailsBreakdownTax struct {
	// Amount of tax applied for this rate.
	Amount int64 `json:"amount"`
	// Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
	//
	// Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).
	Rate *TaxRate `json:"rate"`
}

The aggregated tax amounts by rate.

type ConnectCollectionTransfer

type ConnectCollectionTransfer struct {
	// Amount transferred, in %s.
	Amount int64 `json:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// ID of the account that funds are being collected for.
	Destination *Account `json:"destination"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
}

func (*ConnectCollectionTransfer) UnmarshalJSON

func (c *ConnectCollectionTransfer) UnmarshalJSON(data []byte) error

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

type Country

type Country string

Country is the list of supported countries

type CountrySpec

type CountrySpec struct {
	APIResource
	// The default currency for this country. This applies to both payment methods and bank accounts.
	DefaultCurrency Currency `json:"default_currency"`
	// Unique identifier for the object. Represented as the ISO country code for this country.
	ID string `json:"id"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Currencies that can be accepted in the specific country (for transfers).
	SupportedBankAccountCurrencies map[Currency][]Country `json:"supported_bank_account_currencies"`
	// Currencies that can be accepted in the specified country (for payments).
	SupportedPaymentCurrencies []Currency `json:"supported_payment_currencies"`
	// Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges).
	SupportedPaymentMethods []string `json:"supported_payment_methods"`
	// Countries that can accept transfers from the specified country.
	SupportedTransferCountries []string                                        `json:"supported_transfer_countries"`
	VerificationFields         map[AccountBusinessType]*VerificationFieldsList `json:"verification_fields"`
}

Stripe needs to collect certain pieces of information about each account created. These requirements can differ depending on the account's country. The Country Specs API makes these rules available to your integration.

You can also view the information from this API call as [an online guide](https://stripe.com/docs/connect/required-verification-information).

type CountrySpecList

type CountrySpecList struct {
	APIResource
	ListMeta
	Data []*CountrySpec `json:"data"`
}

CountrySpecList is a list of CountrySpecs as retrieved from a list endpoint.

type CountrySpecListParams

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

Lists all Country Spec objects available in the API.

type CountrySpecParams

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

Returns a Country Spec for a given Country code.

type Coupon

type Coupon struct {
	APIResource
	// Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
	AmountOff int64            `json:"amount_off"`
	AppliesTo *CouponAppliesTo `json:"applies_to"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.
	Currency Currency `json:"currency"`
	// Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
	CurrencyOptions map[string]*CouponCurrencyOptions `json:"currency_options"`
	Deleted         bool                              `json:"deleted"`
	// One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.
	Duration CouponDuration `json:"duration"`
	// If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.
	DurationInMonths int64 `json:"duration_in_months"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
	MaxRedemptions int64 `json:"max_redemptions"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// Name of the coupon displayed to customers on for instance invoices or receipts.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.
	PercentOff float64 `json:"percent_off"`
	// Date after which the coupon can no longer be redeemed.
	RedeemBy int64 `json:"redeem_by"`
	// Number of times this coupon has been applied to a customer.
	TimesRedeemed int64 `json:"times_redeemed"`
	// Taking account of the above properties, whether this coupon can still be applied to a customer.
	Valid bool `json:"valid"`
}

A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).

func (*Coupon) UnmarshalJSON

func (c *Coupon) UnmarshalJSON(data []byte) error

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.

type CouponAppliesTo

type CouponAppliesTo struct {
	// A list of product IDs this coupon applies to
	Products []string `json:"products"`
}

type CouponAppliesToParams

type CouponAppliesToParams struct {
	// An array of Product IDs that this Coupon will apply to.
	Products []*string `form:"products"`
}

A hash containing directions for what this Coupon will apply discounts to.

type CouponCurrencyOptions

type CouponCurrencyOptions struct {
	// Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
	AmountOff int64 `json:"amount_off"`
}

Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

type CouponCurrencyOptionsParams

type CouponCurrencyOptionsParams struct {
	// A positive integer representing the amount to subtract from an invoice total.
	AmountOff *int64 `form:"amount_off"`
}

Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

type CouponDuration

type CouponDuration string

One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.

const (
	CouponDurationForever   CouponDuration = "forever"
	CouponDurationOnce      CouponDuration = "once"
	CouponDurationRepeating CouponDuration = "repeating"
)

List of values that CouponDuration can take

type CouponList

type CouponList struct {
	APIResource
	ListMeta
	Data []*Coupon `json:"data"`
}

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

type CouponListParams

type CouponListParams struct {
	ListParams `form:"*"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	Created *int64 `form:"created"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	CreatedRange *RangeQueryParams `form:"created"`
}

Returns a list of your coupons.

type CouponParams

type CouponParams struct {
	Params `form:"*"`
	// A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
	AmountOff *int64 `form:"amount_off"`
	// A hash containing directions for what this Coupon will apply discounts to.
	AppliesTo *CouponAppliesToParams `form:"applies_to"`
	// Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
	Currency *string `form:"currency"`
	// Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
	CurrencyOptions map[string]*CouponCurrencyOptionsParams `form:"currency_options"`
	// Specifies how long the discount will be in effect if used on a subscription. Can be `forever`, `once`, or `repeating`. Defaults to `once`.
	Duration *string `form:"duration"`
	// Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect.
	DurationInMonths *int64 `form:"duration_in_months"`
	// Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you.
	ID *string `form:"id"`
	// A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.
	MaxRedemptions *int64 `form:"max_redemptions"`
	// Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
	Name *string `form:"name"`
	// A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).
	PercentOff *float64 `form:"percent_off"`
	// Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.
	RedeemBy *int64 `form:"redeem_by"`
}

You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

type CreditNote

type CreditNote struct {
	APIResource
	// The integer amount in %s representing the total amount of the credit note, including tax.
	Amount int64 `json:"amount"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// ID of the customer.
	Customer *Customer `json:"customer"`
	// Customer balance transaction related to this credit note.
	CustomerBalanceTransaction *CustomerBalanceTransaction `json:"customer_balance_transaction"`
	// The integer amount in %s representing the total amount of discount that was credited.
	DiscountAmount int64 `json:"discount_amount"`
	// The aggregate amounts calculated per discount for all line items.
	DiscountAmounts []*CreditNoteDiscountAmount `json:"discount_amounts"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// ID of the invoice.
	Invoice *Invoice `json:"invoice"`
	// Line items that make up the credit note
	Lines *CreditNoteLineItemList `json:"lines"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Customer-facing text that appears on the credit note PDF.
	Memo string `json:"memo"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
	Number string `json:"number"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Amount that was credited outside of Stripe.
	OutOfBandAmount int64 `json:"out_of_band_amount"`
	// The link to download the PDF of the credit note.
	PDF string `json:"pdf"`
	// Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
	Reason CreditNoteReason `json:"reason"`
	// Refund related to this credit note.
	Refund *Refund `json:"refund"`
	// Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
	Status CreditNoteStatus `json:"status"`
	// The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
	Subtotal int64 `json:"subtotal"`
	// The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.
	SubtotalExcludingTax int64 `json:"subtotal_excluding_tax"`
	// The aggregate amounts calculated per tax rate for all line items.
	TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"`
	// The integer amount in %s representing the total amount of the credit note, including tax and all discount.
	Total int64 `json:"total"`
	// The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.
	TotalExcludingTax int64 `json:"total_excluding_tax"`
	// Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.
	Type CreditNoteType `json:"type"`
	// The time that the credit note was voided.
	VoidedAt int64 `json:"voided_at"`
}

Issue a credit note to adjust an invoice's amount after the invoice is finalized.

Related guide: [Credit Notes](https://stripe.com/docs/billing/invoices/credit-notes).

func (*CreditNote) UnmarshalJSON

func (c *CreditNote) UnmarshalJSON(data []byte) error

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.

type CreditNoteDiscountAmount

type CreditNoteDiscountAmount struct {
	// The amount, in %s, of the discount.
	Amount int64 `json:"amount"`
	// The discount that was applied to get this discount amount.
	Discount *Discount `json:"discount"`
}

The integer amount in %s representing the total amount of discount that was credited.

type CreditNoteLineItem

type CreditNoteLineItem struct {
	// The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
	Amount int64 `json:"amount"`
	// The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts.
	AmountExcludingTax int64 `json:"amount_excluding_tax"`
	// Description of the item being credited.
	Description string `json:"description"`
	// The integer amount in %s representing the discount being credited for this line item.
	DiscountAmount int64 `json:"discount_amount"`
	// The amount of discount calculated per discount for this line item
	DiscountAmounts []*CreditNoteLineItemDiscountAmount `json:"discount_amounts"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// ID of the invoice line item being credited
	InvoiceLineItem string `json:"invoice_line_item"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The number of units of product being credited.
	Quantity int64 `json:"quantity"`
	// The amount of tax calculated per tax rate for this line item
	TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"`
	// The tax rates which apply to the line item.
	TaxRates []*TaxRate `json:"tax_rates"`
	// The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice.
	Type CreditNoteLineItemType `json:"type"`
	// The cost of each unit of product being credited.
	UnitAmount int64 `json:"unit_amount"`
	// Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
	UnitAmountDecimal float64 `json:"unit_amount_decimal,string"`
	// The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts.
	UnitAmountExcludingTax float64 `json:"unit_amount_excluding_tax,string"`
}

CreditNoteLineItem is the resource representing a Stripe credit note line item. For more details see https://stripe.com/docs/api/credit_notes/line_item

type CreditNoteLineItemDiscountAmount

type CreditNoteLineItemDiscountAmount struct {
	// The amount, in %s, of the discount.
	Amount int64 `json:"amount"`
	// The discount that was applied to get this discount amount.
	Discount *Discount `json:"discount"`
}

The integer amount in %s representing the discount being credited for this line item.

type CreditNoteLineItemList

type CreditNoteLineItemList struct {
	APIResource
	ListMeta
	Data []*CreditNoteLineItem `json:"data"`
}

CreditNoteLineItemList is a list of CreditNoteLineItems as retrieved from a list endpoint.

type CreditNoteLineItemType

type CreditNoteLineItemType string

The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice.

const (
	CreditNoteLineItemTypeCustomLineItem  CreditNoteLineItemType = "custom_line_item"
	CreditNoteLineItemTypeInvoiceLineItem CreditNoteLineItemType = "invoice_line_item"
)

List of values that CreditNoteLineItemType can take

type CreditNoteLineParams

type CreditNoteLineParams struct {
	// The line item amount to credit. Only valid when `type` is `invoice_line_item`.
	Amount *int64 `form:"amount"`
	// The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
	Description *string `form:"description"`
	// The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
	InvoiceLineItem *string `form:"invoice_line_item"`
	// The line item quantity to credit.
	Quantity *int64 `form:"quantity"`
	// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`.
	TaxRates []*string `form:"tax_rates"`
	// Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
	Type *string `form:"type"`
	// The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Line items that make up the credit note.

type CreditNoteList

type CreditNoteList struct {
	APIResource
	ListMeta
	Data []*CreditNote `json:"data"`
}

CreditNoteList is a list of CreditNotes as retrieved from a list endpoint.

type CreditNoteListLinesParams

type CreditNoteListLinesParams struct {
	ListParams `form:"*"`
	CreditNote *string `form:"-"` // Included in URL
}

When retrieving a credit note, you'll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

type CreditNoteListParams

type CreditNoteListParams struct {
	ListParams `form:"*"`
	// Only return credit notes for the customer specified by this customer ID.
	Customer *string `form:"customer"`
	// Only return credit notes for the invoice specified by this invoice ID.
	Invoice *string `form:"invoice"`
}

Returns a list of credit notes.

type CreditNoteParams

type CreditNoteParams struct {
	Params `form:"*"`
	// The integer amount in cents (or local equivalent) representing the total amount of the credit note.
	Amount *int64 `form:"amount"`
	// The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
	CreditAmount *int64 `form:"credit_amount"`
	// ID of the invoice.
	Invoice *string `form:"invoice"`
	// Line items that make up the credit note.
	Lines []*CreditNoteLineParams `form:"lines"`
	// Credit note memo.
	Memo *string `form:"memo"`
	// The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
	OutOfBandAmount *int64 `form:"out_of_band_amount"`
	// Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
	Reason *string `form:"reason"`
	// ID of an existing refund to link this credit note to.
	Refund *string `form:"refund"`
	// The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
	RefundAmount *int64 `form:"refund_amount"`
}

Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result in any combination of the following:

Refund: create a new refund (using refund_amount) or link an existing refund (using refund). Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).

For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.

You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount or post_payment_credit_notes_amount depending on its status at the time of credit note creation.

type CreditNotePreviewLineParams

type CreditNotePreviewLineParams struct {
	// The line item amount to credit. Only valid when `type` is `invoice_line_item`.
	Amount *int64 `form:"amount"`
	// The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
	Description *string `form:"description"`
	// The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
	InvoiceLineItem *string `form:"invoice_line_item"`
	// The line item quantity to credit.
	Quantity *int64 `form:"quantity"`
	// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`.
	TaxRates []*string `form:"tax_rates"`
	// Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
	Type *string `form:"type"`
	// The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Line items that make up the credit note.

type CreditNotePreviewLinesLineParams

type CreditNotePreviewLinesLineParams struct {
	// The line item amount to credit. Only valid when `type` is `invoice_line_item`.
	Amount *int64 `form:"amount"`
	// The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
	Description *string `form:"description"`
	// The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
	InvoiceLineItem *string `form:"invoice_line_item"`
	// The line item quantity to credit.
	Quantity *int64 `form:"quantity"`
	// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item`.
	TaxRates []*string `form:"tax_rates"`
	// Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
	Type *string `form:"type"`
	// The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Line items that make up the credit note.

type CreditNotePreviewLinesParams

type CreditNotePreviewLinesParams struct {
	ListParams `form:"*"`
	// The integer amount in cents (or local equivalent) representing the total amount of the credit note.
	Amount *int64 `form:"amount"`
	// The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
	CreditAmount *int64 `form:"credit_amount"`
	// ID of the invoice.
	Invoice *string `form:"invoice"`
	// Line items that make up the credit note.
	Lines []*CreditNotePreviewLinesLineParams `form:"lines"`
	// The credit note's memo appears on the credit note PDF.
	Memo *string `form:"memo"`
	// The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
	OutOfBandAmount *int64 `form:"out_of_band_amount"`
	// Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
	Reason *string `form:"reason"`
	// ID of an existing refund to link this credit note to.
	Refund *string `form:"refund"`
	// The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
	RefundAmount *int64 `form:"refund_amount"`
}

When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

type CreditNotePreviewParams

type CreditNotePreviewParams struct {
	Params `form:"*"`
	// The integer amount in cents (or local equivalent) representing the total amount of the credit note.
	Amount *int64 `form:"amount"`
	// The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
	CreditAmount *int64 `form:"credit_amount"`
	// ID of the invoice.
	Invoice *string `form:"invoice"`
	// Line items that make up the credit note.
	Lines []*CreditNotePreviewLineParams `form:"lines"`
	// The credit note's memo appears on the credit note PDF.
	Memo *string `form:"memo"`
	// The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
	OutOfBandAmount *int64 `form:"out_of_band_amount"`
	// Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
	Reason *string `form:"reason"`
	// ID of an existing refund to link this credit note to.
	Refund *string `form:"refund"`
	// The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
	RefundAmount *int64 `form:"refund_amount"`
}

Get a preview of a credit note without creating it.

type CreditNoteReason

type CreditNoteReason string

Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`

const (
	CreditNoteReasonDuplicate             CreditNoteReason = "duplicate"
	CreditNoteReasonFraudulent            CreditNoteReason = "fraudulent"
	CreditNoteReasonOrderChange           CreditNoteReason = "order_change"
	CreditNoteReasonProductUnsatisfactory CreditNoteReason = "product_unsatisfactory"
)

List of values that CreditNoteReason can take

type CreditNoteStatus

type CreditNoteStatus string

Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).

const (
	CreditNoteStatusIssued CreditNoteStatus = "issued"
	CreditNoteStatusVoid   CreditNoteStatus = "void"
)

List of values that CreditNoteStatus can take

type CreditNoteTaxAmount

type CreditNoteTaxAmount struct {
	// The amount, in %s, of the tax.
	Amount int64 `json:"amount"`
	// Whether this tax amount is inclusive or exclusive.
	Inclusive bool `json:"inclusive"`
	// The tax rate that was applied to get this tax amount.
	TaxRate *TaxRate `json:"tax_rate"`
}

The aggregate amounts calculated per tax rate for all line items.

type CreditNoteType

type CreditNoteType string

Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.

const (
	CreditNoteTypePostPayment CreditNoteType = "post_payment"
	CreditNoteTypePrePayment  CreditNoteType = "pre_payment"
)

List of values that CreditNoteType can take

type CreditNoteVoidCreditNoteParams

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

Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).

type Currency

type Currency string

Currency is the list of supported currencies. For more details see https://support.stripe.com/questions/which-currencies-does-stripe-support.

const (
	CurrencyAED Currency = "aed" // United Arab Emirates Dirham
	CurrencyAFN Currency = "afn" // Afghan Afghani
	CurrencyALL Currency = "all" // Albanian Lek
	CurrencyAMD Currency = "amd" // Armenian Dram
	CurrencyANG Currency = "ang" // Netherlands Antillean Gulden
	CurrencyAOA Currency = "aoa" // Angolan Kwanza
	CurrencyARS Currency = "ars" // Argentine Peso
	CurrencyAUD Currency = "aud" // Australian Dollar
	CurrencyAWG Currency = "awg" // Aruban Florin
	CurrencyAZN Currency = "azn" // Azerbaijani Manat
	CurrencyBAM Currency = "bam" // Bosnia & Herzegovina Convertible Mark
	CurrencyBBD Currency = "bbd" // Barbadian Dollar
	CurrencyBDT Currency = "bdt" // Bangladeshi Taka
	CurrencyBGN Currency = "bgn" // Bulgarian Lev
	CurrencyBIF Currency = "bif" // Burundian Franc
	CurrencyBMD Currency = "bmd" // Bermudian Dollar
	CurrencyBND Currency = "bnd" // Brunei Dollar
	CurrencyBOB Currency = "bob" // Bolivian Boliviano
	CurrencyBRL Currency = "brl" // Brazilian Real
	CurrencyBSD Currency = "bsd" // Bahamian Dollar
	CurrencyBWP Currency = "bwp" // Botswana Pula
	CurrencyBZD Currency = "bzd" // Belize Dollar
	CurrencyCAD Currency = "cad" // Canadian Dollar
	CurrencyCDF Currency = "cdf" // Congolese Franc
	CurrencyCHF Currency = "chf" // Swiss Franc
	CurrencyCLP Currency = "clp" // Chilean Peso
	CurrencyCNY Currency = "cny" // Chinese Renminbi Yuan
	CurrencyCOP Currency = "cop" // Colombian Peso
	CurrencyCRC Currency = "crc" // Costa Rican Colón
	CurrencyCVE Currency = "cve" // Cape Verdean Escudo
	CurrencyCZK Currency = "czk" // Czech Koruna
	CurrencyDJF Currency = "djf" // Djiboutian Franc
	CurrencyDKK Currency = "dkk" // Danish Krone
	CurrencyDOP Currency = "dop" // Dominican Peso
	CurrencyDZD Currency = "dzd" // Algerian Dinar
	CurrencyEEK Currency = "eek" // Estonian Kroon
	CurrencyEGP Currency = "egp" // Egyptian Pound
	CurrencyETB Currency = "etb" // Ethiopian Birr
	CurrencyEUR Currency = "eur" // Euro
	CurrencyFJD Currency = "fjd" // Fijian Dollar
	CurrencyFKP Currency = "fkp" // Falkland Islands Pound
	CurrencyGBP Currency = "gbp" // British Pound
	CurrencyGEL Currency = "gel" // Georgian Lari
	CurrencyGIP Currency = "gip" // Gibraltar Pound
	CurrencyGMD Currency = "gmd" // Gambian Dalasi
	CurrencyGNF Currency = "gnf" // Guinean Franc
	CurrencyGTQ Currency = "gtq" // Guatemalan Quetzal
	CurrencyGYD Currency = "gyd" // Guyanese Dollar
	CurrencyHKD Currency = "hkd" // Hong Kong Dollar
	CurrencyHNL Currency = "hnl" // Honduran Lempira
	CurrencyHRK Currency = "hrk" // Croatian Kuna
	CurrencyHTG Currency = "htg" // Haitian Gourde
	CurrencyHUF Currency = "huf" // Hungarian Forint
	CurrencyIDR Currency = "idr" // Indonesian Rupiah
	CurrencyILS Currency = "ils" // Israeli New Sheqel
	CurrencyINR Currency = "inr" // Indian Rupee
	CurrencyISK Currency = "isk" // Icelandic Króna
	CurrencyJMD Currency = "jmd" // Jamaican Dollar
	CurrencyJPY Currency = "jpy" // Japanese Yen
	CurrencyKES Currency = "kes" // Kenyan Shilling
	CurrencyKGS Currency = "kgs" // Kyrgyzstani Som
	CurrencyKHR Currency = "khr" // Cambodian Riel
	CurrencyKMF Currency = "kmf" // Comorian Franc
	CurrencyKRW Currency = "krw" // South Korean Won
	CurrencyKYD Currency = "kyd" // Cayman Islands Dollar
	CurrencyKZT Currency = "kzt" // Kazakhstani Tenge
	CurrencyLAK Currency = "lak" // Lao Kip
	CurrencyLBP Currency = "lbp" // Lebanese Pound
	CurrencyLKR Currency = "lkr" // Sri Lankan Rupee
	CurrencyLRD Currency = "lrd" // Liberian Dollar
	CurrencyLSL Currency = "lsl" // Lesotho Loti
	CurrencyLTL Currency = "ltl" // Lithuanian Litas
	CurrencyLVL Currency = "lvl" // Latvian Lats
	CurrencyMAD Currency = "mad" // Moroccan Dirham
	CurrencyMDL Currency = "mdl" // Moldovan Leu
	CurrencyMGA Currency = "mga" // Malagasy Ariary
	CurrencyMKD Currency = "mkd" // Macedonian Denar
	CurrencyMNT Currency = "mnt" // Mongolian Tögrög
	CurrencyMOP Currency = "mop" // Macanese Pataca
	CurrencyMRO Currency = "mro" // Mauritanian Ouguiya
	CurrencyMUR Currency = "mur" // Mauritian Rupee
	CurrencyMVR Currency = "mvr" // Maldivian Rufiyaa
	CurrencyMWK Currency = "mwk" // Malawian Kwacha
	CurrencyMXN Currency = "mxn" // Mexican Peso
	CurrencyMYR Currency = "myr" // Malaysian Ringgit
	CurrencyMZN Currency = "mzn" // Mozambican Metical
	CurrencyNAD Currency = "nad" // Namibian Dollar
	CurrencyNGN Currency = "ngn" // Nigerian Naira
	CurrencyNIO Currency = "nio" // Nicaraguan Córdoba
	CurrencyNOK Currency = "nok" // Norwegian Krone
	CurrencyNPR Currency = "npr" // Nepalese Rupee
	CurrencyNZD Currency = "nzd" // New Zealand Dollar
	CurrencyPAB Currency = "pab" // Panamanian Balboa
	CurrencyPEN Currency = "pen" // Peruvian Nuevo Sol
	CurrencyPGK Currency = "pgk" // Papua New Guinean Kina
	CurrencyPHP Currency = "php" // Philippine Peso
	CurrencyPKR Currency = "pkr" // Pakistani Rupee
	CurrencyPLN Currency = "pln" // Polish Złoty
	CurrencyPYG Currency = "pyg" // Paraguayan Guaraní
	CurrencyQAR Currency = "qar" // Qatari Riyal
	CurrencyRON Currency = "ron" // Romanian Leu
	CurrencyRSD Currency = "rsd" // Serbian Dinar
	CurrencyRUB Currency = "rub" // Russian Ruble
	CurrencyRWF Currency = "rwf" // Rwandan Franc
	CurrencySAR Currency = "sar" // Saudi Riyal
	CurrencySBD Currency = "sbd" // Solomon Islands Dollar
	CurrencySCR Currency = "scr" // Seychellois Rupee
	CurrencySEK Currency = "sek" // Swedish Krona
	CurrencySGD Currency = "sgd" // Singapore Dollar
	CurrencySHP Currency = "shp" // Saint Helenian Pound
	CurrencySLL Currency = "sll" // Sierra Leonean Leone
	CurrencySOS Currency = "sos" // Somali Shilling
	CurrencySRD Currency = "srd" // Surinamese Dollar
	CurrencySTD Currency = "std" // São Tomé and Príncipe Dobra
	CurrencySVC Currency = "svc" // Salvadoran Colón
	CurrencySZL Currency = "szl" // Swazi Lilangeni
	CurrencyTHB Currency = "thb" // Thai Baht
	CurrencyTJS Currency = "tjs" // Tajikistani Somoni
	CurrencyTOP Currency = "top" // Tongan Paʻanga
	CurrencyTRY Currency = "try" // Turkish Lira
	CurrencyTTD Currency = "ttd" // Trinidad and Tobago Dollar
	CurrencyTWD Currency = "twd" // New Taiwan Dollar
	CurrencyTZS Currency = "tzs" // Tanzanian Shilling
	CurrencyUAH Currency = "uah" // Ukrainian Hryvnia
	CurrencyUGX Currency = "ugx" // Ugandan Shilling
	CurrencyUSD Currency = "usd" // United States Dollar
	CurrencyUYU Currency = "uyu" // Uruguayan Peso
	CurrencyUZS Currency = "uzs" // Uzbekistani Som
	CurrencyVEF Currency = "vef" // Venezuelan Bolívar
	CurrencyVND Currency = "vnd" // Vietnamese Đồng
	CurrencyVUV Currency = "vuv" // Vanuatu Vatu
	CurrencyWST Currency = "wst" // Samoan Tala
	CurrencyXAF Currency = "xaf" // Central African Cfa Franc
	CurrencyXCD Currency = "xcd" // East Caribbean Dollar
	CurrencyXOF Currency = "xof" // West African Cfa Franc
	CurrencyXPF Currency = "xpf" // Cfp Franc
	CurrencyYER Currency = "yer" // Yemeni Rial
	CurrencyZAR Currency = "zar" // South African Rand
	CurrencyZMW Currency = "zmw" // Zambian Kwacha
)

List of values that Currency can take.

type Customer

type Customer struct {
	APIResource
	// The customer's address.
	Address *Address `json:"address"`
	// Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.
	Balance int64 `json:"balance"`
	// The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance".The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically.
	CashBalance *CashBalance `json:"cash_balance"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes.
	Currency Currency `json:"currency"`
	// ID of the default payment source for the customer.
	//
	// If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.
	DefaultSource *PaymentSource `json:"default_source"`
	Deleted       bool           `json:"deleted"`
	// When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date.
	//
	// If an invoice is marked uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't get reset to `false`.
	Delinquent bool `json:"delinquent"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// Describes the current discount active on the customer, if there is one.
	Discount *Discount `json:"discount"`
	// The customer's email address.
	Email string `json:"email"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The current multi-currency balances, if any, being stored on the customer.If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency.If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices.They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized.
	InvoiceCreditBalance map[string]int64 `json:"invoice_credit_balance"`
	// The prefix for the customer used to generate unique invoice numbers.
	InvoicePrefix   string                   `json:"invoice_prefix"`
	InvoiceSettings *CustomerInvoiceSettings `json:"invoice_settings"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// The customer's full name or business name.
	Name string `json:"name"`
	// The suffix of the customer's next invoice number, e.g., 0001.
	NextInvoiceSequence int64 `json:"next_invoice_sequence"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The customer's phone number.
	Phone string `json:"phone"`
	// The customer's preferred locales (languages), ordered by preference.
	PreferredLocales []string `json:"preferred_locales"`
	// Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
	Shipping *ShippingDetails   `json:"shipping"`
	Sources  *PaymentSourceList `json:"sources"`
	// The customer's current subscriptions, if any.
	Subscriptions *SubscriptionList `json:"subscriptions"`
	Tax           *CustomerTax      `json:"tax"`
	// Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **"Reverse charge"**.
	TaxExempt CustomerTaxExempt `json:"tax_exempt"`
	// The customer's tax IDs.
	TaxIDs *TaxIDList `json:"tax_ids"`
	// ID of the test clock this customer belongs to.
	TestClock *TestHelpersTestClock `json:"test_clock"`
}

This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.

Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment).

Example (Delete)
package main

import (
	"log"

	stripe "github.com/stripe/stripe-go/v73"
	"github.com/stripe/stripe-go/v73/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")
	}
}
Output:

func (*Customer) UnmarshalJSON

func (c *Customer) UnmarshalJSON(data []byte) error

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.

type CustomerBalanceTransaction

type CustomerBalanceTransaction struct {
	APIResource
	// The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`.
	Amount int64 `json:"amount"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The ID of the credit note (if any) related to the transaction.
	CreditNote *CreditNote `json:"credit_note"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// The ID of the customer the transaction belongs to.
	Customer *Customer `json:"customer"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.
	EndingBalance int64 `json:"ending_balance"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The ID of the invoice (if any) related to the transaction.
	Invoice *Invoice `json:"invoice"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.
	Type CustomerBalanceTransactionType `json:"type"`
}

Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, which denotes a debit or credit that's automatically applied to their next invoice upon finalization. You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.

Related guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more.

func (*CustomerBalanceTransaction) UnmarshalJSON

func (c *CustomerBalanceTransaction) UnmarshalJSON(data []byte) error

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.

type CustomerBalanceTransactionList

type CustomerBalanceTransactionList struct {
	APIResource
	ListMeta
	Data []*CustomerBalanceTransaction `json:"data"`
}

CustomerBalanceTransactionList is a list of CustomerBalanceTransactions as retrieved from a list endpoint.

type CustomerBalanceTransactionListParams

type CustomerBalanceTransactionListParams struct {
	ListParams `form:"*"`
	Customer   *string `form:"-"` // Included in URL
}

Returns a list of transactions that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance).

type CustomerBalanceTransactionParams

type CustomerBalanceTransactionParams struct {
	Params   `form:"*"`
	Customer *string `form:"-"` // Included in URL
	// The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). If the customer's [`currency`](https://stripe.com/docs/api/customers/object#customer_object-currency) is set, this value must match it. If the customer's `currency` is not set, it will be updated to this value.
	Currency *string `form:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
}

Retrieves a specific customer balance transaction that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance).

type CustomerBalanceTransactionType

type CustomerBalanceTransactionType string

Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.

const (
	CustomerBalanceTransactionTypeAdjustment            CustomerBalanceTransactionType = "adjustment"
	CustomerBalanceTransactionTypeAppliedToInvoice      CustomerBalanceTransactionType = "applied_to_invoice"
	CustomerBalanceTransactionTypeCreditNote            CustomerBalanceTransactionType = "credit_note"
	CustomerBalanceTransactionTypeInitial               CustomerBalanceTransactionType = "initial"
	CustomerBalanceTransactionTypeInvoiceTooLarge       CustomerBalanceTransactionType = "invoice_too_large"
	CustomerBalanceTransactionTypeInvoiceTooSmall       CustomerBalanceTransactionType = "invoice_too_small"
	CustomerBalanceTransactionTypeMigration             CustomerBalanceTransactionType = "migration"
	CustomerBalanceTransactionTypeUnappliedFromInvoice  CustomerBalanceTransactionType = "unapplied_from_invoice"
	CustomerBalanceTransactionTypeUnspentReceiverCredit CustomerBalanceTransactionType = "unspent_receiver_credit"
)

List of values that CustomerBalanceTransactionType can take

type CustomerCashBalanceParams

type CustomerCashBalanceParams struct {
	// Settings controlling the behavior of the customer's cash balance,
	// such as reconciliation of funds received.
	Settings *CustomerCashBalanceSettingsParams `form:"settings"`
}

Balance information and default balance settings for this customer.

type CustomerCashBalanceSettingsParams

type CustomerCashBalanceSettingsParams struct {
	// Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic` or `manual`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
	ReconciliationMode *string `form:"reconciliation_mode"`
}

Settings controlling the behavior of the customer's cash balance, such as reconciliation of funds received.

type CustomerCashBalanceTransaction

type CustomerCashBalanceTransaction struct {
	APIResource
	AppliedToPayment *CustomerCashBalanceTransactionAppliedToPayment `json:"applied_to_payment"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// The customer whose available cash balance changed as a result of this transaction.
	Customer *Customer `json:"customer"`
	// The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	EndingBalance int64                                 `json:"ending_balance"`
	Funded        *CustomerCashBalanceTransactionFunded `json:"funded"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
	NetAmount int64 `json:"net_amount"`
	// String representing the object's type. Objects of the same type share the same value.
	Object              string                                             `json:"object"`
	RefundedFromPayment *CustomerCashBalanceTransactionRefundedFromPayment `json:"refunded_from_payment"`
	// The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.
	Type                 CustomerCashBalanceTransactionType                  `json:"type"`
	UnappliedFromPayment *CustomerCashBalanceTransactionUnappliedFromPayment `json:"unapplied_from_payment"`
}

Customers with certain payments enabled have a cash balance, representing funds that were paid by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions represent when funds are moved into or out of this balance. This includes funding by the customer, allocation to payments, and refunds to the customer.

type CustomerCashBalanceTransactionAppliedToPayment

type CustomerCashBalanceTransactionAppliedToPayment struct {
	// The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.
	PaymentIntent *PaymentIntent `json:"payment_intent"`
}

type CustomerCashBalanceTransactionFunded

type CustomerCashBalanceTransactionFunded struct {
	BankTransfer *CustomerCashBalanceTransactionFundedBankTransfer `json:"bank_transfer"`
}

type CustomerCashBalanceTransactionFundedBankTransfer

type CustomerCashBalanceTransactionFundedBankTransfer struct {
	EUBankTransfer *CustomerCashBalanceTransactionFundedBankTransferEUBankTransfer `json:"eu_bank_transfer"`
	// The user-supplied reference field on the bank transfer.
	Reference string `json:"reference"`
	// The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
	Type CustomerCashBalanceTransactionFundedBankTransferType `json:"type"`
}

type CustomerCashBalanceTransactionFundedBankTransferEUBankTransfer

type CustomerCashBalanceTransactionFundedBankTransferEUBankTransfer struct {
	// The BIC of the bank of the sender of the funding.
	BIC string `json:"bic"`
	// The last 4 digits of the IBAN of the sender of the funding.
	IBANLast4 string `json:"iban_last4"`
	// The full name of the sender, as supplied by the sending bank.
	SenderName string `json:"sender_name"`
}

type CustomerCashBalanceTransactionFundedBankTransferType

type CustomerCashBalanceTransactionFundedBankTransferType string

The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.

const (
	CustomerCashBalanceTransactionFundedBankTransferTypeEUBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "eu_bank_transfer"
	CustomerCashBalanceTransactionFundedBankTransferTypeGBBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "gb_bank_transfer"
	CustomerCashBalanceTransactionFundedBankTransferTypeJPBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "jp_bank_transfer"
	CustomerCashBalanceTransactionFundedBankTransferTypeMXBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "mx_bank_transfer"
)

List of values that CustomerCashBalanceTransactionFundedBankTransferType can take

type CustomerCashBalanceTransactionList

type CustomerCashBalanceTransactionList struct {
	APIResource
	ListMeta
	Data []*CustomerCashBalanceTransaction `json:"data"`
}

CustomerCashBalanceTransactionList is a list of CustomerCashBalanceTransactions as retrieved from a list endpoint.

type CustomerCashBalanceTransactionListParams

type CustomerCashBalanceTransactionListParams struct {
	ListParams `form:"*"`
	Customer   *string `form:"-"` // Included in URL
}

Returns a list of transactions that modified the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).

type CustomerCashBalanceTransactionParams

type CustomerCashBalanceTransactionParams struct {
	Params   `form:"*"`
	Customer *string `form:"-"` // Included in URL
}

Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).

type CustomerCashBalanceTransactionRefundedFromPayment

type CustomerCashBalanceTransactionRefundedFromPayment struct {
	// The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance.
	Refund *Refund `json:"refund"`
}

type CustomerCashBalanceTransactionType

type CustomerCashBalanceTransactionType string

The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.

const (
	CustomerCashBalanceTransactionTypeAppliedToPayment     CustomerCashBalanceTransactionType = "applied_to_payment"
	CustomerCashBalanceTransactionTypeFunded               CustomerCashBalanceTransactionType = "funded"
	CustomerCashBalanceTransactionTypeRefundedFromPayment  CustomerCashBalanceTransactionType = "refunded_from_payment"
	CustomerCashBalanceTransactionTypeReturnCanceled       CustomerCashBalanceTransactionType = "return_canceled"
	CustomerCashBalanceTransactionTypeReturnInitiated      CustomerCashBalanceTransactionType = "return_initiated"
	CustomerCashBalanceTransactionTypeUnappliedFromPayment CustomerCashBalanceTransactionType = "unapplied_from_payment"
)

List of values that CustomerCashBalanceTransactionType can take

type CustomerCashBalanceTransactionUnappliedFromPayment

type CustomerCashBalanceTransactionUnappliedFromPayment struct {
	// The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from.
	PaymentIntent *PaymentIntent `json:"payment_intent"`
}

type CustomerCreateFundingInstructionsBankTransferEUBankTransferParams

type CustomerCreateFundingInstructionsBankTransferEUBankTransferParams struct {
	// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
	Country *string `form:"country"`
}

Configuration for eu_bank_transfer funding type.

type CustomerCreateFundingInstructionsBankTransferParams

type CustomerCreateFundingInstructionsBankTransferParams struct {
	// Configuration for eu_bank_transfer funding type.
	EUBankTransfer *CustomerCreateFundingInstructionsBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
	// List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
	//
	// Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
	RequestedAddressTypes []*string `form:"requested_address_types"`
	// The type of the `bank_transfer`
	Type *string `form:"type"`
}

Additional parameters for `bank_transfer` funding types

type CustomerCreateFundingInstructionsParams

type CustomerCreateFundingInstructionsParams struct {
	Params `form:"*"`
	// Additional parameters for `bank_transfer` funding types
	BankTransfer *CustomerCreateFundingInstructionsBankTransferParams `form:"bank_transfer"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// The `funding_type` to get the instructions for.
	FundingType *string `form:"funding_type"`
}

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new funding instructions will be created. If funding instructions have already been created for a given customer, the same funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

type CustomerDeleteDiscountParams

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

Removes the currently applied discount on a customer.

type CustomerInvoiceSettings

type CustomerInvoiceSettings struct {
	// Default custom fields to be displayed on invoices for this customer.
	CustomFields []*CustomerInvoiceSettingsCustomField `json:"custom_fields"`
	// ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
	DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"`
	// Default footer to be displayed on invoices for this customer.
	Footer string `json:"footer"`
	// Default options for invoice PDF rendering for this customer.
	RenderingOptions *CustomerInvoiceSettingsRenderingOptions `json:"rendering_options"`
}

type CustomerInvoiceSettingsCustomField

type CustomerInvoiceSettingsCustomField struct {
	// The name of the custom field.
	Name string `json:"name"`
	// The value of the custom field.
	Value string `json:"value"`
}

Default custom fields to be displayed on invoices for this customer.

type CustomerInvoiceSettingsCustomFieldParams

type CustomerInvoiceSettingsCustomFieldParams struct {
	// The name of the custom field. This may be up to 30 characters.
	Name *string `form:"name"`
	// The value of the custom field. This may be up to 30 characters.
	Value *string `form:"value"`
}

Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.

type CustomerInvoiceSettingsParams

type CustomerInvoiceSettingsParams struct {
	// Default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
	CustomFields []*CustomerInvoiceSettingsCustomFieldParams `form:"custom_fields"`
	// ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
	DefaultPaymentMethod *string `form:"default_payment_method"`
	// Default footer to be displayed on invoices for this customer.
	Footer *string `form:"footer"`
	// Default options for invoice PDF rendering for this customer.
	RenderingOptions *CustomerInvoiceSettingsRenderingOptionsParams `form:"rendering_options"`
}

Default invoice settings for this customer.

type CustomerInvoiceSettingsRenderingOptions

type CustomerInvoiceSettingsRenderingOptions struct {
	// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
	AmountTaxDisplay string `json:"amount_tax_display"`
}

Default options for invoice PDF rendering for this customer.

type CustomerInvoiceSettingsRenderingOptionsParams

type CustomerInvoiceSettingsRenderingOptionsParams struct {
	// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
	AmountTaxDisplay *string `form:"amount_tax_display"`
}

Default options for invoice PDF rendering for this customer.

type CustomerList

type CustomerList struct {
	APIResource
	ListMeta
	Data []*Customer `json:"data"`
}

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

type CustomerListParams

type CustomerListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.
	Email *string `form:"email"`
	// Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.
	TestClock *string `form:"test_clock"`
}

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

type CustomerListPaymentMethodsParams

type CustomerListPaymentMethodsParams struct {
	ListParams `form:"*"`
	Customer   *string `form:"-"` // Included in URL
	// A required filter on the list, based on the object `type` field.
	Type *string `form:"type"`
}

Returns a list of PaymentMethods for a given Customer

type CustomerParams

type CustomerParams struct {
	Params `form:"*"`
	// The customer's address.
	Address *AddressParams `form:"address"`
	// An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
	Balance *int64 `form:"balance"`
	// Balance information and default balance settings for this customer.
	CashBalance *CustomerCashBalanceParams `form:"cash_balance"`
	Coupon      *string                    `form:"coupon"`
	// If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter.
	//
	// Provide the ID of a payment source already attached to this customer to make it this customer's default payment source.
	//
	// If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property.
	DefaultSource *string `form:"default_source"`
	// An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
	Description *string `form:"description"`
	// Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.
	Email *string `form:"email"`
	// The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
	InvoicePrefix *string `form:"invoice_prefix"`
	// Default invoice settings for this customer.
	InvoiceSettings *CustomerInvoiceSettingsParams `form:"invoice_settings"`
	// The customer's full name or business name.
	Name *string `form:"name"`
	// The sequence to be used on the customer's next invoice. Defaults to 1.
	NextInvoiceSequence *int64  `form:"next_invoice_sequence"`
	PaymentMethod       *string `form:"payment_method"`
	// The customer's phone number.
	Phone *string `form:"phone"`
	// Customer's preferred languages, ordered by preference.
	PreferredLocales []*string `form:"preferred_locales"`
	// The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.
	PromotionCode *string `form:"promotion_code"`
	// The customer's shipping information. Appears on invoices emailed to this customer.
	Shipping *CustomerShippingParams `form:"shipping"`
	Source   *string                 `form:"source"`
	// Tax details about the customer.
	Tax *CustomerTaxParams `form:"tax"`
	// The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
	TaxExempt *string `form:"tax_exempt"`
	// The customer's tax IDs.
	TaxIDData []*CustomerTaxIDDataParams `form:"tax_id_data"`
	// ID of the test clock to attach to the customer.
	TestClock *string `form:"test_clock"`
	Validate  *bool   `form:"validate"`
}

Creates a new customer object.

type CustomerRetrievePaymentMethodParams

type CustomerRetrievePaymentMethodParams struct {
	Params   `form:"*"`
	Customer *string `form:"-"` // Included in URL
}

Retrieves a PaymentMethod object for a given Customer.

type CustomerSearchParams

type CustomerSearchParams struct {
	SearchParams `form:"*"`
	// A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
	Page *string `form:"page"`
}

Search for customers you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

type CustomerSearchResult

type CustomerSearchResult struct {
	APIResource
	SearchMeta
	Data []*Customer `json:"data"`
}

CustomerSearchResult is a list of Customer search results as retrieved from a search endpoint.

type CustomerShippingParams

type CustomerShippingParams struct {
	// Customer shipping address.
	Address *AddressParams `form:"address"`
	// Customer name.
	Name *string `form:"name"`
	// Customer phone (including extension).
	Phone *string `form:"phone"`
}

The customer's shipping information. Appears on invoices emailed to this customer.

type CustomerTax

type CustomerTax struct {
	// Surfaces if automatic tax computation is possible given the current customer location information.
	AutomaticTax CustomerTaxAutomaticTax `json:"automatic_tax"`
	// A recent IP address of the customer used for tax reporting and tax location inference.
	IPAddress string `json:"ip_address"`
	// The customer's location as identified by Stripe Tax.
	Location *CustomerTaxLocation `json:"location"`
}

type CustomerTaxAutomaticTax

type CustomerTaxAutomaticTax string

Surfaces if automatic tax computation is possible given the current customer location information.

const (
	CustomerTaxAutomaticTaxFailed               CustomerTaxAutomaticTax = "failed"
	CustomerTaxAutomaticTaxNotCollecting        CustomerTaxAutomaticTax = "not_collecting"
	CustomerTaxAutomaticTaxSupported            CustomerTaxAutomaticTax = "supported"
	CustomerTaxAutomaticTaxUnrecognizedLocation CustomerTaxAutomaticTax = "unrecognized_location"
)

List of values that CustomerTaxAutomaticTax can take

type CustomerTaxExempt

type CustomerTaxExempt string

Describes the customer's tax exemption status. One of `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the text **"Reverse charge"**.

const (
	CustomerTaxExemptExempt  CustomerTaxExempt = "exempt"
	CustomerTaxExemptNone    CustomerTaxExempt = "none"
	CustomerTaxExemptReverse CustomerTaxExempt = "reverse"
)

List of values that CustomerTaxExempt can take

type CustomerTaxIDDataParams

type CustomerTaxIDDataParams struct {
	// Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
	Type *string `form:"type"`
	// Value of the tax ID.
	Value *string `form:"value"`
}

The customer's tax IDs.

type CustomerTaxLocation

type CustomerTaxLocation struct {
	// The customer's country as identified by Stripe Tax.
	Country string `json:"country"`
	// The data source used to infer the customer's location.
	Source CustomerTaxLocationSource `json:"source"`
	// The customer's state, county, province, or region as identified by Stripe Tax.
	State string `json:"state"`
}

The customer's location as identified by Stripe Tax.

type CustomerTaxLocationSource

type CustomerTaxLocationSource string

The data source used to infer the customer's location.

const (
	CustomerTaxLocationSourceBillingAddress      CustomerTaxLocationSource = "billing_address"
	CustomerTaxLocationSourceIPAddress           CustomerTaxLocationSource = "ip_address"
	CustomerTaxLocationSourcePaymentMethod       CustomerTaxLocationSource = "payment_method"
	CustomerTaxLocationSourceShippingDestination CustomerTaxLocationSource = "shipping_destination"
)

List of values that CustomerTaxLocationSource can take

type CustomerTaxParams

type CustomerTaxParams struct {
	// A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
	IPAddress *string `form:"ip_address"`
}

Tax details about the customer.

type Deauthorize

type Deauthorize struct {
	APIResource
	StripeUserID string `json:"stripe_user_id"`
}

Deauthorize is the value of the return from deauthorizing. https://stripe.com/docs/connect/oauth-reference#post-deauthorize

type DeauthorizeParams

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

DeauthorizeParams for deauthorizing an account.

type DeclineCode

type DeclineCode string

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"
	DeclineCodeInvalidExpiryMonth             DeclineCode = "invalid_expiry_month"
	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"
	DeclineCodeOfflinePINRequired             DeclineCode = "offline_pin_required"
	DeclineCodeOnlineOrOfflinePINRequired     DeclineCode = "online_or_offline_pin_required"
	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. For descriptions see https://stripe.com/docs/declines/codes

type Discount

type Discount struct {
	// The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
	CheckoutSession string `json:"checkout_session"`
	// A coupon contains information about a percent-off or amount-off discount you
	// might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
	// [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
	Coupon *Coupon `json:"coupon"`
	// The ID of the customer associated with this discount.
	Customer *Customer `json:"customer"`
	Deleted  bool      `json:"deleted"`
	// If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.
	End int64 `json:"end"`
	// The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.
	ID string `json:"id"`
	// The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
	Invoice string `json:"invoice"`
	// The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
	InvoiceItem string `json:"invoice_item"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The promotion code applied to create this discount.
	PromotionCode *PromotionCode `json:"promotion_code"`
	// Date that the coupon was applied.
	Start int64 `json:"start"`
	// The subscription that this coupon is applied to, if it is applied to a particular subscription.
	Subscription string `json:"subscription"`
}

A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). It contains information about when the discount began, when it will end, and what it is applied to.

Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).

func (*Discount) UnmarshalJSON

func (d *Discount) UnmarshalJSON(data []byte) error

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

type Dispute

type Dispute struct {
	APIResource
	// Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed).
	Amount int64 `json:"amount"`
	// List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
	BalanceTransactions []*BalanceTransaction `json:"balance_transactions"`
	// ID of the charge that was disputed.
	Charge *Charge `json:"charge"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency        Currency                `json:"currency"`
	Evidence        *DisputeEvidence        `json:"evidence"`
	EvidenceDetails *DisputeEvidenceDetails `json:"evidence_details"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute.
	IsChargeRefundable bool `json:"is_charge_refundable"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// Network-dependent reason code for the dispute.
	NetworkReasonCode string `json:"network_reason_code"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// ID of the PaymentIntent that was disputed.
	PaymentIntent *PaymentIntent `json:"payment_intent"`
	// Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories).
	Reason DisputeReason `json:"reason"`
	// Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`.
	Status DisputeStatus `json:"status"`
}

A dispute occurs when a customer questions your charge with their card issuer. When this happens, you're given the opportunity to respond to the dispute with evidence that shows that the charge is legitimate. You can find more information about the dispute process in our [Disputes and Fraud](https://stripe.com/docs/disputes) documentation.

Related guide: [Disputes and Fraud](https://stripe.com/docs/disputes).

func (*Dispute) UnmarshalJSON

func (d *Dispute) UnmarshalJSON(data []byte) error

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

type DisputeEvidence struct {
	// Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.
	AccessActivityLog string `json:"access_activity_log"`
	// The billing address provided by the customer.
	BillingAddress string `json:"billing_address"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.
	CancellationPolicy *File `json:"cancellation_policy"`
	// An explanation of how and when the customer was shown your refund policy prior to purchase.
	CancellationPolicyDisclosure string `json:"cancellation_policy_disclosure"`
	// A justification for why the customer's subscription was not canceled.
	CancellationRebuttal string `json:"cancellation_rebuttal"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service.
	CustomerCommunication *File `json:"customer_communication"`
	// The email address of the customer.
	CustomerEmailAddress string `json:"customer_email_address"`
	// The name of the customer.
	CustomerName string `json:"customer_name"`
	// The IP address that the customer used when making the purchase.
	CustomerPurchaseIP string `json:"customer_purchase_ip"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.
	CustomerSignature *File `json:"customer_signature"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate.
	DuplicateChargeDocumentation *File `json:"duplicate_charge_documentation"`
	// An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate.
	DuplicateChargeExplanation string `json:"duplicate_charge_explanation"`
	// The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.
	DuplicateChargeID string `json:"duplicate_charge_id"`
	// A description of the product or service that was sold.
	ProductDescription string `json:"product_description"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge.
	Receipt *File `json:"receipt"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.
	RefundPolicy *File `json:"refund_policy"`
	// Documentation demonstrating that the customer was shown your refund policy prior to purchase.
	RefundPolicyDisclosure string `json:"refund_policy_disclosure"`
	// A justification for why the customer is not entitled to a refund.
	RefundRefusalExplanation string `json:"refund_refusal_explanation"`
	// The date on which the customer received or began receiving the purchased service, in a clear human-readable format.
	ServiceDate string `json:"service_date"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.
	ServiceDocumentation *File `json:"service_documentation"`
	// The address to which a physical product was shipped. You should try to include as complete address information as possible.
	ShippingAddress string `json:"shipping_address"`
	// The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.
	ShippingCarrier string `json:"shipping_carrier"`
	// The date on which a physical product began its route to the shipping address, in a clear human-readable format.
	ShippingDate string `json:"shipping_date"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.
	ShippingDocumentation *File `json:"shipping_documentation"`
	// The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
	ShippingTrackingNumber string `json:"shipping_tracking_number"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.
	UncategorizedFile *File `json:"uncategorized_file"`
	// Any additional evidence or statements.
	UncategorizedText string `json:"uncategorized_text"`
}

type DisputeEvidenceDetails

type DisputeEvidenceDetails struct {
	// Date by which evidence must be submitted in order to successfully challenge dispute. Will be null if the customer's bank or credit card company doesn't allow a response for this particular dispute.
	DueBy int64 `json:"due_by"`
	// Whether evidence has been staged for this dispute.
	HasEvidence bool `json:"has_evidence"`
	// Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed.
	PastDue bool `json:"past_due"`
	// The number of times evidence has been submitted. Typically, you may only submit evidence once.
	SubmissionCount int64 `json:"submission_count"`
}

type DisputeEvidenceParams

type DisputeEvidenceParams struct {
	// Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000.
	AccessActivityLog *string `form:"access_activity_log"`
	// The billing address provided by the customer.
	BillingAddress *string `form:"billing_address"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.
	CancellationPolicy *string `form:"cancellation_policy"`
	// An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
	CancellationPolicyDisclosure *string `form:"cancellation_policy_disclosure"`
	// A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000.
	CancellationRebuttal *string `form:"cancellation_rebuttal"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service.
	CustomerCommunication *string `form:"customer_communication"`
	// The email address of the customer.
	CustomerEmailAddress *string `form:"customer_email_address"`
	// The name of the customer.
	CustomerName *string `form:"customer_name"`
	// The IP address that the customer used when making the purchase.
	CustomerPurchaseIP *string `form:"customer_purchase_ip"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.
	CustomerSignature *string `form:"customer_signature"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate.
	DuplicateChargeDocumentation *string `form:"duplicate_charge_documentation"`
	// An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000.
	DuplicateChargeExplanation *string `form:"duplicate_charge_explanation"`
	// The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.
	DuplicateChargeID *string `form:"duplicate_charge_id"`
	// A description of the product or service that was sold. Has a maximum character count of 20,000.
	ProductDescription *string `form:"product_description"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge.
	Receipt *string `form:"receipt"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.
	RefundPolicy *string `form:"refund_policy"`
	// Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
	RefundPolicyDisclosure *string `form:"refund_policy_disclosure"`
	// A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000.
	RefundRefusalExplanation *string `form:"refund_refusal_explanation"`
	// The date on which the customer received or began receiving the purchased service, in a clear human-readable format.
	ServiceDate *string `form:"service_date"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.
	ServiceDocumentation *string `form:"service_documentation"`
	// The address to which a physical product was shipped. You should try to include as complete address information as possible.
	ShippingAddress *string `form:"shipping_address"`
	// The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.
	ShippingCarrier *string `form:"shipping_carrier"`
	// The date on which a physical product began its route to the shipping address, in a clear human-readable format.
	ShippingDate *string `form:"shipping_date"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.
	ShippingDocumentation *string `form:"shipping_documentation"`
	// The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
	ShippingTrackingNumber *string `form:"shipping_tracking_number"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.
	UncategorizedFile *string `form:"uncategorized_file"`
	// Any additional evidence or statements. Has a maximum character count of 20,000.
	UncategorizedText *string `form:"uncategorized_text"`
}

Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.

type DisputeList

type DisputeList struct {
	APIResource
	ListMeta
	Data []*Dispute `json:"data"`
}

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

type DisputeListParams

type DisputeListParams struct {
	ListParams `form:"*"`
	// Only return disputes associated to the charge specified by this charge ID.
	Charge       *string           `form:"charge"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.
	PaymentIntent *string `form:"payment_intent"`
}

Returns a list of your disputes.

type DisputeParams

type DisputeParams struct {
	Params `form:"*"`
	// Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.
	Evidence *DisputeEvidenceParams `form:"evidence"`
	// Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).
	Submit *bool `form:"submit"`
}

Retrieves the dispute with the given ID.

type DisputeReason

type DisputeReason string

Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories).

const (
	DisputeReasonBankCannotProcess       DisputeReason = "bank_cannot_process"
	DisputeReasonCheckReturned           DisputeReason = "check_returned"
	DisputeReasonCreditNotProcessed      DisputeReason = "credit_not_processed"
	DisputeReasonCustomerInitiated       DisputeReason = "customer_initiated"
	DisputeReasonDebitNotAuthorized      DisputeReason = "debit_not_authorized"
	DisputeReasonDuplicate               DisputeReason = "duplicate"
	DisputeReasonFraudulent              DisputeReason = "fraudulent"
	DisputeReasonGeneral                 DisputeReason = "general"
	DisputeReasonIncorrectAccountDetails DisputeReason = "incorrect_account_details"
	DisputeReasonInsufficientFunds       DisputeReason = "insufficient_funds"
	DisputeReasonProductNotReceived      DisputeReason = "product_not_received"
	DisputeReasonProductUnacceptable     DisputeReason = "product_unacceptable"
	DisputeReasonSubscriptionCanceled    DisputeReason = "subscription_canceled"
	DisputeReasonUnrecognized            DisputeReason = "unrecognized"
)

List of values that DisputeReason can take

type DisputeStatus

type DisputeStatus string

Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `charge_refunded`, `won`, or `lost`.

const (
	DisputeStatusChargeRefunded       DisputeStatus = "charge_refunded"
	DisputeStatusLost                 DisputeStatus = "lost"
	DisputeStatusNeedsResponse        DisputeStatus = "needs_response"
	DisputeStatusUnderReview          DisputeStatus = "under_review"
	DisputeStatusWarningClosed        DisputeStatus = "warning_closed"
	DisputeStatusWarningNeedsResponse DisputeStatus = "warning_needs_response"
	DisputeStatusWarningUnderReview   DisputeStatus = "warning_under_review"
	DisputeStatusWon                  DisputeStatus = "won"
)

List of values that DisputeStatus can take

type EphemeralKey

type EphemeralKey struct {
	APIResource
	AssociatedObjects []struct {
		ID   string `json:"id"`
		Type string `json:"type"`
	} `json:"associated_objects"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Time at which the key will expire. Measured in seconds since the Unix epoch.
	Expires int64 `json:"expires"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The key's secret. You can use this value to make authorized requests to the Stripe API.
	Secret string `json:"secret"`
	// RawJSON is provided so that it may be passed back to the frontend
	// unchanged.  Ephemeral keys are issued on behalf of another client which
	// may be running a different version of the bindings and thus expect a
	// different JSON structure.  This ensures that if the structure differs
	// from the version of these bindings, we can still pass back a compatible
	// key.
	RawJSON []byte `json:"-"`
}

func (*EphemeralKey) UnmarshalJSON

func (e *EphemeralKey) UnmarshalJSON(data []byte) error

type EphemeralKeyParams

type EphemeralKeyParams struct {
	Params `form:"*"`
	// The ID of the Customer you'd like to modify using the resulting ephemeral key.
	Customer *string `form:"customer"`
	// The ID of the Issuing Card you'd like to access using the resulting ephemeral key.
	IssuingCard   *string `form:"issuing_card"`
	StripeVersion *string `form:"-"` // This goes in the `Stripe-Version` header
}

Creates a short-lived API key for a given resource.

type Error

type Error struct {
	APIResource

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

	// Err contains an internal error with an additional level of granularity
	// that can be used in some cases to get more detailed information about
	// what went wrong. For example, Err may hold a CardError that indicates
	// exactly what went wrong during charging a card.
	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"`
	PaymentMethodType PaymentMethodType `json:"payment_method_type,omitempty"`
	RequestID         string            `json:"request_id,omitempty"`
	SetupIntent       *SetupIntent      `json:"setup_intent,omitempty"`
	Source            *PaymentSource    `json:"source,omitempty"`
	Type              ErrorType         `json:"type"`

	// OAuth specific Error properties. Named OAuthError because of name conflict.
	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.

func (*Error) Error

func (e *Error) Error() string

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

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap returns the wrapped typed error.

type ErrorCode

type ErrorCode string

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

const (
	ErrorCodeAccountCountryInvalidAddress                                ErrorCode = "account_country_invalid_address"
	ErrorCodeAccountErrorCountryChangeRequiresAdditionalSteps            ErrorCode = "account_error_country_change_requires_additional_steps"
	ErrorCodeAccountInformationMismatch                                  ErrorCode = "account_information_mismatch"
	ErrorCodeAccountInvalid                                              ErrorCode = "account_invalid"
	ErrorCodeAccountNumberInvalid                                        ErrorCode = "account_number_invalid"
	ErrorCodeACSSDebitSessionIncomplete                                  ErrorCode = "acss_debit_session_incomplete"
	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"
	ErrorCodeBankAccountBadRoutingNumbers                                ErrorCode = "bank_account_bad_routing_numbers"
	ErrorCodeBankAccountDeclined                                         ErrorCode = "bank_account_declined"
	ErrorCodeBankAccountExists                                           ErrorCode = "bank_account_exists"
	ErrorCodeBankAccountUnusable                                         ErrorCode = "bank_account_unusable"
	ErrorCodeBankAccountUnverified                                       ErrorCode = "bank_account_unverified"
	ErrorCodeBankAccountVerificationFailed                               ErrorCode = "bank_account_verification_failed"
	ErrorCodeBillingInvalidMandate                                       ErrorCode = "billing_invalid_mandate"
	ErrorCodeBitcoinUpgradeRequired                                      ErrorCode = "bitcoin_upgrade_required"
	ErrorCodeCardDeclinedRateLimitExceeded                               ErrorCode = "card_decline_rate_limit_exceeded"
	ErrorCodeCardDeclined                                                ErrorCode = "card_declined"
	ErrorCodeCardholderPhoneNumberRequired                               ErrorCode = "cardholder_phone_number_required"
	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"
	ErrorCodeChargeInvalidParameter                                      ErrorCode = "charge_invalid_parameter"
	ErrorCodeClearingCodeUnsupported                                     ErrorCode = "clearing_code_unsupported"
	ErrorCodeCountryCodeInvalid                                          ErrorCode = "country_code_invalid"
	ErrorCodeCountryUnsupported                                          ErrorCode = "country_unsupported"
	ErrorCodeCouponExpired                                               ErrorCode = "coupon_expired"
	ErrorCodeCustomerMaxPaymentMethods                                   ErrorCode = "customer_max_payment_methods"
	ErrorCodeCustomerMaxSubscriptions                                    ErrorCode = "customer_max_subscriptions"
	ErrorCodeDebitNotAuthorized                                          ErrorCode = "debit_not_authorized"
	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"
	ErrorCodeinstantPayoutsLimitExceeded                                 ErrorCode = "instant_payouts_limit_exceeded"
	ErrorCodeInstantPayoutsUnsupported                                   ErrorCode = "instant_payouts_unsupported"
	ErrorCodeInsufficientFunds                                           ErrorCode = "insufficient_funds"
	ErrorCodeIntentInvalidState                                          ErrorCode = "intent_invalid_state"
	ErrorCodeIntentVerificationMethodMissing                             ErrorCode = "intent_verification_method_missing"
	ErrorCodeInvalidCardType                                             ErrorCode = "invalid_card_type"
	ErrorCodeInvalidCharacters                                           ErrorCode = "invalid_characters"
	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"
	ErrorCodeInvoiceNoPaymentMethodTypes                                 ErrorCode = "invoice_no_payment_method_types"
	ErrorCodeInvoiceNoSubscriptionLineItems                              ErrorCode = "invoice_no_subscription_line_items"
	ErrorCodeInvoiceNotEditable                                          ErrorCode = "invoice_not_editable"
	ErrorCodeInvoiceOnBehalfOfNotEditable                                ErrorCode = "invoice_on_behalf_of_not_editable"
	ErrorCodeInvoicePamentIntentRequiresAction                           ErrorCode = "invoice_payment_intent_requires_action"
	ErrorCodeInvoiceUpcomingNone                                         ErrorCode = "invoice_upcoming_none"
	ErrorCodeLivemodeMismatch                                            ErrorCode = "livemode_mismatch"
	ErrorCodeLockTimeout                                                 ErrorCode = "lock_timeout"
	ErrorCodeMissing                                                     ErrorCode = "missing"
	ErrorCodeNoAccount                                                   ErrorCode = "no_account"
	ErrorCodeNotAllowedOnStandardAccount                                 ErrorCode = "not_allowed_on_standard_account"
	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"
	ErrorCodePaymentIntentActionRequired                                 ErrorCode = "payment_intent_action_required"
	ErrorCodePaymentIntentAuthenticationFailure                          ErrorCode = "payment_intent_authentication_failure"
	ErrorCodePaymentIntentIncompatiblePaymentMethod                      ErrorCode = "payment_intent_incompatible_payment_method"
	ErrorCodePaymentIntentInvalidParameter                               ErrorCode = "payment_intent_invalid_parameter"
	ErrorCodePaymentIntentKonbiniRejectedConfirmationNumber              ErrorCode = "payment_intent_konbini_rejected_confirmation_number"
	ErrorCodePaymentIntentMandateInvalid                                 ErrorCode = "payment_intent_mandate_invalid"
	ErrorCodePaymentIntentPaymentAttemptExpired                          ErrorCode = "payment_intent_payment_attempt_expired"
	ErrorCodePaymentIntentPaymentAttemptFailed                           ErrorCode = "payment_intent_payment_attempt_failed"
	ErrorCodePaymentIntentUnexpectedState                                ErrorCode = "payment_intent_unexpected_state"
	ErrorCodePaymentMethodBankAccountAlreadyVerified                     ErrorCode = "payment_method_bank_account_already_verified"
	ErrorCodePaymentMethodBankAccountBlocked                             ErrorCode = "payment_method_bank_account_blocked"
	ErrorCodePaymentMethodBillingDetailsAddressMissing                   ErrorCode = "payment_method_billing_details_address_missing"
	ErrorCodePaymentMethodCurrencyMismatch                               ErrorCode = "payment_method_currency_mismatch"
	ErrorCodePaymentMethodInvalidParameter                               ErrorCode = "payment_method_invalid_parameter"
	ErrorCodePaymentMethodInvalidParameterTestmode                       ErrorCode = "payment_method_invalid_parameter_testmode"
	ErrorCodePaymentMethodMicrodepositFailed                             ErrorCode = "payment_method_microdeposit_failed"
	ErrorCodePaymentMethodMicrodepositVerificationAmountsInvalid         ErrorCode = "payment_method_microdeposit_verification_amounts_invalid"
	ErrorCodePaymentMethodMicrodepositVerificationAmountsMismatch        ErrorCode = "payment_method_microdeposit_verification_amounts_mismatch"
	ErrorCodePaymentMethodMicrodepositVerificationAttemptsExceeded       ErrorCode = "payment_method_microdeposit_verification_attempts_exceeded"
	ErrorCodePaymentMethodMicrodepositVerificationDescriptorCodeMismatch ErrorCode = "payment_method_microdeposit_verification_descriptor_code_mismatch"
	ErrorCodePaymentMethodMicrodepositVerificationTimeout                ErrorCode = "payment_method_microdeposit_verification_timeout"
	ErrorCodePaymentMethodProviderDecline                                ErrorCode = "payment_method_provider_decline"
	ErrorCodePaymentMethodProviderTimeout                                ErrorCode = "payment_method_provider_timeout"
	ErrorCodePaymentMethodUnactivated                                    ErrorCode = "payment_method_unactivated"
	ErrorCodePaymentMethodUnexpectedState                                ErrorCode = "payment_method_unexpected_state"
	ErrorCodePaymentMethodUnsupportedType                                ErrorCode = "payment_method_unsupported_type"
	ErrorCodePayoutsNotAllowed                                           ErrorCode = "payouts_not_allowed"
	ErrorCodePlatformAccountRequired                                     ErrorCode = "platform_account_required"
	ErrorCodePlatformAPIKeyExpired                                       ErrorCode = "platform_api_key_expired"
	ErrorCodePostalCodeInvalid                                           ErrorCode = "postal_code_invalid"
	ErrorCodeProcessingError                                             ErrorCode = "processing_error"
	ErrorCodeProductInactive                                             ErrorCode = "product_inactive"
	ErrorCodeRateLimit                                                   ErrorCode = "rate_limit"
	ErrorCodeReferToCustomer                                             ErrorCode = "refer_to_customer"
	ErrorCodeRefundDisputedPayment                                       ErrorCode = "refund_disputed_payment"
	ErrorCodeResourceAlreadyExists                                       ErrorCode = "resource_already_exists"
	ErrorCodeResourceMissing                                             ErrorCode = "resource_missing"
	ErrorCodeReturnIntentAlreadyProcessed                                ErrorCode = "return_intent_already_processed"
	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"
	ErrorCodeSetupIntentInvalidParameter                                 ErrorCode = "setup_intent_invalid_parameter"
	ErrorCodeSetupIntentSetupAttemptExpired                              ErrorCode = "setup_intent_setup_attempt_expired"
	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"
	ErrorCodeTerminalLocationCountryUnsupported                          ErrorCode = "terminal_location_country_unsupported"
	ErrorCodeTestmodeChargesOnly                                         ErrorCode = "testmode_charges_only"
	ErrorCodeTLSVersionUnsupported                                       ErrorCode = "tls_version_unsupported"
	ErrorCodeTokenAlreadyUsed                                            ErrorCode = "token_already_used"
	ErrorCodeTokenInUse                                                  ErrorCode = "token_in_use"
	ErrorCodeTransferSourceBalanceParametersMismatch                     ErrorCode = "transfer_source_balance_parameters_mismatch"
	ErrorCodeTransfersNotAllowed                                         ErrorCode = "transfers_not_allowed"
	ErrorCodeURLInvalid                                                  ErrorCode = "url_invalid"

	// The following error code can be returned though is undocumented
	ErrorCodeInvalidSwipeData ErrorCode = "invalid_swipe_data"
)

List of values that ErrorCode can take. For descriptions see https://stripe.com/docs/error-codes

type ErrorType

type ErrorType string

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

const (
	ErrorTypeAPI            ErrorType = "api_error"
	ErrorTypeCard           ErrorType = "card_error"
	ErrorTypeIdempotency    ErrorType = "idempotency_error"
	ErrorTypeInvalidRequest ErrorType = "invalid_request_error"
)

List of values that ErrorType can take.

type Event

type Event struct {
	APIResource
	// The connected account that originated the event.
	Account string `json:"account"`
	// The Stripe API version used to render `data`. *Note: This property is populated only for events on or after October 31, 2014*.
	APIVersion string `json:"api_version"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64      `json:"created"`
	Data    *EventData `json:"data"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified.
	PendingWebhooks int64 `json:"pending_webhooks"`
	// Information on the API request that instigated the event.
	Request *EventRequest `json:"request"`
	// Description of the event (e.g., `invoice.created` or `charge.refunded`).
	Type string `json:"type"`
}

Events are our way of letting you know when something interesting happens in your account. When an interesting event occurs, we create a new `Event` object. For example, when a charge succeeds, we create a `charge.succeeded` event; and when an invoice payment attempt fails, we create an `invoice.payment_failed` event. Note that many API requests may cause multiple events to be created. For example, if you create a new subscription for a customer, you will receive both a `customer.subscription.created` event and a `charge.succeeded` event.

Events occur when the state of another API resource changes. The state of that resource at the time of the change is embedded in the event's data field. For example, a `charge.succeeded` event will contain a charge, and an `invoice.payment_failed` event will contain an invoice.

As with other API resources, you can use endpoints to retrieve an [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events) from the API. We also have a separate [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the `Event` objects directly to an endpoint on your server. Webhooks are managed in your [account settings](https://dashboard.stripe.com/account/webhooks), and our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.

When using [Connect](https://stripe.com/docs/connect), you can also receive notifications of events that occur in connected accounts. For these events, there will be an additional `account` attribute in the received `Event` object.

**NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is guaranteed only for 30 days.

func (*Event) GetObjectValue

func (e *Event) GetObjectValue(keys ...string) string

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

func (*Event) GetPreviousValue

func (e *Event) GetPreviousValue(keys ...string) string

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

type EventData

type EventData struct {
	// Object is a raw mapping of the API resource contained in the event.
	// Although marked with json:"-", it's still populated independently by
	// a custom UnmarshalJSON implementation.
	// Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key.
	Object map[string]interface{} `json:"-"`
	// Object containing the names of the attributes that have changed, and their previous values (sent along only with *.updated events).
	PreviousAttributes map[string]interface{} `json:"previous_attributes"`
	Raw                json.RawMessage        `json:"object"`
}

func (*EventData) UnmarshalJSON

func (e *EventData) UnmarshalJSON(data []byte) error

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

type EventList

type EventList struct {
	APIResource
	ListMeta
	Data []*Event `json:"data"`
}

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

type EventListParams

type EventListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.
	DeliverySuccess *bool `form:"delivery_success"`
	// A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.
	Type *string `form:"type"`
	// An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both.
	Types []*string `form:"types"`
}

List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://stripe.com/docs/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).

type EventParams

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

Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.

type EventRequest

type EventRequest struct {
	// ID is the request ID of the request that created an event, if the event
	// was created by a request.
	// ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.
	ID string `json:"id"`

	// IdempotencyKey is the idempotency key of the request that created an
	// event, if the event was created by a request and if an idempotency key
	// was specified for that request.
	// The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.
	IdempotencyKey string `json:"idempotency_key"`
}

Information on the API request that instigated the event.

type ExtraValues

type ExtraValues struct {
	url.Values `form:"-"` // See custom AppendTo implementation
}

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.

func (ExtraValues) AppendTo

func (v ExtraValues) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom form encoding for extra parameter values.

type FeeRefund

type FeeRefund struct {
	APIResource
	// Amount, in %s.
	Amount int64 `json:"amount"`
	// Balance transaction that describes the impact on your account balance.
	BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// ID of the application fee that was refunded.
	Fee *ApplicationFee `json:"fee"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
}

`Application Fee Refund` objects allow you to refund an application fee that has previously been created but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected.

Related guide: [Refunding Application Fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee).

func (*FeeRefund) UnmarshalJSON

func (f *FeeRefund) UnmarshalJSON(data []byte) error

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.

type FeeRefundList

type FeeRefundList struct {
	APIResource
	ListMeta
	Data []*FeeRefund `json:"data"`
}

FeeRefundList is a list of FeeRefunds as retrieved from a list endpoint.

type FeeRefundListParams

type FeeRefundListParams struct {
	ListParams `form:"*"`
	ID         *string `form:"-"` // Included in URL
}

You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.

type FeeRefundParams

type FeeRefundParams struct {
	Params `form:"*"`
	Fee    *string `form:"-"` // Included in URL
	ID     *string `form:"-"` // Included in URL
	// A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.
	Amount *int64 `form:"amount"`
}

Refunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected.

You can optionally refund only part of an application fee. You can do so multiple times, until the entire fee has been refunded.

Once entirely refunded, an application fee can't be refunded again. This method will raise an error when called on an already-refunded application fee, or when trying to refund more money than is left on an application fee.

type File

type File struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The time at which the file expires and is no longer available in epoch seconds.
	ExpiresAt int64 `json:"expires_at"`
	// A filename for the file, suitable for saving to a filesystem.
	Filename string `json:"filename"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.
	Links *FileLinkList `json:"links"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
	Purpose FilePurpose `json:"purpose"`
	// The size in bytes of the file object.
	Size int64 `json:"size"`
	// A user friendly title for the document.
	Title string `json:"title"`
	// The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`).
	Type string `json:"type"`
	// The URL from which the file can be downloaded using your live secret API key.
	URL string `json:"url"`
}

This is an object representing a file hosted on Stripe's servers. The file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file) request (for example, when uploading dispute evidence) or it may have been created by Stripe (for example, the results of a [Sigma scheduled query](https://stripe.com/docs/api#scheduled_queries)).

Related guide: [File Upload Guide](https://stripe.com/docs/file-upload).

func (*File) UnmarshalJSON

func (f *File) UnmarshalJSON(data []byte) error

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

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 {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Whether this link is already expired.
	Expired bool `json:"expired"`
	// Time at which the link expires.
	ExpiresAt int64 `json:"expires_at"`
	// The file object this link points to.
	File *File `json:"file"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The publicly accessible URL to download the file.
	URL string `json:"url"`
}

To share the contents of a `File` object with non-Stripe users, you can create a `FileLink`. `FileLink`s contain a URL that can be used to retrieve the contents of the file without authentication.

type FileLinkList struct {
	APIResource
	ListMeta
	Data []*FileLink `json:"data"`
}

FileLinkList is a list of FileLinks as retrieved from a list endpoint.

type FileLinkListParams

type FileLinkListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// Filter links by their expiration status. By default, all links are returned.
	Expired *bool `form:"expired"`
	// Only return links for the given file.
	File *string `form:"file"`
}

Returns a list of file links.

type FileLinkParams

type FileLinkParams struct {
	Params `form:"*"`
	// A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately.
	ExpiresAt    *int64 `form:"expires_at"`
	ExpiresAtNow *bool  `form:"-"` // See custom AppendTo
	// The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, or `tax_document_user_upload`.
	File *string `form:"file"`
}

Retrieves the file link with the given ID.

func (*FileLinkParams) AppendTo

func (f *FileLinkParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for FileLinkParams.

type FileList

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

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

type FileListParams

type FileListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// The file purpose to filter queries by. If none is provided, files will not be filtered by purpose.
	Purpose *string `form:"purpose"`
}

Returns a list of the files that your account has access to. The files are returned sorted by creation date, with the most recently created files appearing first.

type FileParams

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

	// FileReader is a reader with the contents of the file that should be uploaded.
	FileReader io.Reader

	// Filename is just the name of the file without path information.
	Filename     *string
	Purpose      *string
	FileLinkData *FileFileLinkDataParams
}

To upload a file to Stripe, you'll need to send a request of type multipart/form-data. The request should contain the file you would like to upload, as well as the parameters for creating a file.

All of Stripe's officially supported Client libraries should have support for sending multipart/form-data.

func (*FileParams) GetBody

func (f *FileParams) GetBody() (*bytes.Buffer, string, error)

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

type FilePurpose

type FilePurpose string

The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.

const (
	FilePurposeAccountRequirement               FilePurpose = "account_requirement"
	FilePurposeAdditionalVerification           FilePurpose = "additional_verification"
	FilePurposeBusinessIcon                     FilePurpose = "business_icon"
	FilePurposeCustomerSignature                FilePurpose = "customer_signature"
	FilePurposeDisputeEvidence                  FilePurpose = "dispute_evidence"
	FilePurposeDocumentProviderIdentityDocument FilePurpose = "document_provider_identity_document"
	FilePurposeFinanceReportRun                 FilePurpose = "finance_report_run"
	FilePurposeIdentityDocument                 FilePurpose = "identity_document"
	FilePurposeIdentityDocumentDownloadable     FilePurpose = "identity_document_downloadable"
	FilePurposePCIDocument                      FilePurpose = "pci_document"
	FilePurposeSelfie                           FilePurpose = "selfie"
	FilePurposeSigmaScheduledQuery              FilePurpose = "sigma_scheduled_query"
	FilePurposeTaxDocumentUserUpload            FilePurpose = "tax_document_user_upload"
)

List of values that FilePurpose can take

type Filters

type Filters struct {
	// contains filtered or unexported fields
}

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

func (*Filters) AddFilter

func (f *Filters) AddFilter(key, op, value string)

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

func (Filters) AppendTo

func (f Filters) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom form encoding for filters.

type FinancialConnectionsAccount

type FinancialConnectionsAccount struct {
	APIResource
	// The account holder that this account belongs to.
	AccountHolder *FinancialConnectionsAccountAccountHolder `json:"account_holder"`
	// The most recent information about the account's balance.
	Balance *FinancialConnectionsAccountBalance `json:"balance"`
	// The state of the most recent attempt to refresh the account balance.
	BalanceRefresh *FinancialConnectionsAccountBalanceRefresh `json:"balance_refresh"`
	// The type of the account. Account category is further divided in `subcategory`.
	Category FinancialConnectionsAccountCategory `json:"category"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// A human-readable name that has been assigned to this account, either by the account holder or by the institution.
	DisplayName string `json:"display_name"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The name of the institution that holds this account.
	InstitutionName string `json:"institution_name"`
	// The last 4 digits of the account number. If present, this will be 4 numeric characters.
	Last4 string `json:"last4"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The most recent information about the account's owners.
	Ownership *FinancialConnectionsAccountOwnership `json:"ownership"`
	// The state of the most recent attempt to refresh the account owners.
	OwnershipRefresh *FinancialConnectionsAccountOwnershipRefresh `json:"ownership_refresh"`
	// The list of permissions granted by this account.
	Permissions []FinancialConnectionsAccountPermission `json:"permissions"`
	// The status of the link to the account.
	Status FinancialConnectionsAccountStatus `json:"status"`
	// If `category` is `cash`, one of:
	//
	//  - `checking`
	//  - `savings`
	//  - `other`
	//
	// If `category` is `credit`, one of:
	//
	//  - `mortgage`
	//  - `line_of_credit`
	//  - `credit_card`
	//  - `other`
	//
	// If `category` is `investment` or `other`, this will be `other`.
	Subcategory FinancialConnectionsAccountSubcategory `json:"subcategory"`
	// The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.
	SupportedPaymentMethodTypes []FinancialConnectionsAccountSupportedPaymentMethodType `json:"supported_payment_method_types"`
}

A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.

type FinancialConnectionsAccountAccountHolder

type FinancialConnectionsAccountAccountHolder struct {
	// The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.
	Account *Account `json:"account"`
	// ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.
	Customer *Customer `json:"customer"`
	// Type of account holder that this account belongs to.
	Type FinancialConnectionsAccountAccountHolderType `json:"type"`
}

The account holder that this account belongs to.

type FinancialConnectionsAccountAccountHolderType

type FinancialConnectionsAccountAccountHolderType string

Type of account holder that this account belongs to.

const (
	FinancialConnectionsAccountAccountHolderTypeAccount  FinancialConnectionsAccountAccountHolderType = "account"
	FinancialConnectionsAccountAccountHolderTypeCustomer FinancialConnectionsAccountAccountHolderType = "customer"
)

List of values that FinancialConnectionsAccountAccountHolderType can take

type FinancialConnectionsAccountBalance

type FinancialConnectionsAccountBalance struct {
	// The time that the external institution calculated this balance. Measured in seconds since the Unix epoch.
	AsOf   int64                                     `json:"as_of"`
	Cash   *FinancialConnectionsAccountBalanceCash   `json:"cash"`
	Credit *FinancialConnectionsAccountBalanceCredit `json:"credit"`
	// The balances owed to (or by) the account holder.
	//
	// Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
	//
	// Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
	Current map[string]int64 `json:"current"`
	// The `type` of the balance. An additional hash is included on the balance with a name matching this value.
	Type FinancialConnectionsAccountBalanceType `json:"type"`
}

The most recent information about the account's balance.

type FinancialConnectionsAccountBalanceCash

type FinancialConnectionsAccountBalanceCash struct {
	// The funds available to the account holder. Typically this is the current balance less any holds.
	//
	// Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
	//
	// Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
	Available map[string]int64 `json:"available"`
}

type FinancialConnectionsAccountBalanceCredit

type FinancialConnectionsAccountBalanceCredit struct {
	// The credit that has been used by the account holder.
	//
	// Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
	//
	// Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
	Used map[string]int64 `json:"used"`
}

type FinancialConnectionsAccountBalanceRefresh

type FinancialConnectionsAccountBalanceRefresh struct {
	// The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
	LastAttemptedAt int64 `json:"last_attempted_at"`
	// The status of the last refresh attempt.
	Status FinancialConnectionsAccountBalanceRefreshStatus `json:"status"`
}

The state of the most recent attempt to refresh the account balance.

type FinancialConnectionsAccountBalanceRefreshStatus

type FinancialConnectionsAccountBalanceRefreshStatus string

The status of the last refresh attempt.

const (
	FinancialConnectionsAccountBalanceRefreshStatusFailed    FinancialConnectionsAccountBalanceRefreshStatus = "failed"
	FinancialConnectionsAccountBalanceRefreshStatusPending   FinancialConnectionsAccountBalanceRefreshStatus = "pending"
	FinancialConnectionsAccountBalanceRefreshStatusSucceeded FinancialConnectionsAccountBalanceRefreshStatus = "succeeded"
)

List of values that FinancialConnectionsAccountBalanceRefreshStatus can take

type FinancialConnectionsAccountBalanceType

type FinancialConnectionsAccountBalanceType string

The `type` of the balance. An additional hash is included on the balance with a name matching this value.

const (
	FinancialConnectionsAccountBalanceTypeCash   FinancialConnectionsAccountBalanceType = "cash"
	FinancialConnectionsAccountBalanceTypeCredit FinancialConnectionsAccountBalanceType = "credit"
)

List of values that FinancialConnectionsAccountBalanceType can take

type FinancialConnectionsAccountCategory

type FinancialConnectionsAccountCategory string

The type of the account. Account category is further divided in `subcategory`.

const (
	FinancialConnectionsAccountCategoryCash       FinancialConnectionsAccountCategory = "cash"
	FinancialConnectionsAccountCategoryCredit     FinancialConnectionsAccountCategory = "credit"
	FinancialConnectionsAccountCategoryInvestment FinancialConnectionsAccountCategory = "investment"
	FinancialConnectionsAccountCategoryOther      FinancialConnectionsAccountCategory = "other"
)

List of values that FinancialConnectionsAccountCategory can take

type FinancialConnectionsAccountDisconnectParams

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

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

type FinancialConnectionsAccountList

type FinancialConnectionsAccountList struct {
	APIResource
	ListMeta
	Data []*FinancialConnectionsAccount `json:"data"`
}

FinancialConnectionsAccountList is a list of Accounts as retrieved from a list endpoint.

type FinancialConnectionsAccountListAccountHolderParams

type FinancialConnectionsAccountListAccountHolderParams struct {
	// The ID of the Stripe account whose accounts will be retrieved.
	Account *string `form:"account"`
	// The ID of the Stripe customer whose accounts will be retrieved.
	Customer *string `form:"customer"`
}

If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.

type FinancialConnectionsAccountListOwnersParams

type FinancialConnectionsAccountListOwnersParams struct {
	ListParams `form:"*"`
	Account    *string `form:"-"` // Included in URL
	// The ID of the ownership object to fetch owners from.
	Ownership *string `form:"ownership"`
}

Lists all owners for a given Account

type FinancialConnectionsAccountListParams

type FinancialConnectionsAccountListParams struct {
	ListParams `form:"*"`
	// If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.
	AccountHolder *FinancialConnectionsAccountListAccountHolderParams `form:"account_holder"`
	// If present, only return accounts that were collected as part of the given session.
	Session *string `form:"session"`
}

Returns a list of Financial Connections Account objects.

type FinancialConnectionsAccountOwner

type FinancialConnectionsAccountOwner struct {
	// The email address of the owner.
	Email string `json:"email"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The full name of the owner.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The ownership object that this owner belongs to.
	Ownership string `json:"ownership"`
	// The raw phone number of the owner.
	Phone string `json:"phone"`
	// The raw physical address of the owner.
	RawAddress string `json:"raw_address"`
	// The timestamp of the refresh that updated this owner.
	RefreshedAt int64 `json:"refreshed_at"`
}

type FinancialConnectionsAccountOwnerList

type FinancialConnectionsAccountOwnerList struct {
	APIResource
	ListMeta
	Data []*FinancialConnectionsAccountOwner `json:"data"`
}

FinancialConnectionsAccountOwnerList is a list of AccountOwners as retrieved from a list endpoint.

type FinancialConnectionsAccountOwnership

type FinancialConnectionsAccountOwnership struct {
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// A paginated list of owners for this account.
	Owners *FinancialConnectionsAccountOwnerList `json:"owners"`
}

Describes a snapshot of the owners of an account at a particular point in time.

func (*FinancialConnectionsAccountOwnership) UnmarshalJSON

func (f *FinancialConnectionsAccountOwnership) UnmarshalJSON(data []byte) error

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

type FinancialConnectionsAccountOwnershipRefresh

type FinancialConnectionsAccountOwnershipRefresh struct {
	// The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
	LastAttemptedAt int64 `json:"last_attempted_at"`
	// The status of the last refresh attempt.
	Status FinancialConnectionsAccountOwnershipRefreshStatus `json:"status"`
}

The state of the most recent attempt to refresh the account owners.

type FinancialConnectionsAccountOwnershipRefreshStatus

type FinancialConnectionsAccountOwnershipRefreshStatus string

The status of the last refresh attempt.

const (
	FinancialConnectionsAccountOwnershipRefreshStatusFailed    FinancialConnectionsAccountOwnershipRefreshStatus = "failed"
	FinancialConnectionsAccountOwnershipRefreshStatusPending   FinancialConnectionsAccountOwnershipRefreshStatus = "pending"
	FinancialConnectionsAccountOwnershipRefreshStatusSucceeded FinancialConnectionsAccountOwnershipRefreshStatus = "succeeded"
)

List of values that FinancialConnectionsAccountOwnershipRefreshStatus can take

type FinancialConnectionsAccountParams

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

Retrieves the details of an Financial Connections Account.

type FinancialConnectionsAccountPermission

type FinancialConnectionsAccountPermission string

The list of permissions granted by this account.

const (
	FinancialConnectionsAccountPermissionBalances      FinancialConnectionsAccountPermission = "balances"
	FinancialConnectionsAccountPermissionOwnership     FinancialConnectionsAccountPermission = "ownership"
	FinancialConnectionsAccountPermissionPaymentMethod FinancialConnectionsAccountPermission = "payment_method"
	FinancialConnectionsAccountPermissionTransactions  FinancialConnectionsAccountPermission = "transactions"
)

List of values that FinancialConnectionsAccountPermission can take

type FinancialConnectionsAccountRefreshParams

type FinancialConnectionsAccountRefreshParams struct {
	Params `form:"*"`
	// The list of account features that you would like to refresh. Either: `balance` or `ownership`.
	Features []*string `form:"features"`
}

Refreshes the data associated with a Financial Connections Account.

type FinancialConnectionsAccountStatus

type FinancialConnectionsAccountStatus string

The status of the link to the account.

const (
	FinancialConnectionsAccountStatusActive       FinancialConnectionsAccountStatus = "active"
	FinancialConnectionsAccountStatusDisconnected FinancialConnectionsAccountStatus = "disconnected"
	FinancialConnectionsAccountStatusInactive     FinancialConnectionsAccountStatus = "inactive"
)

List of values that FinancialConnectionsAccountStatus can take

type FinancialConnectionsAccountSubcategory

type FinancialConnectionsAccountSubcategory string

If `category` is `cash`, one of:

  • `checking`
  • `savings`
  • `other`

If `category` is `credit`, one of:

  • `mortgage`
  • `line_of_credit`
  • `credit_card`
  • `other`

If `category` is `investment` or `other`, this will be `other`.

const (
	FinancialConnectionsAccountSubcategoryChecking     FinancialConnectionsAccountSubcategory = "checking"
	FinancialConnectionsAccountSubcategoryCreditCard   FinancialConnectionsAccountSubcategory = "credit_card"
	FinancialConnectionsAccountSubcategoryLineOfCredit FinancialConnectionsAccountSubcategory = "line_of_credit"
	FinancialConnectionsAccountSubcategoryMortgage     FinancialConnectionsAccountSubcategory = "mortgage"
	FinancialConnectionsAccountSubcategoryOther        FinancialConnectionsAccountSubcategory = "other"
	FinancialConnectionsAccountSubcategorySavings      FinancialConnectionsAccountSubcategory = "savings"
)

List of values that FinancialConnectionsAccountSubcategory can take

type FinancialConnectionsAccountSupportedPaymentMethodType

type FinancialConnectionsAccountSupportedPaymentMethodType string

The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.

const (
	FinancialConnectionsAccountSupportedPaymentMethodTypeLink          FinancialConnectionsAccountSupportedPaymentMethodType = "link"
	FinancialConnectionsAccountSupportedPaymentMethodTypeUSBankAccount FinancialConnectionsAccountSupportedPaymentMethodType = "us_bank_account"
)

List of values that FinancialConnectionsAccountSupportedPaymentMethodType can take

type FinancialConnectionsSession

type FinancialConnectionsSession struct {
	APIResource
	// The account holder for whom accounts are collected in this session.
	AccountHolder *FinancialConnectionsSessionAccountHolder `json:"account_holder"`
	// The accounts that were collected as part of this Session.
	Accounts *FinancialConnectionsAccountList `json:"accounts"`
	// A value that will be passed to the client to launch the authentication flow.
	ClientSecret string                              `json:"client_secret"`
	Filters      *FinancialConnectionsSessionFilters `json:"filters"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Permissions requested for accounts collected during this session.
	Permissions []FinancialConnectionsSessionPermission `json:"permissions"`
	// For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
	ReturnURL string `json:"return_url"`
}

A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.

type FinancialConnectionsSessionAccountHolder

type FinancialConnectionsSessionAccountHolder struct {
	// The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.
	Account *Account `json:"account"`
	// ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.
	Customer *Customer `json:"customer"`
	// Type of account holder that this account belongs to.
	Type FinancialConnectionsSessionAccountHolderType `json:"type"`
}

The account holder for whom accounts are collected in this session.

type FinancialConnectionsSessionAccountHolderParams

type FinancialConnectionsSessionAccountHolderParams struct {
	// The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`.
	Account *string `form:"account"`
	// The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`.
	Customer *string `form:"customer"`
	// Type of account holder to collect accounts for.
	Type *string `form:"type"`
}

The account holder to link accounts for.

type FinancialConnectionsSessionAccountHolderType

type FinancialConnectionsSessionAccountHolderType string

Type of account holder that this account belongs to.

const (
	FinancialConnectionsSessionAccountHolderTypeAccount  FinancialConnectionsSessionAccountHolderType = "account"
	FinancialConnectionsSessionAccountHolderTypeCustomer FinancialConnectionsSessionAccountHolderType = "customer"
)

List of values that FinancialConnectionsSessionAccountHolderType can take

type FinancialConnectionsSessionFilters

type FinancialConnectionsSessionFilters struct {
	// List of countries from which to filter accounts.
	Countries []string `json:"countries"`
}

type FinancialConnectionsSessionFiltersParams

type FinancialConnectionsSessionFiltersParams struct {
	// List of countries from which to collect accounts.
	Countries []*string `form:"countries"`
}

Filters to restrict the kinds of accounts to collect.

type FinancialConnectionsSessionParams

type FinancialConnectionsSessionParams struct {
	Params `form:"*"`
	// The account holder to link accounts for.
	AccountHolder *FinancialConnectionsSessionAccountHolderParams `form:"account_holder"`
	// Filters to restrict the kinds of accounts to collect.
	Filters *FinancialConnectionsSessionFiltersParams `form:"filters"`
	// List of data features that you would like to request access to.
	//
	// Possible values are `balances`, `transactions`, `ownership`, and `payment_method`.
	Permissions []*string `form:"permissions"`
	// For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
	ReturnURL *string `form:"return_url"`
}

To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.

type FinancialConnectionsSessionPermission

type FinancialConnectionsSessionPermission string

Permissions requested for accounts collected during this session.

const (
	FinancialConnectionsSessionPermissionBalances      FinancialConnectionsSessionPermission = "balances"
	FinancialConnectionsSessionPermissionOwnership     FinancialConnectionsSessionPermission = "ownership"
	FinancialConnectionsSessionPermissionPaymentMethod FinancialConnectionsSessionPermission = "payment_method"
	FinancialConnectionsSessionPermissionTransactions  FinancialConnectionsSessionPermission = "transactions"
)

List of values that FinancialConnectionsSessionPermission can take

type FundingInstructions

type FundingInstructions struct {
	APIResource
	BankTransfer *FundingInstructionsBankTransfer `json:"bank_transfer"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// The `funding_type` of the returned instructions
	FundingType FundingInstructionsFundingType `json:"funding_type"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
}

Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is automatically applied to future invoices and payments using the `customer_balance` payment method. Customers can fund this balance by initiating a bank transfer to any account in the `financial_addresses` field. Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more

type FundingInstructionsBankTransfer

type FundingInstructionsBankTransfer struct {
	// The country of the bank account to fund
	Country string `json:"country"`
	// A list of financial addresses that can be used to fund a particular balance
	FinancialAddresses []*FundingInstructionsBankTransferFinancialAddress `json:"financial_addresses"`
	// The bank_transfer type
	Type FundingInstructionsBankTransferType `json:"type"`
}

type FundingInstructionsBankTransferFinancialAddress

type FundingInstructionsBankTransferFinancialAddress struct {
	// Iban Records contain E.U. bank account details per the SEPA format.
	IBAN *FundingInstructionsBankTransferFinancialAddressIBAN `json:"iban"`
	// Sort Code Records contain U.K. bank account details per the sort code format.
	SortCode *FundingInstructionsBankTransferFinancialAddressSortCode `json:"sort_code"`
	// SPEI Records contain Mexico bank account details per the SPEI format.
	Spei *FundingInstructionsBankTransferFinancialAddressSpei `json:"spei"`
	// The payment networks supported by this FinancialAddress
	SupportedNetworks []FundingInstructionsBankTransferFinancialAddressSupportedNetwork `json:"supported_networks"`
	// The type of financial address
	Type FundingInstructionsBankTransferFinancialAddressType `json:"type"`
	// Zengin Records contain Japan bank account details per the Zengin format.
	Zengin *FundingInstructionsBankTransferFinancialAddressZengin `json:"zengin"`
}

A list of financial addresses that can be used to fund a particular balance

type FundingInstructionsBankTransferFinancialAddressIBAN

type FundingInstructionsBankTransferFinancialAddressIBAN struct {
	// The name of the person or business that owns the bank account
	AccountHolderName string `json:"account_holder_name"`
	// The BIC/SWIFT code of the account.
	BIC string `json:"bic"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country string `json:"country"`
	// The IBAN of the account.
	IBAN string `json:"iban"`
}

Iban Records contain E.U. bank account details per the SEPA format.

type FundingInstructionsBankTransferFinancialAddressSortCode

type FundingInstructionsBankTransferFinancialAddressSortCode struct {
	// The name of the person or business that owns the bank account
	AccountHolderName string `json:"account_holder_name"`
	// The account number
	AccountNumber string `json:"account_number"`
	// The six-digit sort code
	SortCode string `json:"sort_code"`
}

Sort Code Records contain U.K. bank account details per the sort code format.

type FundingInstructionsBankTransferFinancialAddressSpei

type FundingInstructionsBankTransferFinancialAddressSpei struct {
	// The three-digit bank code
	BankCode string `json:"bank_code"`
	// The short banking institution name
	BankName string `json:"bank_name"`
	// The CLABE number
	Clabe string `json:"clabe"`
}

SPEI Records contain Mexico bank account details per the SPEI format.

type FundingInstructionsBankTransferFinancialAddressSupportedNetwork

type FundingInstructionsBankTransferFinancialAddressSupportedNetwork string

The payment networks supported by this FinancialAddress

const (
	FundingInstructionsBankTransferFinancialAddressSupportedNetworkBACS   FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "bacs"
	FundingInstructionsBankTransferFinancialAddressSupportedNetworkFPS    FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "fps"
	FundingInstructionsBankTransferFinancialAddressSupportedNetworkSEPA   FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "sepa"
	FundingInstructionsBankTransferFinancialAddressSupportedNetworkSpei   FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "spei"
	FundingInstructionsBankTransferFinancialAddressSupportedNetworkZengin FundingInstructionsBankTransferFinancialAddressSupportedNetwork = "zengin"
)

List of values that FundingInstructionsBankTransferFinancialAddressSupportedNetwork can take

type FundingInstructionsBankTransferFinancialAddressType

type FundingInstructionsBankTransferFinancialAddressType string

The type of financial address

const (
	FundingInstructionsBankTransferFinancialAddressTypeIBAN     FundingInstructionsBankTransferFinancialAddressType = "iban"
	FundingInstructionsBankTransferFinancialAddressTypeSortCode FundingInstructionsBankTransferFinancialAddressType = "sort_code"
	FundingInstructionsBankTransferFinancialAddressTypeSpei     FundingInstructionsBankTransferFinancialAddressType = "spei"
	FundingInstructionsBankTransferFinancialAddressTypeZengin   FundingInstructionsBankTransferFinancialAddressType = "zengin"
)

List of values that FundingInstructionsBankTransferFinancialAddressType can take

type FundingInstructionsBankTransferFinancialAddressZengin

type FundingInstructionsBankTransferFinancialAddressZengin struct {
	// The account holder name
	AccountHolderName string `json:"account_holder_name"`
	// The account number
	AccountNumber string `json:"account_number"`
	// The bank account type. In Japan, this can only be `futsu` or `toza`.
	AccountType string `json:"account_type"`
	// The bank code of the account
	BankCode string `json:"bank_code"`
	// The bank name of the account
	BankName string `json:"bank_name"`
	// The branch code of the account
	BranchCode string `json:"branch_code"`
	// The branch name of the account
	BranchName string `json:"branch_name"`
}

Zengin Records contain Japan bank account details per the Zengin format.

type FundingInstructionsBankTransferType

type FundingInstructionsBankTransferType string

The bank_transfer type

const (
	FundingInstructionsBankTransferTypeEUBankTransfer FundingInstructionsBankTransferType = "eu_bank_transfer"
	FundingInstructionsBankTransferTypeJPBankTransfer FundingInstructionsBankTransferType = "jp_bank_transfer"
)

List of values that FundingInstructionsBankTransferType can take

type FundingInstructionsFundingType

type FundingInstructionsFundingType string

The `funding_type` of the returned instructions

const (
	FundingInstructionsFundingTypeBankTransfer FundingInstructionsFundingType = "bank_transfer"
)

List of values that FundingInstructionsFundingType can take

type IdempotencyError

type IdempotencyError struct {
	// contains filtered or unexported fields
}

IdempotencyError occurs when an Idempotency-Key is re-used on a request that does not match the first request's API endpoint and parameters.

func (*IdempotencyError) Error

func (e *IdempotencyError) Error() string

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

type IdentityVerificationReport

type IdentityVerificationReport struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Result from a document check
	Document *IdentityVerificationReportDocument `json:"document"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Result from an id_number check
	IDNumber *IdentityVerificationReportIDNumber `json:"id_number"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object  string                             `json:"object"`
	Options *IdentityVerificationReportOptions `json:"options"`
	// Result from a selfie check
	Selfie *IdentityVerificationReportSelfie `json:"selfie"`
	// Type of report.
	Type IdentityVerificationReportType `json:"type"`
	// ID of the VerificationSession that created this report.
	VerificationSession string `json:"verification_session"`
}

A VerificationReport is the result of an attempt to collect and verify data from a user. The collection of verification checks performed is determined from the `type` and `options` parameters used. You can find the result of each verification check performed in the appropriate sub-resource: `document`, `id_number`, `selfie`.

Each VerificationReport contains a copy of any data collected by the user as well as reference IDs which can be used to access collected images through the [FileUpload](https://stripe.com/docs/api/files) API. To configure and create VerificationReports, use the [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.

Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).

func (*IdentityVerificationReport) UnmarshalJSON

func (i *IdentityVerificationReport) UnmarshalJSON(data []byte) error

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

type IdentityVerificationReportDocument

type IdentityVerificationReportDocument struct {
	// Address as it appears in the document.
	Address *Address `json:"address"`
	// Date of birth as it appears in the document.
	DOB *IdentityVerificationReportDocumentDOB `json:"dob"`
	// Details on the verification error. Present when status is `unverified`.
	Error *IdentityVerificationReportDocumentError `json:"error"`
	// Expiration date of the document.
	ExpirationDate *IdentityVerificationReportDocumentExpirationDate `json:"expiration_date"`
	// Array of [File](https://stripe.com/docs/api/files) ids containing images for this document.
	Files []string `json:"files"`
	// First name as it appears in the document.
	FirstName string `json:"first_name"`
	// Issued date of the document.
	IssuedDate *IdentityVerificationReportDocumentIssuedDate `json:"issued_date"`
	// Issuing country of the document.
	IssuingCountry string `json:"issuing_country"`
	// Last name as it appears in the document.
	LastName string `json:"last_name"`
	// Document ID number.
	Number string `json:"number"`
	// Status of this `document` check.
	Status IdentityVerificationReportDocumentStatus `json:"status"`
	// Type of the document.
	Type IdentityVerificationReportDocumentType `json:"type"`
}

Result from a document check

type IdentityVerificationReportDocumentDOB

type IdentityVerificationReportDocumentDOB struct {
	// Numerical day between 1 and 31.
	Day int64 `json:"day"`
	// Numerical month between 1 and 12.
	Month int64 `json:"month"`
	// The four-digit year.
	Year int64 `json:"year"`
}

Date of birth as it appears in the document.

type IdentityVerificationReportDocumentError

type IdentityVerificationReportDocumentError struct {
	// A short machine-readable string giving the reason for the verification failure.
	Code IdentityVerificationReportDocumentErrorCode `json:"code"`
	// A human-readable message giving the reason for the failure. These messages can be shown to your users.
	Reason string `json:"reason"`
}

Details on the verification error. Present when status is `unverified`.

type IdentityVerificationReportDocumentErrorCode

type IdentityVerificationReportDocumentErrorCode string

A short machine-readable string giving the reason for the verification failure.

const (
	IdentityVerificationReportDocumentErrorCodeDocumentExpired          IdentityVerificationReportDocumentErrorCode = "document_expired"
	IdentityVerificationReportDocumentErrorCodeDocumentTypeNotSupported IdentityVerificationReportDocumentErrorCode = "document_type_not_supported"
	IdentityVerificationReportDocumentErrorCodeDocumentUnverifiedOther  IdentityVerificationReportDocumentErrorCode = "document_unverified_other"
)

List of values that IdentityVerificationReportDocumentErrorCode can take

type IdentityVerificationReportDocumentExpirationDate

type IdentityVerificationReportDocumentExpirationDate struct {
	// Numerical day between 1 and 31.
	Day int64 `json:"day"`
	// Numerical month between 1 and 12.
	Month int64 `json:"month"`
	// The four-digit year.
	Year int64 `json:"year"`
}

Expiration date of the document.

type IdentityVerificationReportDocumentIssuedDate

type IdentityVerificationReportDocumentIssuedDate struct {
	// Numerical day between 1 and 31.
	Day int64 `json:"day"`
	// Numerical month between 1 and 12.
	Month int64 `json:"month"`
	// The four-digit year.
	Year int64 `json:"year"`
}

Issued date of the document.

type IdentityVerificationReportDocumentStatus

type IdentityVerificationReportDocumentStatus string

Status of this `document` check.

const (
	IdentityVerificationReportDocumentStatusUnverified IdentityVerificationReportDocumentStatus = "unverified"
	IdentityVerificationReportDocumentStatusVerified   IdentityVerificationReportDocumentStatus = "verified"
)

List of values that IdentityVerificationReportDocumentStatus can take

type IdentityVerificationReportDocumentType

type IdentityVerificationReportDocumentType string

Type of the document.

const (
	IdentityVerificationReportDocumentTypeDrivingLicense IdentityVerificationReportDocumentType = "driving_license"
	IdentityVerificationReportDocumentTypeIDCard         IdentityVerificationReportDocumentType = "id_card"
	IdentityVerificationReportDocumentTypePassport       IdentityVerificationReportDocumentType = "passport"
)

List of values that IdentityVerificationReportDocumentType can take

type IdentityVerificationReportIDNumber

type IdentityVerificationReportIDNumber struct {
	// Date of birth.
	DOB *IdentityVerificationReportIDNumberDOB `json:"dob"`
	// Details on the verification error. Present when status is `unverified`.
	Error *IdentityVerificationReportIDNumberError `json:"error"`
	// First name.
	FirstName string `json:"first_name"`
	// ID number.
	IDNumber string `json:"id_number"`
	// Type of ID number.
	IDNumberType IdentityVerificationReportIDNumberIDNumberType `json:"id_number_type"`
	// Last name.
	LastName string `json:"last_name"`
	// Status of this `id_number` check.
	Status IdentityVerificationReportIDNumberStatus `json:"status"`
}

Result from an id_number check

type IdentityVerificationReportIDNumberDOB

type IdentityVerificationReportIDNumberDOB struct {
	// Numerical day between 1 and 31.
	Day int64 `json:"day"`
	// Numerical month between 1 and 12.
	Month int64 `json:"month"`
	// The four-digit year.
	Year int64 `json:"year"`
}

Date of birth.

type IdentityVerificationReportIDNumberError

type IdentityVerificationReportIDNumberError struct {
	// A short machine-readable string giving the reason for the verification failure.
	Code IdentityVerificationReportIDNumberErrorCode `json:"code"`
	// A human-readable message giving the reason for the failure. These messages can be shown to your users.
	Reason string `json:"reason"`
}

Details on the verification error. Present when status is `unverified`.

type IdentityVerificationReportIDNumberErrorCode

type IdentityVerificationReportIDNumberErrorCode string

A short machine-readable string giving the reason for the verification failure.

const (
	IdentityVerificationReportIDNumberErrorCodeIDNumberInsufficientDocumentData IdentityVerificationReportIDNumberErrorCode = "id_number_insufficient_document_data"
	IdentityVerificationReportIDNumberErrorCodeIDNumberMismatch                 IdentityVerificationReportIDNumberErrorCode = "id_number_mismatch"
	IdentityVerificationReportIDNumberErrorCodeIDNumberUnverifiedOther          IdentityVerificationReportIDNumberErrorCode = "id_number_unverified_other"
)

List of values that IdentityVerificationReportIDNumberErrorCode can take

type IdentityVerificationReportIDNumberIDNumberType

type IdentityVerificationReportIDNumberIDNumberType string

Type of ID number.

const (
	IdentityVerificationReportIDNumberIDNumberTypeBRCPF  IdentityVerificationReportIDNumberIDNumberType = "br_cpf"
	IdentityVerificationReportIDNumberIDNumberTypeSGNRIC IdentityVerificationReportIDNumberIDNumberType = "sg_nric"
	IdentityVerificationReportIDNumberIDNumberTypeUSSSN  IdentityVerificationReportIDNumberIDNumberType = "us_ssn"
)

List of values that IdentityVerificationReportIDNumberIDNumberType can take

type IdentityVerificationReportIDNumberStatus

type IdentityVerificationReportIDNumberStatus string

Status of this `id_number` check.

const (
	IdentityVerificationReportIDNumberStatusUnverified IdentityVerificationReportIDNumberStatus = "unverified"
	IdentityVerificationReportIDNumberStatusVerified   IdentityVerificationReportIDNumberStatus = "verified"
)

List of values that IdentityVerificationReportIDNumberStatus can take

type IdentityVerificationReportList

type IdentityVerificationReportList struct {
	APIResource
	ListMeta
	Data []*IdentityVerificationReport `json:"data"`
}

IdentityVerificationReportList is a list of VerificationReports as retrieved from a list endpoint.

type IdentityVerificationReportListParams

type IdentityVerificationReportListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return VerificationReports of this type
	Type *string `form:"type"`
	// Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.
	VerificationSession *string `form:"verification_session"`
}

List all verification reports.

type IdentityVerificationReportOptions

type IdentityVerificationReportOptions struct {
	Document *IdentityVerificationReportOptionsDocument `json:"document"`
	IDNumber *IdentityVerificationReportOptionsIDNumber `json:"id_number"`
}

type IdentityVerificationReportOptionsDocument

type IdentityVerificationReportOptionsDocument struct {
	// Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
	AllowedTypes []IdentityVerificationReportOptionsDocumentAllowedType `json:"allowed_types"`
	// Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth.
	RequireIDNumber bool `json:"require_id_number"`
	// Disable image uploads, identity document images have to be captured using the device's camera.
	RequireLiveCapture bool `json:"require_live_capture"`
	// Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie).
	RequireMatchingSelfie bool `json:"require_matching_selfie"`
}

type IdentityVerificationReportOptionsDocumentAllowedType

type IdentityVerificationReportOptionsDocumentAllowedType string

Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code.

const (
	IdentityVerificationReportOptionsDocumentAllowedTypeDrivingLicense IdentityVerificationReportOptionsDocumentAllowedType = "driving_license"
	IdentityVerificationReportOptionsDocumentAllowedTypeIDCard         IdentityVerificationReportOptionsDocumentAllowedType = "id_card"
	IdentityVerificationReportOptionsDocumentAllowedTypePassport       IdentityVerificationReportOptionsDocumentAllowedType = "passport"
)

List of values that IdentityVerificationReportOptionsDocumentAllowedType can take

type IdentityVerificationReportOptionsIDNumber

type IdentityVerificationReportOptionsIDNumber struct{}

type IdentityVerificationReportParams

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

Retrieves an existing VerificationReport

type IdentityVerificationReportSelfie

type IdentityVerificationReportSelfie struct {
	// ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check.
	Document string `json:"document"`
	// Details on the verification error. Present when status is `unverified`.
	Error *IdentityVerificationReportSelfieError `json:"error"`
	// ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check.
	Selfie string `json:"selfie"`
	// Status of this `selfie` check.
	Status IdentityVerificationReportSelfieStatus `json:"status"`
}

Result from a selfie check

type IdentityVerificationReportSelfieError

type IdentityVerificationReportSelfieError struct {
	// A short machine-readable string giving the reason for the verification failure.
	Code IdentityVerificationReportSelfieErrorCode `json:"code"`
	// A human-readable message giving the reason for the failure. These messages can be shown to your users.
	Reason string `json:"reason"`
}

Details on the verification error. Present when status is `unverified`.

type IdentityVerificationReportSelfieErrorCode

type IdentityVerificationReportSelfieErrorCode string

A short machine-readable string giving the reason for the verification failure.

const (
	IdentityVerificationReportSelfieErrorCodeSelfieDocumentMissingPhoto IdentityVerificationReportSelfieErrorCode = "selfie_document_missing_photo"
	IdentityVerificationReportSelfieErrorCodeSelfieFaceMismatch         IdentityVerificationReportSelfieErrorCode = "selfie_face_mismatch"
	IdentityVerificationReportSelfieErrorCodeSelfieManipulated          IdentityVerificationReportSelfieErrorCode = "selfie_manipulated"
	IdentityVerificationReportSelfieErrorCodeSelfieUnverifiedOther      IdentityVerificationReportSelfieErrorCode = "selfie_unverified_other"
)

List of values that IdentityVerificationReportSelfieErrorCode can take

type IdentityVerificationReportSelfieStatus

type IdentityVerificationReportSelfieStatus string

Status of this `selfie` check.

const (
	IdentityVerificationReportSelfieStatusUnverified IdentityVerificationReportSelfieStatus = "unverified"
	IdentityVerificationReportSelfieStatusVerified   IdentityVerificationReportSelfieStatus = "verified"
)

List of values that IdentityVerificationReportSelfieStatus can take

type IdentityVerificationReportType

type IdentityVerificationReportType string

Type of report.

const (
	IdentityVerificationReportTypeDocument IdentityVerificationReportType = "document"
	IdentityVerificationReportTypeIDNumber IdentityVerificationReportType = "id_number"
)

List of values that IdentityVerificationReportType can take

type IdentityVerificationSession

type IdentityVerificationSession struct {
	APIResource
	// The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don't store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more.
	ClientSecret string `json:"client_secret"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// If present, this property tells you the last error encountered when processing the verification.
	LastError *IdentityVerificationSessionLastError `json:"last_error"`
	// ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results)
	LastVerificationReport *IdentityVerificationReport `json:"last_verification_report"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object  string                              `json:"object"`
	Options *IdentityVerificationSessionOptions `json:"options"`
	// Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
	Redaction *IdentityVerificationSessionRedaction `json:"redaction"`
	// Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
	Status IdentityVerificationSessionStatus `json:"status"`
	// The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
	Type IdentityVerificationSessionType `json:"type"`
	// The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don't store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe.
	URL string `json:"url"`
	// The user's verified data.
	VerifiedOutputs *IdentityVerificationSessionVerifiedOutputs `json:"verified_outputs"`
}

A VerificationSession guides you through the process of collecting and verifying the identities of your users. It contains details about the type of verification, such as what [verification check](https://stripe.com/docs/identity/verification-checks) to perform. Only create one VerificationSession for each verification in your system.

A VerificationSession transitions through [multiple statuses](https://stripe.com/docs/identity/how-sessions-work) throughout its lifetime as it progresses through the verification flow. The VerificationSession contains the user's verified data after verification checks are complete.

Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions)

type IdentityVerificationSessionCancelParams

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

A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).

Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).

type IdentityVerificationSessionLastError

type IdentityVerificationSessionLastError struct {
	// A short machine-readable string giving the reason for the verification or user-session failure.
	Code IdentityVerificationSessionLastErrorCode `json:"code"`
	// A message that explains the reason for verification or user-session failure.
	Reason string `json:"reason"`
}

If present, this property tells you the last error encountered when processing the verification.

type IdentityVerificationSessionLastErrorCode

type IdentityVerificationSessionLastErrorCode string

A short machine-readable string giving the reason for the verification or user-session failure.

const (
	IdentityVerificationSessionLastErrorCodeAbandoned                        IdentityVerificationSessionLastErrorCode = "abandoned"
	IdentityVerificationSessionLastErrorCodeConsentDeclined                  IdentityVerificationSessionLastErrorCode = "consent_declined"
	IdentityVerificationSessionLastErrorCodeCountryNotSupported              IdentityVerificationSessionLastErrorCode = "country_not_supported"
	IdentityVerificationSessionLastErrorCodeDeviceNotSupported               IdentityVerificationSessionLastErrorCode = "device_not_supported"
	IdentityVerificationSessionLastErrorCodeDocumentExpired                  IdentityVerificationSessionLastErrorCode = "document_expired"
	IdentityVerificationSessionLastErrorCodeDocumentTypeNotSupported         IdentityVerificationSessionLastErrorCode = "document_type_not_supported"
	IdentityVerificationSessionLastErrorCodeDocumentUnverifiedOther          IdentityVerificationSessionLastErrorCode = "document_unverified_other"
	IdentityVerificationSessionLastErrorCodeIDNumberInsufficientDocumentData IdentityVerificationSessionLastErrorCode = "id_number_insufficient_document_data"
	IdentityVerificationSessionLastErrorCodeIDNumberMismatch                 IdentityVerificationSessionLastErrorCode = "id_number_mismatch"
	IdentityVerificationSessionLastErrorCodeIDNumberUnverifiedOther          IdentityVerificationSessionLastErrorCode = "id_number_unverified_other"
	IdentityVerificationSessionLastErrorCodeSelfieDocumentMissingPhoto       IdentityVerificationSessionLastErrorCode = "selfie_document_missing_photo"
	IdentityVerificationSessionLastErrorCodeSelfieFaceMismatch               IdentityVerificationSessionLastErrorCode = "selfie_face_mismatch"
	IdentityVerificationSessionLastErrorCodeSelfieManipulated                IdentityVerificationSessionLastErrorCode = "selfie_manipulated"
	IdentityVerificationSessionLastErrorCodeSelfieUnverifiedOther            IdentityVerificationSessionLastErrorCode = "selfie_unverified_other"
	IdentityVerificationSessionLastErrorCodeUnderSupportedAge                IdentityVerificationSessionLastErrorCode = "under_supported_age"
)

List of values that IdentityVerificationSessionLastErrorCode can take

type IdentityVerificationSessionList

type IdentityVerificationSessionList struct {
	APIResource
	ListMeta
	Data []*IdentityVerificationSession `json:"data"`
}

IdentityVerificationSessionList is a list of VerificationSessions as retrieved from a list endpoint.

type IdentityVerificationSessionListParams

type IdentityVerificationSessionListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
	Status *string `form:"status"`
}

Returns a list of VerificationSessions

type IdentityVerificationSessionOptions

type IdentityVerificationSessionOptions struct {
	Document *IdentityVerificationSessionOptionsDocument `json:"document"`
	IDNumber *IdentityVerificationSessionOptionsIDNumber `json:"id_number"`
}

type IdentityVerificationSessionOptionsDocument

type IdentityVerificationSessionOptionsDocument struct {
	// Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
	AllowedTypes []IdentityVerificationSessionOptionsDocumentAllowedType `json:"allowed_types"`
	// Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth.
	RequireIDNumber bool `json:"require_id_number"`
	// Disable image uploads, identity document images have to be captured using the device's camera.
	RequireLiveCapture bool `json:"require_live_capture"`
	// Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie).
	RequireMatchingSelfie bool `json:"require_matching_selfie"`
}

type IdentityVerificationSessionOptionsDocumentAllowedType

type IdentityVerificationSessionOptionsDocumentAllowedType string

Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code.

const (
	IdentityVerificationSessionOptionsDocumentAllowedTypeDrivingLicense IdentityVerificationSessionOptionsDocumentAllowedType = "driving_license"
	IdentityVerificationSessionOptionsDocumentAllowedTypeIDCard         IdentityVerificationSessionOptionsDocumentAllowedType = "id_card"
	IdentityVerificationSessionOptionsDocumentAllowedTypePassport       IdentityVerificationSessionOptionsDocumentAllowedType = "passport"
)

List of values that IdentityVerificationSessionOptionsDocumentAllowedType can take

type IdentityVerificationSessionOptionsDocumentParams

type IdentityVerificationSessionOptionsDocumentParams struct {
	// Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
	AllowedTypes []*string `form:"allowed_types"`
	// Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth.
	RequireIDNumber *bool `form:"require_id_number"`
	// Disable image uploads, identity document images have to be captured using the device's camera.
	RequireLiveCapture *bool `form:"require_live_capture"`
	// Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie).
	RequireMatchingSelfie *bool `form:"require_matching_selfie"`
}

Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).

type IdentityVerificationSessionOptionsIDNumber

type IdentityVerificationSessionOptionsIDNumber struct{}

type IdentityVerificationSessionOptionsParams

type IdentityVerificationSessionOptionsParams struct {
	// Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
	Document *IdentityVerificationSessionOptionsDocumentParams `form:"document"`
}

A set of options for the session's verification checks.

type IdentityVerificationSessionParams

type IdentityVerificationSessionParams struct {
	Params `form:"*"`
	// A set of options for the session's verification checks.
	Options *IdentityVerificationSessionOptionsParams `form:"options"`
	// The URL that the user will be redirected to upon completing the verification flow.
	ReturnURL *string `form:"return_url"`
	// The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
	Type *string `form:"type"`
}

Creates a VerificationSession object.

After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session's url.

If your API key is in test mode, verification checks won't actually process, though everything else will occur as if in live mode.

Related guide: [Verify your users' identity documents](https://stripe.com/docs/identity/verify-identity-documents).

type IdentityVerificationSessionRedactParams

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

Redact a VerificationSession to remove all collected information from Stripe. This will redact the VerificationSession and all objects related to it, including VerificationReports, Events, request logs, etc.

A VerificationSession object can be redacted when it is in requires_input or verified [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action state will automatically cancel it.

The redaction process may take up to four days. When the redaction process is in progress, the VerificationSession's redaction.status field will be set to processing; when the process is finished, it will change to redacted and an identity.verification_session.redacted event will be emitted.

Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the fields that contain personal data will be replaced by the string [redacted] or a similar placeholder. The metadata field will also be erased. Redacted objects cannot be updated or used for any purpose.

[Learn more](https://stripe.com/docs/identity/verification-sessions#redact).

type IdentityVerificationSessionRedaction

type IdentityVerificationSessionRedaction struct {
	// Indicates whether this object and its related objects have been redacted or not.
	Status IdentityVerificationSessionRedactionStatus `json:"status"`
}

Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.

type IdentityVerificationSessionRedactionStatus

type IdentityVerificationSessionRedactionStatus string

Indicates whether this object and its related objects have been redacted or not.

const (
	IdentityVerificationSessionRedactionStatusProcessing IdentityVerificationSessionRedactionStatus = "processing"
	IdentityVerificationSessionRedactionStatusRedacted   IdentityVerificationSessionRedactionStatus = "redacted"
)

List of values that IdentityVerificationSessionRedactionStatus can take

type IdentityVerificationSessionStatus

type IdentityVerificationSessionStatus string

Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).

const (
	IdentityVerificationSessionStatusCanceled      IdentityVerificationSessionStatus = "canceled"
	IdentityVerificationSessionStatusProcessing    IdentityVerificationSessionStatus = "processing"
	IdentityVerificationSessionStatusRequiresInput IdentityVerificationSessionStatus = "requires_input"
	IdentityVerificationSessionStatusVerified      IdentityVerificationSessionStatus = "verified"
)

List of values that IdentityVerificationSessionStatus can take

type IdentityVerificationSessionType

type IdentityVerificationSessionType string

The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.

const (
	IdentityVerificationSessionTypeDocument IdentityVerificationSessionType = "document"
	IdentityVerificationSessionTypeIDNumber IdentityVerificationSessionType = "id_number"
)

List of values that IdentityVerificationSessionType can take

type IdentityVerificationSessionVerifiedOutputs

type IdentityVerificationSessionVerifiedOutputs struct {
	// The user's verified address.
	Address *Address `json:"address"`
	// The user's verified date of birth.
	DOB *IdentityVerificationSessionVerifiedOutputsDOB `json:"dob"`
	// The user's verified first name.
	FirstName string `json:"first_name"`
	// The user's verified id number.
	IDNumber string `json:"id_number"`
	// The user's verified id number type.
	IDNumberType IdentityVerificationSessionVerifiedOutputsIDNumberType `json:"id_number_type"`
	// The user's verified last name.
	LastName string `json:"last_name"`
}

The user's verified data.

type IdentityVerificationSessionVerifiedOutputsDOB

type IdentityVerificationSessionVerifiedOutputsDOB struct {
	// Numerical day between 1 and 31.
	Day int64 `json:"day"`
	// Numerical month between 1 and 12.
	Month int64 `json:"month"`
	// The four-digit year.
	Year int64 `json:"year"`
}

The user's verified date of birth.

type IdentityVerificationSessionVerifiedOutputsIDNumberType

type IdentityVerificationSessionVerifiedOutputsIDNumberType string

The user's verified id number type.

const (
	IdentityVerificationSessionVerifiedOutputsIDNumberTypeBRCPF  IdentityVerificationSessionVerifiedOutputsIDNumberType = "br_cpf"
	IdentityVerificationSessionVerifiedOutputsIDNumberTypeSGNRIC IdentityVerificationSessionVerifiedOutputsIDNumberType = "sg_nric"
	IdentityVerificationSessionVerifiedOutputsIDNumberTypeUSSSN  IdentityVerificationSessionVerifiedOutputsIDNumberType = "us_ssn"
)

List of values that IdentityVerificationSessionVerifiedOutputsIDNumberType can take

type InvalidRequestError

type InvalidRequestError struct {
	// contains filtered or unexported fields
}

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

func (*InvalidRequestError) Error

func (e *InvalidRequestError) Error() string

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

type Invoice

type Invoice struct {
	APIResource
	// The country of the business associated with this invoice, most often the business creating the invoice.
	AccountCountry string `json:"account_country"`
	// The public name of the business associated with this invoice, most often the business creating the invoice.
	AccountName string `json:"account_name"`
	// The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
	AccountTaxIDs []*TaxID `json:"account_tax_ids"`
	// Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.
	AmountDue int64 `json:"amount_due"`
	// The amount, in %s, that was paid.
	AmountPaid int64 `json:"amount_paid"`
	// The difference between amount_due and amount_paid, in %s.
	AmountRemaining int64 `json:"amount_remaining"`
	// ID of the Connect Application that created the invoice.
	Application *Application `json:"application"`
	// The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
	ApplicationFeeAmount int64 `json:"application_fee_amount"`
	// Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
	AttemptCount int64 `json:"attempt_count"`
	// Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.
	Attempted bool `json:"attempted"`
	// Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.
	AutoAdvance  bool                 `json:"auto_advance"`
	AutomaticTax *InvoiceAutomaticTax `json:"automatic_tax"`
	// Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached.
	BillingReason InvoiceBillingReason `json:"billing_reason"`
	// ID of the latest charge generated for this invoice, if any.
	Charge *Charge `json:"charge"`
	// Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
	CollectionMethod InvoiceCollectionMethod `json:"collection_method"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// The ID of the customer who will be billed.
	Customer *Customer `json:"customer"`
	// The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
	CustomerAddress *Address `json:"customer_address"`
	// The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
	CustomerEmail string `json:"customer_email"`
	// The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated.
	CustomerName string `json:"customer_name"`
	// The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated.
	CustomerPhone string `json:"customer_phone"`
	// The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated.
	CustomerShipping *ShippingDetails `json:"customer_shipping"`
	// The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated.
	CustomerTaxExempt *CustomerTaxExempt `json:"customer_tax_exempt"`
	// The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
	CustomerTaxIDs []*InvoiceCustomerTaxID `json:"customer_tax_ids"`
	// Custom fields displayed on the invoice.
	CustomFields []*InvoiceCustomField `json:"custom_fields"`
	// ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
	DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"`
	// ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
	DefaultSource *PaymentSource `json:"default_source"`
	// The tax rates applied to this invoice, if any.
	DefaultTaxRates []*TaxRate `json:"default_tax_rates"`
	Deleted         bool       `json:"deleted"`
	// An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
	Description string `json:"description"`
	// Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
	Discount *Discount `json:"discount"`
	// The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
	Discounts []*Discount `json:"discounts"`
	// The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.
	DueDate int64 `json:"due_date"`
	// Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
	EndingBalance int64 `json:"ending_balance"`
	// Footer displayed on the invoice.
	Footer string `json:"footer"`
	// The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
	HostedInvoiceURL string `json:"hosted_invoice_url"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
	InvoicePDF string `json:"invoice_pdf"`
	// The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
	LastFinalizationError *Error `json:"last_finalization_error"`
	// The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
	Lines *InvoiceLineItemList `json:"lines"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.
	NextPaymentAttempt int64 `json:"next_payment_attempt"`
	// A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.
	Number string `json:"number"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
	OnBehalfOf *Account `json:"on_behalf_of"`
	// Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.
	Paid bool `json:"paid"`
	// Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.
	PaidOutOfBand bool `json:"paid_out_of_band"`
	// The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.
	PaymentIntent   *PaymentIntent          `json:"payment_intent"`
	PaymentSettings *InvoicePaymentSettings `json:"payment_settings"`
	// End of the usage period during which invoice items were added to this invoice.
	PeriodEnd int64 `json:"period_end"`
	// Start of the usage period during which invoice items were added to this invoice.
	PeriodStart int64 `json:"period_start"`
	// Total amount of all post-payment credit notes issued for this invoice.
	PostPaymentCreditNotesAmount int64 `json:"post_payment_credit_notes_amount"`
	// Total amount of all pre-payment credit notes issued for this invoice.
	PrePaymentCreditNotesAmount int64 `json:"pre_payment_credit_notes_amount"`
	// The quote this invoice was generated from.
	Quote *Quote `json:"quote"`
	// This is the transaction number that appears on email receipts sent for this invoice.
	ReceiptNumber string `json:"receipt_number"`
	// Options for invoice PDF rendering.
	RenderingOptions *InvoiceRenderingOptions `json:"rendering_options"`
	// Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance.
	StartingBalance int64 `json:"starting_balance"`
	// Extra information about an invoice for the customer's credit card statement.
	StatementDescriptor string `json:"statement_descriptor"`
	// The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
	Status            InvoiceStatus             `json:"status"`
	StatusTransitions *InvoiceStatusTransitions `json:"status_transitions"`
	// The subscription that this invoice was prepared for, if any.
	Subscription *Subscription `json:"subscription"`
	// Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
	SubscriptionProrationDate int64 `json:"subscription_proration_date"`
	// Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
	Subtotal int64 `json:"subtotal"`
	// The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
	SubtotalExcludingTax int64 `json:"subtotal_excluding_tax"`
	// The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
	Tax int64 `json:"tax"`
	// ID of the test clock this invoice belongs to.
	TestClock       *TestHelpersTestClock   `json:"test_clock"`
	ThresholdReason *InvoiceThresholdReason `json:"threshold_reason"`
	// Total after discounts and taxes.
	Total int64 `json:"total"`
	// The aggregate amounts calculated per discount across all line items.
	TotalDiscountAmounts []*InvoiceTotalDiscountAmount `json:"total_discount_amounts"`
	// The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.
	TotalExcludingTax int64 `json:"total_excluding_tax"`
	// The aggregate amounts calculated per tax rate for all line items.
	TotalTaxAmounts []*InvoiceTotalTaxAmount `json:"total_tax_amounts"`
	// The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.
	TransferData *InvoiceTransferData `json:"transfer_data"`
	// Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
	WebhooksDeliveredAt int64 `json:"webhooks_delivered_at"`
}

Invoices are statements of amounts owed by a customer, and are either generated one-off, or generated periodically from a subscription.

They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments that may be caused by subscription upgrades/downgrades (if necessary).

If your invoice is configured to be billed through automatic charges, Stripe automatically finalizes your invoice and attempts payment. Note that finalizing the invoice, [when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does not happen immediately as the invoice is created. Stripe waits until one hour after the last webhook was successfully sent (or the last webhook timed out after failing). If you (and the platforms you may have connected to) have no webhooks configured, Stripe waits one hour after creation to finalize the invoice.

If your invoice is configured to be billed by sending an email, then based on your [email settings](https://dashboard.stripe.com/account/billing/automatic), Stripe will email the invoice to your customer and await payment. These emails can contain a link to a hosted page to pay the invoice.

Stripe applies any customer credit on the account before determining the amount due for the invoice (i.e., the amount that will be actually charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the invoice is automatically marked paid, and we add the amount due to the customer's credit balance which is applied to the next invoice.

More details on the customer's credit balance are [here](https://stripe.com/docs/billing/customer/balance).

Related guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending).

Example (Update)
package main

import (
	"log"

	stripe "github.com/stripe/stripe-go/v73"
	"github.com/stripe/stripe-go/v73/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)
}
Output:

func (*Invoice) UnmarshalJSON

func (i *Invoice) UnmarshalJSON(data []byte) error

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 InvoiceAutomaticTax

type InvoiceAutomaticTax struct {
	// Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
	Enabled bool `json:"enabled"`
	// The status of the most recent automated tax calculation for this invoice.
	Status InvoiceAutomaticTaxStatus `json:"status"`
}

type InvoiceAutomaticTaxParams

type InvoiceAutomaticTaxParams struct {
	// Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
	Enabled *bool `form:"enabled"`
}

Settings for automatic tax lookup for this invoice.

type InvoiceAutomaticTaxStatus

type InvoiceAutomaticTaxStatus string

The status of the most recent automated tax calculation for this invoice.

const (
	InvoiceAutomaticTaxStatusComplete               InvoiceAutomaticTaxStatus = "complete"
	InvoiceAutomaticTaxStatusFailed                 InvoiceAutomaticTaxStatus = "failed"
	InvoiceAutomaticTaxStatusRequiresLocationInputs InvoiceAutomaticTaxStatus = "requires_location_inputs"
)

List of values that InvoiceAutomaticTaxStatus can take

type InvoiceBillingReason

type InvoiceBillingReason string

Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created via the invoice editor). The `upcoming` value is reserved for simulated invoices per the upcoming invoice endpoint. `subscription_threshold` indicates an invoice created due to a billing threshold being reached.

const (
	InvoiceBillingReasonAutomaticPendingInvoiceItemInvoice InvoiceBillingReason = "automatic_pending_invoice_item_invoice"
	InvoiceBillingReasonManual                             InvoiceBillingReason = "manual"
	InvoiceBillingReasonQuoteAccept                        InvoiceBillingReason = "quote_accept"
	InvoiceBillingReasonSubscription                       InvoiceBillingReason = "subscription"
	InvoiceBillingReasonSubscriptionCreate                 InvoiceBillingReason = "subscription_create"
	InvoiceBillingReasonSubscriptionCycle                  InvoiceBillingReason = "subscription_cycle"
	InvoiceBillingReasonSubscriptionThreshold              InvoiceBillingReason = "subscription_threshold"
	InvoiceBillingReasonSubscriptionUpdate                 InvoiceBillingReason = "subscription_update"
	InvoiceBillingReasonUpcoming                           InvoiceBillingReason = "upcoming"
)

List of values that InvoiceBillingReason can take

type InvoiceCollectionMethod

type InvoiceCollectionMethod string

Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.

const (
	InvoiceCollectionMethodChargeAutomatically InvoiceCollectionMethod = "charge_automatically"
	InvoiceCollectionMethodSendInvoice         InvoiceCollectionMethod = "send_invoice"
)

List of values that InvoiceCollectionMethod can take

type InvoiceCustomField

type InvoiceCustomField struct {
	// The name of the custom field.
	Name string `json:"name"`
	// The value of the custom field.
	Value string `json:"value"`
}

Custom fields displayed on the invoice.

type InvoiceCustomFieldParams

type InvoiceCustomFieldParams struct {
	// The name of the custom field. This may be up to 30 characters.
	Name *string `form:"name"`
	// The value of the custom field. This may be up to 30 characters.
	Value *string `form:"value"`
}

A list of up to 4 custom fields to be displayed on the invoice.

type InvoiceCustomerTaxID

type InvoiceCustomerTaxID struct {
	// The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown`
	Type *TaxIDType `json:"type"`
	// The value of the tax ID.
	Value string `json:"value"`
}

The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.

type InvoiceDiscountParams

type InvoiceDiscountParams struct {
	// ID of the coupon to create a new discount for.
	Coupon *string `form:"coupon"`
	// ID of an existing discount on the object (or one of its ancestors) to reuse.
	Discount *string `form:"discount"`
}

The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.

type InvoiceFinalizeInvoiceParams

type InvoiceFinalizeInvoiceParams struct {
	Params `form:"*"`
	// Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/invoicing/automatic-charging) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.
	AutoAdvance *bool `form:"auto_advance"`
}

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.

type InvoiceItem

type InvoiceItem struct {
	APIResource
	// Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`.
	Amount int64 `json:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// The ID of the customer who will be billed when this invoice item is billed.
	Customer *Customer `json:"customer"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Date    int64 `json:"date"`
	Deleted bool  `json:"deleted"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// If true, discounts will apply to this invoice item. Always false for prorations.
	Discountable bool `json:"discountable"`
	// The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
	Discounts []*Discount `json:"discounts"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The ID of the invoice this invoice item belongs to.
	Invoice *Invoice `json:"invoice"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string  `json:"object"`
	Period *Period `json:"period"`
	// If the invoice item is a proration, the plan of the subscription that the proration was computed for.
	Plan *Plan `json:"plan"`
	// The price of the invoice item.
	Price *Price `json:"price"`
	// Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
	Proration bool `json:"proration"`
	// Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
	Quantity int64 `json:"quantity"`
	// The subscription that this invoice item has been created for, if any.
	Subscription *Subscription `json:"subscription"`
	// The subscription item that this invoice item has been created for, if any.
	SubscriptionItem string `json:"subscription_item"`
	// The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.
	TaxRates []*TaxRate `json:"tax_rates"`
	// ID of the test clock this invoice item belongs to.
	TestClock *TestHelpersTestClock `json:"test_clock"`
	// Unit amount (in the `currency` specified) of the invoice item.
	UnitAmount int64 `json:"unit_amount"`
	// Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
	UnitAmountDecimal float64 `json:"unit_amount_decimal,string"`
}

Sometimes you want to add a charge or credit to a customer, but actually charge or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges (to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.

Related guide: [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items).

type InvoiceItemDiscountParams

type InvoiceItemDiscountParams struct {
	// ID of the coupon to create a new discount for.
	Coupon *string `form:"coupon"`
	// ID of an existing discount on the object (or one of its ancestors) to reuse.
	Discount *string `form:"discount"`
}

The coupons to redeem into discounts for the invoice item or invoice line item.

type InvoiceItemList

type InvoiceItemList struct {
	APIResource
	ListMeta
	Data []*InvoiceItem `json:"data"`
}

InvoiceItemList is a list of InvoiceItems as retrieved from a list endpoint.

type InvoiceItemListParams

type InvoiceItemListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.
	Customer *string `form:"customer"`
	// Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.
	Invoice *string `form:"invoice"`
	// Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied.
	Pending *bool `form:"pending"`
}

Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.

type InvoiceItemParams

type InvoiceItemParams struct {
	Params `form:"*"`
	// The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// The ID of the customer who will be billed when this invoice item is billed.
	Customer *string `form:"customer"`
	// An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
	Description *string `form:"description"`
	// Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.
	Discountable *bool `form:"discountable"`
	// The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
	Discounts []*InvoiceItemDiscountParams `form:"discounts"`
	// The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.
	Invoice *string `form:"invoice"`
	// The period associated with this invoice item. When set to different values, the period will be rendered on the invoice.
	Period *InvoiceItemPeriodParams `form:"period"`
	// The ID of the price object.
	Price *string `form:"price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
	PriceData *InvoiceItemPriceDataParams `form:"price_data"`
	// Non-negative integer. The quantity of units for the invoice item.
	Quantity *int64 `form:"quantity"`
	// The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
	Subscription *string `form:"subscription"`
	// The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates.
	TaxRates []*string `form:"tax_rates"`
	// The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

type InvoiceItemPeriodParams

type InvoiceItemPeriodParams struct {
	// The end of the period, which must be greater than or equal to the start.
	End *int64 `form:"end"`
	// The start of the period.
	Start *int64 `form:"start"`
}

The period associated with this invoice item. When set to different values, the period will be rendered on the invoice.

type InvoiceItemPriceDataParams

type InvoiceItemPriceDataParams struct {
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// The ID of the product that this price will belong to.
	Product *string `form:"product"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior *string `form:"tax_behavior"`
	// A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline.

type InvoiceLineItem

type InvoiceLineItem struct {
	// The amount, in %s.
	Amount int64 `json:"amount"`
	// The integer amount in %s representing the amount for this line item, excluding all tax and discounts.
	AmountExcludingTax int64 `json:"amount_excluding_tax"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// If true, discounts will apply to this line item. Always false for prorations.
	Discountable bool `json:"discountable"`
	// The amount of discount calculated per discount for this line item.
	DiscountAmounts []*InvoiceLineItemDiscountAmount `json:"discount_amounts"`
	// The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
	Discounts []*Discount `json:"discounts"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.
	InvoiceItem string `json:"invoice_item"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string  `json:"object"`
	Period *Period `json:"period"`
	// The plan of the subscription, if the line item is a subscription or a proration.
	Plan *Plan `json:"plan"`
	// The price of the line item.
	Price *Price `json:"price"`
	// Whether this is a proration.
	Proration bool `json:"proration"`
	// Additional details for proration line items
	ProrationDetails *InvoiceLineItemProrationDetails `json:"proration_details"`
	// The quantity of the subscription, if the line item is a subscription or a proration.
	Quantity int64 `json:"quantity"`
	// The subscription that the invoice item pertains to, if any.
	Subscription string `json:"subscription"`
	// The subscription item that generated this invoice item. Left empty if the line item is not an explicit result of a subscription.
	SubscriptionItem string `json:"subscription_item"`
	// The amount of tax calculated per tax rate for this line item
	TaxAmounts []*InvoiceTotalTaxAmount `json:"tax_amounts"`
	// The tax rates which apply to the line item.
	TaxRates []*TaxRate `json:"tax_rates"`
	// A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.
	Type InvoiceLineItemType `json:"type"`
	// The amount in %s representing the unit amount for this line item, excluding all tax and discounts.
	UnitAmountExcludingTax float64 `json:"unit_amount_excluding_tax,string"`
}

type InvoiceLineItemDiscountAmount

type InvoiceLineItemDiscountAmount struct {
	// The amount, in %s, of the discount.
	Amount int64 `json:"amount"`
	// The discount that was applied to get this discount amount.
	Discount *Discount `json:"discount"`
}

The amount of discount calculated per discount for this line item.

type InvoiceLineItemList

type InvoiceLineItemList struct {
	APIResource
	ListMeta
	Data []*InvoiceLineItem `json:"data"`
}

InvoiceLineItemList is a list of InvoiceLineItems as retrieved from a list endpoint.

type InvoiceLineItemProrationDetails

type InvoiceLineItemProrationDetails struct {
	// For a credit proration `line_item`, the original debit line_items to which the credit proration applies.
	CreditedItems *InvoiceLineItemProrationDetailsCreditedItems `json:"credited_items"`
}

Additional details for proration line items

type InvoiceLineItemProrationDetailsCreditedItems

type InvoiceLineItemProrationDetailsCreditedItems struct {
	// Invoice containing the credited invoice line items
	Invoice string `json:"invoice"`
	// Credited invoice line items
	InvoiceLineItems []string `json:"invoice_line_items"`
}

For a credit proration `line_item`, the original debit line_items to which the credit proration applies.

type InvoiceLineItemType

type InvoiceLineItemType string

A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.

const (
	InvoiceLineItemTypeInvoiceItem  InvoiceLineItemType = "invoiceitem"
	InvoiceLineItemTypeSubscription InvoiceLineItemType = "subscription"
)

List of values that InvoiceLineItemType can take

type InvoiceList

type InvoiceList struct {
	APIResource
	ListMeta
	Data []*Invoice `json:"data"`
}

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

type InvoiceListLinesParams

type InvoiceListLinesParams struct {
	ListParams `form:"*"`
	Invoice    *string `form:"-"` // Included in URL
}

When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

type InvoiceListParams

type InvoiceListParams struct {
	ListParams `form:"*"`
	// The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
	CollectionMethod *string           `form:"collection_method"`
	Created          *int64            `form:"created"`
	CreatedRange     *RangeQueryParams `form:"created"`
	// Only return invoices for the customer specified by this customer ID.
	Customer     *string           `form:"customer"`
	DueDate      *int64            `form:"due_date"`
	DueDateRange *RangeQueryParams `form:"due_date"`
	// The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
	Status *string `form:"status"`
	// Only return invoices for the subscription specified by this subscription ID.
	Subscription *string `form:"subscription"`
}

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

type InvoiceMarkUncollectibleParams

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

Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.

type InvoiceParams

type InvoiceParams struct {
	Params `form:"*"`
	// The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
	AccountTaxIDs []*string `form:"account_tax_ids"`
	// A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
	ApplicationFeeAmount *int64 `form:"application_fee_amount"`
	// Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice.
	AutoAdvance *bool `form:"auto_advance"`
	// Settings for automatic tax lookup for this invoice.
	AutomaticTax *InvoiceAutomaticTaxParams `form:"automatic_tax"`
	// Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
	CollectionMethod *string `form:"collection_method"`
	// The currency to create this invoice in. Defaults to that of `customer` if not specified.
	Currency *string `form:"currency"`
	// The ID of the customer who will be billed.
	Customer *string `form:"customer"`
	// A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
	CustomFields []*InvoiceCustomFieldParams `form:"custom_fields"`
	// The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
	DaysUntilDue *int64 `form:"days_until_due"`
	// ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
	DefaultPaymentMethod *string `form:"default_payment_method"`
	// ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
	DefaultSource *string `form:"default_source"`
	// The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates.
	DefaultTaxRates []*string `form:"default_tax_rates"`
	// An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
	Description *string `form:"description"`
	// The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
	Discounts []*InvoiceDiscountParams `form:"discounts"`
	// The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
	DueDate *int64 `form:"due_date"`
	// Footer to be displayed on the invoice.
	Footer *string `form:"footer"`
	// The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
	OnBehalfOf *string `form:"on_behalf_of"`
	// Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
	PaymentSettings *InvoicePaymentSettingsParams `form:"payment_settings"`
	// How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted.
	PendingInvoiceItemsBehavior *string `form:"pending_invoice_items_behavior"`
	// Options for invoice PDF rendering.
	RenderingOptions *InvoiceRenderingOptionsParams `form:"rendering_options"`
	// Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
	StatementDescriptor *string `form:"statement_descriptor"`
	// The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription if `pending_invoice_items_behavior` is `include`. The subscription's billing cycle and regular subscription events won't be affected.
	Subscription *string `form:"subscription"`
	// If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
	TransferData *InvoiceTransferDataParams `form:"transfer_data"`
}

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.

type InvoicePayParams

type InvoicePayParams struct {
	Params `form:"*"`
	// In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.
	//
	// Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.
	Forgive *bool `form:"forgive"`
	// ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.
	Mandate *string `form:"mandate"`
	// Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
	OffSession *bool `form:"off_session"`
	// Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.
	PaidOutOfBand *bool `form:"paid_out_of_band"`
	// A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
	PaymentMethod *string `form:"payment_method"`
	// A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.
	Source *string `form:"source"`
}

Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.

type InvoicePaymentSettings

type InvoicePaymentSettings struct {
	// ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
	DefaultMandate string `json:"default_mandate"`
	// Payment-method-specific configuration to provide to the invoice's PaymentIntent.
	PaymentMethodOptions *InvoicePaymentSettingsPaymentMethodOptions `json:"payment_method_options"`
	// The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
	PaymentMethodTypes []InvoicePaymentSettingsPaymentMethodType `json:"payment_method_types"`
}

type InvoicePaymentSettingsParams

type InvoicePaymentSettingsParams struct {
	// ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
	DefaultMandate *string `form:"default_mandate"`
	// Payment-method-specific configuration to provide to the invoice's PaymentIntent.
	PaymentMethodOptions *InvoicePaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"`
	// The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
	PaymentMethodTypes []*string `form:"payment_method_types"`
}

Configuration settings for the PaymentIntent that is generated when the invoice is finalized.

type InvoicePaymentSettingsPaymentMethodOptions

type InvoicePaymentSettingsPaymentMethodOptions struct {
	// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
	ACSSDebit *InvoicePaymentSettingsPaymentMethodOptionsACSSDebit `json:"acss_debit"`
	// If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
	Bancontact *InvoicePaymentSettingsPaymentMethodOptionsBancontact `json:"bancontact"`
	// If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
	Card *InvoicePaymentSettingsPaymentMethodOptionsCard `json:"card"`
	// If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
	CustomerBalance *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance `json:"customer_balance"`
	// If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
	Konbini *InvoicePaymentSettingsPaymentMethodOptionsKonbini `json:"konbini"`
	// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
	USBankAccount *InvoicePaymentSettingsPaymentMethodOptionsUSBankAccount `json:"us_bank_account"`
}

Payment-method-specific configuration to provide to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebit

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebit struct {
	MandateOptions *InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"`
	// Bank account verification method.
	VerificationMethod InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"`
}

If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions struct {
	// Transaction type of the mandate.
	TransactionType InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"`
}

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams struct {
	// Transaction type of the mandate.
	TransactionType *string `form:"transaction_type"`
}

Additional fields for Mandate creation

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string

Transaction type of the mandate.

const (
	InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business"
	InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal"
)

List of values that InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitParams

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitParams struct {
	// Additional fields for Mandate creation
	MandateOptions *InvoicePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"`
	// Verification method for the intent
	VerificationMethod *string `form:"verification_method"`
}

If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod

type InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod string

Bank account verification method.

const (
	InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodAutomatic     InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "automatic"
	InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodInstant       InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "instant"
	InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits"
)

List of values that InvoicePaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod can take

type InvoicePaymentSettingsPaymentMethodOptionsBancontact

type InvoicePaymentSettingsPaymentMethodOptionsBancontact struct {
	// Preferred language of the Bancontact authorization page that the customer is redirected to.
	PreferredLanguage string `json:"preferred_language"`
}

If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsBancontactParams

type InvoicePaymentSettingsPaymentMethodOptionsBancontactParams struct {
	// Preferred language of the Bancontact authorization page that the customer is redirected to.
	PreferredLanguage *string `form:"preferred_language"`
}

If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsCard

type InvoicePaymentSettingsPaymentMethodOptionsCard struct {
	Installments *InvoicePaymentSettingsPaymentMethodOptionsCardInstallments `json:"installments"`
	// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
	RequestThreeDSecure InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`
}

If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsCardInstallments

type InvoicePaymentSettingsPaymentMethodOptionsCardInstallments struct {
	// Whether Installments are enabled for this Invoice.
	Enabled bool `json:"enabled"`
}

type InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsParams

type InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsParams struct {
	// Setting to true enables installments for this invoice.
	// Setting to false will prevent any selected plan from applying to a payment.
	Enabled *bool `form:"enabled"`
	// The selected installment plan to use for this invoice.
	Plan *InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"`
}

Installment configuration for payments attempted on this invoice (Mexico Only).

For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).

type InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanParams

type InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanParams struct {
	// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
	Count *int64 `form:"count"`
	// For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
	// One of `month`.
	Interval *string `form:"interval"`
	// Type of installment plan, one of `fixed_count`.
	Type *string `form:"type"`
}

The selected installment plan to use for this invoice.

type InvoicePaymentSettingsPaymentMethodOptionsCardParams

type InvoicePaymentSettingsPaymentMethodOptionsCardParams struct {
	// Installment configuration for payments attempted on this invoice (Mexico Only).
	//
	// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
	Installments *InvoicePaymentSettingsPaymentMethodOptionsCardInstallmentsParams `form:"installments"`
	// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
	RequestThreeDSecure *string `form:"request_three_d_secure"`
}

If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure

type InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure string

We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.

const (
	InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAny       InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "any"
	InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAutomatic InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "automatic"
)

List of values that InvoicePaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure can take

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalance struct {
	BankTransfer *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer `json:"bank_transfer"`
	// The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
	FundingType InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"`
}

If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer struct {
	EUBankTransfer *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer `json:"eu_bank_transfer"`
	// The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
	Type string `json:"type"`
}

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer struct {
	// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
	Country string `json:"country"`
}

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams struct {
	// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
	Country *string `form:"country"`
}

Configuration for eu_bank_transfer funding type.

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams struct {
	// Configuration for eu_bank_transfer funding type.
	EUBankTransfer *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
	// The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
	Type *string `form:"type"`
}

Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType string

The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.

const (
	InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingTypeBankTransfer InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType = "bank_transfer"
)

List of values that InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType can take

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceParams

type InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct {
	// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
	BankTransfer *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"`
	// The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
	FundingType *string `form:"funding_type"`
}

If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsKonbini

type InvoicePaymentSettingsPaymentMethodOptionsKonbini struct{}

If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsKonbiniParams

type InvoicePaymentSettingsPaymentMethodOptionsKonbiniParams struct{}

If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsParams

type InvoicePaymentSettingsPaymentMethodOptionsParams struct {
	// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
	ACSSDebit *InvoicePaymentSettingsPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
	// If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
	Bancontact *InvoicePaymentSettingsPaymentMethodOptionsBancontactParams `form:"bancontact"`
	// If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
	Card *InvoicePaymentSettingsPaymentMethodOptionsCardParams `form:"card"`
	// If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
	CustomerBalance *InvoicePaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
	// If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
	Konbini *InvoicePaymentSettingsPaymentMethodOptionsKonbiniParams `form:"konbini"`
	// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
	USBankAccount *InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
}

Payment-method-specific configuration to provide to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccount

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccount struct {
	FinancialConnections *InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"`
	// Bank account verification method.
	VerificationMethod InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"`
}

If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections struct {
	// The list of permissions to request. The `payment_method` permission must be included.
	Permissions []InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"`
}

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
	// The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
	Permissions []*string `form:"permissions"`
}

Additional fields for Financial Connections Session creation

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string

The list of permissions to request. The `payment_method` permission must be included.

const (
	InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances      InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances"
	InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method"
	InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions  InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions"
)

List of values that InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountParams

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountParams struct {
	// Additional fields for Financial Connections Session creation
	FinancialConnections *InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
	// Verification method for the intent
	VerificationMethod *string `form:"verification_method"`
}

If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod

type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod string

Bank account verification method.

const (
	InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic     InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic"
	InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodInstant       InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "instant"
	InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodMicrodeposits InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "microdeposits"
)

List of values that InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod can take

type InvoicePaymentSettingsPaymentMethodType

type InvoicePaymentSettingsPaymentMethodType string

The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).

const (
	InvoicePaymentSettingsPaymentMethodTypeACHCreditTransfer  InvoicePaymentSettingsPaymentMethodType = "ach_credit_transfer"
	InvoicePaymentSettingsPaymentMethodTypeACHDebit           InvoicePaymentSettingsPaymentMethodType = "ach_debit"
	InvoicePaymentSettingsPaymentMethodTypeACSSDebit          InvoicePaymentSettingsPaymentMethodType = "acss_debit"
	InvoicePaymentSettingsPaymentMethodTypeAUBECSDebit        InvoicePaymentSettingsPaymentMethodType = "au_becs_debit"
	InvoicePaymentSettingsPaymentMethodTypeBACSDebit          InvoicePaymentSettingsPaymentMethodType = "bacs_debit"
	InvoicePaymentSettingsPaymentMethodTypeBancontact         InvoicePaymentSettingsPaymentMethodType = "bancontact"
	InvoicePaymentSettingsPaymentMethodTypeBoleto             InvoicePaymentSettingsPaymentMethodType = "boleto"
	InvoicePaymentSettingsPaymentMethodTypeCard               InvoicePaymentSettingsPaymentMethodType = "card"
	InvoicePaymentSettingsPaymentMethodTypeCustomerBalance    InvoicePaymentSettingsPaymentMethodType = "customer_balance"
	InvoicePaymentSettingsPaymentMethodTypeFPX                InvoicePaymentSettingsPaymentMethodType = "fpx"
	InvoicePaymentSettingsPaymentMethodTypeGiropay            InvoicePaymentSettingsPaymentMethodType = "giropay"
	InvoicePaymentSettingsPaymentMethodTypeGrabpay            InvoicePaymentSettingsPaymentMethodType = "grabpay"
	InvoicePaymentSettingsPaymentMethodTypeIDEAL              InvoicePaymentSettingsPaymentMethodType = "ideal"
	InvoicePaymentSettingsPaymentMethodTypeKonbini            InvoicePaymentSettingsPaymentMethodType = "konbini"
	InvoicePaymentSettingsPaymentMethodTypeLink               InvoicePaymentSettingsPaymentMethodType = "link"
	InvoicePaymentSettingsPaymentMethodTypePayNow             InvoicePaymentSettingsPaymentMethodType = "paynow"
	InvoicePaymentSettingsPaymentMethodTypePromptPay          InvoicePaymentSettingsPaymentMethodType = "promptpay"
	InvoicePaymentSettingsPaymentMethodTypeSEPACreditTransfer InvoicePaymentSettingsPaymentMethodType = "sepa_credit_transfer"
	InvoicePaymentSettingsPaymentMethodTypeSEPADebit          InvoicePaymentSettingsPaymentMethodType = "sepa_debit"
	InvoicePaymentSettingsPaymentMethodTypeSofort             InvoicePaymentSettingsPaymentMethodType = "sofort"
	InvoicePaymentSettingsPaymentMethodTypeUSBankAccount      InvoicePaymentSettingsPaymentMethodType = "us_bank_account"
	InvoicePaymentSettingsPaymentMethodTypeWeChatPay          InvoicePaymentSettingsPaymentMethodType = "wechat_pay"
)

List of values that InvoicePaymentSettingsPaymentMethodType can take

type InvoiceRenderingOptions

type InvoiceRenderingOptions struct {
	// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
	AmountTaxDisplay string `json:"amount_tax_display"`
}

Options for invoice PDF rendering.

type InvoiceRenderingOptionsParams

type InvoiceRenderingOptionsParams struct {
	// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
	AmountTaxDisplay *string `form:"amount_tax_display"`
}

Options for invoice PDF rendering.

type InvoiceSearchParams

type InvoiceSearchParams struct {
	SearchParams `form:"*"`
	// A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
	Page *string `form:"page"`
}

Search for invoices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

type InvoiceSearchResult

type InvoiceSearchResult struct {
	APIResource
	SearchMeta
	Data []*Invoice `json:"data"`
}

InvoiceSearchResult is a list of Invoice search results as retrieved from a search endpoint.

type InvoiceSendInvoiceParams

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

Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.

Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.

type InvoiceStatus

type InvoiceStatus string

The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)

const (
	InvoiceStatusDeleted       InvoiceStatus = "deleted"
	InvoiceStatusDraft         InvoiceStatus = "draft"
	InvoiceStatusOpen          InvoiceStatus = "open"
	InvoiceStatusPaid          InvoiceStatus = "paid"
	InvoiceStatusUncollectible InvoiceStatus = "uncollectible"
	InvoiceStatusVoid          InvoiceStatus = "void"
)

List of values that InvoiceStatus can take

type InvoiceStatusTransitions

type InvoiceStatusTransitions struct {
	// The time that the invoice draft was finalized.
	FinalizedAt int64 `json:"finalized_at"`
	// The time that the invoice was marked uncollectible.
	MarkedUncollectibleAt int64 `json:"marked_uncollectible_at"`
	// The time that the invoice was paid.
	PaidAt int64 `json:"paid_at"`
	// The time that the invoice was voided.
	VoidedAt int64 `json:"voided_at"`
}

type InvoiceThresholdReason

type InvoiceThresholdReason struct {
	// The total invoice amount threshold boundary if it triggered the threshold invoice.
	AmountGTE int64 `json:"amount_gte"`
	// Indicates which line items triggered a threshold invoice.
	ItemReasons []*InvoiceThresholdReasonItemReason `json:"item_reasons"`
}

type InvoiceThresholdReasonItemReason

type InvoiceThresholdReasonItemReason struct {
	// The IDs of the line items that triggered the threshold invoice.
	LineItemIDs []string `json:"line_item_ids"`
	// The quantity threshold boundary that applied to the given line item.
	UsageGTE int64 `json:"usage_gte"`
}

Indicates which line items triggered a threshold invoice.

type InvoiceTotalDiscountAmount

type InvoiceTotalDiscountAmount struct {
	// The amount, in %s, of the discount.
	Amount int64 `json:"amount"`
	// The discount that was applied to get this discount amount.
	Discount *Discount `json:"discount"`
}

The aggregate amounts calculated per discount across all line items.

type InvoiceTotalTaxAmount

type InvoiceTotalTaxAmount struct {
	// The amount, in %s, of the tax.
	Amount int64 `json:"amount"`
	// Whether this tax amount is inclusive or exclusive.
	Inclusive bool `json:"inclusive"`
	// The tax rate that was applied to get this tax amount.
	TaxRate *TaxRate `json:"tax_rate"`
}

The aggregate amounts calculated per tax rate for all line items.

type InvoiceTransferData

type InvoiceTransferData struct {
	// The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.
	Amount int64 `json:"amount"`
	// The account where funds from the payment will be transferred to upon payment success.
	Destination *Account `json:"destination"`
}

The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.

type InvoiceTransferDataParams

type InvoiceTransferDataParams struct {
	// The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
	Amount *int64 `form:"amount"`
	// ID of an existing, connected Stripe account.
	Destination *string `form:"destination"`
}

If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.

type InvoiceUpcomingAutomaticTaxParams

type InvoiceUpcomingAutomaticTaxParams struct {
	Enabled *bool `form:"enabled"`
}

type InvoiceUpcomingCustomerDetailsParams

type InvoiceUpcomingCustomerDetailsParams struct {
	// The customer's address.
	Address *AddressParams `form:"address"`
	// The customer's shipping information. Appears on invoices emailed to this customer.
	Shipping *InvoiceUpcomingCustomerDetailsShippingParams `form:"shipping"`
	// Tax details about the customer.
	Tax *InvoiceUpcomingCustomerDetailsTaxParams `form:"tax"`
	// The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
	TaxExempt *string `form:"tax_exempt"`
	// The customer's tax IDs.
	TaxIDs []*InvoiceUpcomingCustomerDetailsTaxIDParams `form:"tax_ids"`
}

Details about the customer you want to invoice or overrides for an existing customer.

type InvoiceUpcomingCustomerDetailsShippingParams

type InvoiceUpcomingCustomerDetailsShippingParams struct {
	// Customer shipping address.
	Address *AddressParams `form:"address"`
	// Customer name.
	Name *string `form:"name"`
	// Customer phone (including extension).
	Phone *string `form:"phone"`
}

The customer's shipping information. Appears on invoices emailed to this customer.

type InvoiceUpcomingCustomerDetailsTaxIDParams

type InvoiceUpcomingCustomerDetailsTaxIDParams struct {
	// Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
	Type *string `form:"type"`
	// Value of the tax ID.
	Value *string `form:"value"`
}

The customer's tax IDs.

type InvoiceUpcomingCustomerDetailsTaxParams

type InvoiceUpcomingCustomerDetailsTaxParams struct {
	// A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
	IPAddress *string `form:"ip_address"`
}

Tax details about the customer.

type InvoiceUpcomingInvoiceItemParams

type InvoiceUpcomingInvoiceItemParams struct {
	// The integer amount in cents (or local equivalent) of previewed invoice item.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items.
	Currency *string `form:"currency"`
	// An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
	Description *string `form:"description"`
	// Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
	Discountable *bool `form:"discountable"`
	// The coupons to redeem into discounts for the invoice item in the preview.
	Discounts []*InvoiceItemDiscountParams `form:"discounts"`
	// The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
	InvoiceItem *string `form:"invoiceitem"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// The period associated with this invoice item. When set to different values, the period will be rendered on the invoice.
	Period *InvoiceUpcomingInvoiceItemPeriodParams `form:"period"`
	// The ID of the price object.
	Price *string `form:"price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
	PriceData *InvoiceItemPriceDataParams `form:"price_data"`
	// Non-negative integer. The quantity of units for the invoice item.
	Quantity *int64 `form:"quantity"`
	// The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
	TaxRates []*string `form:"tax_rates"`
	// The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

List of invoice items to add or update in the upcoming invoice preview.

type InvoiceUpcomingInvoiceItemPeriodParams

type InvoiceUpcomingInvoiceItemPeriodParams struct {
	// The end of the period, which must be greater than or equal to the start.
	End *int64 `form:"end"`
	// The start of the period.
	Start *int64 `form:"start"`
}

The period associated with this invoice item. When set to different values, the period will be rendered on the invoice.

type InvoiceUpcomingLinesAutomaticTaxParams

type InvoiceUpcomingLinesAutomaticTaxParams struct {
	// Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
	Enabled *bool `form:"enabled"`
}

Settings for automatic tax lookup for this invoice preview.

type InvoiceUpcomingLinesCustomerDetailsParams

type InvoiceUpcomingLinesCustomerDetailsParams struct {
	// The customer's address.
	Address *AddressParams `form:"address"`
	// The customer's shipping information. Appears on invoices emailed to this customer.
	Shipping *InvoiceUpcomingLinesCustomerDetailsShippingParams `form:"shipping"`
	// Tax details about the customer.
	Tax *InvoiceUpcomingLinesCustomerDetailsTaxParams `form:"tax"`
	// The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
	TaxExempt *string `form:"tax_exempt"`
	// The customer's tax IDs.
	TaxIDs []*InvoiceUpcomingLinesCustomerDetailsTaxIDParams `form:"tax_ids"`
}

Details about the customer you want to invoice or overrides for an existing customer.

type InvoiceUpcomingLinesCustomerDetailsShippingParams

type InvoiceUpcomingLinesCustomerDetailsShippingParams struct {
	// Customer shipping address.
	Address *AddressParams `form:"address"`
	// Customer name.
	Name *string `form:"name"`
	// Customer phone (including extension).
	Phone *string `form:"phone"`
}

The customer's shipping information. Appears on invoices emailed to this customer.

type InvoiceUpcomingLinesCustomerDetailsTaxIDParams

type InvoiceUpcomingLinesCustomerDetailsTaxIDParams struct {
	// Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
	Type *string `form:"type"`
	// Value of the tax ID.
	Value *string `form:"value"`
}

The customer's tax IDs.

type InvoiceUpcomingLinesCustomerDetailsTaxParams

type InvoiceUpcomingLinesCustomerDetailsTaxParams struct {
	// A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
	IPAddress *string `form:"ip_address"`
}

Tax details about the customer.

type InvoiceUpcomingLinesDiscountParams

type InvoiceUpcomingLinesDiscountParams struct {
	// ID of the coupon to create a new discount for.
	Coupon *string `form:"coupon"`
	// ID of an existing discount on the object (or one of its ancestors) to reuse.
	Discount *string `form:"discount"`
}

The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead.

type InvoiceUpcomingLinesInvoiceItemDiscountParams

type InvoiceUpcomingLinesInvoiceItemDiscountParams struct {
	// ID of the coupon to create a new discount for.
	Coupon *string `form:"coupon"`
	// ID of an existing discount on the object (or one of its ancestors) to reuse.
	Discount *string `form:"discount"`
}

The coupons to redeem into discounts for the invoice item in the preview.

type InvoiceUpcomingLinesInvoiceItemParams

type InvoiceUpcomingLinesInvoiceItemParams struct {
	// The integer amount in cents (or local equivalent) of previewed invoice item.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items.
	Currency *string `form:"currency"`
	// An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
	Description *string `form:"description"`
	// Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
	Discountable *bool `form:"discountable"`
	// The coupons to redeem into discounts for the invoice item in the preview.
	Discounts []*InvoiceUpcomingLinesInvoiceItemDiscountParams `form:"discounts"`
	// The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
	InvoiceItem *string `form:"invoiceitem"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// The period associated with this invoice item. When set to different values, the period will be rendered on the invoice.
	Period *InvoiceUpcomingLinesInvoiceItemPeriodParams `form:"period"`
	// The ID of the price object.
	Price *string `form:"price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
	PriceData *InvoiceUpcomingLinesInvoiceItemPriceDataParams `form:"price_data"`
	// Non-negative integer. The quantity of units for the invoice item.
	Quantity *int64 `form:"quantity"`
	// The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
	TaxRates []*string `form:"tax_rates"`
	// The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

List of invoice items to add or update in the upcoming invoice preview.

type InvoiceUpcomingLinesInvoiceItemPeriodParams

type InvoiceUpcomingLinesInvoiceItemPeriodParams struct {
	// The end of the period, which must be greater than or equal to the start.
	End *int64 `form:"end"`
	// The start of the period.
	Start *int64 `form:"start"`
}

The period associated with this invoice item. When set to different values, the period will be rendered on the invoice.

type InvoiceUpcomingLinesInvoiceItemPriceDataParams

type InvoiceUpcomingLinesInvoiceItemPriceDataParams struct {
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// The ID of the product that this price will belong to.
	Product *string `form:"product"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior *string `form:"tax_behavior"`
	// A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline.

type InvoiceUpcomingLinesParams

type InvoiceUpcomingLinesParams struct {
	ListParams `form:"*"`
	// Settings for automatic tax lookup for this invoice preview.
	AutomaticTax *InvoiceUpcomingLinesAutomaticTaxParams `form:"automatic_tax"`
	// The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string.
	Coupon *string `form:"coupon"`
	// The currency to preview this invoice in. Defaults to that of `customer` if not specified.
	Currency *string `form:"currency"`
	// The identifier of the customer whose upcoming invoice you'd like to retrieve.
	Customer *string `form:"customer"`
	// Details about the customer you want to invoice or overrides for an existing customer.
	CustomerDetails *InvoiceUpcomingLinesCustomerDetailsParams `form:"customer_details"`
	// The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead.
	Discounts []*InvoiceUpcomingLinesDiscountParams `form:"discounts"`
	// List of invoice items to add or update in the upcoming invoice preview.
	InvoiceItems []*InvoiceUpcomingLinesInvoiceItemParams `form:"invoice_items"`
	// The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
	Schedule *string `form:"schedule"`
	// The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
	Subscription *string `form:"subscription"`
	// For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
	SubscriptionBillingCycleAnchor          *int64 `form:"subscription_billing_cycle_anchor"`
	SubscriptionBillingCycleAnchorNow       *bool  `form:"-"` // See custom AppendTo
	SubscriptionBillingCycleAnchorUnchanged *bool  `form:"-"` // See custom AppendTo
	// Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.
	SubscriptionCancelAt *int64 `form:"subscription_cancel_at"`
	// Boolean indicating whether this subscription should cancel at the end of the current period.
	SubscriptionCancelAtPeriodEnd *bool `form:"subscription_cancel_at_period_end"`
	// This simulates the subscription being canceled or expired immediately.
	SubscriptionCancelNow *bool `form:"subscription_cancel_now"`
	// If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
	SubscriptionDefaultTaxRates []*string `form:"subscription_default_tax_rates"`
	// A list of up to 20 subscription items, each with an attached price.
	SubscriptionItems []*InvoiceUpcomingLinesSubscriptionItemParams `form:"subscription_items"`
	// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes.
	SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"`
	// If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'.
	SubscriptionProrationDate *int64 `form:"subscription_proration_date"`
	// Date a subscription is intended to start (can be future or past)
	SubscriptionStartDate *int64 `form:"subscription_start_date"`
	// If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required.
	SubscriptionTrialEnd    *int64 `form:"subscription_trial_end"`
	SubscriptionTrialEndNow *bool  `form:"-"` // See custom AppendTo
	// Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
	SubscriptionTrialFromPlan *bool `form:"subscription_trial_from_plan"`
}

When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

func (*InvoiceUpcomingLinesParams) AppendTo

func (i *InvoiceUpcomingLinesParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for InvoiceUpcomingLinesParams.

type InvoiceUpcomingLinesSubscriptionItemBillingThresholdsParams

type InvoiceUpcomingLinesSubscriptionItemBillingThresholdsParams struct {
	// Usage threshold that triggers the subscription to advance to a new billing period
	UsageGTE *int64 `form:"usage_gte"`
}

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.

type InvoiceUpcomingLinesSubscriptionItemParams

type InvoiceUpcomingLinesSubscriptionItemParams struct {
	// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
	BillingThresholds *InvoiceUpcomingLinesSubscriptionItemBillingThresholdsParams `form:"billing_thresholds"`
	// Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`.
	ClearUsage *bool `form:"clear_usage"`
	// A flag that, if set to `true`, will delete the specified item.
	Deleted *bool `form:"deleted"`
	// Subscription item to update.
	ID *string `form:"id"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// Plan ID for this item, as a string.
	Plan *string `form:"plan"`
	// The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
	Price *string `form:"price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
	PriceData *InvoiceUpcomingLinesSubscriptionItemPriceDataParams `form:"price_data"`
	// Quantity for this item.
	Quantity *int64 `form:"quantity"`
	// A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
	TaxRates []*string `form:"tax_rates"`
}

A list of up to 20 subscription items, each with an attached price.

type InvoiceUpcomingLinesSubscriptionItemPriceDataParams

type InvoiceUpcomingLinesSubscriptionItemPriceDataParams struct {
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// The ID of the product that this price will belong to.
	Product *string `form:"product"`
	// The recurring components of a price such as `interval` and `interval_count`.
	Recurring *InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringParams `form:"recurring"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior *string `form:"tax_behavior"`
	// A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline.

type InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringParams

type InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringParams struct {
	// Specifies billing frequency. Either `day`, `week`, `month` or `year`.
	Interval *string `form:"interval"`
	// The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
	IntervalCount *int64 `form:"interval_count"`
}

The recurring components of a price such as `interval` and `interval_count`.

type InvoiceUpcomingParams

type InvoiceUpcomingParams struct {
	Params `form:"*"`
	// Settings for automatic tax lookup for this invoice preview.
	AutomaticTax *InvoiceAutomaticTaxParams `form:"automatic_tax"`
	// The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string.
	Coupon *string `form:"coupon"`
	// The currency to preview this invoice in. Defaults to that of `customer` if not specified.
	Currency *string `form:"currency"`
	// The identifier of the customer whose upcoming invoice you'd like to retrieve.
	Customer *string `form:"customer"`
	// Details about the customer you want to invoice or overrides for an existing customer.
	CustomerDetails *InvoiceUpcomingCustomerDetailsParams `form:"customer_details"`
	// The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead.
	Discounts []*InvoiceDiscountParams `form:"discounts"`
	// List of invoice items to add or update in the upcoming invoice preview.
	InvoiceItems []*InvoiceUpcomingInvoiceItemParams `form:"invoice_items"`
	// The identifier of the unstarted schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
	Schedule *string `form:"schedule"`
	// The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
	Subscription *string `form:"subscription"`
	// For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
	SubscriptionBillingCycleAnchor          *int64 `form:"subscription_billing_cycle_anchor"`
	SubscriptionBillingCycleAnchorNow       *bool  `form:"-"` // See custom AppendTo
	SubscriptionBillingCycleAnchorUnchanged *bool  `form:"-"` // See custom AppendTo
	// Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`.
	SubscriptionCancelAt *int64 `form:"subscription_cancel_at"`
	// Boolean indicating whether this subscription should cancel at the end of the current period.
	SubscriptionCancelAtPeriodEnd *bool `form:"subscription_cancel_at_period_end"`
	// This simulates the subscription being canceled or expired immediately.
	SubscriptionCancelNow *bool `form:"subscription_cancel_now"`
	// If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
	SubscriptionDefaultTaxRates []*string `form:"subscription_default_tax_rates"`
	// A list of up to 20 subscription items, each with an attached price.
	SubscriptionItems []*SubscriptionItemsParams `form:"subscription_items"`
	// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes.
	SubscriptionProrationBehavior *string `form:"subscription_proration_behavior"`
	// If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'.
	SubscriptionProrationDate *int64 `form:"subscription_proration_date"`
	// Date a subscription is intended to start (can be future or past)
	SubscriptionStartDate *int64 `form:"subscription_start_date"`
	// If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required.
	SubscriptionTrialEnd    *int64 `form:"subscription_trial_end"`
	SubscriptionTrialEndNow *bool  `form:"-"` // See custom AppendTo
	// Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
	SubscriptionTrialFromPlan *bool `form:"subscription_trial_from_plan"`
}

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.

You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.

func (*InvoiceUpcomingParams) AppendTo

func (i *InvoiceUpcomingParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for InvoiceUpcomingParams.

type InvoiceVoidInvoiceParams

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

Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.

type IssuingAuthorization

type IssuingAuthorization struct {
	APIResource
	// The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	Amount int64 `json:"amount"`
	// Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	AmountDetails *IssuingAuthorizationAmountDetails `json:"amount_details"`
	// Whether the authorization has been approved.
	Approved bool `json:"approved"`
	// How the card details were provided.
	AuthorizationMethod IssuingAuthorizationAuthorizationMethod `json:"authorization_method"`
	// List of balance transactions associated with this authorization.
	BalanceTransactions []*BalanceTransaction `json:"balance_transactions"`
	// You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders.
	Card *IssuingCard `json:"card"`
	// The cardholder to whom this authorization belongs.
	Cardholder *IssuingCardholder `json:"cardholder"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	MerchantAmount int64 `json:"merchant_amount"`
	// The currency that was presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	MerchantCurrency Currency                          `json:"merchant_currency"`
	MerchantData     *IssuingAuthorizationMerchantData `json:"merchant_data"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.
	PendingRequest *IssuingAuthorizationPendingRequest `json:"pending_request"`
	// History of every time `pending_request` was approved/denied, either by you directly or by Stripe (e.g. based on your `spending_controls`). If the merchant changes the authorization by performing an [incremental authorization](https://stripe.com/docs/issuing/purchases/authorizations), you can look at this field to see the previous requests for the authorization.
	RequestHistory []*IssuingAuthorizationRequestHistory `json:"request_history"`
	// The current status of the authorization in its lifecycle.
	Status IssuingAuthorizationStatus `json:"status"`
	// List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization.
	Transactions []*IssuingTransaction `json:"transactions"`
	// [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts).
	Treasury         *IssuingAuthorizationTreasury         `json:"treasury"`
	VerificationData *IssuingAuthorizationVerificationData `json:"verification_data"`
	// The digital wallet used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`.
	Wallet IssuingAuthorizationWallet `json:"wallet"`
}

When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the purchase to be completed successfully.

Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).

func (*IssuingAuthorization) UnmarshalJSON

func (i *IssuingAuthorization) UnmarshalJSON(data []byte) error

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 IssuingAuthorizationAmountDetails

type IssuingAuthorizationAmountDetails struct {
	// The fee charged by the ATM for the cash withdrawal.
	ATMFee int64 `json:"atm_fee"`
}

Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).

type IssuingAuthorizationApproveParams

type IssuingAuthorizationApproveParams struct {
	Params `form:"*"`
	// If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).
	Amount *int64 `form:"amount"`
}

Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.

type IssuingAuthorizationAuthorizationMethod

type IssuingAuthorizationAuthorizationMethod string

How the card details were provided.

const (
	IssuingAuthorizationAuthorizationMethodChip        IssuingAuthorizationAuthorizationMethod = "chip"
	IssuingAuthorizationAuthorizationMethodContactless IssuingAuthorizationAuthorizationMethod = "contactless"
	IssuingAuthorizationAuthorizationMethodKeyedIn     IssuingAuthorizationAuthorizationMethod = "keyed_in"
	IssuingAuthorizationAuthorizationMethodOnline      IssuingAuthorizationAuthorizationMethod = "online"
	IssuingAuthorizationAuthorizationMethodSwipe       IssuingAuthorizationAuthorizationMethod = "swipe"
)

List of values that IssuingAuthorizationAuthorizationMethod can take

type IssuingAuthorizationDeclineParams

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

Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.

type IssuingAuthorizationList

type IssuingAuthorizationList struct {
	APIResource
	ListMeta
	Data []*IssuingAuthorization `json:"data"`
}

IssuingAuthorizationList is a list of Authorizations as retrieved from a list endpoint.

type IssuingAuthorizationListParams

type IssuingAuthorizationListParams struct {
	ListParams `form:"*"`
	// Only return authorizations that belong to the given card.
	Card *string `form:"card"`
	// Only return authorizations that belong to the given cardholder.
	Cardholder *string `form:"cardholder"`
	// Only return authorizations that were created during the given date interval.
	Created *int64 `form:"created"`
	// Only return authorizations that were created during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`.
	Status *string `form:"status"`
}

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

type IssuingAuthorizationMerchantData

type IssuingAuthorizationMerchantData struct {
	// A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
	Category string `json:"category"`
	// The merchant category code for the seller's business
	CategoryCode string `json:"category_code"`
	// City where the seller is located
	City string `json:"city"`
	// Country where the seller is located
	Country string `json:"country"`
	// Name of the seller
	Name string `json:"name"`
	// Identifier assigned to the seller by the card brand
	NetworkID string `json:"network_id"`
	// Postal code where the seller is located
	PostalCode string `json:"postal_code"`
	// State where the seller is located
	State string `json:"state"`
}

type IssuingAuthorizationParams

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

Retrieves an Issuing Authorization object.

type IssuingAuthorizationPendingRequest

type IssuingAuthorizationPendingRequest struct {
	// The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	Amount int64 `json:"amount"`
	// Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	AmountDetails *IssuingAuthorizationAmountDetails `json:"amount_details"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
	IsAmountControllable bool `json:"is_amount_controllable"`
	// The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	MerchantAmount int64 `json:"merchant_amount"`
	// The local currency the merchant is requesting to authorize.
	MerchantCurrency Currency `json:"merchant_currency"`
}

The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook.

type IssuingAuthorizationRequestHistory

type IssuingAuthorizationRequestHistory struct {
	// The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved.
	Amount int64 `json:"amount"`
	// Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	AmountDetails *IssuingAuthorizationAmountDetails `json:"amount_details"`
	// Whether this request was approved.
	Approved bool `json:"approved"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	MerchantAmount int64 `json:"merchant_amount"`
	// The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	MerchantCurrency Currency `json:"merchant_currency"`
	// The reason for the approval or decline.
	Reason IssuingAuthorizationRequestHistoryReason `json:"reason"`
}

History of every time `pending_request` was approved/denied, either by you directly or by Stripe (e.g. based on your `spending_controls`). If the merchant changes the authorization by performing an [incremental authorization](https://stripe.com/docs/issuing/purchases/authorizations), you can look at this field to see the previous requests for the authorization.

type IssuingAuthorizationRequestHistoryReason

type IssuingAuthorizationRequestHistoryReason string

The reason for the approval or decline.

const (
	IssuingAuthorizationRequestHistoryReasonAccountDisabled                IssuingAuthorizationRequestHistoryReason = "account_disabled"
	IssuingAuthorizationRequestHistoryReasonCardActive                     IssuingAuthorizationRequestHistoryReason = "card_active"
	IssuingAuthorizationRequestHistoryReasonCardInactive                   IssuingAuthorizationRequestHistoryReason = "card_inactive"
	IssuingAuthorizationRequestHistoryReasonCardholderInactive             IssuingAuthorizationRequestHistoryReason = "cardholder_inactive"
	IssuingAuthorizationRequestHistoryReasonCardholderVerificationRequired IssuingAuthorizationRequestHistoryReason = "cardholder_verification_required"
	IssuingAuthorizationRequestHistoryReasonInsufficientFunds              IssuingAuthorizationRequestHistoryReason = "insufficient_funds"
	IssuingAuthorizationRequestHistoryReasonNotAllowed                     IssuingAuthorizationRequestHistoryReason = "not_allowed"
	IssuingAuthorizationRequestHistoryReasonSpendingControls               IssuingAuthorizationRequestHistoryReason = "spending_controls"
	IssuingAuthorizationRequestHistoryReasonSuspectedFraud                 IssuingAuthorizationRequestHistoryReason = "suspected_fraud"
	IssuingAuthorizationRequestHistoryReasonVerificationFailed             IssuingAuthorizationRequestHistoryReason = "verification_failed"
	IssuingAuthorizationRequestHistoryReasonWebhookApproved                IssuingAuthorizationRequestHistoryReason = "webhook_approved"
	IssuingAuthorizationRequestHistoryReasonWebhookDeclined                IssuingAuthorizationRequestHistoryReason = "webhook_declined"
	IssuingAuthorizationRequestHistoryReasonWebhookTimeout                 IssuingAuthorizationRequestHistoryReason = "webhook_timeout"
)

List of values that IssuingAuthorizationRequestHistoryReason can take

type IssuingAuthorizationStatus

type IssuingAuthorizationStatus string

The current status of the authorization in its lifecycle.

const (
	IssuingAuthorizationStatusClosed   IssuingAuthorizationStatus = "closed"
	IssuingAuthorizationStatusPending  IssuingAuthorizationStatus = "pending"
	IssuingAuthorizationStatusReversed IssuingAuthorizationStatus = "reversed"
)

List of values that IssuingAuthorizationStatus can take

type IssuingAuthorizationTreasury

type IssuingAuthorizationTreasury struct {
	// The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization
	ReceivedCredits []string `json:"received_credits"`
	// The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization
	ReceivedDebits []string `json:"received_debits"`
	// The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization
	Transaction string `json:"transaction"`
}

[Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts).

type IssuingAuthorizationVerificationData

type IssuingAuthorizationVerificationData struct {
	// Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`.
	AddressLine1Check IssuingAuthorizationVerificationDataCheck `json:"address_line1_check"`
	// Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`.
	AddressPostalCodeCheck IssuingAuthorizationVerificationDataCheck `json:"address_postal_code_check"`
	// Whether the cardholder provided a CVC and if it matched Stripe's record.
	CVCCheck IssuingAuthorizationVerificationDataCheck `json:"cvc_check"`
	// Whether the cardholder provided an expiry date and if it matched Stripe's record.
	ExpiryCheck IssuingAuthorizationVerificationDataCheck `json:"expiry_check"`
}

type IssuingAuthorizationVerificationDataCheck

type IssuingAuthorizationVerificationDataCheck string

Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`.

const (
	IssuingAuthorizationVerificationDataCheckMatch       IssuingAuthorizationVerificationDataCheck = "match"
	IssuingAuthorizationVerificationDataCheckMismatch    IssuingAuthorizationVerificationDataCheck = "mismatch"
	IssuingAuthorizationVerificationDataCheckNotProvided IssuingAuthorizationVerificationDataCheck = "not_provided"
)

List of values that IssuingAuthorizationVerificationDataCheck can take

type IssuingAuthorizationWallet

type IssuingAuthorizationWallet string

The digital wallet used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`.

const (
	IssuingAuthorizationWalletApplePay   IssuingAuthorizationWallet = "apple_pay"
	IssuingAuthorizationWalletGooglePay  IssuingAuthorizationWallet = "google_pay"
	IssuingAuthorizationWalletSamsungPay IssuingAuthorizationWallet = "samsung_pay"
)

List of values that IssuingAuthorizationWallet can take

type IssuingCard

type IssuingCard struct {
	APIResource
	// The brand of the card.
	Brand string `json:"brand"`
	// The reason why the card was canceled.
	CancellationReason IssuingCardCancellationReason `json:"cancellation_reason"`
	// An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
	//
	// Related guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)
	Cardholder *IssuingCardholder `json:"cardholder"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK.
	Currency Currency `json:"currency"`
	// The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
	CVC string `json:"cvc"`
	// The expiration month of the card.
	ExpMonth int64 `json:"exp_month"`
	// The expiration year of the card.
	ExpYear int64 `json:"exp_year"`
	// The financial account this card is attached to.
	FinancialAccount string `json:"financial_account"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The last 4 digits of the card number.
	Last4 string `json:"last4"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
	Number string `json:"number"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The latest card that replaces this card, if any.
	ReplacedBy *IssuingCard `json:"replaced_by"`
	// The card this card replaces, if any.
	ReplacementFor *IssuingCard `json:"replacement_for"`
	// The reason why the previous card needed to be replaced.
	ReplacementReason IssuingCardReplacementReason `json:"replacement_reason"`
	// Where and how the card will be shipped.
	Shipping         *IssuingCardShipping         `json:"shipping"`
	SpendingControls *IssuingCardSpendingControls `json:"spending_controls"`
	// Whether authorizations can be approved on this card.
	Status IssuingCardStatus `json:"status"`
	// The type of the card.
	Type IssuingCardType `json:"type"`
	// Information relating to digital wallets (like Apple Pay and Google Pay).
	Wallets *IssuingCardWallets `json:"wallets"`
}

You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders.

func (*IssuingCard) UnmarshalJSON

func (i *IssuingCard) UnmarshalJSON(data []byte) error

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 IssuingCardCancellationReason

type IssuingCardCancellationReason string

The reason why the card was canceled.

const (
	IssuingCardCancellationReasonDesignRejected IssuingCardCancellationReason = "design_rejected"
	IssuingCardCancellationReasonLost           IssuingCardCancellationReason = "lost"
	IssuingCardCancellationReasonStolen         IssuingCardCancellationReason = "stolen"
)

List of values that IssuingCardCancellationReason can take

type IssuingCardList

type IssuingCardList struct {
	APIResource
	ListMeta
	Data []*IssuingCard `json:"data"`
}

IssuingCardList is a list of Cards as retrieved from a list endpoint.

type IssuingCardListParams

type IssuingCardListParams struct {
	ListParams `form:"*"`
	// Only return cards belonging to the Cardholder with the provided ID.
	Cardholder *string `form:"cardholder"`
	// Only return cards that were issued during the given date interval.
	Created *int64 `form:"created"`
	// Only return cards that were issued during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return cards that have the given expiration month.
	ExpMonth *int64 `form:"exp_month"`
	// Only return cards that have the given expiration year.
	ExpYear *int64 `form:"exp_year"`
	// Only return cards that have the given last four digits.
	Last4 *string `form:"last4"`
	// Only return cards that have the given status. One of `active`, `inactive`, or `canceled`.
	Status *string `form:"status"`
	// Only return cards that have the given type. One of `virtual` or `physical`.
	Type *string `form:"type"`
}

Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

type IssuingCardPINParams

type IssuingCardPINParams struct {
	// The card's desired new PIN, encrypted under Stripe's public key.
	EncryptedNumber *string `form:"encrypted_number"`
}

The desired new PIN for this card.

type IssuingCardParams

type IssuingCardParams struct {
	Params `form:"*"`
	// The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated.
	Cardholder *string `form:"cardholder"`
	// The currency for the card.
	Currency         *string `form:"currency"`
	FinancialAccount *string `form:"financial_account"`
	// The desired new PIN for this card.
	PIN *IssuingCardPINParams `form:"pin"`
	// The card this is meant to be a replacement for (if any).
	ReplacementFor *string `form:"replacement_for"`
	// If `replacement_for` is specified, this should indicate why that card is being replaced.
	ReplacementReason *string `form:"replacement_reason"`
	// The address where the card will be shipped.
	Shipping *IssuingCardShippingParams `form:"shipping"`
	// Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
	SpendingControls *IssuingCardSpendingControlsParams `form:"spending_controls"`
	// Dictates whether authorizations can be approved on this card. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.
	Status *string `form:"status"`
	// The type of card to issue. Possible values are `physical` or `virtual`.
	Type *string `form:"type"`
	// The following parameter is only supported when updating a card
	// Reason why the `status` of this card is `canceled`.
	CancellationReason *string `form:"cancellation_reason"`
}

Creates an Issuing Card object.

type IssuingCardReplacementReason

type IssuingCardReplacementReason string

The reason why the previous card needed to be replaced.

const (
	IssuingCardReplacementReasonDamaged IssuingCardReplacementReason = "damaged"
	IssuingCardReplacementReasonExpired IssuingCardReplacementReason = "expired"
	IssuingCardReplacementReasonLost    IssuingCardReplacementReason = "lost"
	IssuingCardReplacementReasonStolen  IssuingCardReplacementReason = "stolen"
)

List of values that IssuingCardReplacementReason can take

type IssuingCardShipping

type IssuingCardShipping struct {
	Address *Address `json:"address"`
	// The delivery company that shipped a card.
	Carrier IssuingCardShippingCarrier `json:"carrier"`
	// Additional information that may be required for clearing customs.
	Customs *IssuingCardShippingCustoms `json:"customs"`
	// A unix timestamp representing a best estimate of when the card will be delivered.
	ETA int64 `json:"eta"`
	// Recipient name.
	Name string `json:"name"`
	// The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues.
	PhoneNumber string `json:"phone_number"`
	// Shipment service, such as `standard` or `express`.
	Service IssuingCardShippingService `json:"service"`
	// The delivery status of the card.
	Status IssuingCardShippingStatus `json:"status"`
	// A tracking number for a card shipment.
	TrackingNumber string `json:"tracking_number"`
	// A link to the shipping carrier's site where you can view detailed information about a card shipment.
	TrackingURL string `json:"tracking_url"`
	// Packaging options.
	Type IssuingCardShippingType `json:"type"`
}

Where and how the card will be shipped.

type IssuingCardShippingCarrier

type IssuingCardShippingCarrier string

The delivery company that shipped a card.

const (
	IssuingCardShippingCarrierDHL       IssuingCardShippingCarrier = "dhl"
	IssuingCardShippingCarrierFedEx     IssuingCardShippingCarrier = "fedex"
	IssuingCardShippingCarrierRoyalMail IssuingCardShippingCarrier = "royal_mail"
	IssuingCardShippingCarrierUSPS      IssuingCardShippingCarrier = "usps"
)

List of values that IssuingCardShippingCarrier can take

type IssuingCardShippingCustoms

type IssuingCardShippingCustoms struct {
	// A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en.
	EORINumber string `json:"eori_number"`
}

Additional information that may be required for clearing customs.

type IssuingCardShippingCustomsParams

type IssuingCardShippingCustomsParams struct {
	// The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
	EORINumber *string `form:"eori_number"`
}

Customs information for the shipment.

type IssuingCardShippingParams

type IssuingCardShippingParams struct {
	// The address that the card is shipped to.
	Address *AddressParams `form:"address"`
	// Customs information for the shipment.
	Customs *IssuingCardShippingCustomsParams `form:"customs"`
	// The name printed on the shipping label when shipping the card.
	Name *string `form:"name"`
	// Phone number of the recipient of the shipment.
	PhoneNumber *string `form:"phone_number"`
	// Shipment service.
	Service *string `form:"service"`
	// Packaging options.
	Type *string `form:"type"`
}

The address where the card will be shipped.

type IssuingCardShippingService

type IssuingCardShippingService string

Shipment service, such as `standard` or `express`.

const (
	IssuingCardShippingServiceExpress  IssuingCardShippingService = "express"
	IssuingCardShippingServicePriority IssuingCardShippingService = "priority"
	IssuingCardShippingServiceStandard IssuingCardShippingService = "standard"
)

List of values that IssuingCardShippingService can take

type IssuingCardShippingStatus

type IssuingCardShippingStatus string

The delivery status of the card.

const (
	IssuingCardShippingStatusCanceled  IssuingCardShippingStatus = "canceled"
	IssuingCardShippingStatusDelivered IssuingCardShippingStatus = "delivered"
	IssuingCardShippingStatusFailure   IssuingCardShippingStatus = "failure"
	IssuingCardShippingStatusPending   IssuingCardShippingStatus = "pending"
	IssuingCardShippingStatusReturned  IssuingCardShippingStatus = "returned"
	IssuingCardShippingStatusShipped   IssuingCardShippingStatus = "shipped"
)

List of values that IssuingCardShippingStatus can take

type IssuingCardShippingType

type IssuingCardShippingType string

Packaging options.

const (
	IssuingCardShippingTypeBulk       IssuingCardShippingType = "bulk"
	IssuingCardShippingTypeIndividual IssuingCardShippingType = "individual"
)

List of values that IssuingCardShippingType can take

type IssuingCardSpendingControls

type IssuingCardSpendingControls struct {
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
	AllowedCategories []string `json:"allowed_categories"`
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
	BlockedCategories []string `json:"blocked_categories"`
	// Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
	SpendingLimits []*IssuingCardSpendingControlsSpendingLimit `json:"spending_limits"`
	// Currency of the amounts within `spending_limits`. Always the same as the currency of the card.
	SpendingLimitsCurrency Currency `json:"spending_limits_currency"`
}

type IssuingCardSpendingControlsParams

type IssuingCardSpendingControlsParams struct {
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
	AllowedCategories []*string `form:"allowed_categories"`
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
	BlockedCategories []*string `form:"blocked_categories"`
	// Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
	SpendingLimits []*IssuingCardSpendingControlsSpendingLimitParams `form:"spending_limits"`
}

Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.

type IssuingCardSpendingControlsSpendingLimit

type IssuingCardSpendingControlsSpendingLimit struct {
	// Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	Amount int64 `json:"amount"`
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
	Categories []string `json:"categories"`
	// Interval (or event) to which the amount applies.
	Interval IssuingCardSpendingControlsSpendingLimitInterval `json:"interval"`
}

Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).

type IssuingCardSpendingControlsSpendingLimitInterval

type IssuingCardSpendingControlsSpendingLimitInterval string

Interval (or event) to which the amount applies.

const (
	IssuingCardSpendingControlsSpendingLimitIntervalAllTime          IssuingCardSpendingControlsSpendingLimitInterval = "all_time"
	IssuingCardSpendingControlsSpendingLimitIntervalDaily            IssuingCardSpendingControlsSpendingLimitInterval = "daily"
	IssuingCardSpendingControlsSpendingLimitIntervalMonthly          IssuingCardSpendingControlsSpendingLimitInterval = "monthly"
	IssuingCardSpendingControlsSpendingLimitIntervalPerAuthorization IssuingCardSpendingControlsSpendingLimitInterval = "per_authorization"
	IssuingCardSpendingControlsSpendingLimitIntervalWeekly           IssuingCardSpendingControlsSpendingLimitInterval = "weekly"
	IssuingCardSpendingControlsSpendingLimitIntervalYearly           IssuingCardSpendingControlsSpendingLimitInterval = "yearly"
)

List of values that IssuingCardSpendingControlsSpendingLimitInterval can take

type IssuingCardSpendingControlsSpendingLimitParams

type IssuingCardSpendingControlsSpendingLimitParams struct {
	// Maximum amount allowed to spend per interval.
	Amount *int64 `form:"amount"`
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
	Categories []*string `form:"categories"`
	// Interval (or event) to which the amount applies.
	Interval *string `form:"interval"`
}

Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).

type IssuingCardStatus

type IssuingCardStatus string

Whether authorizations can be approved on this card.

const (
	IssuingCardStatusActive   IssuingCardStatus = "active"
	IssuingCardStatusCanceled IssuingCardStatus = "canceled"
	IssuingCardStatusInactive IssuingCardStatus = "inactive"
)

List of values that IssuingCardStatus can take

type IssuingCardType

type IssuingCardType string

The type of the card.

const (
	IssuingCardTypePhysical IssuingCardType = "physical"
	IssuingCardTypeVirtual  IssuingCardType = "virtual"
)

List of values that IssuingCardType can take

type IssuingCardWallets

type IssuingCardWallets struct {
	ApplePay  *IssuingCardWalletsApplePay  `json:"apple_pay"`
	GooglePay *IssuingCardWalletsGooglePay `json:"google_pay"`
	// Unique identifier for a card used with digital wallets
	PrimaryAccountIdentifier string `json:"primary_account_identifier"`
}

Information relating to digital wallets (like Apple Pay and Google Pay).

type IssuingCardWalletsApplePay

type IssuingCardWalletsApplePay struct {
	// Apple Pay Eligibility
	Eligible bool `json:"eligible"`
	// Reason the card is ineligible for Apple Pay
	IneligibleReason IssuingCardWalletsApplePayIneligibleReason `json:"ineligible_reason"`
}

type IssuingCardWalletsApplePayIneligibleReason

type IssuingCardWalletsApplePayIneligibleReason string

Reason the card is ineligible for Apple Pay

const (
	IssuingCardWalletsApplePayIneligibleReasonMissingAgreement         IssuingCardWalletsApplePayIneligibleReason = "missing_agreement"
	IssuingCardWalletsApplePayIneligibleReasonMissingCardholderContact IssuingCardWalletsApplePayIneligibleReason = "missing_cardholder_contact"
	IssuingCardWalletsApplePayIneligibleReasonUnsupportedRegion        IssuingCardWalletsApplePayIneligibleReason = "unsupported_region"
)

List of values that IssuingCardWalletsApplePayIneligibleReason can take

type IssuingCardWalletsGooglePay

type IssuingCardWalletsGooglePay struct {
	// Google Pay Eligibility
	Eligible bool `json:"eligible"`
	// Reason the card is ineligible for Google Pay
	IneligibleReason IssuingCardWalletsGooglePayIneligibleReason `json:"ineligible_reason"`
}

type IssuingCardWalletsGooglePayIneligibleReason

type IssuingCardWalletsGooglePayIneligibleReason string

Reason the card is ineligible for Google Pay

const (
	IssuingCardWalletsGooglePayIneligibleReasonMissingAgreement         IssuingCardWalletsGooglePayIneligibleReason = "missing_agreement"
	IssuingCardWalletsGooglePayIneligibleReasonMissingCardholderContact IssuingCardWalletsGooglePayIneligibleReason = "missing_cardholder_contact"
	IssuingCardWalletsGooglePayIneligibleReasonUnsupportedRegion        IssuingCardWalletsGooglePayIneligibleReason = "unsupported_region"
)

List of values that IssuingCardWalletsGooglePayIneligibleReason can take

type IssuingCardholder

type IssuingCardholder struct {
	APIResource
	Billing *IssuingCardholderBilling `json:"billing"`
	// Additional information about a `company` cardholder.
	Company *IssuingCardholderCompany `json:"company"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The cardholder's email address.
	Email string `json:"email"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Additional information about an `individual` cardholder.
	Individual *IssuingCardholderIndividual `json:"individual"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// The cardholder's name. This will be printed on cards issued to them.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
	PhoneNumber  string                         `json:"phone_number"`
	Requirements *IssuingCardholderRequirements `json:"requirements"`
	// Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
	SpendingControls *IssuingCardholderSpendingControls `json:"spending_controls"`
	// Specifies whether to permit authorizations on this cardholder's cards.
	Status IssuingCardholderStatus `json:"status"`
	// One of `individual` or `company`.
	Type IssuingCardholderType `json:"type"`
}

An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.

Related guide: [How to create a Cardholder](https://stripe.com/docs/issuing/cards#create-cardholder)

func (*IssuingCardholder) UnmarshalJSON

func (i *IssuingCardholder) UnmarshalJSON(data []byte) error

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 IssuingCardholderBilling

type IssuingCardholderBilling struct {
	Address *Address `json:"address"`
}

type IssuingCardholderBillingParams

type IssuingCardholderBillingParams struct {
	// The cardholder's billing address.
	Address *AddressParams `form:"address"`
}

The cardholder's billing address.

type IssuingCardholderCompany

type IssuingCardholderCompany struct {
	// Whether the company's business ID number was provided.
	TaxIDProvided bool `json:"tax_id_provided"`
}

Additional information about a `company` cardholder.

type IssuingCardholderCompanyParams

type IssuingCardholderCompanyParams struct {
	// The entity's business ID number.
	TaxID *string `form:"tax_id"`
}

Additional information about a `company` cardholder.

type IssuingCardholderIndividual

type IssuingCardholderIndividual struct {
	// The date of birth of this cardholder.
	DOB *IssuingCardholderIndividualDOB `json:"dob"`
	// The first name of this cardholder.
	FirstName string `json:"first_name"`
	// The last name of this cardholder.
	LastName string `json:"last_name"`
	// Government-issued ID document for this cardholder.
	Verification *IssuingCardholderIndividualVerification `json:"verification"`
}

Additional information about an `individual` cardholder.

type IssuingCardholderIndividualDOB

type IssuingCardholderIndividualDOB struct {
	// The day of birth, between 1 and 31.
	Day int64 `json:"day"`
	// The month of birth, between 1 and 12.
	Month int64 `json:"month"`
	// The four-digit year of birth.
	Year int64 `json:"year"`
}

The date of birth of this cardholder.

type IssuingCardholderIndividualDOBParams

type IssuingCardholderIndividualDOBParams struct {
	// The day of birth, between 1 and 31.
	Day *int64 `form:"day"`
	// The month of birth, between 1 and 12.
	Month *int64 `form:"month"`
	// The four-digit year of birth.
	Year *int64 `form:"year"`
}

The date of birth of this cardholder.

type IssuingCardholderIndividualParams

type IssuingCardholderIndividualParams struct {
	// The date of birth of this cardholder.
	DOB *IssuingCardholderIndividualDOBParams `form:"dob"`
	// The first name of this cardholder. This field cannot contain any special characters or numbers.
	FirstName *string `form:"first_name"`
	// The last name of this cardholder. This field cannot contain any special characters or numbers.
	LastName *string `form:"last_name"`
	// Government-issued ID document for this cardholder.
	Verification *IssuingCardholderIndividualVerificationParams `form:"verification"`
}

Additional information about an `individual` cardholder.

type IssuingCardholderIndividualVerification

type IssuingCardholderIndividualVerification struct {
	// An identifying document, either a passport or local ID card.
	Document *IssuingCardholderIndividualVerificationDocument `json:"document"`
}

Government-issued ID document for this cardholder.

type IssuingCardholderIndividualVerificationDocument

type IssuingCardholderIndividualVerificationDocument struct {
	// The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
	Back *File `json:"back"`
	// The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
	Front *File `json:"front"`
}

An identifying document, either a passport or local ID card.

type IssuingCardholderIndividualVerificationDocumentParams

type IssuingCardholderIndividualVerificationDocumentParams struct {
	// The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
	Back *string `form:"back"`
	// The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
	Front *string `form:"front"`
}

An identifying document, either a passport or local ID card.

type IssuingCardholderIndividualVerificationParams

type IssuingCardholderIndividualVerificationParams struct {
	// An identifying document, either a passport or local ID card.
	Document *IssuingCardholderIndividualVerificationDocumentParams `form:"document"`
}

Government-issued ID document for this cardholder.

type IssuingCardholderList

type IssuingCardholderList struct {
	APIResource
	ListMeta
	Data []*IssuingCardholder `json:"data"`
}

IssuingCardholderList is a list of Cardholders as retrieved from a list endpoint.

type IssuingCardholderListParams

type IssuingCardholderListParams struct {
	ListParams `form:"*"`
	// Only return cardholders that were created during the given date interval.
	Created *int64 `form:"created"`
	// Only return cardholders that were created during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return cardholders that have the given email address.
	Email *string `form:"email"`
	// Only return cardholders that have the given phone number.
	PhoneNumber *string `form:"phone_number"`
	// Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`.
	Status *string `form:"status"`
	// Only return cardholders that have the given type. One of `individual` or `company`.
	Type *string `form:"type"`
}

Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

type IssuingCardholderParams

type IssuingCardholderParams struct {
	Params `form:"*"`
	// The cardholder's billing address.
	Billing *IssuingCardholderBillingParams `form:"billing"`
	// Additional information about a `company` cardholder.
	Company *IssuingCardholderCompanyParams `form:"company"`
	// The cardholder's email address.
	Email *string `form:"email"`
	// Additional information about an `individual` cardholder.
	Individual *IssuingCardholderIndividualParams `form:"individual"`
	// The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers.
	Name *string `form:"name"`
	// The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details.
	PhoneNumber *string `form:"phone_number"`
	// Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
	SpendingControls *IssuingCardholderSpendingControlsParams `form:"spending_controls"`
	// Specifies whether to permit authorizations on this cardholder's cards.
	Status *string `form:"status"`
	// One of `individual` or `company`.
	Type *string `form:"type"`
}

Creates a new Issuing Cardholder object that can be issued cards.

type IssuingCardholderRequirements

type IssuingCardholderRequirements struct {
	// If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.
	DisabledReason IssuingCardholderRequirementsDisabledReason `json:"disabled_reason"`
	// Array of fields that need to be collected in order to verify and re-enable the cardholder.
	PastDue []string `json:"past_due"`
}

type IssuingCardholderRequirementsDisabledReason

type IssuingCardholderRequirementsDisabledReason string

If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.

const (
	IssuingCardholderRequirementsDisabledReasonListed         IssuingCardholderRequirementsDisabledReason = "listed"
	IssuingCardholderRequirementsDisabledReasonRejectedListed IssuingCardholderRequirementsDisabledReason = "rejected.listed"
	IssuingCardholderRequirementsDisabledReasonUnderReview    IssuingCardholderRequirementsDisabledReason = "under_review"
)

List of values that IssuingCardholderRequirementsDisabledReason can take

type IssuingCardholderSpendingControls

type IssuingCardholderSpendingControls struct {
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
	AllowedCategories []string `json:"allowed_categories"`
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
	BlockedCategories []string `json:"blocked_categories"`
	// Limit spending with amount-based rules that apply across this cardholder's cards.
	SpendingLimits []*IssuingCardholderSpendingControlsSpendingLimit `json:"spending_limits"`
	// Currency of the amounts within `spending_limits`.
	SpendingLimitsCurrency Currency `json:"spending_limits_currency"`
}

Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.

type IssuingCardholderSpendingControlsParams

type IssuingCardholderSpendingControlsParams struct {
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
	AllowedCategories []*string `form:"allowed_categories"`
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
	BlockedCategories []*string `form:"blocked_categories"`
	// Limit spending with amount-based rules that apply across this cardholder's cards.
	SpendingLimits []*IssuingCardholderSpendingControlsSpendingLimitParams `form:"spending_limits"`
	// Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
	SpendingLimitsCurrency *string `form:"spending_limits_currency"`
}

Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.

type IssuingCardholderSpendingControlsSpendingLimit

type IssuingCardholderSpendingControlsSpendingLimit struct {
	// Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	Amount int64 `json:"amount"`
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
	Categories []string `json:"categories"`
	// Interval (or event) to which the amount applies.
	Interval IssuingCardholderSpendingControlsSpendingLimitInterval `json:"interval"`
}

Limit spending with amount-based rules that apply across this cardholder's cards.

type IssuingCardholderSpendingControlsSpendingLimitInterval

type IssuingCardholderSpendingControlsSpendingLimitInterval string

Interval (or event) to which the amount applies.

const (
	IssuingCardholderSpendingControlsSpendingLimitIntervalAllTime          IssuingCardholderSpendingControlsSpendingLimitInterval = "all_time"
	IssuingCardholderSpendingControlsSpendingLimitIntervalDaily            IssuingCardholderSpendingControlsSpendingLimitInterval = "daily"
	IssuingCardholderSpendingControlsSpendingLimitIntervalMonthly          IssuingCardholderSpendingControlsSpendingLimitInterval = "monthly"
	IssuingCardholderSpendingControlsSpendingLimitIntervalPerAuthorization IssuingCardholderSpendingControlsSpendingLimitInterval = "per_authorization"
	IssuingCardholderSpendingControlsSpendingLimitIntervalWeekly           IssuingCardholderSpendingControlsSpendingLimitInterval = "weekly"
	IssuingCardholderSpendingControlsSpendingLimitIntervalYearly           IssuingCardholderSpendingControlsSpendingLimitInterval = "yearly"
)

List of values that IssuingCardholderSpendingControlsSpendingLimitInterval can take

type IssuingCardholderSpendingControlsSpendingLimitParams

type IssuingCardholderSpendingControlsSpendingLimitParams struct {
	// Maximum amount allowed to spend per interval.
	Amount *int64 `form:"amount"`
	// Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
	Categories []*string `form:"categories"`
	// Interval (or event) to which the amount applies.
	Interval *string `form:"interval"`
}

Limit spending with amount-based rules that apply across this cardholder's cards.

type IssuingCardholderStatus

type IssuingCardholderStatus string

Specifies whether to permit authorizations on this cardholder's cards.

const (
	IssuingCardholderStatusActive   IssuingCardholderStatus = "active"
	IssuingCardholderStatusBlocked  IssuingCardholderStatus = "blocked"
	IssuingCardholderStatusInactive IssuingCardholderStatus = "inactive"
)

List of values that IssuingCardholderStatus can take

type IssuingCardholderType

type IssuingCardholderType string

One of `individual` or `company`.

const (
	IssuingCardholderTypeCompany    IssuingCardholderType = "company"
	IssuingCardholderTypeIndividual IssuingCardholderType = "individual"
)

List of values that IssuingCardholderType can take

type IssuingDispute

type IssuingDispute struct {
	APIResource
	// Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).
	Amount int64 `json:"amount"`
	// List of balance transactions associated with the dispute.
	BalanceTransactions []*BalanceTransaction `json:"balance_transactions"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The currency the `transaction` was made in.
	Currency Currency                `json:"currency"`
	Evidence *IssuingDisputeEvidence `json:"evidence"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Current status of the dispute.
	Status IssuingDisputeStatus `json:"status"`
	// The transaction being disputed.
	Transaction *IssuingTransaction `json:"transaction"`
	// [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
	Treasury *IssuingDisputeTreasury `json:"treasury"`
}

As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.

Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes)

func (*IssuingDispute) UnmarshalJSON

func (i *IssuingDispute) UnmarshalJSON(data []byte) error

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.

type IssuingDisputeEvidence

type IssuingDisputeEvidence struct {
	Canceled                  *IssuingDisputeEvidenceCanceled                  `json:"canceled"`
	Duplicate                 *IssuingDisputeEvidenceDuplicate                 `json:"duplicate"`
	Fraudulent                *IssuingDisputeEvidenceFraudulent                `json:"fraudulent"`
	MerchandiseNotAsDescribed *IssuingDisputeEvidenceMerchandiseNotAsDescribed `json:"merchandise_not_as_described"`
	NotReceived               *IssuingDisputeEvidenceNotReceived               `json:"not_received"`
	Other                     *IssuingDisputeEvidenceOther                     `json:"other"`
	// The reason for filing the dispute. Its value will match the field containing the evidence.
	Reason                IssuingDisputeEvidenceReason                 `json:"reason"`
	ServiceNotAsDescribed *IssuingDisputeEvidenceServiceNotAsDescribed `json:"service_not_as_described"`
}

type IssuingDisputeEvidenceCanceled

type IssuingDisputeEvidenceCanceled struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *File `json:"additional_documentation"`
	// Date when order was canceled.
	CanceledAt int64 `json:"canceled_at"`
	// Whether the cardholder was provided with a cancellation policy.
	CancellationPolicyProvided bool `json:"cancellation_policy_provided"`
	// Reason for canceling the order.
	CancellationReason string `json:"cancellation_reason"`
	// Date when the cardholder expected to receive the product.
	ExpectedAt int64 `json:"expected_at"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation string `json:"explanation"`
	// Description of the merchandise or service that was purchased.
	ProductDescription string `json:"product_description"`
	// Whether the product was a merchandise or service.
	ProductType IssuingDisputeEvidenceCanceledProductType `json:"product_type"`
	// Date when the product was returned or attempted to be returned.
	ReturnedAt int64 `json:"returned_at"`
	// Result of cardholder's attempt to return the product.
	ReturnStatus IssuingDisputeEvidenceCanceledReturnStatus `json:"return_status"`
}

type IssuingDisputeEvidenceCanceledParams

type IssuingDisputeEvidenceCanceledParams struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *string `form:"additional_documentation"`
	// Date when order was canceled.
	CanceledAt *int64 `form:"canceled_at"`
	// Whether the cardholder was provided with a cancellation policy.
	CancellationPolicyProvided *bool `form:"cancellation_policy_provided"`
	// Reason for canceling the order.
	CancellationReason *string `form:"cancellation_reason"`
	// Date when the cardholder expected to receive the product.
	ExpectedAt *int64 `form:"expected_at"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation *string `form:"explanation"`
	// Description of the merchandise or service that was purchased.
	ProductDescription *string `form:"product_description"`
	// Whether the product was a merchandise or service.
	ProductType *string `form:"product_type"`
	// Date when the product was returned or attempted to be returned.
	ReturnedAt *int64 `form:"returned_at"`
	// Result of cardholder's attempt to return the product.
	ReturnStatus *string `form:"return_status"`
}

Evidence provided when `reason` is 'canceled'.

type IssuingDisputeEvidenceCanceledProductType

type IssuingDisputeEvidenceCanceledProductType string

Whether the product was a merchandise or service.

const (
	IssuingDisputeEvidenceCanceledProductTypeMerchandise IssuingDisputeEvidenceCanceledProductType = "merchandise"
	IssuingDisputeEvidenceCanceledProductTypeService     IssuingDisputeEvidenceCanceledProductType = "service"
)

List of values that IssuingDisputeEvidenceCanceledProductType can take

type IssuingDisputeEvidenceCanceledReturnStatus

type IssuingDisputeEvidenceCanceledReturnStatus string

Result of cardholder's attempt to return the product.

const (
	IssuingDisputeEvidenceCanceledReturnStatusMerchantRejected IssuingDisputeEvidenceCanceledReturnStatus = "merchant_rejected"
	IssuingDisputeEvidenceCanceledReturnStatusSuccessful       IssuingDisputeEvidenceCanceledReturnStatus = "successful"
)

List of values that IssuingDisputeEvidenceCanceledReturnStatus can take

type IssuingDisputeEvidenceDuplicate

type IssuingDisputeEvidenceDuplicate struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *File `json:"additional_documentation"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
	CardStatement *File `json:"card_statement"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
	CashReceipt *File `json:"cash_receipt"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
	CheckImage *File `json:"check_image"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation string `json:"explanation"`
	// Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
	OriginalTransaction string `json:"original_transaction"`
}

type IssuingDisputeEvidenceDuplicateParams

type IssuingDisputeEvidenceDuplicateParams struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *string `form:"additional_documentation"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
	CardStatement *string `form:"card_statement"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
	CashReceipt *string `form:"cash_receipt"`
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
	CheckImage *string `form:"check_image"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation *string `form:"explanation"`
	// Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
	OriginalTransaction *string `form:"original_transaction"`
}

Evidence provided when `reason` is 'duplicate'.

type IssuingDisputeEvidenceFraudulent

type IssuingDisputeEvidenceFraudulent struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *File `json:"additional_documentation"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation string `json:"explanation"`
}

type IssuingDisputeEvidenceFraudulentParams

type IssuingDisputeEvidenceFraudulentParams struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *string `form:"additional_documentation"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation *string `form:"explanation"`
}

Evidence provided when `reason` is 'fraudulent'.

type IssuingDisputeEvidenceMerchandiseNotAsDescribed

type IssuingDisputeEvidenceMerchandiseNotAsDescribed struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *File `json:"additional_documentation"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation string `json:"explanation"`
	// Date when the product was received.
	ReceivedAt int64 `json:"received_at"`
	// Description of the cardholder's attempt to return the product.
	ReturnDescription string `json:"return_description"`
	// Date when the product was returned or attempted to be returned.
	ReturnedAt int64 `json:"returned_at"`
	// Result of cardholder's attempt to return the product.
	ReturnStatus IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus `json:"return_status"`
}

type IssuingDisputeEvidenceMerchandiseNotAsDescribedParams

type IssuingDisputeEvidenceMerchandiseNotAsDescribedParams struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *string `form:"additional_documentation"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation *string `form:"explanation"`
	// Date when the product was received.
	ReceivedAt *int64 `form:"received_at"`
	// Description of the cardholder's attempt to return the product.
	ReturnDescription *string `form:"return_description"`
	// Date when the product was returned or attempted to be returned.
	ReturnedAt *int64 `form:"returned_at"`
	// Result of cardholder's attempt to return the product.
	ReturnStatus *string `form:"return_status"`
}

Evidence provided when `reason` is 'merchandise_not_as_described'.

type IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus

type IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus string

Result of cardholder's attempt to return the product.

const (
	IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatusMerchantRejected IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus = "merchant_rejected"
	IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatusSuccessful       IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus = "successful"
)

List of values that IssuingDisputeEvidenceMerchandiseNotAsDescribedReturnStatus can take

type IssuingDisputeEvidenceNotReceived

type IssuingDisputeEvidenceNotReceived struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *File `json:"additional_documentation"`
	// Date when the cardholder expected to receive the product.
	ExpectedAt int64 `json:"expected_at"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation string `json:"explanation"`
	// Description of the merchandise or service that was purchased.
	ProductDescription string `json:"product_description"`
	// Whether the product was a merchandise or service.
	ProductType IssuingDisputeEvidenceNotReceivedProductType `json:"product_type"`
}

type IssuingDisputeEvidenceNotReceivedParams

type IssuingDisputeEvidenceNotReceivedParams struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *string `form:"additional_documentation"`
	// Date when the cardholder expected to receive the product.
	ExpectedAt *int64 `form:"expected_at"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation *string `form:"explanation"`
	// Description of the merchandise or service that was purchased.
	ProductDescription *string `form:"product_description"`
	// Whether the product was a merchandise or service.
	ProductType *string `form:"product_type"`
}

Evidence provided when `reason` is 'not_received'.

type IssuingDisputeEvidenceNotReceivedProductType

type IssuingDisputeEvidenceNotReceivedProductType string

Whether the product was a merchandise or service.

const (
	IssuingDisputeEvidenceNotReceivedProductTypeMerchandise IssuingDisputeEvidenceNotReceivedProductType = "merchandise"
	IssuingDisputeEvidenceNotReceivedProductTypeService     IssuingDisputeEvidenceNotReceivedProductType = "service"
)

List of values that IssuingDisputeEvidenceNotReceivedProductType can take

type IssuingDisputeEvidenceOther

type IssuingDisputeEvidenceOther struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *File `json:"additional_documentation"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation string `json:"explanation"`
	// Description of the merchandise or service that was purchased.
	ProductDescription string `json:"product_description"`
	// Whether the product was a merchandise or service.
	ProductType IssuingDisputeEvidenceOtherProductType `json:"product_type"`
}

type IssuingDisputeEvidenceOtherParams

type IssuingDisputeEvidenceOtherParams struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *string `form:"additional_documentation"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation *string `form:"explanation"`
	// Description of the merchandise or service that was purchased.
	ProductDescription *string `form:"product_description"`
	// Whether the product was a merchandise or service.
	ProductType *string `form:"product_type"`
}

Evidence provided when `reason` is 'other'.

type IssuingDisputeEvidenceOtherProductType

type IssuingDisputeEvidenceOtherProductType string

Whether the product was a merchandise or service.

const (
	IssuingDisputeEvidenceOtherProductTypeMerchandise IssuingDisputeEvidenceOtherProductType = "merchandise"
	IssuingDisputeEvidenceOtherProductTypeService     IssuingDisputeEvidenceOtherProductType = "service"
)

List of values that IssuingDisputeEvidenceOtherProductType can take

type IssuingDisputeEvidenceParams

type IssuingDisputeEvidenceParams struct {
	// Evidence provided when `reason` is 'canceled'.
	Canceled *IssuingDisputeEvidenceCanceledParams `form:"canceled"`
	// Evidence provided when `reason` is 'duplicate'.
	Duplicate *IssuingDisputeEvidenceDuplicateParams `form:"duplicate"`
	// Evidence provided when `reason` is 'fraudulent'.
	Fraudulent *IssuingDisputeEvidenceFraudulentParams `form:"fraudulent"`
	// Evidence provided when `reason` is 'merchandise_not_as_described'.
	MerchandiseNotAsDescribed *IssuingDisputeEvidenceMerchandiseNotAsDescribedParams `form:"merchandise_not_as_described"`
	// Evidence provided when `reason` is 'not_received'.
	NotReceived *IssuingDisputeEvidenceNotReceivedParams `form:"not_received"`
	// Evidence provided when `reason` is 'other'.
	Other *IssuingDisputeEvidenceOtherParams `form:"other"`
	// The reason for filing the dispute. The evidence should be submitted in the field of the same name.
	Reason *string `form:"reason"`
	// Evidence provided when `reason` is 'service_not_as_described'.
	ServiceNotAsDescribed *IssuingDisputeEvidenceServiceNotAsDescribedParams `form:"service_not_as_described"`
}

Evidence provided for the dispute.

type IssuingDisputeEvidenceReason

type IssuingDisputeEvidenceReason string

The reason for filing the dispute. Its value will match the field containing the evidence.

const (
	IssuingDisputeEvidenceReasonCanceled                  IssuingDisputeEvidenceReason = "canceled"
	IssuingDisputeEvidenceReasonDuplicate                 IssuingDisputeEvidenceReason = "duplicate"
	IssuingDisputeEvidenceReasonFraudulent                IssuingDisputeEvidenceReason = "fraudulent"
	IssuingDisputeEvidenceReasonMerchandiseNotAsDescribed IssuingDisputeEvidenceReason = "merchandise_not_as_described"
	IssuingDisputeEvidenceReasonNotReceived               IssuingDisputeEvidenceReason = "not_received"
	IssuingDisputeEvidenceReasonOther                     IssuingDisputeEvidenceReason = "other"
	IssuingDisputeEvidenceReasonServiceNotAsDescribed     IssuingDisputeEvidenceReason = "service_not_as_described"
)

List of values that IssuingDisputeEvidenceReason can take

type IssuingDisputeEvidenceServiceNotAsDescribed

type IssuingDisputeEvidenceServiceNotAsDescribed struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *File `json:"additional_documentation"`
	// Date when order was canceled.
	CanceledAt int64 `json:"canceled_at"`
	// Reason for canceling the order.
	CancellationReason string `json:"cancellation_reason"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation string `json:"explanation"`
	// Date when the product was received.
	ReceivedAt int64 `json:"received_at"`
}

type IssuingDisputeEvidenceServiceNotAsDescribedParams

type IssuingDisputeEvidenceServiceNotAsDescribedParams struct {
	// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
	AdditionalDocumentation *string `form:"additional_documentation"`
	// Date when order was canceled.
	CanceledAt *int64 `form:"canceled_at"`
	// Reason for canceling the order.
	CancellationReason *string `form:"cancellation_reason"`
	// Explanation of why the cardholder is disputing this transaction.
	Explanation *string `form:"explanation"`
	// Date when the product was received.
	ReceivedAt *int64 `form:"received_at"`
}

Evidence provided when `reason` is 'service_not_as_described'.

type IssuingDisputeList

type IssuingDisputeList struct {
	APIResource
	ListMeta
	Data []*IssuingDispute `json:"data"`
}

IssuingDisputeList is a list of Disputes as retrieved from a list endpoint.

type IssuingDisputeListParams

type IssuingDisputeListParams struct {
	ListParams `form:"*"`
	// Select Issuing disputes that were created during the given date interval.
	Created *int64 `form:"created"`
	// Select Issuing disputes that were created during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// Select Issuing disputes with the given status.
	Status *string `form:"status"`
	// Select the Issuing dispute for the given transaction.
	Transaction *string `form:"transaction"`
}

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

type IssuingDisputeParams

type IssuingDisputeParams struct {
	Params `form:"*"`
	// Evidence provided for the dispute.
	Evidence *IssuingDisputeEvidenceParams `form:"evidence"`
	// The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`.
	Transaction *string `form:"transaction"`
	// Params for disputes related to Treasury FinancialAccounts
	Treasury *IssuingDisputeTreasuryParams `form:"treasury"`
}

Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.

type IssuingDisputeStatus

type IssuingDisputeStatus string

Current status of the dispute.

const (
	IssuingDisputeStatusExpired     IssuingDisputeStatus = "expired"
	IssuingDisputeStatusLost        IssuingDisputeStatus = "lost"
	IssuingDisputeStatusSubmitted   IssuingDisputeStatus = "submitted"
	IssuingDisputeStatusUnsubmitted IssuingDisputeStatus = "unsubmitted"
	IssuingDisputeStatusWon         IssuingDisputeStatus = "won"
)

List of values that IssuingDisputeStatus can take

type IssuingDisputeSubmitParams

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

Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).

type IssuingDisputeTreasury

type IssuingDisputeTreasury struct {
	// The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute
	DebitReversal string `json:"debit_reversal"`
	// The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.
	ReceivedDebit string `json:"received_debit"`
}

[Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts

type IssuingDisputeTreasuryParams

type IssuingDisputeTreasuryParams struct {
	// The ID of the ReceivedDebit to initiate an Issuings dispute for.
	ReceivedDebit *string `form:"received_debit"`
}

Params for disputes related to Treasury FinancialAccounts

type IssuingTransaction

type IssuingTransaction struct {
	APIResource
	// The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	Amount int64 `json:"amount"`
	// Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	AmountDetails *IssuingTransactionAmountDetails `json:"amount_details"`
	// The `Authorization` object that led to this transaction.
	Authorization *IssuingAuthorization `json:"authorization"`
	// ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.
	BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
	// The card used to make this transaction.
	Card *IssuingCard `json:"card"`
	// The cardholder to whom this transaction belongs.
	Cardholder *IssuingCardholder `json:"cardholder"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// If you've disputed the transaction, the ID of the dispute.
	Dispute *IssuingDispute `json:"dispute"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.
	MerchantAmount int64 `json:"merchant_amount"`
	// The currency with which the merchant is taking payment.
	MerchantCurrency Currency                          `json:"merchant_currency"`
	MerchantData     *IssuingAuthorizationMerchantData `json:"merchant_data"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Additional purchase information that is optionally provided by the merchant.
	PurchaseDetails *IssuingTransactionPurchaseDetails `json:"purchase_details"`
	// [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
	Treasury *IssuingTransactionTreasury `json:"treasury"`
	// The nature of the transaction.
	Type IssuingTransactionType `json:"type"`
	// The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.
	Wallet IssuingTransactionWallet `json:"wallet"`
}

Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving your Stripe account, such as a completed purchase or refund, is represented by an Issuing `Transaction` object.

Related guide: [Issued Card Transactions](https://stripe.com/docs/issuing/purchases/transactions).

func (*IssuingTransaction) UnmarshalJSON

func (i *IssuingTransaction) UnmarshalJSON(data []byte) error

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.

type IssuingTransactionAmountDetails

type IssuingTransactionAmountDetails struct {
	// The fee charged by the ATM for the cash withdrawal.
	ATMFee int64 `json:"atm_fee"`
}

Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).

type IssuingTransactionList

type IssuingTransactionList struct {
	APIResource
	ListMeta
	Data []*IssuingTransaction `json:"data"`
}

IssuingTransactionList is a list of Transactions as retrieved from a list endpoint.

type IssuingTransactionListParams

type IssuingTransactionListParams struct {
	ListParams `form:"*"`
	// Only return transactions that belong to the given card.
	Card *string `form:"card"`
	// Only return transactions that belong to the given cardholder.
	Cardholder *string `form:"cardholder"`
	// Only return transactions that were created during the given date interval.
	Created *int64 `form:"created"`
	// Only return transactions that were created during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return transactions that have the given type. One of `capture` or `refund`.
	Type *string `form:"type"`
}

Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

type IssuingTransactionParams

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

Retrieves an Issuing Transaction object.

type IssuingTransactionPurchaseDetails

type IssuingTransactionPurchaseDetails struct {
	// Information about the flight that was purchased with this transaction.
	Flight *IssuingTransactionPurchaseDetailsFlight `json:"flight"`
	// Information about fuel that was purchased with this transaction.
	Fuel *IssuingTransactionPurchaseDetailsFuel `json:"fuel"`
	// Information about lodging that was purchased with this transaction.
	Lodging *IssuingTransactionPurchaseDetailsLodging `json:"lodging"`
	// The line items in the purchase.
	Receipt []*IssuingTransactionPurchaseDetailsReceipt `json:"receipt"`
	// A merchant-specific order number.
	Reference string `json:"reference"`
}

Additional purchase information that is optionally provided by the merchant.

type IssuingTransactionPurchaseDetailsFlight

type IssuingTransactionPurchaseDetailsFlight struct {
	// The time that the flight departed.
	DepartureAt int64 `json:"departure_at"`
	// The name of the passenger.
	PassengerName string `json:"passenger_name"`
	// Whether the ticket is refundable.
	Refundable bool `json:"refundable"`
	// The legs of the trip.
	Segments []*IssuingTransactionPurchaseDetailsFlightSegment `json:"segments"`
	// The travel agency that issued the ticket.
	TravelAgency string `json:"travel_agency"`
}

Information about the flight that was purchased with this transaction.

type IssuingTransactionPurchaseDetailsFlightSegment

type IssuingTransactionPurchaseDetailsFlightSegment struct {
	// The three-letter IATA airport code of the flight's destination.
	ArrivalAirportCode string `json:"arrival_airport_code"`
	// The airline carrier code.
	Carrier string `json:"carrier"`
	// The three-letter IATA airport code that the flight departed from.
	DepartureAirportCode string `json:"departure_airport_code"`
	// The flight number.
	FlightNumber string `json:"flight_number"`
	// The flight's service class.
	ServiceClass string `json:"service_class"`
	// Whether a stopover is allowed on this flight.
	StopoverAllowed bool `json:"stopover_allowed"`
}

The legs of the trip.

type IssuingTransactionPurchaseDetailsFuel

type IssuingTransactionPurchaseDetailsFuel struct {
	// The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
	Type IssuingTransactionPurchaseDetailsFuelType `json:"type"`
	// The units for `volume_decimal`. One of `us_gallon` or `liter`.
	Unit IssuingTransactionPurchaseDetailsFuelUnit `json:"unit"`
	// The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
	UnitCostDecimal float64 `json:"unit_cost_decimal,string"`
	// The volume of the fuel that was pumped, represented as a decimal string with at most 12 decimal places.
	VolumeDecimal float64 `json:"volume_decimal,string"`
}

Information about fuel that was purchased with this transaction.

type IssuingTransactionPurchaseDetailsFuelType

type IssuingTransactionPurchaseDetailsFuelType string

The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.

const (
	IssuingTransactionPurchaseDetailsFuelTypeDiesel          IssuingTransactionPurchaseDetailsFuelType = "diesel"
	IssuingTransactionPurchaseDetailsFuelTypeOther           IssuingTransactionPurchaseDetailsFuelType = "other"
	IssuingTransactionPurchaseDetailsFuelTypeUnleadedPlus    IssuingTransactionPurchaseDetailsFuelType = "unleaded_plus"
	IssuingTransactionPurchaseDetailsFuelTypeUnleadedRegular IssuingTransactionPurchaseDetailsFuelType = "unleaded_regular"
	IssuingTransactionPurchaseDetailsFuelTypeUnleadedSuper   IssuingTransactionPurchaseDetailsFuelType = "unleaded_super"
)

List of values that IssuingTransactionPurchaseDetailsFuelType can take

type IssuingTransactionPurchaseDetailsFuelUnit

type IssuingTransactionPurchaseDetailsFuelUnit string

The units for `volume_decimal`. One of `us_gallon` or `liter`.

const (
	IssuingTransactionPurchaseDetailsFuelUnitLiter    IssuingTransactionPurchaseDetailsFuelUnit = "liter"
	IssuingTransactionPurchaseDetailsFuelUnitUSGallon IssuingTransactionPurchaseDetailsFuelUnit = "us_gallon"
)

List of values that IssuingTransactionPurchaseDetailsFuelUnit can take

type IssuingTransactionPurchaseDetailsLodging

type IssuingTransactionPurchaseDetailsLodging struct {
	// The time of checking into the lodging.
	CheckInAt int64 `json:"check_in_at"`
	// The number of nights stayed at the lodging.
	Nights int64 `json:"nights"`
}

Information about lodging that was purchased with this transaction.

type IssuingTransactionPurchaseDetailsReceipt

type IssuingTransactionPurchaseDetailsReceipt struct {
	// The description of the item. The maximum length of this field is 26 characters.
	Description string `json:"description"`
	// The quantity of the item.
	Quantity float64 `json:"quantity"`
	// The total for this line item in cents.
	Total int64 `json:"total"`
	// The unit cost of the item in cents.
	UnitCost int64 `json:"unit_cost"`
}

The line items in the purchase.

type IssuingTransactionTreasury

type IssuingTransactionTreasury struct {
	// The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a refund
	ReceivedCredit string `json:"received_credit"`
	// The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a capture
	ReceivedDebit string `json:"received_debit"`
}

[Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts

type IssuingTransactionType

type IssuingTransactionType string

The nature of the transaction.

const (
	IssuingTransactionTypeCapture IssuingTransactionType = "capture"
	IssuingTransactionTypeRefund  IssuingTransactionType = "refund"
)

List of values that IssuingTransactionType can take

type IssuingTransactionWallet

type IssuingTransactionWallet string

The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.

const (
	IssuingTransactionWalletApplePay   IssuingTransactionWallet = "apple_pay"
	IssuingTransactionWalletGooglePay  IssuingTransactionWallet = "google_pay"
	IssuingTransactionWalletSamsungPay IssuingTransactionWallet = "samsung_pay"
)

List of values that IssuingTransactionWallet can take

type Iter

type Iter struct {
	// contains filtered or unexported fields
}

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.

func GetIter

func GetIter(container ListParamsContainer, query Query) *Iter

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

func (*Iter) Current

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

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

func (*Iter) Err

func (it *Iter) Err() error

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

func (*Iter) List

func (it *Iter) List() ListContainer

List returns the current list object which the iterator is currently using. List objects will change as new API calls are made to continue pagination.

func (*Iter) Meta

func (it *Iter) Meta() *ListMeta

Meta returns the list metadata.

func (*Iter) Next

func (it *Iter) Next() bool

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.

type LastResponseSetter

type LastResponseSetter interface {
	SetLastResponse(response *APIResponse)
}

LastResponseSetter defines a type that contains an HTTP response from a Stripe API endpoint.

type Level

type Level uint32

Level represents a logging level.

const (
	// LevelNull sets a logger to show no messages at all.
	LevelNull Level = 0

	// LevelError sets a logger to show error messages only.
	LevelError Level = 1

	// LevelWarn sets a logger to show warning messages or anything more
	// severe.
	LevelWarn Level = 2

	// LevelInfo sets a logger to show informational messages or anything more
	// severe.
	LevelInfo Level = 3

	// LevelDebug sets a logger to show informational messages or anything more
	// severe.
	LevelDebug Level = 4
)

type LeveledLogger

type LeveledLogger struct {
	// Level is the minimum logging level that will be emitted by this logger.
	//
	// For example, a Level set to LevelWarn will emit warnings and errors, but
	// not informational or debug messages.
	//
	// Always set this with a constant like LevelWarn because the individual
	// values are not guaranteed to be stable.
	Level Level
	// contains filtered or unexported fields
}

LeveledLogger is a leveled logger implementation.

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

func (*LeveledLogger) Debugf

func (l *LeveledLogger) Debugf(format string, v ...interface{})

Debugf logs a debug message using Printf conventions.

func (*LeveledLogger) Errorf

func (l *LeveledLogger) Errorf(format string, v ...interface{})

Errorf logs a warning message using Printf conventions.

func (*LeveledLogger) Infof

func (l *LeveledLogger) Infof(format string, v ...interface{})

Infof logs an informational message using Printf conventions.

func (*LeveledLogger) Warnf

func (l *LeveledLogger) Warnf(format string, v ...interface{})

Warnf logs a warning message using Printf conventions.

type LeveledLoggerInterface

type LeveledLoggerInterface interface {
	// Debugf logs a debug message using Printf conventions.
	Debugf(format string, v ...interface{})

	// Errorf logs a warning message using Printf conventions.
	Errorf(format string, v ...interface{})

	// Infof logs an informational message using Printf conventions.
	Infof(format string, v ...interface{})

	// Warnf logs a warning message using Printf conventions.
	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.

var DefaultLeveledLogger LeveledLoggerInterface = &LeveledLogger{
	Level: LevelError,
}

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 LineItem

type LineItem struct {
	// Total discount amount applied. If no discounts were applied, defaults to 0.
	AmountDiscount int64 `json:"amount_discount"`
	// Total before any discounts or taxes are applied.
	AmountSubtotal int64 `json:"amount_subtotal"`
	// Total tax amount applied. If no tax was applied, defaults to 0.
	AmountTax int64 `json:"amount_tax"`
	// Total after discounts and taxes.
	AmountTotal int64 `json:"amount_total"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
	Description string `json:"description"`
	// The discounts applied to the line item.
	Discounts []*LineItemDiscount `json:"discounts"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The price used to generate the line item.
	Price *Price `json:"price"`
	// The ID of the product for this line item.
	//
	// This will always be the same as `price.product`.
	Product *Product `json:"product"`
	// The quantity of products being purchased.
	Quantity int64 `json:"quantity"`
	// The taxes applied to the line item.
	Taxes []*LineItemTax `json:"taxes"`
}

A line item.

type LineItemDiscount

type LineItemDiscount struct {
	// The amount discounted.
	Amount int64 `json:"amount"`
	// A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
	// It contains information about when the discount began, when it will end, and what it is applied to.
	//
	// Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
	Discount *Discount `json:"discount"`
}

The discounts applied to the line item.

type LineItemList

type LineItemList struct {
	APIResource
	ListMeta
	Data []*LineItem `json:"data"`
}

LineItemList is a list of LineItems as retrieved from a list endpoint.

type LineItemTax

type LineItemTax struct {
	// Amount of tax applied for this rate.
	Amount int64 `json:"amount"`
	// Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
	//
	// Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).
	Rate *TaxRate `json:"rate"`
}

The taxes applied to the line item.

type ListContainer

type ListContainer interface {
	GetListMeta() *ListMeta
}

ListContainer is a general interface for which all list object structs should comply. They achieve this by embedding a ListMeta struct and inheriting its implementation of this interface.

type ListMeta

type ListMeta struct {
	HasMore bool   `json:"has_more"`
	URL     string `json:"url"`

	// TotalCount is the total number of objects in the collection (beyond just
	// on the current page). This is not returned in most list calls.
	//
	// Deprecated: TotalCount is only included in some legacy situations and
	// not generally available anymore.
	TotalCount uint32 `json:"total_count"`
}

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).

func (*ListMeta) GetListMeta

func (l *ListMeta) GetListMeta() *ListMeta

GetListMeta returns a ListMeta struct (itself). It exists because any structs that embed ListMeta will inherit it, and thus implement the ListContainer interface.

type ListParams

type ListParams struct {
	// Context used for request. It may carry deadlines, cancelation signals,
	// and other request-scoped values across API boundaries and between
	// processes.
	//
	// Note that a cancelled or timed out context does not provide any
	// guarantee whether the operation was or was not completed on Stripe's API
	// servers. For certainty, you must either retry with the same idempotency
	// key or query the state of the API.
	Context context.Context `form:"-"`

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

	// Single specifies whether this is a single page iterator. By default,
	// listing through an iterator will automatically grab additional pages as
	// the query progresses. To change this behavior and just load a single
	// page, set this to true.
	Single bool `form:"-"` // Not an API parameter

	StartingAfter *string `form:"starting_after"`

	// StripeAccount may contain the ID of a connected account. By including
	// this field, the request is made as if it originated from the connected
	// account instead of under the account of the owner of the configured
	// Stripe key.
	StripeAccount *string `form:"-"` // Passed as header
}

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

func (*ListParams) AddExpand

func (p *ListParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*ListParams) GetListParams

func (p *ListParams) GetListParams() *ListParams

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

func (*ListParams) GetParams

func (p *ListParams) GetParams() *Params

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

func (*ListParams) SetStripeAccount

func (p *ListParams) SetStripeAccount(val string)

SetStripeAccount sets a value for the Stripe-Account header.

func (*ListParams) ToParams

func (p *ListParams) ToParams() *Params

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

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 LoginLink struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The URL for the login link.
	URL string `json:"url"`
}

type LoginLinkParams

type LoginLinkParams struct {
	Params  `form:"*"`
	Account *string `form:"-"` // Included in URL
}

Creates a single-use login link for an Express account to access their Stripe dashboard.

You may only create login links for [Express accounts](https://stripe.com/docs/connect/express-accounts) connected to your platform.

type Mandate

type Mandate struct {
	APIResource
	CustomerAcceptance *MandateCustomerAcceptance `json:"customer_acceptance"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool             `json:"livemode"`
	MultiUse *MandateMultiUse `json:"multi_use"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// ID of the payment method associated with this mandate.
	PaymentMethod        *PaymentMethod               `json:"payment_method"`
	PaymentMethodDetails *MandatePaymentMethodDetails `json:"payment_method_details"`
	SingleUse            *MandateSingleUse            `json:"single_use"`
	// The status of the mandate, which indicates whether it can be used to initiate a payment.
	Status MandateStatus `json:"status"`
	// The type of the mandate.
	Type MandateType `json:"type"`
}

A Mandate is a record of the permission a customer has given you to debit their payment method.

func (*Mandate) UnmarshalJSON

func (m *Mandate) UnmarshalJSON(data []byte) error

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 MandateCustomerAcceptance

type MandateCustomerAcceptance struct {
	// The time at which the customer accepted the Mandate.
	AcceptedAt int64                             `json:"accepted_at"`
	Offline    *MandateCustomerAcceptanceOffline `json:"offline"`
	Online     *MandateCustomerAcceptanceOnline  `json:"online"`
	// The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
	Type MandateCustomerAcceptanceType `json:"type"`
}

type MandateCustomerAcceptanceOffline

type MandateCustomerAcceptanceOffline struct{}

type MandateCustomerAcceptanceOnline

type MandateCustomerAcceptanceOnline struct {
	// The IP address from which the Mandate was accepted by the customer.
	IPAddress string `json:"ip_address"`
	// The user agent of the browser from which the Mandate was accepted by the customer.
	UserAgent string `json:"user_agent"`
}

type MandateCustomerAcceptanceType

type MandateCustomerAcceptanceType string

The type of customer acceptance information included with the Mandate. One of `online` or `offline`.

const (
	MandateCustomerAcceptanceTypeOffline MandateCustomerAcceptanceType = "offline"
	MandateCustomerAcceptanceTypeOnline  MandateCustomerAcceptanceType = "online"
)

List of values that MandateCustomerAcceptanceType can take

type MandateMultiUse

type MandateMultiUse struct{}

type MandateParams

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

Retrieves a Mandate object.

type MandatePaymentMethodDetails

type MandatePaymentMethodDetails struct {
	ACSSDebit   *MandatePaymentMethodDetailsACSSDebit   `json:"acss_debit"`
	AUBECSDebit *MandatePaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"`
	BACSDebit   *MandatePaymentMethodDetailsBACSDebit   `json:"bacs_debit"`
	BLIK        *MandatePaymentMethodDetailsBLIK        `json:"blik"`
	Card        *MandatePaymentMethodDetailsCard        `json:"card"`
	Link        *MandatePaymentMethodDetailsLink        `json:"link"`
	SEPADebit   *MandatePaymentMethodDetailsSEPADebit   `json:"sepa_debit"`
	// The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method.
	Type          MandatePaymentMethodDetailsType           `json:"type"`
	USBankAccount *MandatePaymentMethodDetailsUSBankAccount `json:"us_bank_account"`
}

type MandatePaymentMethodDetailsACSSDebit

type MandatePaymentMethodDetailsACSSDebit struct {
	// List of Stripe products where this mandate can be selected automatically.
	DefaultFor []MandatePaymentMethodDetailsACSSDebitDefaultFor `json:"default_for"`
	// Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
	IntervalDescription string `json:"interval_description"`
	// Payment schedule for the mandate.
	PaymentSchedule MandatePaymentMethodDetailsACSSDebitPaymentSchedule `json:"payment_schedule"`
	// Transaction type of the mandate.
	TransactionType MandatePaymentMethodDetailsACSSDebitTransactionType `json:"transaction_type"`
}

type MandatePaymentMethodDetailsACSSDebitDefaultFor

type MandatePaymentMethodDetailsACSSDebitDefaultFor string

List of Stripe products where this mandate can be selected automatically.

const (
	MandatePaymentMethodDetailsACSSDebitDefaultForInvoice      MandatePaymentMethodDetailsACSSDebitDefaultFor = "invoice"
	MandatePaymentMethodDetailsACSSDebitDefaultForSubscription MandatePaymentMethodDetailsACSSDebitDefaultFor = "subscription"
)

List of values that MandatePaymentMethodDetailsACSSDebitDefaultFor can take

type MandatePaymentMethodDetailsACSSDebitPaymentSchedule

type MandatePaymentMethodDetailsACSSDebitPaymentSchedule string

Payment schedule for the mandate.

const (
	MandatePaymentMethodDetailsACSSDebitPaymentScheduleCombined MandatePaymentMethodDetailsACSSDebitPaymentSchedule = "combined"
	MandatePaymentMethodDetailsACSSDebitPaymentScheduleInterval MandatePaymentMethodDetailsACSSDebitPaymentSchedule = "interval"
	MandatePaymentMethodDetailsACSSDebitPaymentScheduleSporadic MandatePaymentMethodDetailsACSSDebitPaymentSchedule = "sporadic"
)

List of values that MandatePaymentMethodDetailsACSSDebitPaymentSchedule can take

type MandatePaymentMethodDetailsACSSDebitTransactionType

type MandatePaymentMethodDetailsACSSDebitTransactionType string

Transaction type of the mandate.

const (
	MandatePaymentMethodDetailsACSSDebitTransactionTypeBusiness MandatePaymentMethodDetailsACSSDebitTransactionType = "business"
	MandatePaymentMethodDetailsACSSDebitTransactionTypePersonal MandatePaymentMethodDetailsACSSDebitTransactionType = "personal"
)

List of values that MandatePaymentMethodDetailsACSSDebitTransactionType can take

type MandatePaymentMethodDetailsAUBECSDebit

type MandatePaymentMethodDetailsAUBECSDebit struct {
	// The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.
	URL string `json:"url"`
}

type MandatePaymentMethodDetailsBACSDebit

type MandatePaymentMethodDetailsBACSDebit struct {
	// The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.
	NetworkStatus MandatePaymentMethodDetailsBACSDebitNetworkStatus `json:"network_status"`
	// The unique reference identifying the mandate on the Bacs network.
	Reference string `json:"reference"`
	// The URL that will contain the mandate that the customer has signed.
	URL string `json:"url"`
}

type MandatePaymentMethodDetailsBACSDebitNetworkStatus

type MandatePaymentMethodDetailsBACSDebitNetworkStatus string

The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`.

const (
	MandatePaymentMethodDetailsBACSDebitNetworkStatusAccepted MandatePaymentMethodDetailsBACSDebitNetworkStatus = "accepted"
	MandatePaymentMethodDetailsBACSDebitNetworkStatusPending  MandatePaymentMethodDetailsBACSDebitNetworkStatus = "pending"
	MandatePaymentMethodDetailsBACSDebitNetworkStatusRefused  MandatePaymentMethodDetailsBACSDebitNetworkStatus = "refused"
	MandatePaymentMethodDetailsBACSDebitNetworkStatusRevoked  MandatePaymentMethodDetailsBACSDebitNetworkStatus = "revoked"
)

List of values that MandatePaymentMethodDetailsBACSDebitNetworkStatus can take

type MandatePaymentMethodDetailsBLIK

type MandatePaymentMethodDetailsBLIK struct {
	// Date at which the mandate expires.
	ExpiresAfter int64                                      `json:"expires_after"`
	OffSession   *MandatePaymentMethodDetailsBLIKOffSession `json:"off_session"`
	// Type of the mandate.
	Type MandatePaymentMethodDetailsBLIKType `json:"type"`
}

type MandatePaymentMethodDetailsBLIKOffSession

type MandatePaymentMethodDetailsBLIKOffSession struct {
	// Amount of each recurring payment.
	Amount int64 `json:"amount"`
	// Currency of each recurring payment.
	Currency Currency `json:"currency"`
	// Frequency interval of each recurring payment.
	Interval MandatePaymentMethodDetailsBLIKOffSessionInterval `json:"interval"`
	// Frequency indicator of each recurring payment.
	IntervalCount int64 `json:"interval_count"`
}

type MandatePaymentMethodDetailsBLIKOffSessionInterval

type MandatePaymentMethodDetailsBLIKOffSessionInterval string

Frequency interval of each recurring payment.

const (
	MandatePaymentMethodDetailsBLIKOffSessionIntervalDay   MandatePaymentMethodDetailsBLIKOffSessionInterval = "day"
	MandatePaymentMethodDetailsBLIKOffSessionIntervalMonth MandatePaymentMethodDetailsBLIKOffSessionInterval = "month"
	MandatePaymentMethodDetailsBLIKOffSessionIntervalWeek  MandatePaymentMethodDetailsBLIKOffSessionInterval = "week"
	MandatePaymentMethodDetailsBLIKOffSessionIntervalYear  MandatePaymentMethodDetailsBLIKOffSessionInterval = "year"
)

List of values that MandatePaymentMethodDetailsBLIKOffSessionInterval can take

type MandatePaymentMethodDetailsBLIKType

type MandatePaymentMethodDetailsBLIKType string

Type of the mandate.

const (
	MandatePaymentMethodDetailsBLIKTypeOffSession MandatePaymentMethodDetailsBLIKType = "off_session"
	MandatePaymentMethodDetailsBLIKTypeOnSession  MandatePaymentMethodDetailsBLIKType = "on_session"
)

List of values that MandatePaymentMethodDetailsBLIKType can take

type MandatePaymentMethodDetailsCard

type MandatePaymentMethodDetailsCard struct{}
type MandatePaymentMethodDetailsLink struct{}

type MandatePaymentMethodDetailsSEPADebit

type MandatePaymentMethodDetailsSEPADebit struct {
	// The unique reference of the mandate.
	Reference string `json:"reference"`
	// The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively.
	URL string `json:"url"`
}

type MandatePaymentMethodDetailsType

type MandatePaymentMethodDetailsType string

The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method.

const (
	MandatePaymentMethodDetailsTypeACSSDebit     MandatePaymentMethodDetailsType = "acss_debit"
	MandatePaymentMethodDetailsTypeAUBECSDebit   MandatePaymentMethodDetailsType = "au_becs_debit"
	MandatePaymentMethodDetailsTypeBACSDebit     MandatePaymentMethodDetailsType = "bacs_debit"
	MandatePaymentMethodDetailsTypeBLIK          MandatePaymentMethodDetailsType = "blik"
	MandatePaymentMethodDetailsTypeCard          MandatePaymentMethodDetailsType = "card"
	MandatePaymentMethodDetailsTypeLink          MandatePaymentMethodDetailsType = "link"
	MandatePaymentMethodDetailsTypeSEPADebit     MandatePaymentMethodDetailsType = "sepa_debit"
	MandatePaymentMethodDetailsTypeUSBankAccount MandatePaymentMethodDetailsType = "us_bank_account"
)

List of values that MandatePaymentMethodDetailsType can take

type MandatePaymentMethodDetailsUSBankAccount

type MandatePaymentMethodDetailsUSBankAccount struct{}

type MandateSingleUse

type MandateSingleUse struct {
	// On a single use mandate, the amount of the payment.
	Amount int64 `json:"amount"`
	// On a single use mandate, the currency of the payment.
	Currency Currency `json:"currency"`
}

type MandateStatus

type MandateStatus string

The status of the mandate, which indicates whether it can be used to initiate a payment.

const (
	MandateStatusActive   MandateStatus = "active"
	MandateStatusInactive MandateStatus = "inactive"
	MandateStatusPending  MandateStatus = "pending"
)

List of values that MandateStatus can take

type MandateType

type MandateType string

The type of the mandate.

const (
	MandateTypeMultiUse  MandateType = "multi_use"
	MandateTypeSingleUse MandateType = "single_use"
)

List of values that MandateType can take

type OAuthScopeType

type OAuthScopeType string

OAuthScopeType is the type of OAuth scope.

const (
	OAuthScopeTypeReadOnly  OAuthScopeType = "read_only"
	OAuthScopeTypeReadWrite OAuthScopeType = "read_write"
)

List of possible values for OAuth scopes.

type OAuthStripeUserBusinessType

type OAuthStripeUserBusinessType string

OAuthStripeUserBusinessType is the business type for the Stripe oauth user.

const (
	OAuthStripeUserBusinessTypeCorporation OAuthStripeUserBusinessType = "corporation"
	OAuthStripeUserBusinessTypeLLC         OAuthStripeUserBusinessType = "llc"
	OAuthStripeUserBusinessTypeNonProfit   OAuthStripeUserBusinessType = "non_profit"
	OAuthStripeUserBusinessTypePartnership OAuthStripeUserBusinessType = "partnership"
	OAuthStripeUserBusinessTypeSoleProp    OAuthStripeUserBusinessType = "sole_prop"
)

List of supported values for business type.

type OAuthStripeUserGender

type OAuthStripeUserGender string

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

const (
	OAuthStripeUserGenderFemale OAuthStripeUserGender = "female"
	OAuthStripeUserGenderMale   OAuthStripeUserGender = "male"
)

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

type OAuthStripeUserParams

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 OAuthToken

type OAuthToken struct {
	APIResource

	Livemode     bool           `json:"livemode"`
	Scope        OAuthScopeType `json:"scope"`
	StripeUserID string         `json:"stripe_user_id"`
	TokenType    OAuthTokenType `json:"token_type"`

	// Deprecated, please use StripeUserID
	AccessToken          string `json:"access_token"`
	RefreshToken         string `json:"refresh_token"`
	StripePublishableKey string `json:"stripe_publishable_key"`
}

OAuthToken is the value of the OAuthToken from OAuth flow. https://stripe.com/docs/connect/oauth-reference#post-token

type OAuthTokenParams

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.

type OAuthTokenType

type OAuthTokenType string

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

const (
	OAuthTokenTypeBearer OAuthTokenType = "bearer"
)

List of possible OAuthTokenType values.

type Params

type Params struct {
	// Context used for request. It may carry deadlines, cancelation signals,
	// and other request-scoped values across API boundaries and between
	// processes.
	//
	// Note that a cancelled or timed out context does not provide any
	// guarantee whether the operation was or was not completed on Stripe's API
	// servers. For certainty, you must either retry with the same idempotency
	// key or query the state of the API.
	Context context.Context `form:"-"`

	Expand []*string    `form:"expand"`
	Extra  *ExtraValues `form:"*"`

	// Headers may be used to provide extra header lines on the HTTP request.
	Headers http.Header `form:"-"`

	IdempotencyKey *string           `form:"-"` // Passed as header
	Metadata       map[string]string `form:"metadata"`

	// StripeAccount may contain the ID of a connected account. By including
	// this field, the request is made as if it originated from the connected
	// account instead of under the account of the owner of the configured
	// Stripe key.
	StripeAccount *string `form:"-"` // Passed as header
}

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

func (*Params) AddExpand

func (p *Params) AddExpand(f string)

AddExpand appends a new field to expand.

func (*Params) AddExtra

func (p *Params) AddExtra(key, value string)

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

func (*Params) AddMetadata

func (p *Params) AddMetadata(key, value string)

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

func (*Params) GetParams

func (p *Params) GetParams() *Params

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

func (*Params) SetIdempotencyKey

func (p *Params) SetIdempotencyKey(val string)

SetIdempotencyKey sets a value for the Idempotency-Key header.

func (*Params) SetStripeAccount

func (p *Params) SetStripeAccount(val string)

SetStripeAccount sets a value for the Stripe-Account header.

type ParamsContainer

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.

type PaymentIntent

type PaymentIntent struct {
	APIResource
	// Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
	Amount int64 `json:"amount"`
	// Amount that can be captured from this PaymentIntent.
	AmountCapturable int64                       `json:"amount_capturable"`
	AmountDetails    *PaymentIntentAmountDetails `json:"amount_details"`
	// Amount that was collected by this PaymentIntent.
	AmountReceived int64 `json:"amount_received"`
	// ID of the Connect application that created the PaymentIntent.
	Application *Application `json:"application"`
	// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
	ApplicationFeeAmount int64 `json:"application_fee_amount"`
	// Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)
	AutomaticPaymentMethods *PaymentIntentAutomaticPaymentMethods `json:"automatic_payment_methods"`
	// Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.
	CanceledAt int64 `json:"canceled_at"`
	// Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).
	CancellationReason PaymentIntentCancellationReason `json:"cancellation_reason"`
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod PaymentIntentCaptureMethod `json:"capture_method"`
	// Charges that were created by this PaymentIntent, if any.
	Charges *ChargeList `json:"charges"`
	// The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key.
	//
	// The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
	//
	// Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.
	ClientSecret       string                          `json:"client_secret"`
	ConfirmationMethod PaymentIntentConfirmationMethod `json:"confirmation_method"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// ID of the Customer this PaymentIntent belongs to, if one exists.
	//
	// Payment methods attached to other Customers cannot be used with this PaymentIntent.
	//
	// If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.
	Customer *Customer `json:"customer"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// ID of the invoice that created this PaymentIntent, if it exists.
	Invoice *Invoice `json:"invoice"`
	// The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.
	LastPaymentError *Error `json:"last_payment_error"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).
	Metadata map[string]string `json:"metadata"`
	// If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
	NextAction *PaymentIntentNextAction `json:"next_action"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
	OnBehalfOf *Account `json:"on_behalf_of"`
	// ID of the payment method used in this PaymentIntent.
	PaymentMethod *PaymentMethod `json:"payment_method"`
	// Payment-method-specific configuration for this PaymentIntent.
	PaymentMethodOptions *PaymentIntentPaymentMethodOptions `json:"payment_method_options"`
	// The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.
	PaymentMethodTypes []string `json:"payment_method_types"`
	// If present, this property tells you about the processing state of the payment.
	Processing *PaymentIntentProcessing `json:"processing"`
	// Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
	ReceiptEmail string `json:"receipt_email"`
	// ID of the review associated with this PaymentIntent, if any.
	Review *Review `json:"review"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentSetupFutureUsage `json:"setup_future_usage"`
	// Shipping information for this PaymentIntent.
	Shipping *ShippingDetails `json:"shipping"`
	// This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.
	Source *PaymentSource `json:"source"`
	// For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters.
	StatementDescriptor string `json:"statement_descriptor"`
	// Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
	StatementDescriptorSuffix string `json:"statement_descriptor_suffix"`
	// Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).
	Status PaymentIntentStatus `json:"status"`
	// The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
	TransferData *PaymentIntentTransferData `json:"transfer_data"`
	// A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
	TransferGroup string `json:"transfer_group"`
}

A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.

A PaymentIntent transitions through [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates at most one successful charge.

Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents).

func (*PaymentIntent) UnmarshalJSON

func (p *PaymentIntent) UnmarshalJSON(data []byte) error

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

type PaymentIntentAmountDetails

type PaymentIntentAmountDetails struct {
	Tip *PaymentIntentAmountDetailsTip `json:"tip"`
}

type PaymentIntentAmountDetailsTip

type PaymentIntentAmountDetailsTip struct {
	// Portion of the amount that corresponds to a tip.
	Amount int64 `json:"amount"`
}

type PaymentIntentApplyCustomerBalanceParams

type PaymentIntentApplyCustomerBalanceParams struct {
	Params `form:"*"`
	// Amount intended to be applied to this PaymentIntent from the customer's cash balance.
	//
	// A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).
	//
	// The maximum amount is the amount of the PaymentIntent.
	//
	// When omitted, the amount defaults to the remaining amount requested on the PaymentIntent.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
}

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

type PaymentIntentAutomaticPaymentMethods

type PaymentIntentAutomaticPaymentMethods struct {
	// Automatically calculates compatible payment methods
	Enabled bool `json:"enabled"`
}

Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)

type PaymentIntentAutomaticPaymentMethodsParams

type PaymentIntentAutomaticPaymentMethodsParams struct {
	// Whether this feature is enabled.
	Enabled *bool `form:"enabled"`
}

When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters.

type PaymentIntentCancelParams

type PaymentIntentCancelParams struct {
	Params `form:"*"`
	// Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`
	CancellationReason *string `form:"cancellation_reason"`
}

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status='requires_capture', the remaining amount_capturable will automatically be refunded.

You cannot cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead

type PaymentIntentCancellationReason

type PaymentIntentCancellationReason string

Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).

const (
	PaymentIntentCancellationReasonAbandoned           PaymentIntentCancellationReason = "abandoned"
	PaymentIntentCancellationReasonAutomatic           PaymentIntentCancellationReason = "automatic"
	PaymentIntentCancellationReasonDuplicate           PaymentIntentCancellationReason = "duplicate"
	PaymentIntentCancellationReasonFailedInvoice       PaymentIntentCancellationReason = "failed_invoice"
	PaymentIntentCancellationReasonFraudulent          PaymentIntentCancellationReason = "fraudulent"
	PaymentIntentCancellationReasonRequestedByCustomer PaymentIntentCancellationReason = "requested_by_customer"
	PaymentIntentCancellationReasonVoidInvoice         PaymentIntentCancellationReason = "void_invoice"
)

List of values that PaymentIntentCancellationReason can take

type PaymentIntentCaptureMethod

type PaymentIntentCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	PaymentIntentCaptureMethodAutomatic PaymentIntentCaptureMethod = "automatic"
	PaymentIntentCaptureMethodManual    PaymentIntentCaptureMethod = "manual"
)

List of values that PaymentIntentCaptureMethod can take

type PaymentIntentCaptureParams

type PaymentIntentCaptureParams struct {
	Params `form:"*"`
	// The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided.
	AmountToCapture *int64 `form:"amount_to_capture"`
	// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
	ApplicationFeeAmount *int64 `form:"application_fee_amount"`
	// For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters.
	StatementDescriptor *string `form:"statement_descriptor"`
	// Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
	StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
	// The parameters used to automatically create a Transfer when the payment
	// is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
	TransferData *PaymentIntentTransferDataParams `form:"transfer_data"`
}

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later).

type PaymentIntentConfirmParams

type PaymentIntentConfirmParams struct {
	Params `form:"*"`
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod *string `form:"capture_method"`
	// Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication).
	ErrorOnRequiresAction *bool `form:"error_on_requires_action"`
	// ID of the mandate to be used for this payment.
	Mandate *string `form:"mandate"`
	// This hash contains details about the Mandate to create
	MandateData *PaymentIntentMandateDataParams `form:"mandate_data"`
	// Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards).
	OffSession *bool `form:"off_session"`
	// ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.
	PaymentMethod *string `form:"payment_method"`
	// If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
	// in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
	// property on the PaymentIntent.
	PaymentMethodData *PaymentIntentPaymentMethodDataParams `form:"payment_method_data"`
	// Payment-method-specific configuration for this PaymentIntent.
	PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
	// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
	RadarOptions *PaymentIntentConfirmRadarOptionsParams `form:"radar_options"`
	// Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
	ReceiptEmail *string `form:"receipt_email"`
	// The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
	// If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
	// This parameter is only used for cards and other redirect-based payment methods.
	ReturnURL *string `form:"return_url"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Shipping information for this PaymentIntent.
	Shipping *ShippingDetailsParams `form:"shipping"`
	// Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps.
	UseStripeSDK *bool `form:"use_stripe_sdk"`
}

Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.

If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the requires_action status and suggest additional actions via next_action. If payment fails, the PaymentIntent will transition to the requires_payment_method status. If payment succeeds, the PaymentIntent will transition to the succeeded status (or requires_capture, if capture_method is set to manual).

If the confirmation_method is automatic, payment may be attempted using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment) and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret). After next_actions are handled by the client, no additional confirmation is required to complete the payment.

If the confirmation_method is manual, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to the requires_confirmation state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. Read the [expanded documentation](https://stripe.com/docs/payments/payment-intents/web-manual) to learn more about manual confirmation.

type PaymentIntentConfirmRadarOptionsParams

type PaymentIntentConfirmRadarOptionsParams struct {
	// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
	Session *string `form:"session"`
}

Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.

type PaymentIntentConfirmationMethod

type PaymentIntentConfirmationMethod string
const (
	PaymentIntentConfirmationMethodAutomatic PaymentIntentConfirmationMethod = "automatic"
	PaymentIntentConfirmationMethodManual    PaymentIntentConfirmationMethod = "manual"
)

List of values that PaymentIntentConfirmationMethod can take

type PaymentIntentIncrementAuthorizationParams

type PaymentIntentIncrementAuthorizationParams struct {
	Params `form:"*"`
	// The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount.
	Amount *int64 `form:"amount"`
	// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
	ApplicationFeeAmount *int64 `form:"application_fee_amount"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// The parameters used to automatically create a Transfer when the payment is captured.
	// For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
	TransferData *PaymentIntentIncrementAuthorizationTransferDataParams `form:"transfer_data"`
}

Perform an incremental authorization on an eligible PaymentIntent(https://stripe.com/docs/api/payment_intents/object). To be eligible, the PaymentIntent's status must be requires_capture and [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) must be true.

Incremental authorizations attempt to increase the authorized amount on your customer's card to the new, higher amount provided. As with the initial authorization, incremental authorizations may be declined. A single PaymentIntent can call this endpoint multiple times to further increase the authorized amount.

If the incremental authorization succeeds, the PaymentIntent object is returned with the updated [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount). If the incremental authorization fails, a [card_declined](https://stripe.com/docs/error-codes#card-declined) error is returned, and no fields on the PaymentIntent or Charge are updated. The PaymentIntent object remains capturable for the previously authorized amount.

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. Once captured, a PaymentIntent can no longer be incremented.

Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations).

type PaymentIntentIncrementAuthorizationTransferDataParams

type PaymentIntentIncrementAuthorizationTransferDataParams struct {
	// The amount that will be transferred automatically when a charge succeeds.
	Amount *int64 `form:"amount"`
}

The parameters used to automatically create a Transfer when the payment is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).

type PaymentIntentList

type PaymentIntentList struct {
	APIResource
	ListMeta
	Data []*PaymentIntent `json:"data"`
}

PaymentIntentList is a list of PaymentIntents as retrieved from a list endpoint.

type PaymentIntentListParams

type PaymentIntentListParams struct {
	ListParams `form:"*"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	Created *int64 `form:"created"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return PaymentIntents for the customer specified by this customer ID.
	Customer *string `form:"customer"`
}

Returns a list of PaymentIntents.

type PaymentIntentMandateDataCustomerAcceptanceOfflineParams

type PaymentIntentMandateDataCustomerAcceptanceOfflineParams struct{}

If this is a Mandate accepted offline, this hash contains details about the offline acceptance.

type PaymentIntentMandateDataCustomerAcceptanceOnlineParams

type PaymentIntentMandateDataCustomerAcceptanceOnlineParams struct {
	// The IP address from which the Mandate was accepted by the customer.
	IPAddress *string `form:"ip_address"`
	// The user agent of the browser from which the Mandate was accepted by the customer.
	UserAgent *string `form:"user_agent"`
}

If this is a Mandate accepted online, this hash contains details about the online acceptance.

type PaymentIntentMandateDataCustomerAcceptanceParams

type PaymentIntentMandateDataCustomerAcceptanceParams struct {
	// The time at which the customer accepted the Mandate.
	AcceptedAt *int64 `form:"accepted_at"`
	// If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
	Offline *PaymentIntentMandateDataCustomerAcceptanceOfflineParams `form:"offline"`
	// If this is a Mandate accepted online, this hash contains details about the online acceptance.
	Online *PaymentIntentMandateDataCustomerAcceptanceOnlineParams `form:"online"`
	// The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
	Type *string `form:"type"`
}

This hash contains details about the customer acceptance of the Mandate.

type PaymentIntentMandateDataParams

type PaymentIntentMandateDataParams struct {
	// This hash contains details about the customer acceptance of the Mandate.
	CustomerAcceptance *PaymentIntentMandateDataCustomerAcceptanceParams `form:"customer_acceptance"`
}

This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).

type PaymentIntentNextAction

type PaymentIntentNextAction struct {
	AlipayHandleRedirect            *PaymentIntentNextActionAlipayHandleRedirect            `json:"alipay_handle_redirect"`
	BoletoDisplayDetails            *PaymentIntentNextActionBoletoDisplayDetails            `json:"boleto_display_details"`
	CardAwaitNotification           *PaymentIntentNextActionCardAwaitNotification           `json:"card_await_notification"`
	DisplayBankTransferInstructions *PaymentIntentNextActionDisplayBankTransferInstructions `json:"display_bank_transfer_instructions"`
	KonbiniDisplayDetails           *PaymentIntentNextActionKonbiniDisplayDetails           `json:"konbini_display_details"`
	OXXODisplayDetails              *PaymentIntentNextActionOXXODisplayDetails              `json:"oxxo_display_details"`
	PayNowDisplayQRCode             *PaymentIntentNextActionPayNowDisplayQRCode             `json:"paynow_display_qr_code"`
	PromptPayDisplayQRCode          *PaymentIntentNextActionPromptPayDisplayQRCode          `json:"promptpay_display_qr_code"`
	RedirectToURL                   *PaymentIntentNextActionRedirectToURL                   `json:"redirect_to_url"`
	// Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
	Type PaymentIntentNextActionType `json:"type"`
	// When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
	UseStripeSDK                  *PaymentIntentNextActionUseStripeSDK                  `json:"use_stripe_sdk"`
	VerifyWithMicrodeposits       *PaymentIntentNextActionVerifyWithMicrodeposits       `json:"verify_with_microdeposits"`
	WeChatPayDisplayQRCode        *PaymentIntentNextActionWeChatPayDisplayQRCode        `json:"wechat_pay_display_qr_code"`
	WeChatPayRedirectToAndroidApp *PaymentIntentNextActionWeChatPayRedirectToAndroidApp `json:"wechat_pay_redirect_to_android_app"`
	WeChatPayRedirectToIOSApp     *PaymentIntentNextActionWeChatPayRedirectToIOSApp     `json:"wechat_pay_redirect_to_ios_app"`
}

If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.

type PaymentIntentNextActionAlipayHandleRedirect

type PaymentIntentNextActionAlipayHandleRedirect struct {
	// The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App.
	NativeData string `json:"native_data"`
	// The native URL you must redirect your customer to in order to authenticate the payment in an iOS App.
	NativeURL string `json:"native_url"`
	// If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
	ReturnURL string `json:"return_url"`
	// The URL you must redirect your customer to in order to authenticate the payment.
	URL string `json:"url"`
}

type PaymentIntentNextActionBoletoDisplayDetails

type PaymentIntentNextActionBoletoDisplayDetails struct {
	// The timestamp after which the boleto expires.
	ExpiresAt int64 `json:"expires_at"`
	// The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher.
	HostedVoucherURL string `json:"hosted_voucher_url"`
	// The boleto number.
	Number string `json:"number"`
	// The URL to the downloadable boleto voucher PDF.
	PDF string `json:"pdf"`
}

type PaymentIntentNextActionCardAwaitNotification

type PaymentIntentNextActionCardAwaitNotification struct {
	// The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.
	ChargeAttemptAt int64 `json:"charge_attempt_at"`
	// For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required.
	CustomerApprovalRequired bool `json:"customer_approval_required"`
}

type PaymentIntentNextActionDisplayBankTransferInstructions

type PaymentIntentNextActionDisplayBankTransferInstructions struct {
	// The remaining amount that needs to be transferred to complete the payment.
	AmountRemaining int64 `json:"amount_remaining"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// A list of financial addresses that can be used to fund the customer balance
	FinancialAddresses []*PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress `json:"financial_addresses"`
	// A link to a hosted page that guides your customer through completing the transfer.
	HostedInstructionsURL string `json:"hosted_instructions_url"`
	// A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer.
	Reference string `json:"reference"`
	// Type of bank transfer
	Type PaymentIntentNextActionDisplayBankTransferInstructionsType `json:"type"`
}

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddress struct {
	// Iban Records contain E.U. bank account details per the SEPA format.
	IBAN *PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIBAN `json:"iban"`
	// Sort Code Records contain U.K. bank account details per the sort code format.
	SortCode *PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode `json:"sort_code"`
	// SPEI Records contain Mexico bank account details per the SPEI format.
	Spei *PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei `json:"spei"`
	// The payment networks supported by this FinancialAddress
	SupportedNetworks []PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork `json:"supported_networks"`
	// The type of financial address
	Type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType `json:"type"`
	// Zengin Records contain Japan bank account details per the Zengin format.
	Zengin *PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin `json:"zengin"`
}

A list of financial addresses that can be used to fund the customer balance

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIBAN

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressIBAN struct {
	// The name of the person or business that owns the bank account
	AccountHolderName string `json:"account_holder_name"`
	// The BIC/SWIFT code of the account.
	BIC string `json:"bic"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country string `json:"country"`
	// The IBAN of the account.
	IBAN string `json:"iban"`
}

Iban Records contain E.U. bank account details per the SEPA format.

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSortCode struct {
	// The name of the person or business that owns the bank account
	AccountHolderName string `json:"account_holder_name"`
	// The account number
	AccountNumber string `json:"account_number"`
	// The six-digit sort code
	SortCode string `json:"sort_code"`
}

Sort Code Records contain U.K. bank account details per the sort code format.

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei struct {
	// The three-digit bank code
	BankCode string `json:"bank_code"`
	// The short banking institution name
	BankName string `json:"bank_name"`
	// The CLABE number
	Clabe string `json:"clabe"`
}

SPEI Records contain Mexico bank account details per the SPEI format.

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork string

The payment networks supported by this FinancialAddress

const (
	PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetworkBACS   PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork = "bacs"
	PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetworkFPS    PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork = "fps"
	PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetworkSEPA   PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork = "sepa"
	PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetworkSpei   PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork = "spei"
	PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetworkZengin PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork = "zengin"
)

List of values that PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSupportedNetwork can take

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType string

The type of financial address

const (
	PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressTypeIBAN     PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType = "iban"
	PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressTypeSortCode PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType = "sort_code"
	PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressTypeSpei     PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType = "spei"
	PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressTypeZengin   PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType = "zengin"
)

List of values that PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressType can take

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin

type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressZengin struct {
	// The account holder name
	AccountHolderName string `json:"account_holder_name"`
	// The account number
	AccountNumber string `json:"account_number"`
	// The bank account type. In Japan, this can only be `futsu` or `toza`.
	AccountType string `json:"account_type"`
	// The bank code of the account
	BankCode string `json:"bank_code"`
	// The bank name of the account
	BankName string `json:"bank_name"`
	// The branch code of the account
	BranchCode string `json:"branch_code"`
	// The branch name of the account
	BranchName string `json:"branch_name"`
}

Zengin Records contain Japan bank account details per the Zengin format.

type PaymentIntentNextActionDisplayBankTransferInstructionsType

type PaymentIntentNextActionDisplayBankTransferInstructionsType string

Type of bank transfer

const (
	PaymentIntentNextActionDisplayBankTransferInstructionsTypeEUBankTransfer PaymentIntentNextActionDisplayBankTransferInstructionsType = "eu_bank_transfer"
	PaymentIntentNextActionDisplayBankTransferInstructionsTypeGBBankTransfer PaymentIntentNextActionDisplayBankTransferInstructionsType = "gb_bank_transfer"
	PaymentIntentNextActionDisplayBankTransferInstructionsTypeJPBankTransfer PaymentIntentNextActionDisplayBankTransferInstructionsType = "jp_bank_transfer"
	PaymentIntentNextActionDisplayBankTransferInstructionsTypeMXBankTransfer PaymentIntentNextActionDisplayBankTransferInstructionsType = "mx_bank_transfer"
)

List of values that PaymentIntentNextActionDisplayBankTransferInstructionsType can take

type PaymentIntentNextActionKonbiniDisplayDetails

type PaymentIntentNextActionKonbiniDisplayDetails struct {
	// The timestamp at which the pending Konbini payment expires.
	ExpiresAt int64 `json:"expires_at"`
	// The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher.
	HostedVoucherURL string                                              `json:"hosted_voucher_url"`
	Stores           *PaymentIntentNextActionKonbiniDisplayDetailsStores `json:"stores"`
}

type PaymentIntentNextActionKonbiniDisplayDetailsStores

type PaymentIntentNextActionKonbiniDisplayDetailsStores struct {
	// FamilyMart instruction details.
	FamilyMart *PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilyMart `json:"familymart"`
	// Lawson instruction details.
	Lawson *PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson `json:"lawson"`
	// Ministop instruction details.
	Ministop *PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop `json:"ministop"`
	// Seicomart instruction details.
	Seicomart *PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart `json:"seicomart"`
}

type PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilyMart

type PaymentIntentNextActionKonbiniDisplayDetailsStoresFamilyMart struct {
	// The confirmation number.
	ConfirmationNumber string `json:"confirmation_number"`
	// The payment code.
	PaymentCode string `json:"payment_code"`
}

FamilyMart instruction details.

type PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson

type PaymentIntentNextActionKonbiniDisplayDetailsStoresLawson struct {
	// The confirmation number.
	ConfirmationNumber string `json:"confirmation_number"`
	// The payment code.
	PaymentCode string `json:"payment_code"`
}

Lawson instruction details.

type PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop

type PaymentIntentNextActionKonbiniDisplayDetailsStoresMinistop struct {
	// The confirmation number.
	ConfirmationNumber string `json:"confirmation_number"`
	// The payment code.
	PaymentCode string `json:"payment_code"`
}

Ministop instruction details.

type PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart

type PaymentIntentNextActionKonbiniDisplayDetailsStoresSeicomart struct {
	// The confirmation number.
	ConfirmationNumber string `json:"confirmation_number"`
	// The payment code.
	PaymentCode string `json:"payment_code"`
}

Seicomart instruction details.

type PaymentIntentNextActionOXXODisplayDetails

type PaymentIntentNextActionOXXODisplayDetails struct {
	// The timestamp after which the OXXO voucher expires.
	ExpiresAfter int64 `json:"expires_after"`
	// The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher.
	HostedVoucherURL string `json:"hosted_voucher_url"`
	// OXXO reference number.
	Number string `json:"number"`
}

type PaymentIntentNextActionPayNowDisplayQRCode

type PaymentIntentNextActionPayNowDisplayQRCode struct {
	// The raw data string used to generate QR code, it should be used together with QR code library.
	Data string `json:"data"`
	// The image_url_png string used to render QR code
	ImageURLPNG string `json:"image_url_png"`
	// The image_url_svg string used to render QR code
	ImageURLSVG string `json:"image_url_svg"`
}

type PaymentIntentNextActionPromptPayDisplayQRCode

type PaymentIntentNextActionPromptPayDisplayQRCode struct {
	// The raw data string used to generate QR code, it should be used together with QR code library.
	Data string `json:"data"`
	// The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code.
	HostedInstructionsURL string `json:"hosted_instructions_url"`
	// The image_url_png string used to render QR code, can be used as <img src="…" />
	ImageURLPNG string `json:"image_url_png"`
	// The image_url_svg string used to render QR code, can be used as <img src="…" />
	ImageURLSVG string `json:"image_url_svg"`
}

type PaymentIntentNextActionRedirectToURL

type PaymentIntentNextActionRedirectToURL struct {
	// If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
	ReturnURL string `json:"return_url"`
	// The URL you must redirect your customer to in order to authenticate the payment.
	URL string `json:"url"`
}

type PaymentIntentNextActionType

type PaymentIntentNextActionType string

Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.

const (
	PaymentIntentNextActionTypeAlipayHandleRedirect PaymentIntentNextActionType = "alipay_handle_redirect"
	PaymentIntentNextActionTypeOXXODisplayDetails   PaymentIntentNextActionType = "oxxo_display_details"
	PaymentIntentNextActionTypeRedirectToURL        PaymentIntentNextActionType = "redirect_to_url"
)

List of values that PaymentIntentNextActionType can take

type PaymentIntentNextActionUseStripeSDK

type PaymentIntentNextActionUseStripeSDK struct{}

When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.

type PaymentIntentNextActionVerifyWithMicrodeposits

type PaymentIntentNextActionVerifyWithMicrodeposits struct {
	// The timestamp when the microdeposits are expected to land.
	ArrivalDate int64 `json:"arrival_date"`
	// The URL for the hosted verification page, which allows customers to verify their bank account.
	HostedVerificationURL string `json:"hosted_verification_url"`
	// The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
	MicrodepositType PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType `json:"microdeposit_type"`
}

type PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType

type PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType string

The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.

const (
	PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositTypeAmounts        PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType = "amounts"
	PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositTypeDescriptorCode PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType = "descriptor_code"
)

List of values that PaymentIntentNextActionVerifyWithMicrodepositsMicrodepositType can take

type PaymentIntentNextActionWeChatPayDisplayQRCode

type PaymentIntentNextActionWeChatPayDisplayQRCode struct {
	// The data being used to generate QR code
	Data string `json:"data"`
	// The base64 image data for a pre-generated QR code
	ImageDataURL string `json:"image_data_url"`
	// The image_url_png string used to render QR code
	ImageURLPNG string `json:"image_url_png"`
	// The image_url_svg string used to render QR code
	ImageURLSVG string `json:"image_url_svg"`
}

type PaymentIntentNextActionWeChatPayRedirectToAndroidApp

type PaymentIntentNextActionWeChatPayRedirectToAndroidApp struct {
	// app_id is the APP ID registered on WeChat open platform
	AppID string `json:"app_id"`
	// nonce_str is a random string
	NonceStr string `json:"nonce_str"`
	// package is static value
	Package string `json:"package"`
	// an unique merchant ID assigned by WeChat Pay
	PartnerID string `json:"partner_id"`
	// an unique trading ID assigned by WeChat Pay
	PrepayID string `json:"prepay_id"`
	// A signature
	Sign string `json:"sign"`
	// Specifies the current time in epoch format
	Timestamp string `json:"timestamp"`
}

type PaymentIntentNextActionWeChatPayRedirectToIOSApp

type PaymentIntentNextActionWeChatPayRedirectToIOSApp struct {
	// An universal link that redirect to WeChat Pay app
	NativeURL string `json:"native_url"`
}

type PaymentIntentParams

type PaymentIntentParams struct {
	Params `form:"*"`
	// Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
	Amount *int64 `form:"amount"`
	// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
	ApplicationFeeAmount *int64 `form:"application_fee_amount"`
	// When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters.
	AutomaticPaymentMethods *PaymentIntentAutomaticPaymentMethodsParams `form:"automatic_payment_methods"`
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod *string `form:"capture_method"`
	// The client secret of the PaymentIntent. Required if a publishable key is used to retrieve the source.
	ClientSecret *string `form:"client_secret"`
	// Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided.
	Confirm            *bool   `form:"confirm"`
	ConfirmationMethod *string `form:"confirmation_method"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// ID of the Customer this PaymentIntent belongs to, if one exists.
	//
	// Payment methods attached to other Customers cannot be used with this PaymentIntent.
	//
	// If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.
	Customer *string `form:"customer"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
	Mandate *string `form:"mandate"`
	// This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
	MandateData *PaymentIntentMandateDataParams `form:"mandate_data"`
	// The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
	OnBehalfOf *string `form:"on_behalf_of"`
	// ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.
	PaymentMethod *string `form:"payment_method"`
	// If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
	// in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
	// property on the PaymentIntent.
	PaymentMethodData *PaymentIntentPaymentMethodDataParams `form:"payment_method_data"`
	// Payment-method-specific configuration for this PaymentIntent.
	PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
	// The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
	PaymentMethodTypes []*string `form:"payment_method_types"`
	// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
	RadarOptions *PaymentIntentRadarOptionsParams `form:"radar_options"`
	// Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
	ReceiptEmail *string `form:"receipt_email"`
	// The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
	ReturnURL *string `form:"return_url"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Shipping information for this PaymentIntent.
	Shipping *ShippingDetailsParams `form:"shipping"`
	// For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters.
	StatementDescriptor *string `form:"statement_descriptor"`
	// Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
	StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
	// The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
	TransferData *PaymentIntentTransferDataParams `form:"transfer_data"`
	// A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.
	TransferGroup *string `form:"transfer_group"`
	// These parameters apply only for paymentIntent.New with `confirm=true`
	// Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
	ErrorOnRequiresAction *bool `form:"error_on_requires_action"`
	// Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
	OffSession *bool `form:"off_session"`
	// Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps.
	UseStripeSDK *bool `form:"use_stripe_sdk"`
}

Creates a PaymentIntent object.

After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm) to continue the payment. You can read more about the different payment flows available via the Payment Intents API [here](https://stripe.com/docs/payments/payment-intents).

When confirm=true is used during creation, it is equivalent to creating and confirming the PaymentIntent in the same call. You may use any parameters available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when confirm=true is supplied.

type PaymentIntentPaymentMethodDataAffirmParams

type PaymentIntentPaymentMethodDataAffirmParams struct{}

If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.

type PaymentIntentPaymentMethodDataBLIKParams

type PaymentIntentPaymentMethodDataBLIKParams struct{}

If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.

type PaymentIntentPaymentMethodDataBillingDetailsParams

type PaymentIntentPaymentMethodDataBillingDetailsParams struct {
	// Billing address.
	Address *AddressParams `form:"address"`
	// Email address.
	Email *string `form:"email"`
	// Full name.
	Name *string `form:"name"`
	// Billing phone number (including extension).
	Phone *string `form:"phone"`
}

Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

type PaymentIntentPaymentMethodDataCustomerBalanceParams

type PaymentIntentPaymentMethodDataCustomerBalanceParams struct{}

If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.

type PaymentIntentPaymentMethodDataKonbiniParams

type PaymentIntentPaymentMethodDataKonbiniParams struct{}

If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.

type PaymentIntentPaymentMethodDataLinkParams

type PaymentIntentPaymentMethodDataLinkParams struct{}

If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.

type PaymentIntentPaymentMethodDataParams

type PaymentIntentPaymentMethodDataParams struct {
	// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
	ACSSDebit *PaymentMethodACSSDebitParams `form:"acss_debit"`
	// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
	Affirm *PaymentIntentPaymentMethodDataAffirmParams `form:"affirm"`
	// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
	AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"`
	// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
	Alipay *PaymentMethodAlipayParams `form:"alipay"`
	// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
	AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"`
	// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
	BACSDebit *PaymentMethodBACSDebitParams `form:"bacs_debit"`
	// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
	Bancontact *PaymentMethodBancontactParams `form:"bancontact"`
	// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
	BillingDetails *PaymentIntentPaymentMethodDataBillingDetailsParams `form:"billing_details"`
	// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
	BLIK *PaymentIntentPaymentMethodDataBLIKParams `form:"blik"`
	// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
	Boleto *PaymentMethodBoletoParams `form:"boleto"`
	// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
	CustomerBalance *PaymentIntentPaymentMethodDataCustomerBalanceParams `form:"customer_balance"`
	// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
	EPS *PaymentMethodEPSParams `form:"eps"`
	// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
	FPX *PaymentMethodFPXParams `form:"fpx"`
	// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
	Giropay *PaymentMethodGiropayParams `form:"giropay"`
	// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
	Grabpay *PaymentMethodGrabpayParams `form:"grabpay"`
	// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
	IDEAL *PaymentMethodIDEALParams `form:"ideal"`
	// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
	InteracPresent *PaymentMethodInteracPresentParams `form:"interac_present"`
	// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
	Klarna *PaymentMethodKlarnaParams `form:"klarna"`
	// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
	Konbini *PaymentIntentPaymentMethodDataKonbiniParams `form:"konbini"`
	// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
	Link *PaymentIntentPaymentMethodDataLinkParams `form:"link"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
	OXXO *PaymentMethodOXXOParams `form:"oxxo"`
	// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
	P24 *PaymentMethodP24Params `form:"p24"`
	// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
	PayNow *PaymentIntentPaymentMethodDataPayNowParams `form:"paynow"`
	// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
	PromptPay *PaymentIntentPaymentMethodDataPromptPayParams `form:"promptpay"`
	// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
	RadarOptions *PaymentIntentPaymentMethodDataRadarOptionsParams `form:"radar_options"`
	// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
	SEPADebit *PaymentMethodSEPADebitParams `form:"sepa_debit"`
	// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
	Sofort *PaymentMethodSofortParams `form:"sofort"`
	// The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
	Type *string `form:"type"`
	// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
	USBankAccount *PaymentIntentPaymentMethodDataUSBankAccountParams `form:"us_bank_account"`
	// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
	WeChatPay *PaymentMethodWeChatPayParams `form:"wechat_pay"`
}

If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) property on the PaymentIntent.

type PaymentIntentPaymentMethodDataPayNowParams

type PaymentIntentPaymentMethodDataPayNowParams struct{}

If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.

type PaymentIntentPaymentMethodDataPromptPayParams

type PaymentIntentPaymentMethodDataPromptPayParams struct{}

If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.

type PaymentIntentPaymentMethodDataRadarOptionsParams

type PaymentIntentPaymentMethodDataRadarOptionsParams struct {
	// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
	Session *string `form:"session"`
}

Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.

type PaymentIntentPaymentMethodDataUSBankAccountParams

type PaymentIntentPaymentMethodDataUSBankAccountParams struct {
	// Account holder type: individual or company.
	AccountHolderType *string `form:"account_holder_type"`
	// Account number of the bank account.
	AccountNumber *string `form:"account_number"`
	// Account type: checkings or savings. Defaults to checking if omitted.
	AccountType *string `form:"account_type"`
	// The ID of a Financial Connections Account to use as a payment method.
	FinancialConnectionsAccount *string `form:"financial_connections_account"`
	// Routing number of the bank account.
	RoutingNumber *string `form:"routing_number"`
}

If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.

type PaymentIntentPaymentMethodOptions

type PaymentIntentPaymentMethodOptions struct {
	ACSSDebit        *PaymentIntentPaymentMethodOptionsACSSDebit        `json:"acss_debit"`
	Affirm           *PaymentIntentPaymentMethodOptionsAffirm           `json:"affirm"`
	AfterpayClearpay *PaymentIntentPaymentMethodOptionsAfterpayClearpay `json:"afterpay_clearpay"`
	Alipay           *PaymentIntentPaymentMethodOptionsAlipay           `json:"alipay"`
	AUBECSDebit      *PaymentIntentPaymentMethodOptionsAUBECSDebit      `json:"au_becs_debit"`
	BACSDebit        *PaymentIntentPaymentMethodOptionsBACSDebit        `json:"bacs_debit"`
	Bancontact       *PaymentIntentPaymentMethodOptionsBancontact       `json:"bancontact"`
	BLIK             *PaymentIntentPaymentMethodOptionsBLIK             `json:"blik"`
	Boleto           *PaymentIntentPaymentMethodOptionsBoleto           `json:"boleto"`
	Card             *PaymentIntentPaymentMethodOptionsCard             `json:"card"`
	CardPresent      *PaymentIntentPaymentMethodOptionsCardPresent      `json:"card_present"`
	CustomerBalance  *PaymentIntentPaymentMethodOptionsCustomerBalance  `json:"customer_balance"`
	EPS              *PaymentIntentPaymentMethodOptionsEPS              `json:"eps"`
	FPX              *PaymentIntentPaymentMethodOptionsFPX              `json:"fpx"`
	Giropay          *PaymentIntentPaymentMethodOptionsGiropay          `json:"giropay"`
	Grabpay          *PaymentIntentPaymentMethodOptionsGrabpay          `json:"grabpay"`
	IDEAL            *PaymentIntentPaymentMethodOptionsIDEAL            `json:"ideal"`
	InteracPresent   *PaymentIntentPaymentMethodOptionsInteracPresent   `json:"interac_present"`
	Klarna           *PaymentIntentPaymentMethodOptionsKlarna           `json:"klarna"`
	Konbini          *PaymentIntentPaymentMethodOptionsKonbini          `json:"konbini"`
	Link             *PaymentIntentPaymentMethodOptionsLink             `json:"link"`
	OXXO             *PaymentIntentPaymentMethodOptionsOXXO             `json:"oxxo"`
	P24              *PaymentIntentPaymentMethodOptionsP24              `json:"p24"`
	PayNow           *PaymentIntentPaymentMethodOptionsPayNow           `json:"paynow"`
	PromptPay        *PaymentIntentPaymentMethodOptionsPromptPay        `json:"promptpay"`
	SEPADebit        *PaymentIntentPaymentMethodOptionsSEPADebit        `json:"sepa_debit"`
	Sofort           *PaymentIntentPaymentMethodOptionsSofort           `json:"sofort"`
	USBankAccount    *PaymentIntentPaymentMethodOptionsUSBankAccount    `json:"us_bank_account"`
	WeChatPay        *PaymentIntentPaymentMethodOptionsWeChatPay        `json:"wechat_pay"`
}

Payment-method-specific configuration for this PaymentIntent.

type PaymentIntentPaymentMethodOptionsACSSDebit

type PaymentIntentPaymentMethodOptionsACSSDebit struct {
	MandateOptions *PaymentIntentPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage `json:"setup_future_usage"`
	// Bank account verification method.
	VerificationMethod PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"`
}

type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptions

type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptions struct {
	// A URL for custom mandate text
	CustomMandateURL string `json:"custom_mandate_url"`
	// Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
	IntervalDescription string `json:"interval_description"`
	// Payment schedule for the mandate.
	PaymentSchedule PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule `json:"payment_schedule"`
	// Transaction type of the mandate.
	TransactionType PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"`
}

type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsParams

type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsParams struct {
	// A URL for custom mandate text to render during confirmation step.
	// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
	// or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
	CustomMandateURL *string `form:"custom_mandate_url"`
	// Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
	IntervalDescription *string `form:"interval_description"`
	// Payment schedule for the mandate.
	PaymentSchedule *string `form:"payment_schedule"`
	// Transaction type of the mandate.
	TransactionType *string `form:"transaction_type"`
}

Additional fields for Mandate creation

type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule

type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule string

Payment schedule for the mandate.

const (
	PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleCombined PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "combined"
	PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleInterval PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "interval"
	PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleSporadic PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "sporadic"
)

List of values that PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule can take

type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType

type PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string

Transaction type of the mandate.

const (
	PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business"
	PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal"
)

List of values that PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take

type PaymentIntentPaymentMethodOptionsACSSDebitParams

type PaymentIntentPaymentMethodOptionsACSSDebitParams struct {
	// Additional fields for Mandate creation
	MandateOptions *PaymentIntentPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Verification method for the intent
	VerificationMethod *string `form:"verification_method"`
}

If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.

type PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage

type PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsageNone       PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage = "off_session"
	PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsageOnSession  PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage = "on_session"
)

List of values that PaymentIntentPaymentMethodOptionsACSSDebitSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod

type PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod string

Bank account verification method.

const (
	PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethodAutomatic     PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod = "automatic"
	PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethodInstant       PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod = "instant"
	PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits"
)

List of values that PaymentIntentPaymentMethodOptionsACSSDebitVerificationMethod can take

type PaymentIntentPaymentMethodOptionsAUBECSDebit

type PaymentIntentPaymentMethodOptionsAUBECSDebit struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsAUBECSDebitParams

type PaymentIntentPaymentMethodOptionsAUBECSDebitParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.

type PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage

type PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsageNone       PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage = "off_session"
	PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsageOnSession  PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage = "on_session"
)

List of values that PaymentIntentPaymentMethodOptionsAUBECSDebitSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsAffirm

type PaymentIntentPaymentMethodOptionsAffirm struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod PaymentIntentPaymentMethodOptionsAffirmCaptureMethod `json:"capture_method"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsAffirmCaptureMethod

type PaymentIntentPaymentMethodOptionsAffirmCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	PaymentIntentPaymentMethodOptionsAffirmCaptureMethodManual PaymentIntentPaymentMethodOptionsAffirmCaptureMethod = "manual"
)

List of values that PaymentIntentPaymentMethodOptionsAffirmCaptureMethod can take

type PaymentIntentPaymentMethodOptionsAffirmParams

type PaymentIntentPaymentMethodOptionsAffirmParams struct {
	// Controls when the funds will be captured from the customer's account.
	//
	// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
	//
	// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
	CaptureMethod *string `form:"capture_method"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.

type PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage

type PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsageNone PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsAffirmSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsAfterpayClearpay

type PaymentIntentPaymentMethodOptionsAfterpayClearpay struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod `json:"capture_method"`
	// Order identifier shown to the customer in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about
	// the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.
	Reference string `json:"reference"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod

type PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethodManual PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod = "manual"
)

List of values that PaymentIntentPaymentMethodOptionsAfterpayClearpayCaptureMethod can take

type PaymentIntentPaymentMethodOptionsAfterpayClearpayParams

type PaymentIntentPaymentMethodOptionsAfterpayClearpayParams struct {
	// Controls when the funds will be captured from the customer's account.
	//
	// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
	//
	// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
	CaptureMethod *string `form:"capture_method"`
	// Order identifier shown to the customer in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about
	// the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.
	Reference *string `form:"reference"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.

type PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage

type PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsAfterpayClearpaySetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsAlipay

type PaymentIntentPaymentMethodOptionsAlipay struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsAlipayParams

type PaymentIntentPaymentMethodOptionsAlipayParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.

type PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage

type PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsageNone       PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage = "off_session"
)

List of values that PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsBACSDebit

type PaymentIntentPaymentMethodOptionsBACSDebit struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsBACSDebitParams

type PaymentIntentPaymentMethodOptionsBACSDebitParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.

type PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage

type PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsageNone       PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage = "off_session"
	PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsageOnSession  PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage = "on_session"
)

List of values that PaymentIntentPaymentMethodOptionsBACSDebitSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsBLIK

type PaymentIntentPaymentMethodOptionsBLIK struct{}

type PaymentIntentPaymentMethodOptionsBLIKParams

type PaymentIntentPaymentMethodOptionsBLIKParams struct {
	// The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
	Code *string `form:"code"`
}

If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.

type PaymentIntentPaymentMethodOptionsBancontact

type PaymentIntentPaymentMethodOptionsBancontact struct {
	// Preferred language of the Bancontact authorization page that the customer is redirected to.
	PreferredLanguage string `json:"preferred_language"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsBancontactParams

type PaymentIntentPaymentMethodOptionsBancontactParams struct {
	// Preferred language of the Bancontact authorization page that the customer is redirected to.
	PreferredLanguage *string `form:"preferred_language"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.

type PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage

type PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsageNone       PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage = "off_session"
)

List of values that PaymentIntentPaymentMethodOptionsBancontactSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsBoleto

type PaymentIntentPaymentMethodOptionsBoleto struct {
	// The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time.
	ExpiresAfterDays int64 `json:"expires_after_days"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsBoletoParams

type PaymentIntentPaymentMethodOptionsBoletoParams struct {
	// The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time.
	ExpiresAfterDays *int64 `form:"expires_after_days"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.

type PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage

type PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsageNone       PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage = "off_session"
	PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsageOnSession  PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage = "on_session"
)

List of values that PaymentIntentPaymentMethodOptionsBoletoSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsCard

type PaymentIntentPaymentMethodOptionsCard struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod PaymentIntentPaymentMethodOptionsCardCaptureMethod `json:"capture_method"`
	// Installment details for this payment (Mexico only).
	//
	// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
	Installments *PaymentIntentPaymentMethodOptionsCardInstallments `json:"installments"`
	// Configuration options for setting up an eMandate for cards issued in India.
	MandateOptions *PaymentIntentPaymentMethodOptionsCardMandateOptions `json:"mandate_options"`
	// Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time.
	Network PaymentIntentPaymentMethodOptionsCardNetwork `json:"network"`
	// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
	RequestThreeDSecure PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsCardSetupFutureUsage `json:"setup_future_usage"`
	// Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
	StatementDescriptorSuffixKana string `json:"statement_descriptor_suffix_kana"`
	// Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
	StatementDescriptorSuffixKanji string `json:"statement_descriptor_suffix_kanji"`
}

type PaymentIntentPaymentMethodOptionsCardCaptureMethod

type PaymentIntentPaymentMethodOptionsCardCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	PaymentIntentPaymentMethodOptionsCardCaptureMethodManual PaymentIntentPaymentMethodOptionsCardCaptureMethod = "manual"
)

List of values that PaymentIntentPaymentMethodOptionsCardCaptureMethod can take

type PaymentIntentPaymentMethodOptionsCardInstallments

type PaymentIntentPaymentMethodOptionsCardInstallments struct {
	// Installment plans that may be selected for this PaymentIntent.
	AvailablePlans []*PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"available_plans"`
	// Whether Installments are enabled for this PaymentIntent.
	Enabled bool `json:"enabled"`
	// Installment plan selected for this PaymentIntent.
	Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlan `json:"plan"`
}

Installment details for this payment (Mexico only).

For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).

type PaymentIntentPaymentMethodOptionsCardInstallmentsParams

type PaymentIntentPaymentMethodOptionsCardInstallmentsParams struct {
	// Setting to true enables installments for this PaymentIntent.
	// This will cause the response to contain a list of available installment plans.
	// Setting to false will prevent any selected plan from applying to a charge.
	Enabled *bool `form:"enabled"`
	// The selected installment plan to use for this payment attempt.
	// This parameter can only be provided during confirmation.
	Plan *PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"`
}

Installment configuration for payments attempted on this PaymentIntent (Mexico Only).

For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).

type PaymentIntentPaymentMethodOptionsCardInstallmentsPlan

type PaymentIntentPaymentMethodOptionsCardInstallmentsPlan struct {
	// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
	Count int64 `json:"count"`
	// For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
	// One of `month`.
	Interval PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval `json:"interval"`
	// Type of installment plan, one of `fixed_count`.
	Type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType `json:"type"`
}

Installment plan selected for this PaymentIntent.

type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval

type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval string

For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`.

const (
	PaymentIntentPaymentMethodOptionsCardInstallmentsPlanIntervalMonth PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval = "month"
)

List of values that PaymentIntentPaymentMethodOptionsCardInstallmentsPlanInterval can take

type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams

type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanParams struct {
	// For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card.
	Count *int64 `form:"count"`
	// For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
	// One of `month`.
	Interval *string `form:"interval"`
	// Type of installment plan, one of `fixed_count`.
	Type *string `form:"type"`
}

The selected installment plan to use for this payment attempt. This parameter can only be provided during confirmation.

type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType

type PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType string

Type of installment plan, one of `fixed_count`.

const (
	PaymentIntentPaymentMethodOptionsCardInstallmentsPlanTypeFixedCount PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType = "fixed_count"
)

List of values that PaymentIntentPaymentMethodOptionsCardInstallmentsPlanType can take

type PaymentIntentPaymentMethodOptionsCardMandateOptions

type PaymentIntentPaymentMethodOptionsCardMandateOptions struct {
	// Amount to be charged for future payments.
	Amount int64 `json:"amount"`
	// One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
	AmountType PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType `json:"amount_type"`
	// A description of the mandate or subscription that is meant to be displayed to the customer.
	Description string `json:"description"`
	// End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
	EndDate int64 `json:"end_date"`
	// Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
	Interval PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval `json:"interval"`
	// The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
	IntervalCount int64 `json:"interval_count"`
	// Unique identifier for the mandate or subscription.
	Reference string `json:"reference"`
	// Start date of the mandate or subscription. Start date should not be lesser than yesterday.
	StartDate int64 `json:"start_date"`
	// Specifies the type of mandates supported. Possible values are `india`.
	SupportedTypes []PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedType `json:"supported_types"`
}

Configuration options for setting up an eMandate for cards issued in India.

type PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType

type PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType string

One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.

const (
	PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountTypeFixed   PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType = "fixed"
	PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountTypeMaximum PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType = "maximum"
)

List of values that PaymentIntentPaymentMethodOptionsCardMandateOptionsAmountType can take

type PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval

type PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval string

Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.

const (
	PaymentIntentPaymentMethodOptionsCardMandateOptionsIntervalDay      PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval = "day"
	PaymentIntentPaymentMethodOptionsCardMandateOptionsIntervalMonth    PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval = "month"
	PaymentIntentPaymentMethodOptionsCardMandateOptionsIntervalSporadic PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval = "sporadic"
	PaymentIntentPaymentMethodOptionsCardMandateOptionsIntervalWeek     PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval = "week"
	PaymentIntentPaymentMethodOptionsCardMandateOptionsIntervalYear     PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval = "year"
)

List of values that PaymentIntentPaymentMethodOptionsCardMandateOptionsInterval can take

type PaymentIntentPaymentMethodOptionsCardMandateOptionsParams

type PaymentIntentPaymentMethodOptionsCardMandateOptionsParams struct {
	// Amount to be charged for future payments.
	Amount *int64 `form:"amount"`
	// One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
	AmountType *string `form:"amount_type"`
	// A description of the mandate or subscription that is meant to be displayed to the customer.
	Description *string `form:"description"`
	// End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
	EndDate *int64 `form:"end_date"`
	// Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
	Interval *string `form:"interval"`
	// The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
	IntervalCount *int64 `form:"interval_count"`
	// Unique identifier for the mandate or subscription.
	Reference *string `form:"reference"`
	// Start date of the mandate or subscription. Start date should not be lesser than yesterday.
	StartDate *int64 `form:"start_date"`
	// Specifies the type of mandates supported. Possible values are `india`.
	SupportedTypes []*string `form:"supported_types"`
}

Configuration options for setting up an eMandate for cards issued in India.

type PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedType

type PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedType string

Specifies the type of mandates supported. Possible values are `india`.

const (
	PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedTypeIndia PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedType = "india"
)

List of values that PaymentIntentPaymentMethodOptionsCardMandateOptionsSupportedType can take

type PaymentIntentPaymentMethodOptionsCardNetwork

type PaymentIntentPaymentMethodOptionsCardNetwork string

Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time.

const (
	PaymentIntentPaymentMethodOptionsCardNetworkAmex            PaymentIntentPaymentMethodOptionsCardNetwork = "amex"
	PaymentIntentPaymentMethodOptionsCardNetworkCartesBancaires PaymentIntentPaymentMethodOptionsCardNetwork = "cartes_bancaires"
	PaymentIntentPaymentMethodOptionsCardNetworkDiners          PaymentIntentPaymentMethodOptionsCardNetwork = "diners"
	PaymentIntentPaymentMethodOptionsCardNetworkDiscover        PaymentIntentPaymentMethodOptionsCardNetwork = "discover"
	PaymentIntentPaymentMethodOptionsCardNetworkInterac         PaymentIntentPaymentMethodOptionsCardNetwork = "interac"
	PaymentIntentPaymentMethodOptionsCardNetworkJCB             PaymentIntentPaymentMethodOptionsCardNetwork = "jcb"
	PaymentIntentPaymentMethodOptionsCardNetworkMastercard      PaymentIntentPaymentMethodOptionsCardNetwork = "mastercard"
	PaymentIntentPaymentMethodOptionsCardNetworkUnionpay        PaymentIntentPaymentMethodOptionsCardNetwork = "unionpay"
	PaymentIntentPaymentMethodOptionsCardNetworkUnknown         PaymentIntentPaymentMethodOptionsCardNetwork = "unknown"
	PaymentIntentPaymentMethodOptionsCardNetworkVisa            PaymentIntentPaymentMethodOptionsCardNetwork = "visa"
)

List of values that PaymentIntentPaymentMethodOptionsCardNetwork can take

type PaymentIntentPaymentMethodOptionsCardParams

type PaymentIntentPaymentMethodOptionsCardParams struct {
	// Controls when the funds will be captured from the customer's account.
	//
	// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
	//
	// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
	CaptureMethod *string `form:"capture_method"`
	// A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
	CVCToken *string `form:"cvc_token"`
	// Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
	//
	// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
	Installments *PaymentIntentPaymentMethodOptionsCardInstallmentsParams `form:"installments"`
	// Configuration options for setting up an eMandate for cards issued in India.
	MandateOptions *PaymentIntentPaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"`
	// When specified, this parameter indicates that a transaction will be marked
	// as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
	// parameter can only be provided during confirmation.
	MOTO *bool `form:"moto"`
	// Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
	Network *string `form:"network"`
	// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
	RequestThreeDSecure *string `form:"request_three_d_secure"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters.
	StatementDescriptorSuffixKana *string `form:"statement_descriptor_suffix_kana"`
	// Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters.
	StatementDescriptorSuffixKanji *string `form:"statement_descriptor_suffix_kanji"`
}

Configuration for any card payments attempted on this PaymentIntent.

type PaymentIntentPaymentMethodOptionsCardPresent

type PaymentIntentPaymentMethodOptionsCardPresent struct {
	// Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
	RequestExtendedAuthorization bool `json:"request_extended_authorization"`
	// Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
	RequestIncrementalAuthorizationSupport bool `json:"request_incremental_authorization_support"`
}

type PaymentIntentPaymentMethodOptionsCardPresentParams

type PaymentIntentPaymentMethodOptionsCardPresentParams struct {
	// Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
	RequestExtendedAuthorization *bool `form:"request_extended_authorization"`
	// Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
	RequestIncrementalAuthorizationSupport *bool `form:"request_incremental_authorization_support"`
}

If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.

type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure

type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure string

We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.

const (
	PaymentIntentPaymentMethodOptionsCardRequestThreeDSecureAny           PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure = "any"
	PaymentIntentPaymentMethodOptionsCardRequestThreeDSecureAutomatic     PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure = "automatic"
	PaymentIntentPaymentMethodOptionsCardRequestThreeDSecureChallengeOnly PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure = "challenge_only"
)

List of values that PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure can take

type PaymentIntentPaymentMethodOptionsCardSetupFutureUsage

type PaymentIntentPaymentMethodOptionsCardSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsCardSetupFutureUsageNone       PaymentIntentPaymentMethodOptionsCardSetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsCardSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsCardSetupFutureUsage = "off_session"
	PaymentIntentPaymentMethodOptionsCardSetupFutureUsageOnSession  PaymentIntentPaymentMethodOptionsCardSetupFutureUsage = "on_session"
)

List of values that PaymentIntentPaymentMethodOptionsCardSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsCustomerBalance

type PaymentIntentPaymentMethodOptionsCustomerBalance struct {
	BankTransfer *PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer `json:"bank_transfer"`
	// The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
	FundingType PaymentIntentPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransfer struct {
	EUBankTransfer *PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer `json:"eu_bank_transfer"`
	// List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
	//
	// Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
	RequestedAddressTypes []PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType `json:"requested_address_types"`
	// The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
	Type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType `json:"type"`
}

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer struct {
	// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
	Country string `json:"country"`
}

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams struct {
	// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
	Country *string `form:"country"`
}

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferParams

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferParams struct {
	EUBankTransfer *PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
	// List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
	//
	// Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
	RequestedAddressTypes []*string `form:"requested_address_types"`
	// The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
	Type *string `form:"type"`
}

Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType string

List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.

Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.

const (
	PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeIBAN     PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "iban"
	PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSEPA     PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sepa"
	PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSortCode PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sort_code"
	PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSpei     PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "spei"
	PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeZengin   PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "zengin"
)

List of values that PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType can take

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType

type PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType string

The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.

const (
	PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferTypeEUBankTransfer PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType = "eu_bank_transfer"
	PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferTypeGBBankTransfer PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType = "gb_bank_transfer"
	PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferTypeJPBankTransfer PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType = "jp_bank_transfer"
	PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferTypeMXBankTransfer PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType = "mx_bank_transfer"
)

List of values that PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferType can take

type PaymentIntentPaymentMethodOptionsCustomerBalanceFundingType

type PaymentIntentPaymentMethodOptionsCustomerBalanceFundingType string

The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.

const (
	PaymentIntentPaymentMethodOptionsCustomerBalanceFundingTypeBankTransfer PaymentIntentPaymentMethodOptionsCustomerBalanceFundingType = "bank_transfer"
)

List of values that PaymentIntentPaymentMethodOptionsCustomerBalanceFundingType can take

type PaymentIntentPaymentMethodOptionsCustomerBalanceParams

type PaymentIntentPaymentMethodOptionsCustomerBalanceParams struct {
	// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
	BankTransfer *PaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"`
	// The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
	FundingType *string `form:"funding_type"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.

type PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage

type PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsageNone PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsCustomerBalanceSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsEPS

type PaymentIntentPaymentMethodOptionsEPS struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsEPSSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsEPSParams

type PaymentIntentPaymentMethodOptionsEPSParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.

type PaymentIntentPaymentMethodOptionsEPSSetupFutureUsage

type PaymentIntentPaymentMethodOptionsEPSSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsEPSSetupFutureUsageNone PaymentIntentPaymentMethodOptionsEPSSetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsEPSSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsFPX

type PaymentIntentPaymentMethodOptionsFPX struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsFPXSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsFPXParams

type PaymentIntentPaymentMethodOptionsFPXParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.

type PaymentIntentPaymentMethodOptionsFPXSetupFutureUsage

type PaymentIntentPaymentMethodOptionsFPXSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsFPXSetupFutureUsageNone PaymentIntentPaymentMethodOptionsFPXSetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsFPXSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsGiropay

type PaymentIntentPaymentMethodOptionsGiropay struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsGiropayParams

type PaymentIntentPaymentMethodOptionsGiropayParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.

type PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage

type PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsGiropaySetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsGrabpay

type PaymentIntentPaymentMethodOptionsGrabpay struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsGrabpayParams

type PaymentIntentPaymentMethodOptionsGrabpayParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.

type PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage

type PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsGrabpaySetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsIDEAL

type PaymentIntentPaymentMethodOptionsIDEAL struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsIDEALParams

type PaymentIntentPaymentMethodOptionsIDEALParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.

type PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage

type PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsageNone       PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage = "off_session"
)

List of values that PaymentIntentPaymentMethodOptionsIDEALSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsInteracPresent

type PaymentIntentPaymentMethodOptionsInteracPresent struct{}

type PaymentIntentPaymentMethodOptionsInteracPresentParams

type PaymentIntentPaymentMethodOptionsInteracPresentParams struct{}

If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.

type PaymentIntentPaymentMethodOptionsKlarna

type PaymentIntentPaymentMethodOptionsKlarna struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod PaymentIntentPaymentMethodOptionsKlarnaCaptureMethod `json:"capture_method"`
	// Preferred locale of the Klarna checkout page that the customer is redirected to.
	PreferredLocale string `json:"preferred_locale"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsKlarnaCaptureMethod

type PaymentIntentPaymentMethodOptionsKlarnaCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	PaymentIntentPaymentMethodOptionsKlarnaCaptureMethodManual PaymentIntentPaymentMethodOptionsKlarnaCaptureMethod = "manual"
)

List of values that PaymentIntentPaymentMethodOptionsKlarnaCaptureMethod can take

type PaymentIntentPaymentMethodOptionsKlarnaParams

type PaymentIntentPaymentMethodOptionsKlarnaParams struct {
	// Controls when the funds will be captured from the customer's account.
	//
	// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
	//
	// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
	CaptureMethod *string `form:"capture_method"`
	// Preferred language of the Klarna authorization page that the customer is redirected to
	PreferredLocale *string `form:"preferred_locale"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.

type PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage

type PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsageNone PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsKlarnaSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsKonbini

type PaymentIntentPaymentMethodOptionsKonbini struct {
	// An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores.
	ConfirmationNumber string `json:"confirmation_number"`
	// The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST.
	ExpiresAfterDays int64 `json:"expires_after_days"`
	// The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
	ExpiresAt int64 `json:"expires_at"`
	// A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
	ProductDescription string `json:"product_description"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsKonbiniParams

type PaymentIntentPaymentMethodOptionsKonbiniParams struct {
	// An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
	ConfirmationNumber *string `form:"confirmation_number"`
	// The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
	ExpiresAfterDays *int64 `form:"expires_after_days"`
	// The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
	ExpiresAt *int64 `form:"expires_at"`
	// A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
	ProductDescription *string `form:"product_description"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.

type PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage

type PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsageNone PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsKonbiniSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsLink struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod PaymentIntentPaymentMethodOptionsLinkCaptureMethod `json:"capture_method"`
	// Token used for persistent Link logins.
	PersistentToken string `json:"persistent_token"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsLinkCaptureMethod

type PaymentIntentPaymentMethodOptionsLinkCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	PaymentIntentPaymentMethodOptionsLinkCaptureMethodManual PaymentIntentPaymentMethodOptionsLinkCaptureMethod = "manual"
)

List of values that PaymentIntentPaymentMethodOptionsLinkCaptureMethod can take

type PaymentIntentPaymentMethodOptionsLinkParams

type PaymentIntentPaymentMethodOptionsLinkParams struct {
	// Controls when the funds will be captured from the customer's account.
	//
	// If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
	//
	// If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
	CaptureMethod *string `form:"capture_method"`
	// Token used for persistent Link logins.
	PersistentToken *string `form:"persistent_token"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.

type PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage

type PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsLinkSetupFutureUsageNone       PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsLinkSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage = "off_session"
)

List of values that PaymentIntentPaymentMethodOptionsLinkSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsOXXO

type PaymentIntentPaymentMethodOptionsOXXO struct {
	// The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
	ExpiresAfterDays int64 `json:"expires_after_days"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsOXXOParams

type PaymentIntentPaymentMethodOptionsOXXOParams struct {
	// The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
	ExpiresAfterDays *int64 `form:"expires_after_days"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.

type PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsage

type PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsageNone PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsOXXOSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsP24

type PaymentIntentPaymentMethodOptionsP24 struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsP24SetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsP24Params

type PaymentIntentPaymentMethodOptionsP24Params struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Confirm that the payer has accepted the P24 terms and conditions.
	TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"`
}

If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.

type PaymentIntentPaymentMethodOptionsP24SetupFutureUsage

type PaymentIntentPaymentMethodOptionsP24SetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsP24SetupFutureUsageNone PaymentIntentPaymentMethodOptionsP24SetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsP24SetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsParams

type PaymentIntentPaymentMethodOptionsParams struct {
	// If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
	ACSSDebit *PaymentIntentPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
	// If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
	Affirm *PaymentIntentPaymentMethodOptionsAffirmParams `form:"affirm"`
	// If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
	AfterpayClearpay *PaymentIntentPaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"`
	// If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
	Alipay *PaymentIntentPaymentMethodOptionsAlipayParams `form:"alipay"`
	// If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
	AUBECSDebit *PaymentIntentPaymentMethodOptionsAUBECSDebitParams `form:"au_becs_debit"`
	// If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
	BACSDebit *PaymentIntentPaymentMethodOptionsBACSDebitParams `form:"bacs_debit"`
	// If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
	Bancontact *PaymentIntentPaymentMethodOptionsBancontactParams `form:"bancontact"`
	// If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
	BLIK *PaymentIntentPaymentMethodOptionsBLIKParams `form:"blik"`
	// If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
	Boleto *PaymentIntentPaymentMethodOptionsBoletoParams `form:"boleto"`
	// Configuration for any card payments attempted on this PaymentIntent.
	Card *PaymentIntentPaymentMethodOptionsCardParams `form:"card"`
	// If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
	CardPresent *PaymentIntentPaymentMethodOptionsCardPresentParams `form:"card_present"`
	// If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
	CustomerBalance *PaymentIntentPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
	// If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
	EPS *PaymentIntentPaymentMethodOptionsEPSParams `form:"eps"`
	// If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
	FPX *PaymentIntentPaymentMethodOptionsFPXParams `form:"fpx"`
	// If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
	Giropay *PaymentIntentPaymentMethodOptionsGiropayParams `form:"giropay"`
	// If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
	Grabpay *PaymentIntentPaymentMethodOptionsGrabpayParams `form:"grabpay"`
	// If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
	IDEAL *PaymentIntentPaymentMethodOptionsIDEALParams `form:"ideal"`
	// If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
	InteracPresent *PaymentIntentPaymentMethodOptionsInteracPresentParams `form:"interac_present"`
	// If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
	Klarna *PaymentIntentPaymentMethodOptionsKlarnaParams `form:"klarna"`
	// If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
	Konbini *PaymentIntentPaymentMethodOptionsKonbiniParams `form:"konbini"`
	// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
	Link *PaymentIntentPaymentMethodOptionsLinkParams `form:"link"`
	// If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
	OXXO *PaymentIntentPaymentMethodOptionsOXXOParams `form:"oxxo"`
	// If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
	P24 *PaymentIntentPaymentMethodOptionsP24Params `form:"p24"`
	// If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
	PayNow *PaymentIntentPaymentMethodOptionsPayNowParams `form:"paynow"`
	// If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
	PromptPay *PaymentIntentPaymentMethodOptionsPromptPayParams `form:"promptpay"`
	// If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
	SEPADebit *PaymentIntentPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
	// If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
	Sofort *PaymentIntentPaymentMethodOptionsSofortParams `form:"sofort"`
	// If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
	USBankAccount *PaymentIntentPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
	// If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
	WeChatPay *PaymentIntentPaymentMethodOptionsWeChatPayParams `form:"wechat_pay"`
}

Payment-method-specific configuration for this PaymentIntent.

type PaymentIntentPaymentMethodOptionsPayNow

type PaymentIntentPaymentMethodOptionsPayNow struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsPayNowParams

type PaymentIntentPaymentMethodOptionsPayNowParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.

type PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage

type PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsageNone PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsPayNowSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsPromptPay

type PaymentIntentPaymentMethodOptionsPromptPay struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsPromptPayParams

type PaymentIntentPaymentMethodOptionsPromptPayParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.

type PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsage

type PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsPromptPaySetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsSEPADebit

type PaymentIntentPaymentMethodOptionsSEPADebit struct {
	MandateOptions *PaymentIntentPaymentMethodOptionsSEPADebitMandateOptions `json:"mandate_options"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptions

type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptions struct{}

type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptionsParams

type PaymentIntentPaymentMethodOptionsSEPADebitMandateOptionsParams struct{}

Additional fields for Mandate creation

type PaymentIntentPaymentMethodOptionsSEPADebitParams

type PaymentIntentPaymentMethodOptionsSEPADebitParams struct {
	// Additional fields for Mandate creation
	MandateOptions *PaymentIntentPaymentMethodOptionsSEPADebitMandateOptionsParams `form:"mandate_options"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.

type PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage

type PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsageNone       PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage = "off_session"
	PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsageOnSession  PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage = "on_session"
)

List of values that PaymentIntentPaymentMethodOptionsSEPADebitSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsSofort

type PaymentIntentPaymentMethodOptionsSofort struct {
	// Preferred language of the SOFORT authorization page that the customer is redirected to.
	PreferredLanguage string `json:"preferred_language"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsSofortParams

type PaymentIntentPaymentMethodOptionsSofortParams struct {
	// Language shown to the payer on redirect.
	PreferredLanguage *string `form:"preferred_language"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.

type PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage

type PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsSofortSetupFutureUsageNone       PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsSofortSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage = "off_session"
)

List of values that PaymentIntentPaymentMethodOptionsSofortSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsUSBankAccount

type PaymentIntentPaymentMethodOptionsUSBankAccount struct {
	FinancialConnections *PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage `json:"setup_future_usage"`
	// Bank account verification method.
	VerificationMethod PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"`
}

type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnections

type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnections struct {
	// The list of permissions to request. The `payment_method` permission must be included.
	Permissions []PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"`
	// For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
	ReturnURL string `json:"return_url"`
}

type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams

type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
	// The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
	Permissions []*string `form:"permissions"`
	// For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
	ReturnURL *string `form:"return_url"`
}

Additional fields for Financial Connections Session creation

type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission

type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string

The list of permissions to request. The `payment_method` permission must be included.

const (
	PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances      PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances"
	PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership     PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "ownership"
	PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method"
	PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions  PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions"
)

List of values that PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take

type PaymentIntentPaymentMethodOptionsUSBankAccountNetworksParams

type PaymentIntentPaymentMethodOptionsUSBankAccountNetworksParams struct {
	// Triggers validations to run across the selected networks
	Requested []*string `form:"requested"`
}

Additional fields for network related functions

type PaymentIntentPaymentMethodOptionsUSBankAccountParams

type PaymentIntentPaymentMethodOptionsUSBankAccountParams struct {
	// Additional fields for Financial Connections Session creation
	FinancialConnections *PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
	// Additional fields for network related functions
	Networks *PaymentIntentPaymentMethodOptionsUSBankAccountNetworksParams `form:"networks"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Verification method for the intent
	VerificationMethod *string `form:"verification_method"`
}

If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.

type PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage

type PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsageNone       PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage = "none"
	PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage = "off_session"
	PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsageOnSession  PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage = "on_session"
)

List of values that PaymentIntentPaymentMethodOptionsUSBankAccountSetupFutureUsage can take

type PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod

type PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod string

Bank account verification method.

const (
	PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic     PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic"
	PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethodInstant       PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "instant"
	PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethodMicrodeposits PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "microdeposits"
)

List of values that PaymentIntentPaymentMethodOptionsUSBankAccountVerificationMethod can take

type PaymentIntentPaymentMethodOptionsWeChatPay

type PaymentIntentPaymentMethodOptionsWeChatPay struct {
	// The app ID registered with WeChat Pay. Only required when client is ios or android.
	AppID string `json:"app_id"`
	// The client type that the end customer will pay from
	Client PaymentIntentPaymentMethodOptionsWeChatPayClient `json:"client"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	SetupFutureUsage PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsage `json:"setup_future_usage"`
}

type PaymentIntentPaymentMethodOptionsWeChatPayClient

type PaymentIntentPaymentMethodOptionsWeChatPayClient string

The client type that the end customer will pay from

const (
	PaymentIntentPaymentMethodOptionsWeChatPayClientAndroid PaymentIntentPaymentMethodOptionsWeChatPayClient = "android"
	PaymentIntentPaymentMethodOptionsWeChatPayClientIOS     PaymentIntentPaymentMethodOptionsWeChatPayClient = "ios"
	PaymentIntentPaymentMethodOptionsWeChatPayClientWeb     PaymentIntentPaymentMethodOptionsWeChatPayClient = "web"
)

List of values that PaymentIntentPaymentMethodOptionsWeChatPayClient can take

type PaymentIntentPaymentMethodOptionsWeChatPayParams

type PaymentIntentPaymentMethodOptionsWeChatPayParams struct {
	// The app ID registered with WeChat Pay. Only required when client is ios or android.
	AppID *string `form:"app_id"`
	// The client type that the end customer will pay from
	Client *string `form:"client"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
	//
	// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
	//
	// If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.

type PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsage

type PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsage = "none"
)

List of values that PaymentIntentPaymentMethodOptionsWeChatPaySetupFutureUsage can take

type PaymentIntentProcessing

type PaymentIntentProcessing struct {
	Card *PaymentIntentProcessingCard `json:"card"`
	// Type of the payment method for which payment is in `processing` state, one of `card`.
	Type PaymentIntentProcessingType `json:"type"`
}

If present, this property tells you about the processing state of the payment.

type PaymentIntentProcessingCard

type PaymentIntentProcessingCard struct {
	CustomerNotification *PaymentIntentProcessingCardCustomerNotification `json:"customer_notification"`
}

type PaymentIntentProcessingCardCustomerNotification

type PaymentIntentProcessingCardCustomerNotification struct {
	// Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank.
	ApprovalRequested bool `json:"approval_requested"`
	// If customer approval is required, they need to provide approval before this time.
	CompletesAt int64 `json:"completes_at"`
}

type PaymentIntentProcessingType

type PaymentIntentProcessingType string

Type of the payment method for which payment is in `processing` state, one of `card`.

const (
	PaymentIntentProcessingTypeCard PaymentIntentProcessingType = "card"
)

List of values that PaymentIntentProcessingType can take

type PaymentIntentRadarOptionsParams

type PaymentIntentRadarOptionsParams struct {
	// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
	Session *string `form:"session"`
}

Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.

type PaymentIntentSearchParams

type PaymentIntentSearchParams struct {
	SearchParams `form:"*"`
	// A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
	Page *string `form:"page"`
}

Search for PaymentIntents you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

type PaymentIntentSearchResult

type PaymentIntentSearchResult struct {
	APIResource
	SearchMeta
	Data []*PaymentIntent `json:"data"`
}

PaymentIntentSearchResult is a list of PaymentIntent search results as retrieved from a search endpoint.

type PaymentIntentSetupFutureUsage

type PaymentIntentSetupFutureUsage string

Indicates that you intend to make future payments with this PaymentIntent's payment method.

Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.

When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).

const (
	PaymentIntentSetupFutureUsageOffSession PaymentIntentSetupFutureUsage = "off_session"
	PaymentIntentSetupFutureUsageOnSession  PaymentIntentSetupFutureUsage = "on_session"
)

List of values that PaymentIntentSetupFutureUsage can take

type PaymentIntentStatus

type PaymentIntentStatus string

Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).

const (
	PaymentIntentStatusCanceled              PaymentIntentStatus = "canceled"
	PaymentIntentStatusProcessing            PaymentIntentStatus = "processing"
	PaymentIntentStatusRequiresAction        PaymentIntentStatus = "requires_action"
	PaymentIntentStatusRequiresCapture       PaymentIntentStatus = "requires_capture"
	PaymentIntentStatusRequiresConfirmation  PaymentIntentStatus = "requires_confirmation"
	PaymentIntentStatusRequiresPaymentMethod PaymentIntentStatus = "requires_payment_method"
	PaymentIntentStatusSucceeded             PaymentIntentStatus = "succeeded"
)

List of values that PaymentIntentStatus can take

type PaymentIntentTransferData

type PaymentIntentTransferData struct {
	// Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
	Amount int64 `json:"amount"`
	// The account (if any) the payment will be attributed to for tax
	// reporting, and where funds from the payment will be transferred to upon
	// payment success.
	Destination *Account `json:"destination"`
}

The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.

type PaymentIntentTransferDataParams

type PaymentIntentTransferDataParams struct {
	// The amount that will be transferred automatically when a charge succeeds.
	Amount *int64 `form:"amount"`
	// If specified, successful charges will be attributed to the destination
	// account for tax reporting, and the funds from charges will be transferred
	// to the destination account. The ID of the resulting transfer will be
	// returned on the successful charge's `transfer` field.
	Destination *string `form:"destination"`
}

The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).

type PaymentIntentVerifyMicrodepositsParams

type PaymentIntentVerifyMicrodepositsParams struct {
	Params `form:"*"`
	// Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
	Amounts []*int64 `form:"amounts"`
	// A six-character code starting with SM present in the microdeposit sent to the bank account.
	DescriptorCode *string `form:"descriptor_code"`
}

Verifies microdeposits on a PaymentIntent object.

type PaymentLink struct {
	APIResource
	// Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
	Active          bool                        `json:"active"`
	AfterCompletion *PaymentLinkAfterCompletion `json:"after_completion"`
	// Whether user redeemable promotion codes are enabled.
	AllowPromotionCodes bool `json:"allow_promotion_codes"`
	// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
	ApplicationFeeAmount int64 `json:"application_fee_amount"`
	// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.
	ApplicationFeePercent float64                  `json:"application_fee_percent"`
	AutomaticTax          *PaymentLinkAutomaticTax `json:"automatic_tax"`
	// Configuration for collecting the customer's billing address.
	BillingAddressCollection PaymentLinkBillingAddressCollection `json:"billing_address_collection"`
	// When set, provides configuration to gather active consent from customers.
	ConsentCollection *PaymentLinkConsentCollection `json:"consent_collection"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// Configuration for Customer creation during checkout.
	CustomerCreation PaymentLinkCustomerCreation `json:"customer_creation"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The line items representing what is being sold.
	LineItems *LineItemList `json:"line_items"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.
	OnBehalfOf *Account `json:"on_behalf_of"`
	// Indicates the parameters to be passed to PaymentIntent creation during checkout.
	PaymentIntentData *PaymentLinkPaymentIntentData `json:"payment_intent_data"`
	// Configuration for collecting a payment method during checkout.
	PaymentMethodCollection PaymentLinkPaymentMethodCollection `json:"payment_method_collection"`
	// The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
	PaymentMethodTypes    []PaymentLinkPaymentMethodType    `json:"payment_method_types"`
	PhoneNumberCollection *PaymentLinkPhoneNumberCollection `json:"phone_number_collection"`
	// Configuration for collecting the customer's shipping address.
	ShippingAddressCollection *PaymentLinkShippingAddressCollection `json:"shipping_address_collection"`
	// The shipping rate options applied to the session.
	ShippingOptions []*PaymentLinkShippingOption `json:"shipping_options"`
	// Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.
	SubmitType PaymentLinkSubmitType `json:"submit_type"`
	// When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
	SubscriptionData *PaymentLinkSubscriptionData `json:"subscription_data"`
	TaxIDCollection  *PaymentLinkTaxIDCollection  `json:"tax_id_collection"`
	// The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
	TransferData *PaymentLinkTransferData `json:"transfer_data"`
	// The public URL that can be shared with customers.
	URL string `json:"url"`
}

A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.

When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links.

Related guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api)

func (*PaymentLink) UnmarshalJSON

func (p *PaymentLink) UnmarshalJSON(data []byte) error

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

type PaymentLinkAfterCompletion

type PaymentLinkAfterCompletion struct {
	HostedConfirmation *PaymentLinkAfterCompletionHostedConfirmation `json:"hosted_confirmation"`
	Redirect           *PaymentLinkAfterCompletionRedirect           `json:"redirect"`
	// The specified behavior after the purchase is complete.
	Type PaymentLinkAfterCompletionType `json:"type"`
}

type PaymentLinkAfterCompletionHostedConfirmation

type PaymentLinkAfterCompletionHostedConfirmation struct {
	// The custom message that is displayed to the customer after the purchase is complete.
	CustomMessage string `json:"custom_message"`
}

type PaymentLinkAfterCompletionHostedConfirmationParams

type PaymentLinkAfterCompletionHostedConfirmationParams struct {
	// A custom message to display to the customer after the purchase is complete.
	CustomMessage *string `form:"custom_message"`
}

Configuration when `type=hosted_confirmation`.

type PaymentLinkAfterCompletionParams

type PaymentLinkAfterCompletionParams struct {
	// Configuration when `type=hosted_confirmation`.
	HostedConfirmation *PaymentLinkAfterCompletionHostedConfirmationParams `form:"hosted_confirmation"`
	// Configuration when `type=redirect`.
	Redirect *PaymentLinkAfterCompletionRedirectParams `form:"redirect"`
	// The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
	Type *string `form:"type"`
}

Behavior after the purchase is complete.

type PaymentLinkAfterCompletionRedirect

type PaymentLinkAfterCompletionRedirect struct {
	// The URL the customer will be redirected to after the purchase is complete.
	URL string `json:"url"`
}

type PaymentLinkAfterCompletionRedirectParams

type PaymentLinkAfterCompletionRedirectParams struct {
	// The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included.
	URL *string `form:"url"`
}

Configuration when `type=redirect`.

type PaymentLinkAfterCompletionType

type PaymentLinkAfterCompletionType string

The specified behavior after the purchase is complete.

const (
	PaymentLinkAfterCompletionTypeHostedConfirmation PaymentLinkAfterCompletionType = "hosted_confirmation"
	PaymentLinkAfterCompletionTypeRedirect           PaymentLinkAfterCompletionType = "redirect"
)

List of values that PaymentLinkAfterCompletionType can take

type PaymentLinkAutomaticTax

type PaymentLinkAutomaticTax struct {
	// If `true`, tax will be calculated automatically using the customer's location.
	Enabled bool `json:"enabled"`
}

type PaymentLinkAutomaticTaxParams

type PaymentLinkAutomaticTaxParams struct {
	// If `true`, tax will be calculated automatically using the customer's location.
	Enabled *bool `form:"enabled"`
}

Configuration for automatic tax collection.

type PaymentLinkBillingAddressCollection

type PaymentLinkBillingAddressCollection string

Configuration for collecting the customer's billing address.

const (
	PaymentLinkBillingAddressCollectionAuto     PaymentLinkBillingAddressCollection = "auto"
	PaymentLinkBillingAddressCollectionRequired PaymentLinkBillingAddressCollection = "required"
)

List of values that PaymentLinkBillingAddressCollection can take

type PaymentLinkConsentCollection

type PaymentLinkConsentCollection struct {
	// If set to `auto`, enables the collection of customer consent for promotional communications.
	Promotions PaymentLinkConsentCollectionPromotions `json:"promotions"`
}

When set, provides configuration to gather active consent from customers.

type PaymentLinkConsentCollectionParams

type PaymentLinkConsentCollectionParams struct {
	// If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
	// Session will determine whether to display an option to opt into promotional communication
	// from the merchant depending on the customer's locale. Only available to US merchants.
	Promotions *string `form:"promotions"`
}

Configure fields to gather active consent from customers.

type PaymentLinkConsentCollectionPromotions

type PaymentLinkConsentCollectionPromotions string

If set to `auto`, enables the collection of customer consent for promotional communications.

const (
	PaymentLinkConsentCollectionPromotionsAuto PaymentLinkConsentCollectionPromotions = "auto"
	PaymentLinkConsentCollectionPromotionsNone PaymentLinkConsentCollectionPromotions = "none"
)

List of values that PaymentLinkConsentCollectionPromotions can take

type PaymentLinkCustomerCreation

type PaymentLinkCustomerCreation string

Configuration for Customer creation during checkout.

const (
	PaymentLinkCustomerCreationAlways     PaymentLinkCustomerCreation = "always"
	PaymentLinkCustomerCreationIfRequired PaymentLinkCustomerCreation = "if_required"
)

List of values that PaymentLinkCustomerCreation can take

type PaymentLinkLineItemAdjustableQuantityParams

type PaymentLinkLineItemAdjustableQuantityParams struct {
	// Set to true if the quantity can be adjusted to any non-negative Integer.
	Enabled *bool `form:"enabled"`
	// The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 99.
	Maximum *int64 `form:"maximum"`
	// The minimum quantity the customer can purchase. By default this value is 0. You can specify a value up to 98. If there is only one item in the cart then that item's quantity cannot go down to 0.
	Minimum *int64 `form:"minimum"`
}

When set, provides configuration for this item's quantity to be adjusted by the customer during checkout.

type PaymentLinkLineItemParams

type PaymentLinkLineItemParams struct {
	// When set, provides configuration for this item's quantity to be adjusted by the customer during checkout.
	AdjustableQuantity *PaymentLinkLineItemAdjustableQuantityParams `form:"adjustable_quantity"`
	// The ID of an existing line item on the payment link.
	ID *string `form:"id"`
	// The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
	Price *string `form:"price"`
	// The quantity of the line item being purchased.
	Quantity *int64 `form:"quantity"`
}

The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.

type PaymentLinkList struct {
	APIResource
	ListMeta
	Data []*PaymentLink `json:"data"`
}

PaymentLinkList is a list of PaymentLinks as retrieved from a list endpoint.

type PaymentLinkListLineItemsParams

type PaymentLinkListLineItemsParams struct {
	ListParams  `form:"*"`
	PaymentLink *string `form:"-"` // Included in URL
}

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

type PaymentLinkListParams

type PaymentLinkListParams struct {
	ListParams `form:"*"`
	// Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).
	Active *bool `form:"active"`
}

Returns a list of your payment links.

type PaymentLinkParams

type PaymentLinkParams struct {
	Params `form:"*"`
	// Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
	Active *bool `form:"active"`
	// Behavior after the purchase is complete.
	AfterCompletion *PaymentLinkAfterCompletionParams `form:"after_completion"`
	// Enables user redeemable promotion codes.
	AllowPromotionCodes *bool `form:"allow_promotion_codes"`
	// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices.
	ApplicationFeeAmount *int64 `form:"application_fee_amount"`
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
	ApplicationFeePercent *float64 `form:"application_fee_percent"`
	// Configuration for automatic tax collection.
	AutomaticTax *PaymentLinkAutomaticTaxParams `form:"automatic_tax"`
	// Configuration for collecting the customer's billing address.
	BillingAddressCollection *string `form:"billing_address_collection"`
	// Configure fields to gather active consent from customers.
	ConsentCollection *PaymentLinkConsentCollectionParams `form:"consent_collection"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price.
	Currency *string `form:"currency"`
	// Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).
	CustomerCreation *string `form:"customer_creation"`
	// The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
	LineItems []*PaymentLinkLineItemParams `form:"line_items"`
	// The account on behalf of which to charge.
	OnBehalfOf *string `form:"on_behalf_of"`
	// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
	PaymentIntentData *PaymentLinkPaymentIntentDataParams `form:"payment_intent_data"`
	// Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.
	//
	// Can only be set in `subscription` mode.
	//
	// If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
	PaymentMethodCollection *string `form:"payment_method_collection"`
	// The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
	PaymentMethodTypes []*string `form:"payment_method_types"`
	// Controls phone number collection settings during checkout.
	//
	// We recommend that you review your privacy policy and check with your legal contacts.
	PhoneNumberCollection *PaymentLinkPhoneNumberCollectionParams `form:"phone_number_collection"`
	// Configuration for collecting the customer's shipping address.
	ShippingAddressCollection *PaymentLinkShippingAddressCollectionParams `form:"shipping_address_collection"`
	// The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
	ShippingOptions []*PaymentLinkShippingOptionParams `form:"shipping_options"`
	// Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`).
	SubmitType *string `form:"submit_type"`
	// When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
	SubscriptionData *PaymentLinkSubscriptionDataParams `form:"subscription_data"`
	// Controls tax ID collection during checkout.
	TaxIDCollection *PaymentLinkTaxIDCollectionParams `form:"tax_id_collection"`
	// The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
	TransferData *PaymentLinkTransferDataParams `form:"transfer_data"`
}

Creates a payment link.

type PaymentLinkPaymentIntentData

type PaymentLinkPaymentIntentData struct {
	// Indicates when the funds will be captured from the customer's account.
	CaptureMethod PaymentLinkPaymentIntentDataCaptureMethod `json:"capture_method"`
	// Indicates that you intend to make future payments with the payment method collected during checkout.
	SetupFutureUsage PaymentLinkPaymentIntentDataSetupFutureUsage `json:"setup_future_usage"`
}

Indicates the parameters to be passed to PaymentIntent creation during checkout.

type PaymentLinkPaymentIntentDataCaptureMethod

type PaymentLinkPaymentIntentDataCaptureMethod string

Indicates when the funds will be captured from the customer's account.

const (
	PaymentLinkPaymentIntentDataCaptureMethodAutomatic PaymentLinkPaymentIntentDataCaptureMethod = "automatic"
	PaymentLinkPaymentIntentDataCaptureMethodManual    PaymentLinkPaymentIntentDataCaptureMethod = "manual"
)

List of values that PaymentLinkPaymentIntentDataCaptureMethod can take

type PaymentLinkPaymentIntentDataParams

type PaymentLinkPaymentIntentDataParams struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod *string `form:"capture_method"`
	// Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session.
	//
	// When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved.
	//
	// When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments.
	//
	// If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer.
	//
	// If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent.
	//
	// When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.

type PaymentLinkPaymentIntentDataSetupFutureUsage

type PaymentLinkPaymentIntentDataSetupFutureUsage string

Indicates that you intend to make future payments with the payment method collected during checkout.

const (
	PaymentLinkPaymentIntentDataSetupFutureUsageOffSession PaymentLinkPaymentIntentDataSetupFutureUsage = "off_session"
	PaymentLinkPaymentIntentDataSetupFutureUsageOnSession  PaymentLinkPaymentIntentDataSetupFutureUsage = "on_session"
)

List of values that PaymentLinkPaymentIntentDataSetupFutureUsage can take

type PaymentLinkPaymentMethodCollection

type PaymentLinkPaymentMethodCollection string

Configuration for collecting a payment method during checkout.

const (
	PaymentLinkPaymentMethodCollectionAlways     PaymentLinkPaymentMethodCollection = "always"
	PaymentLinkPaymentMethodCollectionIfRequired PaymentLinkPaymentMethodCollection = "if_required"
)

List of values that PaymentLinkPaymentMethodCollection can take

type PaymentLinkPaymentMethodType

type PaymentLinkPaymentMethodType string

The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).

const (
	PaymentLinkPaymentMethodTypeAffirm           PaymentLinkPaymentMethodType = "affirm"
	PaymentLinkPaymentMethodTypeAfterpayClearpay PaymentLinkPaymentMethodType = "afterpay_clearpay"
	PaymentLinkPaymentMethodTypeAlipay           PaymentLinkPaymentMethodType = "alipay"
	PaymentLinkPaymentMethodTypeAUBECSDebit      PaymentLinkPaymentMethodType = "au_becs_debit"
	PaymentLinkPaymentMethodTypeBACSDebit        PaymentLinkPaymentMethodType = "bacs_debit"
	PaymentLinkPaymentMethodTypeBancontact       PaymentLinkPaymentMethodType = "bancontact"
	PaymentLinkPaymentMethodTypeBLIK             PaymentLinkPaymentMethodType = "blik"
	PaymentLinkPaymentMethodTypeBoleto           PaymentLinkPaymentMethodType = "boleto"
	PaymentLinkPaymentMethodTypeCard             PaymentLinkPaymentMethodType = "card"
	PaymentLinkPaymentMethodTypeEPS              PaymentLinkPaymentMethodType = "eps"
	PaymentLinkPaymentMethodTypeFPX              PaymentLinkPaymentMethodType = "fpx"
	PaymentLinkPaymentMethodTypeGiropay          PaymentLinkPaymentMethodType = "giropay"
	PaymentLinkPaymentMethodTypeGrabpay          PaymentLinkPaymentMethodType = "grabpay"
	PaymentLinkPaymentMethodTypeIDEAL            PaymentLinkPaymentMethodType = "ideal"
	PaymentLinkPaymentMethodTypeKlarna           PaymentLinkPaymentMethodType = "klarna"
	PaymentLinkPaymentMethodTypeKonbini          PaymentLinkPaymentMethodType = "konbini"
	PaymentLinkPaymentMethodTypeOXXO             PaymentLinkPaymentMethodType = "oxxo"
	PaymentLinkPaymentMethodTypeP24              PaymentLinkPaymentMethodType = "p24"
	PaymentLinkPaymentMethodTypePayNow           PaymentLinkPaymentMethodType = "paynow"
	PaymentLinkPaymentMethodTypePromptPay        PaymentLinkPaymentMethodType = "promptpay"
	PaymentLinkPaymentMethodTypeSEPADebit        PaymentLinkPaymentMethodType = "sepa_debit"
	PaymentLinkPaymentMethodTypeSofort           PaymentLinkPaymentMethodType = "sofort"
	PaymentLinkPaymentMethodTypeUSBankAccount    PaymentLinkPaymentMethodType = "us_bank_account"
	PaymentLinkPaymentMethodTypeWeChatPay        PaymentLinkPaymentMethodType = "wechat_pay"
)

List of values that PaymentLinkPaymentMethodType can take

type PaymentLinkPhoneNumberCollection

type PaymentLinkPhoneNumberCollection struct {
	// If `true`, a phone number will be collected during checkout.
	Enabled bool `json:"enabled"`
}

type PaymentLinkPhoneNumberCollectionParams

type PaymentLinkPhoneNumberCollectionParams struct {
	// Set to `true` to enable phone number collection.
	Enabled *bool `form:"enabled"`
}

Controls phone number collection settings during checkout.

We recommend that you review your privacy policy and check with your legal contacts.

type PaymentLinkShippingAddressCollection

type PaymentLinkShippingAddressCollection struct {
	// An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.
	AllowedCountries []string `json:"allowed_countries"`
}

Configuration for collecting the customer's shipping address.

type PaymentLinkShippingAddressCollectionParams

type PaymentLinkShippingAddressCollectionParams struct {
	// An array of two-letter ISO country codes representing which countries Checkout should provide as options for
	// shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.
	AllowedCountries []*string `form:"allowed_countries"`
}

Configuration for collecting the customer's shipping address.

type PaymentLinkShippingOption

type PaymentLinkShippingOption struct {
	// A non-negative integer in cents representing how much to charge.
	ShippingAmount int64 `json:"shipping_amount"`
	// The ID of the Shipping Rate to use for this shipping option.
	ShippingRate *ShippingRate `json:"shipping_rate"`
}

The shipping rate options applied to the session.

type PaymentLinkShippingOptionParams

type PaymentLinkShippingOptionParams struct {
	// The ID of the Shipping Rate to use for this shipping option.
	ShippingRate *string `form:"shipping_rate"`
}

The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.

type PaymentLinkSubmitType

type PaymentLinkSubmitType string

Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.

const (
	PaymentLinkSubmitTypeAuto   PaymentLinkSubmitType = "auto"
	PaymentLinkSubmitTypeBook   PaymentLinkSubmitType = "book"
	PaymentLinkSubmitTypeDonate PaymentLinkSubmitType = "donate"
	PaymentLinkSubmitTypePay    PaymentLinkSubmitType = "pay"
)

List of values that PaymentLinkSubmitType can take

type PaymentLinkSubscriptionData

type PaymentLinkSubscriptionData struct {
	// The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
	Description string `json:"description"`
	// Integer representing the number of trial period days before the customer is charged for the first time.
	TrialPeriodDays int64 `json:"trial_period_days"`
}

When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.

type PaymentLinkSubscriptionDataParams

type PaymentLinkSubscriptionDataParams struct {
	// The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
	Description *string `form:"description"`
	// Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
	TrialPeriodDays *int64 `form:"trial_period_days"`
}

When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.

type PaymentLinkTaxIDCollection

type PaymentLinkTaxIDCollection struct {
	// Indicates whether tax ID collection is enabled for the session.
	Enabled bool `json:"enabled"`
}

type PaymentLinkTaxIDCollectionParams

type PaymentLinkTaxIDCollectionParams struct {
	// Set to `true` to enable tax ID collection.
	Enabled *bool `form:"enabled"`
}

Controls tax ID collection during checkout.

type PaymentLinkTransferData

type PaymentLinkTransferData struct {
	// The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
	Amount int64 `json:"amount"`
	// The connected account receiving the transfer.
	Destination *Account `json:"destination"`
}

The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.

type PaymentLinkTransferDataParams

type PaymentLinkTransferDataParams struct {
	// The amount that will be transferred automatically when a charge succeeds.
	Amount *int64 `form:"amount"`
	// If specified, successful charges will be attributed to the destination
	// account for tax reporting, and the funds from charges will be transferred
	// to the destination account. The ID of the resulting transfer will be
	// returned on the successful charge's `transfer` field.
	Destination *string `form:"destination"`
}

The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.

type PaymentMethod

type PaymentMethod struct {
	APIResource
	ACSSDebit        *PaymentMethodACSSDebit        `json:"acss_debit"`
	Affirm           *PaymentMethodAffirm           `json:"affirm"`
	AfterpayClearpay *PaymentMethodAfterpayClearpay `json:"afterpay_clearpay"`
	Alipay           *PaymentMethodAlipay           `json:"alipay"`
	AUBECSDebit      *PaymentMethodAUBECSDebit      `json:"au_becs_debit"`
	BACSDebit        *PaymentMethodBACSDebit        `json:"bacs_debit"`
	Bancontact       *PaymentMethodBancontact       `json:"bancontact"`
	BillingDetails   *PaymentMethodBillingDetails   `json:"billing_details"`
	BLIK             *PaymentMethodBLIK             `json:"blik"`
	Boleto           *PaymentMethodBoleto           `json:"boleto"`
	Card             *PaymentMethodCard             `json:"card"`
	CardPresent      *PaymentMethodCardPresent      `json:"card_present"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
	Customer        *Customer                     `json:"customer"`
	CustomerBalance *PaymentMethodCustomerBalance `json:"customer_balance"`
	EPS             *PaymentMethodEPS             `json:"eps"`
	FPX             *PaymentMethodFPX             `json:"fpx"`
	Giropay         *PaymentMethodGiropay         `json:"giropay"`
	Grabpay         *PaymentMethodGrabpay         `json:"grabpay"`
	// Unique identifier for the object.
	ID             string                       `json:"id"`
	IDEAL          *PaymentMethodIDEAL          `json:"ideal"`
	InteracPresent *PaymentMethodInteracPresent `json:"interac_present"`
	Klarna         *PaymentMethodKlarna         `json:"klarna"`
	Konbini        *PaymentMethodKonbini        `json:"konbini"`
	Link           *PaymentMethodLink           `json:"link"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object    string                  `json:"object"`
	OXXO      *PaymentMethodOXXO      `json:"oxxo"`
	P24       *PaymentMethodP24       `json:"p24"`
	PayNow    *PaymentMethodPayNow    `json:"paynow"`
	PromptPay *PaymentMethodPromptPay `json:"promptpay"`
	// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
	RadarOptions *PaymentMethodRadarOptions `json:"radar_options"`
	SEPADebit    *PaymentMethodSEPADebit    `json:"sepa_debit"`
	Sofort       *PaymentMethodSofort       `json:"sofort"`
	// The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
	Type          PaymentMethodType           `json:"type"`
	USBankAccount *PaymentMethodUSBankAccount `json:"us_bank_account"`
	WeChatPay     *PaymentMethodWeChatPay     `json:"wechat_pay"`
}

PaymentMethod objects represent your customer's payment instruments. You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to Customer objects to store instrument details for future payments.

Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).

func (*PaymentMethod) UnmarshalJSON

func (p *PaymentMethod) UnmarshalJSON(data []byte) error

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 PaymentMethodACSSDebit

type PaymentMethodACSSDebit struct {
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Institution number of the bank account.
	InstitutionNumber string `json:"institution_number"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
	// Transit number of the bank account.
	TransitNumber string `json:"transit_number"`
}

type PaymentMethodACSSDebitParams

type PaymentMethodACSSDebitParams struct {
	// Customer's bank account number.
	AccountNumber *string `form:"account_number"`
	// Institution number of the customer's bank.
	InstitutionNumber *string `form:"institution_number"`
	// Transit number of the customer's bank.
	TransitNumber *string `form:"transit_number"`
}

If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.

type PaymentMethodAUBECSDebit

type PaymentMethodAUBECSDebit struct {
	// Six-digit number identifying bank and branch associated with this bank account.
	BSBNumber string `json:"bsb_number"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
}

type PaymentMethodAUBECSDebitParams

type PaymentMethodAUBECSDebitParams struct {
	// The account number for the bank account.
	AccountNumber *string `form:"account_number"`
	// Bank-State-Branch number of the bank account.
	BSBNumber *string `form:"bsb_number"`
}

If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.

type PaymentMethodAffirm

type PaymentMethodAffirm struct{}

type PaymentMethodAffirmParams

type PaymentMethodAffirmParams struct{}

If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.

type PaymentMethodAfterpayClearpay

type PaymentMethodAfterpayClearpay struct{}

type PaymentMethodAfterpayClearpayParams

type PaymentMethodAfterpayClearpayParams struct{}

If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.

type PaymentMethodAlipay

type PaymentMethodAlipay struct{}

type PaymentMethodAlipayParams

type PaymentMethodAlipayParams struct{}

If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.

type PaymentMethodAttachParams

type PaymentMethodAttachParams struct {
	Params `form:"*"`
	// The ID of the customer to which to attach the PaymentMethod.
	Customer *string `form:"customer"`
}

Attaches a PaymentMethod object to a Customer.

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent(https://stripe.com/docs/api/setup_intents) or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage). These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for future use, which makes later declines and payment friction more likely. See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up future payments.

To use this PaymentMethod as the default for invoice or subscription payments, set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method), on the Customer to the PaymentMethod's ID.

type PaymentMethodBACSDebit

type PaymentMethodBACSDebit struct {
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
	// Sort code of the bank account. (e.g., `10-20-30`)
	SortCode string `json:"sort_code"`
}

type PaymentMethodBACSDebitParams

type PaymentMethodBACSDebitParams struct {
	// Account number of the bank account that the funds will be debited from.
	AccountNumber *string `form:"account_number"`
	// Sort code of the bank account. (e.g., `10-20-30`)
	SortCode *string `form:"sort_code"`
}

If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.

type PaymentMethodBLIK

type PaymentMethodBLIK struct{}

type PaymentMethodBLIKParams

type PaymentMethodBLIKParams struct{}

If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.

type PaymentMethodBancontact

type PaymentMethodBancontact struct{}

type PaymentMethodBancontactParams

type PaymentMethodBancontactParams struct{}

If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.

type PaymentMethodBillingDetails

type PaymentMethodBillingDetails struct {
	// Billing address.
	Address *Address `json:"address"`
	// Email address.
	Email string `json:"email"`
	// Full name.
	Name string `json:"name"`
	// Billing phone number (including extension).
	Phone string `json:"phone"`
}

type PaymentMethodBillingDetailsParams

type PaymentMethodBillingDetailsParams struct {
	// Billing address.
	Address *AddressParams `form:"address"`
	// Email address.
	Email *string `form:"email"`
	// Full name.
	Name *string `form:"name"`
	// Billing phone number (including extension).
	Phone *string `form:"phone"`
}

Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

type PaymentMethodBoleto

type PaymentMethodBoleto struct {
	// Uniquely identifies the customer tax id (CNPJ or CPF)
	TaxID string `json:"tax_id"`
}

type PaymentMethodBoletoParams

type PaymentMethodBoletoParams struct {
	// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
	TaxID *string `form:"tax_id"`
}

If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.

type PaymentMethodCard

type PaymentMethodCard struct {
	// Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Brand PaymentMethodCardBrand `json:"brand"`
	// Checks on Card address and CVC if provided.
	Checks *PaymentMethodCardChecks `json:"checks"`
	// Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
	Country string `json:"country"`
	// Two-digit number representing the card's expiration month.
	ExpMonth int64 `json:"exp_month"`
	// Four-digit number representing the card's expiration year.
	ExpYear int64 `json:"exp_year"`
	// Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
	//
	// *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.*
	Fingerprint string `json:"fingerprint"`
	// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
	Funding CardFunding `json:"funding"`
	// The last four digits of the card.
	Last4 string `json:"last4"`
	// Contains information about card networks that can be used to process the payment.
	Networks *PaymentMethodCardNetworks `json:"networks"`
	// Contains details on how this Card maybe be used for 3D Secure authentication.
	ThreeDSecureUsage *PaymentMethodCardThreeDSecureUsage `json:"three_d_secure_usage"`
	// If this Card is part of a card wallet, this contains the details of the card wallet.
	Wallet *PaymentMethodCardWallet `json:"wallet"`
	// Please note that the fields below are for internal use only and are not returned
	// as part of standard API requests.
	// A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
	Description string `json:"description"`
	// Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
	IIN string `json:"iin"`
	// The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
	Issuer string `json:"issuer"`
}

type PaymentMethodCardBrand

type PaymentMethodCardBrand string

Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.

const (
	PaymentMethodCardBrandAmex       PaymentMethodCardBrand = "amex"
	PaymentMethodCardBrandDiners     PaymentMethodCardBrand = "diners"
	PaymentMethodCardBrandDiscover   PaymentMethodCardBrand = "discover"
	PaymentMethodCardBrandJCB        PaymentMethodCardBrand = "jcb"
	PaymentMethodCardBrandMastercard PaymentMethodCardBrand = "mastercard"
	PaymentMethodCardBrandUnionpay   PaymentMethodCardBrand = "unionpay"
	PaymentMethodCardBrandUnknown    PaymentMethodCardBrand = "unknown"
	PaymentMethodCardBrandVisa       PaymentMethodCardBrand = "visa"
)

List of values that PaymentMethodCardBrand can take

type PaymentMethodCardChecks

type PaymentMethodCardChecks struct {
	// If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
	AddressLine1Check PaymentMethodCardChecksAddressLine1Check `json:"address_line1_check"`
	// If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
	AddressPostalCodeCheck PaymentMethodCardChecksAddressPostalCodeCheck `json:"address_postal_code_check"`
	// If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
	CVCCheck PaymentMethodCardChecksCVCCheck `json:"cvc_check"`
}

Checks on Card address and CVC if provided.

type PaymentMethodCardChecksAddressLine1Check

type PaymentMethodCardChecksAddressLine1Check string

If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.

const (
	PaymentMethodCardChecksAddressLine1CheckFail        PaymentMethodCardChecksAddressLine1Check = "fail"
	PaymentMethodCardChecksAddressLine1CheckPass        PaymentMethodCardChecksAddressLine1Check = "pass"
	PaymentMethodCardChecksAddressLine1CheckUnavailable PaymentMethodCardChecksAddressLine1Check = "unavailable"
	PaymentMethodCardChecksAddressLine1CheckUnchecked   PaymentMethodCardChecksAddressLine1Check = "unchecked"
)

List of values that PaymentMethodCardChecksAddressLine1Check can take

type PaymentMethodCardChecksAddressPostalCodeCheck

type PaymentMethodCardChecksAddressPostalCodeCheck string

If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.

const (
	PaymentMethodCardChecksAddressPostalCodeCheckFail        PaymentMethodCardChecksAddressPostalCodeCheck = "fail"
	PaymentMethodCardChecksAddressPostalCodeCheckPass        PaymentMethodCardChecksAddressPostalCodeCheck = "pass"
	PaymentMethodCardChecksAddressPostalCodeCheckUnavailable PaymentMethodCardChecksAddressPostalCodeCheck = "unavailable"
	PaymentMethodCardChecksAddressPostalCodeCheckUnchecked   PaymentMethodCardChecksAddressPostalCodeCheck = "unchecked"
)

List of values that PaymentMethodCardChecksAddressPostalCodeCheck can take

type PaymentMethodCardChecksCVCCheck

type PaymentMethodCardChecksCVCCheck string

If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.

const (
	PaymentMethodCardChecksCVCCheckFail        PaymentMethodCardChecksCVCCheck = "fail"
	PaymentMethodCardChecksCVCCheckPass        PaymentMethodCardChecksCVCCheck = "pass"
	PaymentMethodCardChecksCVCCheckUnavailable PaymentMethodCardChecksCVCCheck = "unavailable"
	PaymentMethodCardChecksCVCCheckUnchecked   PaymentMethodCardChecksCVCCheck = "unchecked"
)

List of values that PaymentMethodCardChecksCVCCheck can take

type PaymentMethodCardNetworks

type PaymentMethodCardNetworks struct {
	// All available networks for the card.
	Available []PaymentMethodCardNetworksAvailable `json:"available"`
	// The preferred network for the card.
	Preferred PaymentMethodCardNetworksPreferred `json:"preferred"`
}

Contains information about card networks that can be used to process the payment.

type PaymentMethodCardNetworksAvailable

type PaymentMethodCardNetworksAvailable string

All available networks for the card.

const (
	PaymentMethodCardNetworksAvailableAmex            PaymentMethodCardNetworksAvailable = "amex"
	PaymentMethodCardNetworksAvailableCartesBancaires PaymentMethodCardNetworksAvailable = "cartes_bancaires"
	PaymentMethodCardNetworksAvailableDiners          PaymentMethodCardNetworksAvailable = "diners"
	PaymentMethodCardNetworksAvailableDiscover        PaymentMethodCardNetworksAvailable = "discover"
	PaymentMethodCardNetworksAvailableInterac         PaymentMethodCardNetworksAvailable = "interac"
	PaymentMethodCardNetworksAvailableJCB             PaymentMethodCardNetworksAvailable = "jcb"
	PaymentMethodCardNetworksAvailableMastercard      PaymentMethodCardNetworksAvailable = "mastercard"
	PaymentMethodCardNetworksAvailableUnionpay        PaymentMethodCardNetworksAvailable = "unionpay"
	PaymentMethodCardNetworksAvailableVisa            PaymentMethodCardNetworksAvailable = "visa"
	PaymentMethodCardNetworksAvailableUnknown         PaymentMethodCardNetworksAvailable = "unknown"
)

List of values that PaymentMethodCardNetworksAvailable can take

type PaymentMethodCardNetworksPreferred

type PaymentMethodCardNetworksPreferred string

The preferred network for the card.

const (
	PaymentMethodCardNetworksPreferredAmex            PaymentMethodCardNetworksPreferred = "amex"
	PaymentMethodCardNetworksPreferredCartesBancaires PaymentMethodCardNetworksPreferred = "cartes_bancaires"
	PaymentMethodCardNetworksPreferredDiners          PaymentMethodCardNetworksPreferred = "diners"
	PaymentMethodCardNetworksPreferredDiscover        PaymentMethodCardNetworksPreferred = "discover"
	PaymentMethodCardNetworksPreferredInterac         PaymentMethodCardNetworksPreferred = "interac"
	PaymentMethodCardNetworksPreferredJCB             PaymentMethodCardNetworksPreferred = "jcb"
	PaymentMethodCardNetworksPreferredMastercard      PaymentMethodCardNetworksPreferred = "mastercard"
	PaymentMethodCardNetworksPreferredUnionpay        PaymentMethodCardNetworksPreferred = "unionpay"
	PaymentMethodCardNetworksPreferredVisa            PaymentMethodCardNetworksPreferred = "visa"
	PaymentMethodCardNetworksPreferredUnknown         PaymentMethodCardNetworksPreferred = "unknown"
)

List of values that PaymentMethodCardNetworksPreferred can take

type PaymentMethodCardParams

type PaymentMethodCardParams struct {
	// The card's CVC. It is highly recommended to always include this value.
	CVC *string `form:"cvc"`
	// Two-digit number representing the card's expiration month.
	ExpMonth *int64 `form:"exp_month"`
	// Four-digit number representing the card's expiration year.
	ExpYear *int64 `form:"exp_year"`
	// The card number, as a string without any separators.
	Number *string `form:"number"`
	Token  *string `form:"token"`
}

If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.

type PaymentMethodCardPresent

type PaymentMethodCardPresent struct{}

type PaymentMethodCardThreeDSecureUsage

type PaymentMethodCardThreeDSecureUsage struct {
	// Whether 3D Secure is supported on this card.
	Supported bool `json:"supported"`
}

Contains details on how this Card maybe be used for 3D Secure authentication.

type PaymentMethodCardWallet

type PaymentMethodCardWallet struct {
	AmexExpressCheckout *PaymentMethodCardWalletAmexExpressCheckout `json:"amex_express_checkout"`
	ApplePay            *PaymentMethodCardWalletApplePay            `json:"apple_pay"`
	// (For tokenized numbers only.) The last four digits of the device account number.
	DynamicLast4 string                             `json:"dynamic_last4"`
	GooglePay    *PaymentMethodCardWalletGooglePay  `json:"google_pay"`
	Masterpass   *PaymentMethodCardWalletMasterpass `json:"masterpass"`
	SamsungPay   *PaymentMethodCardWalletSamsungPay `json:"samsung_pay"`
	// The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.
	Type         PaymentMethodCardWalletType          `json:"type"`
	VisaCheckout *PaymentMethodCardWalletVisaCheckout `json:"visa_checkout"`
}

If this Card is part of a card wallet, this contains the details of the card wallet.

type PaymentMethodCardWalletAmexExpressCheckout

type PaymentMethodCardWalletAmexExpressCheckout struct{}

type PaymentMethodCardWalletApplePay

type PaymentMethodCardWalletApplePay struct{}

type PaymentMethodCardWalletGooglePay

type PaymentMethodCardWalletGooglePay struct{}

type PaymentMethodCardWalletMasterpass

type PaymentMethodCardWalletMasterpass struct {
	// Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	BillingAddress *Address `json:"billing_address"`
	// Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	Email string `json:"email"`
	// Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	Name string `json:"name"`
	// Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	ShippingAddress *Address `json:"shipping_address"`
}

type PaymentMethodCardWalletSamsungPay

type PaymentMethodCardWalletSamsungPay struct{}

type PaymentMethodCardWalletType

type PaymentMethodCardWalletType string

The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type.

const (
	PaymentMethodCardWalletTypeAmexExpressCheckout PaymentMethodCardWalletType = "amex_express_checkout"
	PaymentMethodCardWalletTypeApplePay            PaymentMethodCardWalletType = "apple_pay"
	PaymentMethodCardWalletTypeGooglePay           PaymentMethodCardWalletType = "google_pay"
	PaymentMethodCardWalletTypeMasterpass          PaymentMethodCardWalletType = "masterpass"
	PaymentMethodCardWalletTypeSamsungPay          PaymentMethodCardWalletType = "samsung_pay"
	PaymentMethodCardWalletTypeVisaCheckout        PaymentMethodCardWalletType = "visa_checkout"
)

List of values that PaymentMethodCardWalletType can take

type PaymentMethodCardWalletVisaCheckout

type PaymentMethodCardWalletVisaCheckout struct {
	// Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	BillingAddress *Address `json:"billing_address"`
	// Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	Email string `json:"email"`
	// Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	Name string `json:"name"`
	// Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	ShippingAddress *Address `json:"shipping_address"`
}

type PaymentMethodCustomerBalance

type PaymentMethodCustomerBalance struct{}

type PaymentMethodCustomerBalanceParams

type PaymentMethodCustomerBalanceParams struct{}

If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.

type PaymentMethodDetachParams

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

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

type PaymentMethodEPS

type PaymentMethodEPS struct {
	// The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
	Bank string `json:"bank"`
}

type PaymentMethodEPSParams

type PaymentMethodEPSParams struct {
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.

type PaymentMethodFPX

type PaymentMethodFPX struct {
	// Account holder type, if provided. Can be one of `individual` or `company`.
	AccountHolderType PaymentMethodFPXAccountHolderType `json:"account_holder_type"`
	// The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`.
	Bank string `json:"bank"`
}

type PaymentMethodFPXAccountHolderType

type PaymentMethodFPXAccountHolderType string

Account holder type, if provided. Can be one of `individual` or `company`.

const (
	PaymentMethodFPXAccountHolderTypeCompany    PaymentMethodFPXAccountHolderType = "company"
	PaymentMethodFPXAccountHolderTypeIndividual PaymentMethodFPXAccountHolderType = "individual"
)

List of values that PaymentMethodFPXAccountHolderType can take

type PaymentMethodFPXParams

type PaymentMethodFPXParams struct {
	// Account holder type for FPX transaction
	AccountHolderType *string `form:"account_holder_type"`
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.

type PaymentMethodGiropay

type PaymentMethodGiropay struct{}

type PaymentMethodGiropayParams

type PaymentMethodGiropayParams struct{}

If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.

type PaymentMethodGrabpay

type PaymentMethodGrabpay struct{}

type PaymentMethodGrabpayParams

type PaymentMethodGrabpayParams struct{}

If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.

type PaymentMethodIDEAL

type PaymentMethodIDEAL struct {
	// The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`.
	Bank string `json:"bank"`
	// The Bank Identifier Code of the customer's bank, if the bank was provided.
	BIC string `json:"bic"`
}

type PaymentMethodIDEALParams

type PaymentMethodIDEALParams struct {
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.

type PaymentMethodInteracPresent

type PaymentMethodInteracPresent struct{}

type PaymentMethodInteracPresentParams

type PaymentMethodInteracPresentParams struct{}

If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.

type PaymentMethodKlarna

type PaymentMethodKlarna struct {
	// The customer's date of birth, if provided.
	DOB *PaymentMethodKlarnaDOB `json:"dob"`
}

type PaymentMethodKlarnaDOB

type PaymentMethodKlarnaDOB struct {
	// The day of birth, between 1 and 31.
	Day int64 `json:"day"`
	// The month of birth, between 1 and 12.
	Month int64 `json:"month"`
	// The four-digit year of birth.
	Year int64 `json:"year"`
}

The customer's date of birth, if provided.

type PaymentMethodKlarnaDOBParams

type PaymentMethodKlarnaDOBParams struct {
	// The day of birth, between 1 and 31.
	Day *int64 `form:"day"`
	// The month of birth, between 1 and 12.
	Month *int64 `form:"month"`
	// The four-digit year of birth.
	Year *int64 `form:"year"`
}

Customer's date of birth

type PaymentMethodKlarnaParams

type PaymentMethodKlarnaParams struct {
	// Customer's date of birth
	DOB *PaymentMethodKlarnaDOBParams `form:"dob"`
}

If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.

type PaymentMethodKonbini

type PaymentMethodKonbini struct{}

type PaymentMethodKonbiniParams

type PaymentMethodKonbiniParams struct{}

If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.

type PaymentMethodLink struct {
	// Account owner's email address.
	Email string `json:"email"`
	// Token used for persistent Link logins.
	PersistentToken string `json:"persistent_token"`
}

type PaymentMethodLinkParams

type PaymentMethodLinkParams struct{}

If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.

type PaymentMethodList

type PaymentMethodList struct {
	APIResource
	ListMeta
	Data []*PaymentMethod `json:"data"`
}

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

type PaymentMethodListParams

type PaymentMethodListParams struct {
	ListParams `form:"*"`
	// The ID of the customer whose PaymentMethods will be retrieved.
	Customer *string `form:"customer"`
	// A required filter on the list, based on the object `type` field.
	Type *string `form:"type"`
}

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer's payment methods, you should use [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list)

type PaymentMethodOXXO

type PaymentMethodOXXO struct{}

type PaymentMethodOXXOParams

type PaymentMethodOXXOParams struct{}

If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.

type PaymentMethodP24

type PaymentMethodP24 struct {
	// The customer's bank, if provided.
	Bank string `json:"bank"`
}

type PaymentMethodP24Params

type PaymentMethodP24Params struct {
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.

type PaymentMethodParams

type PaymentMethodParams struct {
	Params `form:"*"`
	// This is a legacy parameter that will be removed in the future. It is a hash that does not accept any keys.
	ACSSDebit *PaymentMethodACSSDebitParams `form:"acss_debit"`
	// This is a legacy parameter that will be removed in the future. It is a hash that does not accept any keys.
	Affirm *PaymentMethodAffirmParams `form:"affirm"`
	// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
	AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"`
	// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
	Alipay *PaymentMethodAlipayParams `form:"alipay"`
	// This is a legacy parameter that will be removed in the future. It is a hash that does not accept any keys.
	AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"`
	// This is a legacy parameter that will be removed in the future. It is a hash that does not accept any keys.
	BACSDebit *PaymentMethodBACSDebitParams `form:"bacs_debit"`
	// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
	Bancontact *PaymentMethodBancontactParams `form:"bancontact"`
	// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
	BillingDetails *PaymentMethodBillingDetailsParams `form:"billing_details"`
	// This is a legacy parameter that will be removed in the future. It is a hash that does not accept any keys.
	BLIK *PaymentMethodBLIKParams `form:"blik"`
	// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
	Boleto *PaymentMethodBoletoParams `form:"boleto"`
	// If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
	Card *PaymentMethodCardParams `form:"card"`
	// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
	CustomerBalance *PaymentMethodCustomerBalanceParams `form:"customer_balance"`
	// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
	EPS *PaymentMethodEPSParams `form:"eps"`
	// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
	FPX *PaymentMethodFPXParams `form:"fpx"`
	// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
	Giropay *PaymentMethodGiropayParams `form:"giropay"`
	// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
	Grabpay *PaymentMethodGrabpayParams `form:"grabpay"`
	// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
	IDEAL *PaymentMethodIDEALParams `form:"ideal"`
	// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
	InteracPresent *PaymentMethodInteracPresentParams `form:"interac_present"`
	// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
	Klarna *PaymentMethodKlarnaParams `form:"klarna"`
	// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
	Konbini *PaymentMethodKonbiniParams `form:"konbini"`
	// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
	Link *PaymentMethodLinkParams `form:"link"`
	// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
	OXXO *PaymentMethodOXXOParams `form:"oxxo"`
	// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
	P24 *PaymentMethodP24Params `form:"p24"`
	// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
	PayNow *PaymentMethodPayNowParams `form:"paynow"`
	// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
	PromptPay *PaymentMethodPromptPayParams `form:"promptpay"`
	// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
	RadarOptions *PaymentMethodRadarOptionsParams `form:"radar_options"`
	// This is a legacy parameter that will be removed in the future. It is a hash that does not accept any keys.
	SEPADebit *PaymentMethodSEPADebitParams `form:"sepa_debit"`
	// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
	Sofort *PaymentMethodSofortParams `form:"sofort"`
	// The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
	Type *string `form:"type"`
	// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
	USBankAccount *PaymentMethodUSBankAccountParams `form:"us_bank_account"`
	// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
	WeChatPay *PaymentMethodWeChatPayParams `form:"wechat_pay"`
	// The following parameters are used when cloning a PaymentMethod to the connected account
	// The `Customer` to whom the original PaymentMethod is attached.
	Customer *string `form:"customer"`
	// The PaymentMethod to share.
	PaymentMethod *string `form:"payment_method"`
}

Creates a PaymentMethod object. Read the [Stripe.js reference](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.

Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the <a href="/docs/payments/save-and-reuse">SetupIntent](https://stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.

type PaymentMethodPayNow

type PaymentMethodPayNow struct{}

type PaymentMethodPayNowParams

type PaymentMethodPayNowParams struct{}

If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.

type PaymentMethodPromptPay

type PaymentMethodPromptPay struct{}

type PaymentMethodPromptPayParams

type PaymentMethodPromptPayParams struct{}

If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.

type PaymentMethodRadarOptions

type PaymentMethodRadarOptions struct {
	// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
	Session string `json:"session"`
}

Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.

type PaymentMethodRadarOptionsParams

type PaymentMethodRadarOptionsParams struct {
	// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
	Session *string `form:"session"`
}

Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.

type PaymentMethodSEPADebit

type PaymentMethodSEPADebit struct {
	// Bank code of bank associated with the bank account.
	BankCode string `json:"bank_code"`
	// Branch code of bank associated with the bank account.
	BranchCode string `json:"branch_code"`
	// Two-letter ISO code representing the country the bank account is located in.
	Country string `json:"country"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Information about the object that generated this PaymentMethod.
	GeneratedFrom *PaymentMethodSEPADebitGeneratedFrom `json:"generated_from"`
	// Last four characters of the IBAN.
	Last4 string `json:"last4"`
}

type PaymentMethodSEPADebitGeneratedFrom

type PaymentMethodSEPADebitGeneratedFrom struct {
	// The ID of the Charge that generated this PaymentMethod, if any.
	Charge *Charge `json:"charge"`
	// The ID of the SetupAttempt that generated this PaymentMethod, if any.
	SetupAttempt *SetupAttempt `json:"setup_attempt"`
}

Information about the object that generated this PaymentMethod.

type PaymentMethodSEPADebitParams

type PaymentMethodSEPADebitParams struct {
	// IBAN of the bank account.
	IBAN *string `form:"iban"`
}

If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.

type PaymentMethodSofort

type PaymentMethodSofort struct {
	// Two-letter ISO code representing the country the bank account is located in.
	Country string `json:"country"`
}

type PaymentMethodSofortParams

type PaymentMethodSofortParams struct {
	// Two-letter ISO code representing the country the bank account is located in.
	Country *string `form:"country"`
}

If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.

type PaymentMethodType

type PaymentMethodType string

The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.

const (
	PaymentMethodTypeACSSDebit        PaymentMethodType = "acss_debit"
	PaymentMethodTypeAffirm           PaymentMethodType = "affirm"
	PaymentMethodTypeAfterpayClearpay PaymentMethodType = "afterpay_clearpay"
	PaymentMethodTypeAlipay           PaymentMethodType = "alipay"
	PaymentMethodTypeAUBECSDebit      PaymentMethodType = "au_becs_debit"
	PaymentMethodTypeBACSDebit        PaymentMethodType = "bacs_debit"
	PaymentMethodTypeBancontact       PaymentMethodType = "bancontact"
	PaymentMethodTypeBLIK             PaymentMethodType = "blik"
	PaymentMethodTypeBoleto           PaymentMethodType = "boleto"
	PaymentMethodTypeCard             PaymentMethodType = "card"
	PaymentMethodTypeCardPresent      PaymentMethodType = "card_present"
	PaymentMethodTypeCustomerBalance  PaymentMethodType = "customer_balance"
	PaymentMethodTypeEPS              PaymentMethodType = "eps"
	PaymentMethodTypeFPX              PaymentMethodType = "fpx"
	PaymentMethodTypeGiropay          PaymentMethodType = "giropay"
	PaymentMethodTypeGrabpay          PaymentMethodType = "grabpay"
	PaymentMethodTypeIDEAL            PaymentMethodType = "ideal"
	PaymentMethodTypeInteracPresent   PaymentMethodType = "interac_present"
	PaymentMethodTypeKlarna           PaymentMethodType = "klarna"
	PaymentMethodTypeKonbini          PaymentMethodType = "konbini"
	PaymentMethodTypeLink             PaymentMethodType = "link"
	PaymentMethodTypeOXXO             PaymentMethodType = "oxxo"
	PaymentMethodTypeP24              PaymentMethodType = "p24"
	PaymentMethodTypePayNow           PaymentMethodType = "paynow"
	PaymentMethodTypePromptPay        PaymentMethodType = "promptpay"
	PaymentMethodTypeSEPADebit        PaymentMethodType = "sepa_debit"
	PaymentMethodTypeSofort           PaymentMethodType = "sofort"
	PaymentMethodTypeUSBankAccount    PaymentMethodType = "us_bank_account"
	PaymentMethodTypeWeChatPay        PaymentMethodType = "wechat_pay"
)

List of values that PaymentMethodType can take

type PaymentMethodUSBankAccount

type PaymentMethodUSBankAccount struct {
	// Account holder type: individual or company.
	AccountHolderType PaymentMethodUSBankAccountAccountHolderType `json:"account_holder_type"`
	// Account type: checkings or savings. Defaults to checking if omitted.
	AccountType PaymentMethodUSBankAccountAccountType `json:"account_type"`
	// The name of the bank.
	BankName string `json:"bank_name"`
	// The ID of the Financial Connections Account used to create the payment method.
	FinancialConnectionsAccount string `json:"financial_connections_account"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
	// Contains information about US bank account networks that can be used.
	Networks *PaymentMethodUSBankAccountNetworks `json:"networks"`
	// Routing number of the bank account.
	RoutingNumber string `json:"routing_number"`
}

type PaymentMethodUSBankAccountAccountHolderType

type PaymentMethodUSBankAccountAccountHolderType string

Account holder type: individual or company.

const (
	PaymentMethodUSBankAccountAccountHolderTypeCompany    PaymentMethodUSBankAccountAccountHolderType = "company"
	PaymentMethodUSBankAccountAccountHolderTypeIndividual PaymentMethodUSBankAccountAccountHolderType = "individual"
)

List of values that PaymentMethodUSBankAccountAccountHolderType can take

type PaymentMethodUSBankAccountAccountType

type PaymentMethodUSBankAccountAccountType string

Account type: checkings or savings. Defaults to checking if omitted.

const (
	PaymentMethodUSBankAccountAccountTypeChecking PaymentMethodUSBankAccountAccountType = "checking"
	PaymentMethodUSBankAccountAccountTypeSavings  PaymentMethodUSBankAccountAccountType = "savings"
)

List of values that PaymentMethodUSBankAccountAccountType can take

type PaymentMethodUSBankAccountNetworks

type PaymentMethodUSBankAccountNetworks struct {
	// The preferred network.
	Preferred string `json:"preferred"`
	// All supported networks.
	Supported []PaymentMethodUSBankAccountNetworksSupported `json:"supported"`
}

Contains information about US bank account networks that can be used.

type PaymentMethodUSBankAccountNetworksSupported

type PaymentMethodUSBankAccountNetworksSupported string

All supported networks.

const (
	PaymentMethodUSBankAccountNetworksSupportedACH            PaymentMethodUSBankAccountNetworksSupported = "ach"
	PaymentMethodUSBankAccountNetworksSupportedUSDomesticWire PaymentMethodUSBankAccountNetworksSupported = "us_domestic_wire"
)

List of values that PaymentMethodUSBankAccountNetworksSupported can take

type PaymentMethodUSBankAccountParams

type PaymentMethodUSBankAccountParams struct {
	// Bank account type.
	AccountHolderType *string `form:"account_holder_type"`
	// Account number of the bank account.
	AccountNumber *string `form:"account_number"`
	// Account type: checkings or savings. Defaults to checking if omitted.
	AccountType *string `form:"account_type"`
	// The ID of a Financial Connections Account to use as a payment method.
	FinancialConnectionsAccount *string `form:"financial_connections_account"`
	// Routing number of the bank account.
	RoutingNumber *string `form:"routing_number"`
}

If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.

type PaymentMethodWeChatPay

type PaymentMethodWeChatPay struct{}

type PaymentMethodWeChatPayParams

type PaymentMethodWeChatPayParams struct{}

If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.

type PaymentSource

type PaymentSource struct {
	APIResource
	BankAccount *BankAccount      `json:"-"`
	Card        *Card             `json:"-"`
	Deleted     bool              `json:"deleted"`
	ID          string            `json:"id"`
	Source      *Source           `json:"-"`
	Type        PaymentSourceType `json:"object"`
}

func (*PaymentSource) MarshalJSON

func (s *PaymentSource) MarshalJSON() ([]byte, error)

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

func (*PaymentSource) UnmarshalJSON

func (s *PaymentSource) UnmarshalJSON(data []byte) error

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

type PaymentSourceList

type PaymentSourceList struct {
	APIResource
	ListMeta
	Data []*PaymentSource `json:"data"`
}

PaymentSourceList is a list of PaymentSources as retrieved from a list endpoint.

type PaymentSourceListParams

type PaymentSourceListParams struct {
	ListParams `form:"*"`
	Customer   *string `form:"-"` // Included in URL
	// Filter sources according to a particular object type.
	Object *string `form:"object"`
}

List sources for a specified customer.

type PaymentSourceOwnerParams

type PaymentSourceOwnerParams struct {
	// Owner's address.
	Address *AddressParams `form:"address"`
	// Owner's email address.
	Email *string `form:"email"`
	// Owner's full name.
	Name *string `form:"name"`
	// Owner's phone number.
	Phone *string `form:"phone"`
}

type PaymentSourceParams

type PaymentSourceParams struct {
	Params   `form:"*"`
	Customer *string `form:"-"` // Included in URL
	// The name of the person or business that owns the bank account.
	AccountHolderName *string `form:"account_holder_name"`
	// The type of entity that holds the account. This can be either `individual` or `company`.
	AccountHolderType *string `form:"account_holder_type"`
	// City/District/Suburb/Town/Village.
	AddressCity *string `form:"address_city"`
	// Billing address country, if provided when creating card.
	AddressCountry *string `form:"address_country"`
	// Address line 1 (Street address/PO Box/Company name).
	AddressLine1 *string `form:"address_line1"`
	// Address line 2 (Apartment/Suite/Unit/Building).
	AddressLine2 *string `form:"address_line2"`
	// State/County/Province/Region.
	AddressState *string `form:"address_state"`
	// ZIP or postal code.
	AddressZip *string `form:"address_zip"`
	// Two digit number representing the card's expiration month.
	ExpMonth *string `form:"exp_month"`
	// Four digit number representing the card's expiration year.
	ExpYear *string `form:"exp_year"`
	// Cardholder name.
	Name  *string                   `form:"name"`
	Owner *PaymentSourceOwnerParams `form:"owner"`
	// Please refer to full [documentation](https://stripe.com/docs/api) instead.
	Source   *PaymentSourceSourceParams `form:"*"` // PaymentSourceSourceParams has custom encoding so brought to top level with "*"
	Validate *bool                      `form:"validate"`
}

When you create a new credit card, you must specify a customer or recipient on which to create it.

If the card's owner has no default card, then the new card will become the default. However, if the owner already has a default, then it will not change. To change the default, you should [update the customer](https://stripe.com/docs/api#update_customer) to have a new default_source.

type PaymentSourceSourceParams

type PaymentSourceSourceParams struct {
	Card  *CardParams `form:"-"`
	Token *string     `form:"source"`
}

PaymentSourceSourceParams is a union struct used to describe an arbitrary payment source.

func SourceParamsFor

func SourceParamsFor(obj interface{}) (*PaymentSourceSourceParams, error)

SourceParamsFor creates PaymentSourceSourceParams objects around supported payment sources, returning errors if not.

Currently supported payment source types are Card (CardParams) and Tokens/IDs (string), where Tokens could be single use card tokens

func (*PaymentSourceSourceParams) AppendTo

func (p *PaymentSourceSourceParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for PaymentSourceSourceParams.

type PaymentSourceType

type PaymentSourceType string
const (
	PaymentSourceTypeAccount     PaymentSourceType = "account"
	PaymentSourceTypeBankAccount PaymentSourceType = "bank_account"
	PaymentSourceTypeCard        PaymentSourceType = "card"
	PaymentSourceTypeSource      PaymentSourceType = "source"
)

List of values that PaymentSourceType can take

type PaymentSourceVerifyParams

type PaymentSourceVerifyParams struct {
	Params   `form:"*"`
	Customer *string `form:"-"` // Included in URL
	// Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
	Amounts [2]int64  `form:"amounts"` // Amounts is used when verifying bank accounts
	Values  []*string `form:"values"`  // Values is used when verifying sources
}

Verify a specified bank account for a given customer.

type Payout

type Payout struct {
	APIResource
	// Amount (in %s) to be transferred to your bank account or debit card.
	Amount int64 `json:"amount"`
	// Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays.
	ArrivalDate int64 `json:"arrival_date"`
	// Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts).
	Automatic bool `json:"automatic"`
	// ID of the balance transaction that describes the impact of this payout on your account balance.
	BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// ID of the bank account or card the payout was sent to.
	Destination *PayoutDestination `json:"destination"`
	// If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance.
	FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"`
	// Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes.
	FailureCode PayoutFailureCode `json:"failure_code"`
	// Message to user further explaining reason for payout failure if available.
	FailureMessage string `json:"failure_message"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.)
	Method PayoutMethodType `json:"method"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// If the payout reverses another, this is the ID of the original payout.
	OriginalPayout *Payout `json:"original_payout"`
	// If the payout was reversed, this is the ID of the payout that reverses this payout.
	ReversedBy *Payout `json:"reversed_by"`
	// The source balance this payout came from. One of `card`, `fpx`, or `bank_account`.
	SourceType PayoutSourceType `json:"source_type"`
	// Extra information about a payout to be displayed on the user's bank statement.
	StatementDescriptor string `json:"statement_descriptor"`
	// Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`.
	Status PayoutStatus `json:"status"`
	// Can be `bank_account` or `card`.
	Type PayoutType `json:"type"`
}

A `Payout` object is created when you receive funds from Stripe, or when you initiate a payout to either a bank account or debit card of a [connected Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, as well as list all payouts. Payouts are made on [varying schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and industry.

Related guide: [Receiving Payouts](https://stripe.com/docs/payouts).

func (*Payout) UnmarshalJSON

func (p *Payout) UnmarshalJSON(data []byte) error

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.

type PayoutDestination

type PayoutDestination struct {
	ID   string                `json:"id"`
	Type PayoutDestinationType `json:"object"`

	BankAccount *BankAccount `json:"-"`
	Card        *Card        `json:"-"`
}

func (*PayoutDestination) UnmarshalJSON

func (p *PayoutDestination) UnmarshalJSON(data []byte) error

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

type PayoutDestinationType

type PayoutDestinationType string
const (
	PayoutDestinationTypeBankAccount PayoutDestinationType = "bank_account"
	PayoutDestinationTypeCard        PayoutDestinationType = "card"
)

List of values that PayoutDestinationType can take

type PayoutFailureCode

type PayoutFailureCode string

Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes.

const (
	PayoutFailureCodeAccountClosed                 PayoutFailureCode = "account_closed"
	PayoutFailureCodeAccountFrozen                 PayoutFailureCode = "account_frozen"
	PayoutFailureCodeBankAccountRestricted         PayoutFailureCode = "bank_account_restricted"
	PayoutFailureCodeBankOwnershipChanged          PayoutFailureCode = "bank_ownership_changed"
	PayoutFailureCodeCouldNotProcess               PayoutFailureCode = "could_not_process"
	PayoutFailureCodeDebitNotAuthorized            PayoutFailureCode = "debit_not_authorized"
	PayoutFailureCodeDeclined                      PayoutFailureCode = "declined"
	PayoutFailureCodeInsufficientFunds             PayoutFailureCode = "insufficient_funds"
	PayoutFailureCodeInvalidAccountNumber          PayoutFailureCode = "invalid_account_number"
	PayoutFailureCodeIncorrectAccountHolderName    PayoutFailureCode = "incorrect_account_holder_name"
	PayoutFailureCodeIncorrectAccountHolderAddress PayoutFailureCode = "incorrect_account_holder_address"
	PayoutFailureCodeIncorrectAccountHolderTaxID   PayoutFailureCode = "incorrect_account_holder_tax_id"
	PayoutFailureCodeInvalidCurrency               PayoutFailureCode = "invalid_currency"
	PayoutFailureCodeNoAccount                     PayoutFailureCode = "no_account"
	PayoutFailureCodeUnsupportedCard               PayoutFailureCode = "unsupported_card"
)

List of values that PayoutFailureCode can take

type PayoutList

type PayoutList struct {
	APIResource
	ListMeta
	Data []*Payout `json:"data"`
}

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

type PayoutListParams

type PayoutListParams struct {
	ListParams       `form:"*"`
	ArrivalDate      *int64            `form:"arrival_date"`
	ArrivalDateRange *RangeQueryParams `form:"arrival_date"`
	Created          *int64            `form:"created"`
	CreatedRange     *RangeQueryParams `form:"created"`
	// The ID of an external account - only return payouts sent to this external account.
	Destination *string `form:"destination"`
	// Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`.
	Status *string `form:"status"`
}

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

type PayoutMethodType

type PayoutMethodType string

The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.)

const (
	PayoutMethodInstant  PayoutMethodType = "instant"
	PayoutMethodStandard PayoutMethodType = "standard"
)

List of values that PayoutMethodType can take

type PayoutParams

type PayoutParams struct {
	Params `form:"*"`
	// A positive integer in cents representing how much to payout.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used.
	Destination *string `form:"destination"`
	// The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).)
	Method *string `form:"method"`
	// The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`.
	SourceType *string `form:"source_type"`
	// A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all.
	StatementDescriptor *string `form:"statement_descriptor"`
}

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

type PayoutReverseParams

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

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

type PayoutSourceType

type PayoutSourceType string

The source balance this payout came from. One of `card`, `fpx`, or `bank_account`.

const (
	PayoutSourceTypeBankAccount PayoutSourceType = "bank_account"
	PayoutSourceTypeCard        PayoutSourceType = "card"
	PayoutSourceTypeFPX         PayoutSourceType = "fpx"
)

List of values that PayoutSourceType can take

type PayoutStatus

type PayoutStatus string

Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`.

const (
	PayoutStatusCanceled  PayoutStatus = "canceled"
	PayoutStatusFailed    PayoutStatus = "failed"
	PayoutStatusInTransit PayoutStatus = "in_transit"
	PayoutStatusPaid      PayoutStatus = "paid"
	PayoutStatusPending   PayoutStatus = "pending"
)

List of values that PayoutStatus can take

type PayoutType

type PayoutType string

Can be `bank_account` or `card`.

const (
	PayoutTypeBank PayoutType = "bank_account"
	PayoutTypeCard PayoutType = "card"
)

List of values that PayoutType can take

type Period

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

Period is a structure representing a start and end dates.

type Person

type Person struct {
	APIResource
	// The account the person is associated with.
	Account string   `json:"account"`
	Address *Address `json:"address"`
	// The Kana variation of the person's address (Japan only).
	AddressKana *PersonAddressKana `json:"address_kana"`
	// The Kanji variation of the person's address (Japan only).
	AddressKanji *PersonAddressKanji `json:"address_kanji"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64      `json:"created"`
	Deleted bool       `json:"deleted"`
	DOB     *PersonDOB `json:"dob"`
	// The person's email address.
	Email string `json:"email"`
	// The person's first name.
	FirstName string `json:"first_name"`
	// The Kana variation of the person's first name (Japan only).
	FirstNameKana string `json:"first_name_kana"`
	// The Kanji variation of the person's first name (Japan only).
	FirstNameKanji string `json:"first_name_kanji"`
	// A list of alternate names or aliases that the person is known by.
	FullNameAliases []string `json:"full_name_aliases"`
	// Information about the upcoming new requirements for this person, including what information needs to be collected, and by when.
	FutureRequirements *PersonFutureRequirements `json:"future_requirements"`
	// The person's gender (International regulations require either "male" or "female").
	Gender string `json:"gender"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Whether the person's `id_number` was provided.
	IDNumberProvided bool `json:"id_number_provided"`
	// Whether the person's `id_number_secondary` was provided.
	IDNumberSecondaryProvided bool `json:"id_number_secondary_provided"`
	// The person's last name.
	LastName string `json:"last_name"`
	// The Kana variation of the person's last name (Japan only).
	LastNameKana string `json:"last_name_kana"`
	// The Kanji variation of the person's last name (Japan only).
	LastNameKanji string `json:"last_name_kanji"`
	// The person's maiden name.
	MaidenName string `json:"maiden_name"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// The country where the person is a national.
	Nationality string `json:"nationality"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The person's phone number.
	Phone string `json:"phone"`
	// Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
	PoliticalExposure PersonPoliticalExposure `json:"political_exposure"`
	RegisteredAddress *Address                `json:"registered_address"`
	Relationship      *PersonRelationship     `json:"relationship"`
	// Information about the requirements for this person, including what information needs to be collected, and by when.
	Requirements *PersonRequirements `json:"requirements"`
	// Whether the last four digits of the person's Social Security number have been provided (U.S. only).
	SSNLast4Provided bool                `json:"ssn_last_4_provided"`
	Verification     *PersonVerification `json:"verification"`
}

This is an object representing a person associated with a Stripe account.

A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.

Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information).

type PersonAddressKana

type PersonAddressKana struct {
	// City/Ward.
	City string `json:"city"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country string `json:"country"`
	// Block/Building number.
	Line1 string `json:"line1"`
	// Building details.
	Line2 string `json:"line2"`
	// ZIP or postal code.
	PostalCode string `json:"postal_code"`
	// Prefecture.
	State string `json:"state"`
	// Town/cho-me.
	Town string `json:"town"`
}

The Kana variation of the person's address (Japan only).

type PersonAddressKanaParams

type PersonAddressKanaParams struct {
	// City or ward.
	City *string `form:"city"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country *string `form:"country"`
	// Block or building number.
	Line1 *string `form:"line1"`
	// Building details.
	Line2 *string `form:"line2"`
	// Postal code.
	PostalCode *string `form:"postal_code"`
	// Prefecture.
	State *string `form:"state"`
	// Town or cho-me.
	Town *string `form:"town"`
}

The Kana variation of the person's address (Japan only).

type PersonAddressKanji

type PersonAddressKanji struct {
	// City/Ward.
	City string `json:"city"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country string `json:"country"`
	// Block/Building number.
	Line1 string `json:"line1"`
	// Building details.
	Line2 string `json:"line2"`
	// ZIP or postal code.
	PostalCode string `json:"postal_code"`
	// Prefecture.
	State string `json:"state"`
	// Town/cho-me.
	Town string `json:"town"`
}

The Kanji variation of the person's address (Japan only).

type PersonAddressKanjiParams

type PersonAddressKanjiParams struct {
	// City or ward.
	City *string `form:"city"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country *string `form:"country"`
	// Block or building number.
	Line1 *string `form:"line1"`
	// Building details.
	Line2 *string `form:"line2"`
	// Postal code.
	PostalCode *string `form:"postal_code"`
	// Prefecture.
	State *string `form:"state"`
	// Town or cho-me.
	Town *string `form:"town"`
}

The Kanji variation of the person's address (Japan only).

type PersonDOB

type PersonDOB struct {
	// The day of birth, between 1 and 31.
	Day int64 `json:"day"`
	// The month of birth, between 1 and 12.
	Month int64 `json:"month"`
	// The four-digit year of birth.
	Year int64 `json:"year"`
}

type PersonDOBParams

type PersonDOBParams struct {
	// The day of birth, between 1 and 31.
	Day *int64 `form:"day"`
	// The month of birth, between 1 and 12.
	Month *int64 `form:"month"`
	// The four-digit year of birth.
	Year *int64 `form:"year"`
}

The person's date of birth.

type PersonDocumentsCompanyAuthorizationParams

type PersonDocumentsCompanyAuthorizationParams struct {
	// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
	Files []*string `form:"files"`
}

One or more documents that demonstrate proof that this person is authorized to represent the company.

type PersonDocumentsParams

type PersonDocumentsParams struct {
	// One or more documents that demonstrate proof that this person is authorized to represent the company.
	CompanyAuthorization *PersonDocumentsCompanyAuthorizationParams `form:"company_authorization"`
	// One or more documents showing the person's passport page with photo and personal data.
	Passport *PersonDocumentsPassportParams `form:"passport"`
	// One or more documents showing the person's visa required for living in the country where they are residing.
	Visa *PersonDocumentsVisaParams `form:"visa"`
}

Documents that may be submitted to satisfy various informational requests.

type PersonDocumentsPassportParams

type PersonDocumentsPassportParams struct {
	// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
	Files []*string `form:"files"`
}

One or more documents showing the person's passport page with photo and personal data.

type PersonDocumentsVisaParams

type PersonDocumentsVisaParams struct {
	// One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
	Files []*string `form:"files"`
}

One or more documents showing the person's visa required for living in the country where they are residing.

type PersonFutureRequirements

type PersonFutureRequirements struct {
	// Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
	Alternatives []*PersonFutureRequirementsAlternative `json:"alternatives"`
	// Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition.
	CurrentlyDue []string `json:"currently_due"`
	// Fields that are `currently_due` and need to be collected again because validation or verification failed.
	Errors []*PersonFutureRequirementsError `json:"errors"`
	// Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set.
	EventuallyDue []string `json:"eventually_due"`
	// Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.
	PastDue []string `json:"past_due"`
	// Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`.
	PendingVerification []string `json:"pending_verification"`
}

Information about the upcoming new requirements for this person, including what information needs to be collected, and by when.

type PersonFutureRequirementsAlternative

type PersonFutureRequirementsAlternative struct {
	// Fields that can be provided to satisfy all fields in `original_fields_due`.
	AlternativeFieldsDue []string `json:"alternative_fields_due"`
	// Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
	OriginalFieldsDue []string `json:"original_fields_due"`
}

Fields that are due and can be satisfied by providing the corresponding alternative fields instead.

type PersonFutureRequirementsError

type PersonFutureRequirementsError struct {
	// The code for the type of error.
	Code string `json:"code"`
	// An informative message that indicates the error type and provides additional details about the error.
	Reason string `json:"reason"`
	// The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
	Requirement string `json:"requirement"`
}

Fields that are `currently_due` and need to be collected again because validation or verification failed.

type PersonList

type PersonList struct {
	APIResource
	ListMeta
	Data []*Person `json:"data"`
}

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

type PersonListParams

type PersonListParams struct {
	ListParams `form:"*"`
	Account    *string `form:"-"` // Included in URL
	// Filters on the list of people returned based on the person's relationship to the account's company.
	Relationship *PersonListRelationshipParams `form:"relationship"`
}

Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.

type PersonListRelationshipParams

type PersonListRelationshipParams struct {
	// A filter on the list of people returned based on whether these people are directors of the account's company.
	Director *bool `form:"director"`
	// A filter on the list of people returned based on whether these people are executives of the account's company.
	Executive *bool `form:"executive"`
	// A filter on the list of people returned based on whether these people are owners of the account's company.
	Owner *bool `form:"owner"`
	// A filter on the list of people returned based on whether these people are the representative of the account's company.
	Representative *bool `form:"representative"`
}

Filters on the list of people returned based on the person's relationship to the account's company.

type PersonParams

type PersonParams struct {
	Params  `form:"*"`
	Account *string `form:"-"` // Included in URL
	// The person's address.
	Address *AddressParams `form:"address"`
	// The Kana variation of the person's address (Japan only).
	AddressKana *PersonAddressKanaParams `form:"address_kana"`
	// The Kanji variation of the person's address (Japan only).
	AddressKanji *PersonAddressKanjiParams `form:"address_kanji"`
	// The person's date of birth.
	DOB *PersonDOBParams `form:"dob"`
	// Documents that may be submitted to satisfy various informational requests.
	Documents *PersonDocumentsParams `form:"documents"`
	// The person's email address.
	Email *string `form:"email"`
	// The person's first name.
	FirstName *string `form:"first_name"`
	// The Kana variation of the person's first name (Japan only).
	FirstNameKana *string `form:"first_name_kana"`
	// The Kanji variation of the person's first name (Japan only).
	FirstNameKanji *string `form:"first_name_kanji"`
	// A list of alternate names or aliases that the person is known by.
	FullNameAliases []*string `form:"full_name_aliases"`
	// The person's gender (International regulations require either "male" or "female").
	Gender *string `form:"gender"`
	// The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).
	IDNumber *string `form:"id_number"`
	// The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii).
	IDNumberSecondary *string `form:"id_number_secondary"`
	// The person's last name.
	LastName *string `form:"last_name"`
	// The Kana variation of the person's last name (Japan only).
	LastNameKana *string `form:"last_name_kana"`
	// The Kanji variation of the person's last name (Japan only).
	LastNameKanji *string `form:"last_name_kanji"`
	// The person's maiden name.
	MaidenName *string `form:"maiden_name"`
	// The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
	Nationality *string `form:"nationality"`
	// A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person.
	PersonToken *string `form:"person_token"`
	// The person's phone number.
	Phone *string `form:"phone"`
	// Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
	PoliticalExposure *string `form:"political_exposure"`
	// The person's registered address.
	RegisteredAddress *AddressParams `form:"registered_address"`
	// The relationship that this person has with the account's legal entity.
	Relationship *PersonRelationshipParams `form:"relationship"`
	// The last four digits of the person's Social Security number (U.S. only).
	SSNLast4 *string `form:"ssn_last_4"`
	// The person's verification status.
	Verification *PersonVerificationParams `form:"verification"`
}

Creates a new person.

type PersonPoliticalExposure

type PersonPoliticalExposure string

Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.

const (
	PersonPoliticalExposureExisting PersonPoliticalExposure = "existing"
	PersonPoliticalExposureNone     PersonPoliticalExposure = "none"
)

List of values that PersonPoliticalExposure can take

type PersonRelationship

type PersonRelationship struct {
	// Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
	Director bool `json:"director"`
	// Whether the person has significant responsibility to control, manage, or direct the organization.
	Executive bool `json:"executive"`
	// Whether the person is an owner of the account's legal entity.
	Owner bool `json:"owner"`
	// The percent owned by the person of the account's legal entity.
	PercentOwnership float64 `json:"percent_ownership"`
	// Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
	Representative bool `json:"representative"`
	// The person's title (e.g., CEO, Support Engineer).
	Title string `json:"title"`
}

type PersonRelationshipParams

type PersonRelationshipParams struct {
	// Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
	Director *bool `form:"director"`
	// Whether the person has significant responsibility to control, manage, or direct the organization.
	Executive *bool `form:"executive"`
	// Whether the person is an owner of the account's legal entity.
	Owner *bool `form:"owner"`
	// The percent owned by the person of the account's legal entity.
	PercentOwnership *float64 `form:"percent_ownership"`
	// Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
	Representative *bool `form:"representative"`
	// The person's title (e.g., CEO, Support Engineer).
	Title *string `form:"title"`
}

The relationship that this person has with the account's legal entity.

type PersonRequirements

type PersonRequirements struct {
	// Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
	Alternatives []*PersonRequirementsAlternative `json:"alternatives"`
	// Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
	CurrentlyDue []string `json:"currently_due"`
	// Fields that are `currently_due` and need to be collected again because validation or verification failed.
	Errors []*AccountRequirementsError `json:"errors"`
	// Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set.
	EventuallyDue []string `json:"eventually_due"`
	// Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account.
	PastDue []string `json:"past_due"`
	// Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`.
	PendingVerification []string `json:"pending_verification"`
}

Information about the requirements for this person, including what information needs to be collected, and by when.

type PersonRequirementsAlternative

type PersonRequirementsAlternative struct {
	// Fields that can be provided to satisfy all fields in `original_fields_due`.
	AlternativeFieldsDue []string `json:"alternative_fields_due"`
	// Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
	OriginalFieldsDue []string `json:"original_fields_due"`
}

Fields that are due and can be satisfied by providing the corresponding alternative fields instead.

type PersonVerification

type PersonVerification struct {
	// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
	AdditionalDocument *PersonVerificationDocument `json:"additional_document"`
	// A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified".
	Details string `json:"details"`
	// One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person.
	DetailsCode PersonVerificationDetailsCode `json:"details_code"`
	Document    *PersonVerificationDocument   `json:"document"`
	// The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.
	Status PersonVerificationStatus `json:"status"`
}

type PersonVerificationDetailsCode

type PersonVerificationDetailsCode string

One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person.

const (
	PersonVerificationDetailsCodeFailedKeyedIdentity PersonVerificationDetailsCode = "failed_keyed_identity"
	PersonVerificationDetailsCodeFailedOther         PersonVerificationDetailsCode = "failed_other"
	PersonVerificationDetailsCodeScanNameMismatch    PersonVerificationDetailsCode = "scan_name_mismatch"
)

List of values that PersonVerificationDetailsCode can take

type PersonVerificationDocument

type PersonVerificationDocument struct {
	// The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
	Back *File `json:"back"`
	// A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read".
	Details string `json:"details"`
	// One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document.
	DetailsCode PersonVerificationDocumentDetailsCode `json:"details_code"`
	// The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
	Front *File `json:"front"`
}

A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.

type PersonVerificationDocumentDetailsCode

type PersonVerificationDocumentDetailsCode string

One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document.

const (
	PersonVerificationDocumentDetailsCodeDocumentCorrupt               PersonVerificationDocumentDetailsCode = "document_corrupt"
	PersonVerificationDocumentDetailsCodeDocumentFailedCopy            PersonVerificationDocumentDetailsCode = "document_failed_copy"
	PersonVerificationDocumentDetailsCodeDocumentFailedGreyscale       PersonVerificationDocumentDetailsCode = "document_failed_greyscale"
	PersonVerificationDocumentDetailsCodeDocumentFailedOther           PersonVerificationDocumentDetailsCode = "document_failed_other"
	PersonVerificationDocumentDetailsCodeDocumentFailedTestMode        PersonVerificationDocumentDetailsCode = "document_failed_test_mode"
	PersonVerificationDocumentDetailsCodeDocumentFraudulent            PersonVerificationDocumentDetailsCode = "document_fraudulent"
	PersonVerificationDocumentDetailsCodeDocumentIDTypeNotSupported    PersonVerificationDocumentDetailsCode = "document_id_type_not_supported"
	PersonVerificationDocumentDetailsCodeDocumentIDCountryNotSupported PersonVerificationDocumentDetailsCode = "document_id_country_not_supported"
	PersonVerificationDocumentDetailsCodeDocumentManipulated           PersonVerificationDocumentDetailsCode = "document_manipulated"
	PersonVerificationDocumentDetailsCodeDocumentMissingBack           PersonVerificationDocumentDetailsCode = "document_missing_back"
	PersonVerificationDocumentDetailsCodeDocumentMissingFront          PersonVerificationDocumentDetailsCode = "document_missing_front"
	PersonVerificationDocumentDetailsCodeDocumentNotReadable           PersonVerificationDocumentDetailsCode = "document_not_readable"
	PersonVerificationDocumentDetailsCodeDocumentNotUploaded           PersonVerificationDocumentDetailsCode = "document_not_uploaded"
	PersonVerificationDocumentDetailsCodeDocumentTooLarge              PersonVerificationDocumentDetailsCode = "document_too_large"
)

List of values that PersonVerificationDocumentDetailsCode can take

type PersonVerificationDocumentParams

type PersonVerificationDocumentParams struct {
	// The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
	Back *string `form:"back"`
	// The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
	Front *string `form:"front"`
}

A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.

type PersonVerificationParams

type PersonVerificationParams struct {
	// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
	AdditionalDocument *PersonVerificationDocumentParams `form:"additional_document"`
	// An identifying document, either a passport or local ID card.
	Document *PersonVerificationDocumentParams `form:"document"`
}

The person's verification status.

type PersonVerificationStatus

type PersonVerificationStatus string

The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`.

const (
	PersonVerificationStatusPending    PersonVerificationStatus = "pending"
	PersonVerificationStatusUnverified PersonVerificationStatus = "unverified"
	PersonVerificationStatusVerified   PersonVerificationStatus = "verified"
)

List of values that PersonVerificationStatus can take

type Plan

type Plan struct {
	APIResource
	// Whether the plan can be used for new purchases.
	Active bool `json:"active"`
	// Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.
	AggregateUsage PlanAggregateUsage `json:"aggregate_usage"`
	// The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
	Amount int64 `json:"amount"`
	// The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
	AmountDecimal float64 `json:"amount_decimal,string"`
	// Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
	BillingScheme PlanBillingScheme `json:"billing_scheme"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	Deleted  bool     `json:"deleted"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
	Interval PlanInterval `json:"interval"`
	// The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
	IntervalCount int64 `json:"interval_count"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// A brief description of the plan, hidden from customers.
	Nickname string `json:"nickname"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The product whose pricing this plan determines.
	Product *Product `json:"product"`
	// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
	Tiers []*PlanTier `json:"tiers"`
	// Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.
	TiersMode PlanTiersMode `json:"tiers_mode"`
	// Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
	TransformUsage *PlanTransformUsage `json:"transform_usage"`
	// Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
	TrialPeriodDays int64 `json:"trial_period_days"`
	// Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
	UsageType PlanUsageType `json:"usage_type"`
}

You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.

Plans define the base price, currency, and billing cycle for recurring purchases of products. [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.

Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).

Example (List)
package main

import (
	"log"

	stripe "github.com/stripe/stripe-go/v73"
	"github.com/stripe/stripe-go/v73/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)
	}
}
Output:

func (*Plan) UnmarshalJSON

func (p *Plan) UnmarshalJSON(data []byte) error

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

type PlanAggregateUsage string

Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.

const (
	PlanAggregateUsageLastDuringPeriod PlanAggregateUsage = "last_during_period"
	PlanAggregateUsageLastEver         PlanAggregateUsage = "last_ever"
	PlanAggregateUsageMax              PlanAggregateUsage = "max"
	PlanAggregateUsageSum              PlanAggregateUsage = "sum"
)

List of values that PlanAggregateUsage can take

type PlanBillingScheme

type PlanBillingScheme string

Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.

const (
	PlanBillingSchemePerUnit PlanBillingScheme = "per_unit"
	PlanBillingSchemeTiered  PlanBillingScheme = "tiered"
)

List of values that PlanBillingScheme can take

type PlanInterval

type PlanInterval string

The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.

const (
	PlanIntervalDay   PlanInterval = "day"
	PlanIntervalMonth PlanInterval = "month"
	PlanIntervalWeek  PlanInterval = "week"
	PlanIntervalYear  PlanInterval = "year"
)

List of values that PlanInterval can take

type PlanList

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

PlanList is a list of Plans as retrieved from a list endpoint.

type PlanListParams

type PlanListParams struct {
	ListParams `form:"*"`
	// Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans).
	Active *bool `form:"active"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	Created *int64 `form:"created"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return plans for the given product.
	Product *string `form:"product"`
}

Returns a list of your plans.

type PlanParams

type PlanParams struct {
	Params `form:"*"`
	// Whether the plan is currently available for new subscriptions.
	Active *bool `form:"active"`
	// Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.
	AggregateUsage *string `form:"aggregate_usage"`
	// A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis.
	Amount *int64 `form:"amount"`
	// Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set.
	AmountDecimal *float64 `form:"amount_decimal,high_precision"`
	// Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
	BillingScheme *string `form:"billing_scheme"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes.
	ID *string `form:"id"`
	// Specifies billing frequency. Either `day`, `week`, `month` or `year`.
	Interval *string `form:"interval"`
	// The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
	IntervalCount *int64 `form:"interval_count"`
	// A brief description of the plan, hidden from customers.
	Nickname *string            `form:"nickname"`
	Product  *PlanProductParams `form:"product"`
	// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
	Tiers []*PlanTierParams `form:"tiers"`
	// Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
	TiersMode *string `form:"tiers_mode"`
	// Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
	TransformUsage *PlanTransformUsageParams `form:"transform_usage"`
	// Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
	TrialPeriodDays *int64 `form:"trial_period_days"`
	// Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
	UsageType *string `form:"usage_type"`
}

You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.

type PlanProductParams

type PlanProductParams struct {
	// Whether the product is currently available for purchase. Defaults to `true`.
	Active *bool `form:"active"`
	// The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
	ID *string `form:"id"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// The product's name, meant to be displayable to the customer.
	Name *string `form:"name"`
	// An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
	//
	// This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
	StatementDescriptor *string `form:"statement_descriptor"`
	// A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
	TaxCode *string `form:"tax_code"`
	// A label that represents units of this product in Stripe and on customers' receipts and invoices. When set, this will be included in associated invoice line item descriptions.
	UnitLabel *string `form:"unit_label"`
}

The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.

type PlanTier

type PlanTier struct {
	// Price for the entire tier.
	FlatAmount int64 `json:"flat_amount"`
	// Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.
	FlatAmountDecimal float64 `json:"flat_amount_decimal,string"`
	// Per unit price for units relevant to the tier.
	UnitAmount int64 `json:"unit_amount"`
	// Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
	UnitAmountDecimal float64 `json:"unit_amount_decimal,string"`
	// Up to and including to this quantity will be contained in the tier.
	UpTo int64 `json:"up_to"`
}

Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.

type PlanTierParams

type PlanTierParams struct {
	Params `form:"*"`
	// The flat billing amount for an entire tier, regardless of the number of units in the tier.
	FlatAmount *int64 `form:"flat_amount"`
	// Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
	FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"`
	// The per unit billing amount for each individual unit for which this tier applies.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
	// Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
	UpTo    *int64 `form:"-"` // See custom AppendTo
	UpToInf *bool  `form:"-"` // See custom AppendTo
}

Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.

func (*PlanTierParams) AppendTo

func (p *PlanTierParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for PlanTierParams.

type PlanTiersMode

type PlanTiersMode string

Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.

const (
	PlanTiersModeGraduated PlanTiersMode = "graduated"
	PlanTiersModeVolume    PlanTiersMode = "volume"
)

List of values that PlanTiersMode can take

type PlanTransformUsage

type PlanTransformUsage struct {
	// Divide usage by this number.
	DivideBy int64 `json:"divide_by"`
	// After division, either round the result `up` or `down`.
	Round PlanTransformUsageRound `json:"round"`
}

Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.

type PlanTransformUsageParams

type PlanTransformUsageParams struct {
	// Divide usage by this number.
	DivideBy *int64 `form:"divide_by"`
	// After division, either round the result `up` or `down`.
	Round *string `form:"round"`
}

Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.

type PlanTransformUsageRound

type PlanTransformUsageRound string

After division, either round the result `up` or `down`.

const (
	PlanTransformUsageRoundDown PlanTransformUsageRound = "down"
	PlanTransformUsageRoundUp   PlanTransformUsageRound = "up"
)

List of values that PlanTransformUsageRound can take

type PlanUsageType

type PlanUsageType string

Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.

const (
	PlanUsageTypeLicensed PlanUsageType = "licensed"
	PlanUsageTypeMetered  PlanUsageType = "metered"
)

List of values that PlanUsageType can take

type Price

type Price struct {
	APIResource
	// Whether the price can be used for new purchases.
	Active bool `json:"active"`
	// Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
	BillingScheme PriceBillingScheme `json:"billing_scheme"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
	CurrencyOptions map[string]*PriceCurrencyOptions `json:"currency_options"`
	// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
	CustomUnitAmount *PriceCustomUnitAmount `json:"custom_unit_amount"`
	Deleted          bool                   `json:"deleted"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
	LookupKey string `json:"lookup_key"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// A brief description of the price, hidden from customers.
	Nickname string `json:"nickname"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The ID of the product this price is associated with.
	Product *Product `json:"product"`
	// The recurring components of a price such as `interval` and `usage_type`.
	Recurring *PriceRecurring `json:"recurring"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior PriceTaxBehavior `json:"tax_behavior"`
	// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
	Tiers []*PriceTier `json:"tiers"`
	// Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.
	TiersMode PriceTiersMode `json:"tiers_mode"`
	// Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
	TransformQuantity *PriceTransformQuantity `json:"transform_quantity"`
	// One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
	Type PriceType `json:"type"`
	// The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
	UnitAmount int64 `json:"unit_amount"`
	// The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
	UnitAmountDecimal float64 `json:"unit_amount_decimal,string"`
}

Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.

Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).

func (*Price) UnmarshalJSON

func (p *Price) UnmarshalJSON(data []byte) error

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

type PriceBillingScheme

type PriceBillingScheme string

Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.

const (
	PriceBillingSchemePerUnit PriceBillingScheme = "per_unit"
	PriceBillingSchemeTiered  PriceBillingScheme = "tiered"
)

List of values that PriceBillingScheme can take

type PriceCurrencyOptions

type PriceCurrencyOptions struct {
	// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
	CustomUnitAmount *PriceCurrencyOptionsCustomUnitAmount `json:"custom_unit_amount"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior PriceCurrencyOptionsTaxBehavior `json:"tax_behavior"`
	// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
	Tiers []*PriceCurrencyOptionsTier `json:"tiers"`
	// The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
	UnitAmount int64 `json:"unit_amount"`
	// The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
	UnitAmountDecimal float64 `json:"unit_amount_decimal,string"`
}

Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

type PriceCurrencyOptionsCustomUnitAmount

type PriceCurrencyOptionsCustomUnitAmount struct {
	// The maximum unit amount the customer can specify for this item.
	Maximum int64 `json:"maximum"`
	// The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
	Minimum int64 `json:"minimum"`
	// The starting unit amount which can be updated by the customer.
	Preset int64 `json:"preset"`
}

When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.

type PriceCurrencyOptionsCustomUnitAmountParams

type PriceCurrencyOptionsCustomUnitAmountParams struct {
	// Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
	Enabled *bool `form:"enabled"`
	// The maximum unit amount the customer can specify for this item.
	Maximum *int64 `form:"maximum"`
	// The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
	Minimum *int64 `form:"minimum"`
	// The starting unit amount which can be updated by the customer.
	Preset *int64 `form:"preset"`
}

When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.

type PriceCurrencyOptionsParams

type PriceCurrencyOptionsParams struct {
	// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
	CustomUnitAmount *PriceCurrencyOptionsCustomUnitAmountParams `form:"custom_unit_amount"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior *string `form:"tax_behavior"`
	// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
	Tiers []*PriceCurrencyOptionsTierParams `form:"tiers"`
	// A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

type PriceCurrencyOptionsTaxBehavior

type PriceCurrencyOptionsTaxBehavior string

Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.

const (
	PriceCurrencyOptionsTaxBehaviorExclusive   PriceCurrencyOptionsTaxBehavior = "exclusive"
	PriceCurrencyOptionsTaxBehaviorInclusive   PriceCurrencyOptionsTaxBehavior = "inclusive"
	PriceCurrencyOptionsTaxBehaviorUnspecified PriceCurrencyOptionsTaxBehavior = "unspecified"
)

List of values that PriceCurrencyOptionsTaxBehavior can take

type PriceCurrencyOptionsTier

type PriceCurrencyOptionsTier struct {
	// Price for the entire tier.
	FlatAmount int64 `json:"flat_amount"`
	// Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.
	FlatAmountDecimal float64 `json:"flat_amount_decimal,string"`
	// Per unit price for units relevant to the tier.
	UnitAmount int64 `json:"unit_amount"`
	// Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
	UnitAmountDecimal float64 `json:"unit_amount_decimal,string"`
	// Up to and including to this quantity will be contained in the tier.
	UpTo int64 `json:"up_to"`
}

Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.

type PriceCurrencyOptionsTierParams

type PriceCurrencyOptionsTierParams struct {
	// The flat billing amount for an entire tier, regardless of the number of units in the tier.
	FlatAmount *int64 `form:"flat_amount"`
	// Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
	FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"`
	// The per unit billing amount for each individual unit for which this tier applies.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
	// Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
	UpTo    *int64 `form:"up_to"`
	UpToInf *bool  `form:"-"` // See custom AppendTo
}

Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.

func (*PriceCurrencyOptionsTierParams) AppendTo

func (p *PriceCurrencyOptionsTierParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for PriceCurrencyOptionsTierParams.

type PriceCustomUnitAmount

type PriceCustomUnitAmount struct {
	// The maximum unit amount the customer can specify for this item.
	Maximum int64 `json:"maximum"`
	// The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
	Minimum int64 `json:"minimum"`
	// The starting unit amount which can be updated by the customer.
	Preset int64 `json:"preset"`
}

When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.

type PriceCustomUnitAmountParams

type PriceCustomUnitAmountParams struct {
	// Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
	Enabled *bool `form:"enabled"`
	// The maximum unit amount the customer can specify for this item.
	Maximum *int64 `form:"maximum"`
	// The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
	Minimum *int64 `form:"minimum"`
	// The starting unit amount which can be updated by the customer.
	Preset *int64 `form:"preset"`
}

When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.

type PriceList

type PriceList struct {
	APIResource
	ListMeta
	Data []*Price `json:"data"`
}

PriceList is a list of Prices as retrieved from a list endpoint.

type PriceListParams

type PriceListParams struct {
	ListParams `form:"*"`
	// Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices).
	Active *bool `form:"active"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	Created *int64 `form:"created"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return prices for the given currency.
	Currency *string `form:"currency"`
	// Only return the price with these lookup_keys, if any exist.
	LookupKeys []*string `form:"lookup_keys"`
	// Only return prices for the given product.
	Product *string `form:"product"`
	// Only return prices with these recurring fields.
	Recurring *PriceListRecurringParams `form:"recurring"`
	// Only return prices of type `recurring` or `one_time`.
	Type *string `form:"type"`
}

Returns a list of your prices.

type PriceListRecurringParams

type PriceListRecurringParams struct {
	// Filter by billing frequency. Either `day`, `week`, `month` or `year`.
	Interval *string `form:"interval"`
	// Filter by the usage type for this price. Can be either `metered` or `licensed`.
	UsageType *string `form:"usage_type"`
}

Only return prices with these recurring fields.

type PriceParams

type PriceParams struct {
	Params `form:"*"`
	// Whether the price can be used for new purchases. Defaults to `true`.
	Active *bool `form:"active"`
	// Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
	BillingScheme *string `form:"billing_scheme"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
	CurrencyOptions map[string]*PriceCurrencyOptionsParams `form:"currency_options"`
	// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
	CustomUnitAmount *PriceCustomUnitAmountParams `form:"custom_unit_amount"`
	// A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
	LookupKey *string `form:"lookup_key"`
	// A brief description of the price, hidden from customers.
	Nickname *string `form:"nickname"`
	// The ID of the product that this price will belong to.
	Product *string `form:"product"`
	// These fields can be used to create a new product that this price will belong to.
	ProductData *PriceProductDataParams `form:"product_data"`
	// The recurring components of a price such as `interval` and `usage_type`.
	Recurring *PriceRecurringParams `form:"recurring"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior *string `form:"tax_behavior"`
	// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
	Tiers []*PriceTierParams `form:"tiers"`
	// Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
	TiersMode *string `form:"tiers_mode"`
	// If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
	TransferLookupKey *bool `form:"transfer_lookup_key"`
	// Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
	TransformQuantity *PriceTransformQuantityParams `form:"transform_quantity"`
	// A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Creates a new price for an existing product. The price can be recurring or one-time.

type PriceProductDataParams

type PriceProductDataParams struct {
	// Whether the product is currently available for purchase. Defaults to `true`.
	Active *bool `form:"active"`
	// The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
	ID *string `form:"id"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// The product's name, meant to be displayable to the customer.
	Name *string `form:"name"`
	// An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
	//
	// This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
	StatementDescriptor *string `form:"statement_descriptor"`
	// A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
	TaxCode *string `form:"tax_code"`
	// A label that represents units of this product in Stripe and on customers' receipts and invoices. When set, this will be included in associated invoice line item descriptions.
	UnitLabel *string `form:"unit_label"`
}

These fields can be used to create a new product that this price will belong to.

type PriceRecurring

type PriceRecurring struct {
	// Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.
	AggregateUsage PriceRecurringAggregateUsage `json:"aggregate_usage"`
	// The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
	Interval PriceRecurringInterval `json:"interval"`
	// The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
	IntervalCount int64 `json:"interval_count"`
	// Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
	TrialPeriodDays int64 `json:"trial_period_days"`
	// Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
	UsageType PriceRecurringUsageType `json:"usage_type"`
}

The recurring components of a price such as `interval` and `usage_type`.

type PriceRecurringAggregateUsage

type PriceRecurringAggregateUsage string

Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.

const (
	PriceRecurringAggregateUsageLastDuringPeriod PriceRecurringAggregateUsage = "last_during_period"
	PriceRecurringAggregateUsageLastEver         PriceRecurringAggregateUsage = "last_ever"
	PriceRecurringAggregateUsageMax              PriceRecurringAggregateUsage = "max"
	PriceRecurringAggregateUsageSum              PriceRecurringAggregateUsage = "sum"
)

List of values that PriceRecurringAggregateUsage can take

type PriceRecurringInterval

type PriceRecurringInterval string

The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.

const (
	PriceRecurringIntervalDay   PriceRecurringInterval = "day"
	PriceRecurringIntervalMonth PriceRecurringInterval = "month"
	PriceRecurringIntervalWeek  PriceRecurringInterval = "week"
	PriceRecurringIntervalYear  PriceRecurringInterval = "year"
)

List of values that PriceRecurringInterval can take

type PriceRecurringParams

type PriceRecurringParams struct {
	// Specifies a usage aggregation strategy for prices of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.
	AggregateUsage *string `form:"aggregate_usage"`
	// Specifies billing frequency. Either `day`, `week`, `month` or `year`.
	Interval *string `form:"interval"`
	// The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
	IntervalCount *int64 `form:"interval_count"`
	// Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
	TrialPeriodDays *int64 `form:"trial_period_days"`
	// Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
	UsageType *string `form:"usage_type"`
}

The recurring components of a price such as `interval` and `usage_type`.

type PriceRecurringUsageType

type PriceRecurringUsageType string

Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.

const (
	PriceRecurringUsageTypeLicensed PriceRecurringUsageType = "licensed"
	PriceRecurringUsageTypeMetered  PriceRecurringUsageType = "metered"
)

List of values that PriceRecurringUsageType can take

type PriceSearchParams

type PriceSearchParams struct {
	SearchParams `form:"*"`
	// A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
	Page *string `form:"page"`
}

Search for prices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

type PriceSearchResult

type PriceSearchResult struct {
	APIResource
	SearchMeta
	Data []*Price `json:"data"`
}

PriceSearchResult is a list of Price search results as retrieved from a search endpoint.

type PriceTaxBehavior

type PriceTaxBehavior string

Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.

const (
	PriceTaxBehaviorExclusive   PriceTaxBehavior = "exclusive"
	PriceTaxBehaviorInclusive   PriceTaxBehavior = "inclusive"
	PriceTaxBehaviorUnspecified PriceTaxBehavior = "unspecified"
)

List of values that PriceTaxBehavior can take

type PriceTier

type PriceTier struct {
	// Price for the entire tier.
	FlatAmount int64 `json:"flat_amount"`
	// Same as `flat_amount`, but contains a decimal value with at most 12 decimal places.
	FlatAmountDecimal float64 `json:"flat_amount_decimal,string"`
	// Per unit price for units relevant to the tier.
	UnitAmount int64 `json:"unit_amount"`
	// Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
	UnitAmountDecimal float64 `json:"unit_amount_decimal,string"`
	// Up to and including to this quantity will be contained in the tier.
	UpTo int64 `json:"up_to"`
}

Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.

type PriceTierParams

type PriceTierParams struct {
	// The flat billing amount for an entire tier, regardless of the number of units in the tier.
	FlatAmount *int64 `form:"flat_amount"`
	// Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
	FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"`
	// The per unit billing amount for each individual unit for which this tier applies.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
	// Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
	UpTo    *int64 `form:"up_to"`
	UpToInf *bool  `form:"-"` // See custom AppendTo
}

Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.

func (*PriceTierParams) AppendTo

func (p *PriceTierParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for PriceTierParams.

type PriceTiersMode

type PriceTiersMode string

Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.

const (
	PriceTiersModeGraduated PriceTiersMode = "graduated"
	PriceTiersModeVolume    PriceTiersMode = "volume"
)

List of values that PriceTiersMode can take

type PriceTransformQuantity

type PriceTransformQuantity struct {
	// Divide usage by this number.
	DivideBy int64 `json:"divide_by"`
	// After division, either round the result `up` or `down`.
	Round PriceTransformQuantityRound `json:"round"`
}

Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.

type PriceTransformQuantityParams

type PriceTransformQuantityParams struct {
	// Divide usage by this number.
	DivideBy *int64 `form:"divide_by"`
	// After division, either round the result `up` or `down`.
	Round *string `form:"round"`
}

Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.

type PriceTransformQuantityRound

type PriceTransformQuantityRound string

After division, either round the result `up` or `down`.

const (
	PriceTransformQuantityRoundDown PriceTransformQuantityRound = "down"
	PriceTransformQuantityRoundUp   PriceTransformQuantityRound = "up"
)

List of values that PriceTransformQuantityRound can take

type PriceType

type PriceType string

One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.

const (
	PriceTypeOneTime   PriceType = "one_time"
	PriceTypeRecurring PriceType = "recurring"
)

List of values that PriceType can take

type Product

type Product struct {
	APIResource
	// Whether the product is currently available for purchase.
	Active bool `json:"active"`
	// A list of up to 5 attributes that each SKU can provide values for (e.g., `["color", "size"]`).
	Attributes []string `json:"attributes"`
	// A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of `type=good`.
	Caption string `json:"caption"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// An array of connect application identifiers that cannot purchase this product. Only applicable to products of `type=good`.
	DeactivateOn []string `json:"deactivate_on"`
	// The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
	DefaultPrice *Price `json:"default_price"`
	Deleted      bool   `json:"deleted"`
	// The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
	Description string `json:"description"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
	Images []string `json:"images"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// The product's name, meant to be displayable to the customer.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The dimensions of this product for shipping purposes.
	PackageDimensions *ProductPackageDimensions `json:"package_dimensions"`
	// Whether this product is shipped (i.e., physical goods).
	Shippable bool `json:"shippable"`
	// Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used.
	StatementDescriptor string `json:"statement_descriptor"`
	// A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
	TaxCode *TaxCode `json:"tax_code"`
	// The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans.
	Type ProductType `json:"type"`
	// A label that represents units of this product in Stripe and on customers' receipts and invoices. When set, this will be included in associated invoice line item descriptions.
	UnitLabel string `json:"unit_label"`
	// Time at which the object was last updated. Measured in seconds since the Unix epoch.
	Updated int64 `json:"updated"`
	// A URL of a publicly-accessible webpage for this product.
	URL string `json:"url"`
}

Products describe the specific goods or services you offer to your customers. For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions.

Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [share a Payment Link](https://stripe.com/docs/payments/payment-links/overview), [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), and more about [Products and Prices](https://stripe.com/docs/products-prices/overview)

func (*Product) UnmarshalJSON

func (p *Product) UnmarshalJSON(data []byte) error

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.

type ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountParams

type ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountParams struct {
	// Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
	Enabled *bool `form:"enabled"`
	// The maximum unit amount the customer can specify for this item.
	Maximum *int64 `form:"maximum"`
	// The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
	Minimum *int64 `form:"minimum"`
	// The starting unit amount which can be updated by the customer.
	Preset *int64 `form:"preset"`
}

When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.

type ProductDefaultPriceDataCurrencyOptionsParams

type ProductDefaultPriceDataCurrencyOptionsParams struct {
	// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
	CustomUnitAmount *ProductDefaultPriceDataCurrencyOptionsCustomUnitAmountParams `form:"custom_unit_amount"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior *string `form:"tax_behavior"`
	// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
	Tiers []*ProductDefaultPriceDataCurrencyOptionsTierParams `form:"tiers"`
	// A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

type ProductDefaultPriceDataCurrencyOptionsTierParams

type ProductDefaultPriceDataCurrencyOptionsTierParams struct {
	// The flat billing amount for an entire tier, regardless of the number of units in the tier.
	FlatAmount *int64 `form:"flat_amount"`
	// Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
	FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"`
	// The per unit billing amount for each individual unit for which this tier applies.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
	// Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
	UpTo    *int64 `form:"up_to"`
	UpToInf *bool  `form:"-"` // See custom AppendTo
}

Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.

func (*ProductDefaultPriceDataCurrencyOptionsTierParams) AppendTo

func (p *ProductDefaultPriceDataCurrencyOptionsTierParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for ProductDefaultPriceDataCurrencyOptionsTierParams.

type ProductDefaultPriceDataParams

type ProductDefaultPriceDataParams struct {
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
	CurrencyOptions map[string]*ProductDefaultPriceDataCurrencyOptionsParams `form:"currency_options"`
	// The recurring components of a price such as `interval` and `interval_count`.
	Recurring *ProductDefaultPriceDataRecurringParams `form:"recurring"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior *string `form:"tax_behavior"`
	// A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Data used to generate a new Price(https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.

type ProductDefaultPriceDataRecurringParams

type ProductDefaultPriceDataRecurringParams struct {
	// Specifies billing frequency. Either `day`, `week`, `month` or `year`.
	Interval *string `form:"interval"`
	// The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
	IntervalCount *int64 `form:"interval_count"`
}

The recurring components of a price such as `interval` and `interval_count`.

type ProductList

type ProductList struct {
	APIResource
	ListMeta
	Data []*Product `json:"data"`
}

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

type ProductListParams

type ProductListParams struct {
	ListParams `form:"*"`
	// Only return products that are active or inactive (e.g., pass `false` to list all inactive products).
	Active *bool `form:"active"`
	// Only return products that were created during the given date interval.
	Created *int64 `form:"created"`
	// Only return products that were created during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before).
	IDs []*string `form:"ids"`
	// Only return products that can be shipped (i.e., physical, not digital products).
	Shippable *bool `form:"shippable"`
	// Only return products of this type.
	Type *string `form:"type"`
	// Only return products with the given url.
	URL *string `form:"url"`
}

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

type ProductPackageDimensions

type ProductPackageDimensions struct {
	// Height, in inches.
	Height float64 `json:"height"`
	// Length, in inches.
	Length float64 `json:"length"`
	// Weight, in ounces.
	Weight float64 `json:"weight"`
	// Width, in inches.
	Width float64 `json:"width"`
}

The dimensions of this product for shipping purposes.

type ProductPackageDimensionsParams

type ProductPackageDimensionsParams struct {
	// Height, in inches. Maximum precision is 2 decimal places.
	Height *float64 `form:"height"`
	// Length, in inches. Maximum precision is 2 decimal places.
	Length *float64 `form:"length"`
	// Weight, in ounces. Maximum precision is 2 decimal places.
	Weight *float64 `form:"weight"`
	// Width, in inches. Maximum precision is 2 decimal places.
	Width *float64 `form:"width"`
}

The dimensions of this product for shipping purposes.

type ProductParams

type ProductParams struct {
	Params `form:"*"`
	// Whether the product is available for purchase.
	Active *bool `form:"active"`
	// A list of up to 5 alphanumeric attributes that each SKU can provide values for (e.g., `["color", "size"]`). If a value for `attributes` is specified, the list specified will replace the existing attributes list on this product. Any attributes not present after the update will be deleted from the SKUs for this product.
	Attributes []*string `form:"attributes"`
	// A short one-line description of the product, meant to be displayable to the customer. May only be set if `type=good`.
	Caption *string `form:"caption"`
	// An array of Connect application names or identifiers that should not be able to order the SKUs for this product. May only be set if `type=good`.
	DeactivateOn []*string `form:"deactivate_on"`
	// The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
	DefaultPrice *string `form:"default_price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.
	DefaultPriceData *ProductDefaultPriceDataParams `form:"default_price_data"`
	// The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
	Description *string `form:"description"`
	// An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.
	ID *string `form:"id"`
	// A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
	Images []*string `form:"images"`
	// The product's name, meant to be displayable to the customer.
	Name *string `form:"name"`
	// The dimensions of this product for shipping purposes.
	PackageDimensions *ProductPackageDimensionsParams `form:"package_dimensions"`
	// Whether this product is shipped (i.e., physical goods).
	Shippable *bool `form:"shippable"`
	// An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
	//
	// This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
	//  It must contain at least one letter. May only be set if `type=service`.
	StatementDescriptor *string `form:"statement_descriptor"`
	// A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
	TaxCode *string `form:"tax_code"`
	// The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons.
	Type *string `form:"type"`
	// A label that represents units of this product in Stripe and on customers' receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`.
	UnitLabel *string `form:"unit_label"`
	// A URL of a publicly-accessible webpage for this product.
	URL *string `form:"url"`
}

Creates a new product object.

type ProductSearchParams

type ProductSearchParams struct {
	SearchParams `form:"*"`
	// A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
	Page *string `form:"page"`
}

Search for products you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

type ProductSearchResult

type ProductSearchResult struct {
	APIResource
	SearchMeta
	Data []*Product `json:"data"`
}

ProductSearchResult is a list of Product search results as retrieved from a search endpoint.

type ProductType

type ProductType string

The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans.

const (
	ProductTypeGood    ProductType = "good"
	ProductTypeService ProductType = "service"
)

List of values that ProductType can take

type PromotionCode

type PromotionCode struct {
	APIResource
	// Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.
	Active bool `json:"active"`
	// The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer.
	Code string `json:"code"`
	// A coupon contains information about a percent-off or amount-off discount you
	// might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
	// [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
	Coupon *Coupon `json:"coupon"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The customer that this promotion code can be used by.
	Customer *Customer `json:"customer"`
	// Date at which the promotion code can no longer be redeemed.
	ExpiresAt int64 `json:"expires_at"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Maximum number of times this promotion code can be redeemed.
	MaxRedemptions int64 `json:"max_redemptions"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object       string                     `json:"object"`
	Restrictions *PromotionCodeRestrictions `json:"restrictions"`
	// Number of times this promotion code has been used.
	TimesRedeemed int64 `json:"times_redeemed"`
}

A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to create multiple codes for a single coupon.

func (*PromotionCode) UnmarshalJSON

func (p *PromotionCode) UnmarshalJSON(data []byte) error

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

type PromotionCodeList

type PromotionCodeList struct {
	APIResource
	ListMeta
	Data []*PromotionCode `json:"data"`
}

PromotionCodeList is a list of PromotionCodes as retrieved from a list endpoint.

type PromotionCodeListParams

type PromotionCodeListParams struct {
	ListParams `form:"*"`
	// Filter promotion codes by whether they are active.
	Active *bool `form:"active"`
	// Only return promotion codes that have this case-insensitive code.
	Code *string `form:"code"`
	// Only return promotion codes for this coupon.
	Coupon *string `form:"coupon"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	Created *int64 `form:"created"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return promotion codes that are restricted to this customer.
	Customer *string `form:"customer"`
}

Returns a list of your promotion codes.

type PromotionCodeParams

type PromotionCodeParams struct {
	Params `form:"*"`
	// Whether the promotion code is currently active.
	Active *bool `form:"active"`
	// The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically.
	Code *string `form:"code"`
	// The coupon for this promotion code.
	Coupon *string `form:"coupon"`
	// The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.
	Customer *string `form:"customer"`
	// The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.
	ExpiresAt *int64 `form:"expires_at"`
	// A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`.
	MaxRedemptions *int64 `form:"max_redemptions"`
	// Settings that restrict the redemption of the promotion code.
	Restrictions *PromotionCodeRestrictionsParams `form:"restrictions"`
}

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired code.

type PromotionCodeRestrictions

type PromotionCodeRestrictions struct {
	// Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
	CurrencyOptions map[string]*PromotionCodeRestrictionsCurrencyOptions `json:"currency_options"`
	// A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices
	FirstTimeTransaction bool `json:"first_time_transaction"`
	// Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
	MinimumAmount int64 `json:"minimum_amount"`
	// Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount
	MinimumAmountCurrency Currency `json:"minimum_amount_currency"`
}

type PromotionCodeRestrictionsCurrencyOptions

type PromotionCodeRestrictionsCurrencyOptions struct {
	// Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
	MinimumAmount int64 `json:"minimum_amount"`
}

Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

type PromotionCodeRestrictionsCurrencyOptionsParams

type PromotionCodeRestrictionsCurrencyOptionsParams struct {
	// Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
	MinimumAmount *int64 `form:"minimum_amount"`
}

Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

type PromotionCodeRestrictionsParams

type PromotionCodeRestrictionsParams struct {
	// Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
	CurrencyOptions map[string]*PromotionCodeRestrictionsCurrencyOptionsParams `form:"currency_options"`
	// A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices
	FirstTimeTransaction *bool `form:"first_time_transaction"`
	// Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
	MinimumAmount *int64 `form:"minimum_amount"`
	// Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount
	MinimumAmountCurrency *string `form:"minimum_amount_currency"`
}

Settings that restrict the redemption of the promotion code.

type Query

type Query func(*Params, *form.Values) ([]interface{}, ListContainer, error)

Query is the function used to get a page listing.

type Quote

type Quote struct {
	APIResource
	// Total before any discounts or taxes are applied.
	AmountSubtotal int64 `json:"amount_subtotal"`
	// Total after discounts and taxes are applied.
	AmountTotal int64 `json:"amount_total"`
	// ID of the Connect Application that created the quote.
	Application *Application `json:"application"`
	// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.
	ApplicationFeeAmount int64 `json:"application_fee_amount"`
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.
	ApplicationFeePercent float64            `json:"application_fee_percent"`
	AutomaticTax          *QuoteAutomaticTax `json:"automatic_tax"`
	// Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`.
	CollectionMethod QuoteCollectionMethod `json:"collection_method"`
	Computed         *QuoteComputed        `json:"computed"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
	Customer *Customer `json:"customer"`
	// The tax rates applied to this quote.
	DefaultTaxRates []*TaxRate `json:"default_tax_rates"`
	// A description that will be displayed on the quote PDF.
	Description string `json:"description"`
	// The discounts applied to this quote.
	Discounts []*Discount `json:"discounts"`
	// The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
	ExpiresAt int64 `json:"expires_at"`
	// A footer that will be displayed on the quote PDF.
	Footer string `json:"footer"`
	// Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.
	FromQuote *QuoteFromQuote `json:"from_quote"`
	// A header that will be displayed on the quote PDF.
	Header string `json:"header"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The invoice that was created from this quote.
	Invoice *Invoice `json:"invoice"`
	// All invoices will be billed using the specified settings.
	InvoiceSettings *QuoteInvoiceSettings `json:"invoice_settings"`
	// A list of items the customer is being quoted for.
	LineItems *LineItemList `json:"line_items"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).
	Number string `json:"number"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.
	OnBehalfOf *Account `json:"on_behalf_of"`
	// The status of the quote.
	Status            QuoteStatus             `json:"status"`
	StatusTransitions *QuoteStatusTransitions `json:"status_transitions"`
	// The subscription that was created or updated from this quote.
	Subscription     *Subscription          `json:"subscription"`
	SubscriptionData *QuoteSubscriptionData `json:"subscription_data"`
	// The subscription schedule that was created or updated from this quote.
	SubscriptionSchedule *SubscriptionSchedule `json:"subscription_schedule"`
	// ID of the test clock this quote belongs to.
	TestClock    *TestHelpersTestClock `json:"test_clock"`
	TotalDetails *QuoteTotalDetails    `json:"total_details"`
	// The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
	TransferData *QuoteTransferData `json:"transfer_data"`
}

A Quote is a way to model prices that you'd like to provide to a customer. Once accepted, it will automatically create an invoice, subscription or subscription schedule.

func (*Quote) UnmarshalJSON

func (q *Quote) UnmarshalJSON(data []byte) error

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

type QuoteAcceptParams

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

Accepts the specified quote.

type QuoteAutomaticTax

type QuoteAutomaticTax struct {
	// Automatically calculate taxes
	Enabled bool `json:"enabled"`
	// The status of the most recent automated tax calculation for this quote.
	Status QuoteAutomaticTaxStatus `json:"status"`
}

type QuoteAutomaticTaxParams

type QuoteAutomaticTaxParams struct {
	// Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
	Enabled *bool `form:"enabled"`
}

Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.

type QuoteAutomaticTaxStatus

type QuoteAutomaticTaxStatus string

The status of the most recent automated tax calculation for this quote.

const (
	QuoteAutomaticTaxStatusComplete               QuoteAutomaticTaxStatus = "complete"
	QuoteAutomaticTaxStatusFailed                 QuoteAutomaticTaxStatus = "failed"
	QuoteAutomaticTaxStatusRequiresLocationInputs QuoteAutomaticTaxStatus = "requires_location_inputs"
)

List of values that QuoteAutomaticTaxStatus can take

type QuoteCancelParams

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

Cancels the quote.

type QuoteCollectionMethod

type QuoteCollectionMethod string

Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`.

const (
	QuoteCollectionMethodChargeAutomatically QuoteCollectionMethod = "charge_automatically"
	QuoteCollectionMethodSendInvoice         QuoteCollectionMethod = "send_invoice"
)

List of values that QuoteCollectionMethod can take

type QuoteComputed

type QuoteComputed struct {
	// The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
	Recurring *QuoteComputedRecurring `json:"recurring"`
	Upfront   *QuoteComputedUpfront   `json:"upfront"`
}

type QuoteComputedRecurring

type QuoteComputedRecurring struct {
	// Total before any discounts or taxes are applied.
	AmountSubtotal int64 `json:"amount_subtotal"`
	// Total after discounts and taxes are applied.
	AmountTotal int64 `json:"amount_total"`
	// The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
	Interval QuoteComputedRecurringInterval `json:"interval"`
	// The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
	IntervalCount int64                               `json:"interval_count"`
	TotalDetails  *QuoteComputedRecurringTotalDetails `json:"total_details"`
}

The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.

type QuoteComputedRecurringInterval

type QuoteComputedRecurringInterval string

The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.

const (
	QuoteComputedRecurringIntervalDay   QuoteComputedRecurringInterval = "day"
	QuoteComputedRecurringIntervalMonth QuoteComputedRecurringInterval = "month"
	QuoteComputedRecurringIntervalWeek  QuoteComputedRecurringInterval = "week"
	QuoteComputedRecurringIntervalYear  QuoteComputedRecurringInterval = "year"
)

List of values that QuoteComputedRecurringInterval can take

type QuoteComputedRecurringTotalDetails

type QuoteComputedRecurringTotalDetails struct {
	// This is the sum of all the discounts.
	AmountDiscount int64 `json:"amount_discount"`
	// This is the sum of all the shipping amounts.
	AmountShipping int64 `json:"amount_shipping"`
	// This is the sum of all the tax amounts.
	AmountTax int64                                        `json:"amount_tax"`
	Breakdown *QuoteComputedRecurringTotalDetailsBreakdown `json:"breakdown"`
}

type QuoteComputedRecurringTotalDetailsBreakdown

type QuoteComputedRecurringTotalDetailsBreakdown struct {
	// The aggregated discounts.
	Discounts []*QuoteComputedRecurringTotalDetailsBreakdownDiscount `json:"discounts"`
	// The aggregated tax amounts by rate.
	Taxes []*QuoteComputedRecurringTotalDetailsBreakdownTax `json:"taxes"`
}

type QuoteComputedRecurringTotalDetailsBreakdownDiscount

type QuoteComputedRecurringTotalDetailsBreakdownDiscount struct {
	// The amount discounted.
	Amount int64 `json:"amount"`
	// A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
	// It contains information about when the discount began, when it will end, and what it is applied to.
	//
	// Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
	Discount *Discount `json:"discount"`
}

The aggregated discounts.

type QuoteComputedRecurringTotalDetailsBreakdownTax

type QuoteComputedRecurringTotalDetailsBreakdownTax struct {
	// Amount of tax applied for this rate.
	Amount int64 `json:"amount"`
	// Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
	//
	// Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).
	Rate *TaxRate `json:"rate"`
}

The aggregated tax amounts by rate.

type QuoteComputedUpfront

type QuoteComputedUpfront struct {
	// Total before any discounts or taxes are applied.
	AmountSubtotal int64 `json:"amount_subtotal"`
	// Total after discounts and taxes are applied.
	AmountTotal int64 `json:"amount_total"`
	// The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.
	LineItems    *LineItemList                     `json:"line_items"`
	TotalDetails *QuoteComputedUpfrontTotalDetails `json:"total_details"`
}

type QuoteComputedUpfrontTotalDetails

type QuoteComputedUpfrontTotalDetails struct {
	// This is the sum of all the discounts.
	AmountDiscount int64 `json:"amount_discount"`
	// This is the sum of all the shipping amounts.
	AmountShipping int64 `json:"amount_shipping"`
	// This is the sum of all the tax amounts.
	AmountTax int64                                      `json:"amount_tax"`
	Breakdown *QuoteComputedUpfrontTotalDetailsBreakdown `json:"breakdown"`
}

type QuoteComputedUpfrontTotalDetailsBreakdown

type QuoteComputedUpfrontTotalDetailsBreakdown struct {
	// The aggregated discounts.
	Discounts []*QuoteComputedUpfrontTotalDetailsBreakdownDiscount `json:"discounts"`
	// The aggregated tax amounts by rate.
	Taxes []*QuoteComputedUpfrontTotalDetailsBreakdownTax `json:"taxes"`
}

type QuoteComputedUpfrontTotalDetailsBreakdownDiscount

type QuoteComputedUpfrontTotalDetailsBreakdownDiscount struct {
	// The amount discounted.
	Amount int64 `json:"amount"`
	// A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
	// It contains information about when the discount began, when it will end, and what it is applied to.
	//
	// Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
	Discount *Discount `json:"discount"`
}

The aggregated discounts.

type QuoteComputedUpfrontTotalDetailsBreakdownTax

type QuoteComputedUpfrontTotalDetailsBreakdownTax struct {
	// Amount of tax applied for this rate.
	Amount int64 `json:"amount"`
	// Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
	//
	// Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).
	Rate *TaxRate `json:"rate"`
}

The aggregated tax amounts by rate.

type QuoteDiscountParams

type QuoteDiscountParams struct {
	// ID of the coupon to create a new discount for.
	Coupon *string `form:"coupon"`
	// ID of an existing discount on the object (or one of its ancestors) to reuse.
	Discount *string `form:"discount"`
}

The discounts applied to the quote. You can only set up to one discount.

type QuoteFinalizeQuoteParams

type QuoteFinalizeQuoteParams struct {
	Params `form:"*"`
	// A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
	ExpiresAt *int64 `form:"expires_at"`
}

Finalizes the quote.

type QuoteFromQuote

type QuoteFromQuote struct {
	// Whether this quote is a revision of a different quote.
	IsRevision bool `json:"is_revision"`
	// The quote that was cloned.
	Quote *Quote `json:"quote"`
}

Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.

type QuoteFromQuoteParams

type QuoteFromQuoteParams struct {
	// Whether this quote is a revision of the previous quote.
	IsRevision *bool `form:"is_revision"`
	// The `id` of the quote that will be cloned.
	Quote *string `form:"quote"`
}

Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.

type QuoteInvoiceSettings

type QuoteInvoiceSettings struct {
	// Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
	DaysUntilDue int64 `json:"days_until_due"`
}

All invoices will be billed using the specified settings.

type QuoteInvoiceSettingsParams

type QuoteInvoiceSettingsParams struct {
	// Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
	DaysUntilDue *int64 `form:"days_until_due"`
}

All invoices will be billed using the specified settings.

type QuoteLineItemParams

type QuoteLineItemParams struct {
	// The ID of an existing line item on the quote.
	ID *string `form:"id"`
	// The ID of the price object. One of `price` or `price_data` is required.
	Price *string `form:"price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
	PriceData *QuoteLineItemPriceDataParams `form:"price_data"`
	// The quantity of the line item.
	Quantity *int64 `form:"quantity"`
	// The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
	TaxRates []*string `form:"tax_rates"`
}

A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.

type QuoteLineItemPriceDataParams

type QuoteLineItemPriceDataParams struct {
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// The ID of the product that this price will belong to.
	Product *string `form:"product"`
	// The recurring components of a price such as `interval` and `interval_count`.
	Recurring *QuoteLineItemPriceDataRecurringParams `form:"recurring"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior *string `form:"tax_behavior"`
	// A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.

type QuoteLineItemPriceDataRecurringParams

type QuoteLineItemPriceDataRecurringParams struct {
	// Specifies billing frequency. Either `day`, `week`, `month` or `year`.
	Interval *string `form:"interval"`
	// The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
	IntervalCount *int64 `form:"interval_count"`
}

The recurring components of a price such as `interval` and `interval_count`.

type QuoteList

type QuoteList struct {
	APIResource
	ListMeta
	Data []*Quote `json:"data"`
}

QuoteList is a list of Quotes as retrieved from a list endpoint.

type QuoteListComputedUpfrontLineItemsParams

type QuoteListComputedUpfrontLineItemsParams struct {
	ListParams `form:"*"`
	Quote      *string `form:"-"` // Included in URL
}

When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

type QuoteListLineItemsParams

type QuoteListLineItemsParams struct {
	ListParams `form:"*"`
	Quote      *string `form:"-"` // Included in URL
}

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

type QuoteListParams

type QuoteListParams struct {
	ListParams `form:"*"`
	// The ID of the customer whose quotes will be retrieved.
	Customer *string `form:"customer"`
	// The status of the quote.
	Status *string `form:"status"`
	// Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set.
	TestClock *string `form:"test_clock"`
}

Returns a list of your quotes.

type QuotePDFParams

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

Download the PDF for a finalized quote

type QuoteParams

type QuoteParams struct {
	Params `form:"*"`
	// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
	ApplicationFeeAmount *int64 `form:"application_fee_amount"`
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
	ApplicationFeePercent *float64 `form:"application_fee_percent"`
	// Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
	AutomaticTax *QuoteAutomaticTaxParams `form:"automatic_tax"`
	// Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`.
	CollectionMethod *string `form:"collection_method"`
	// The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
	Customer *string `form:"customer"`
	// The tax rates that will apply to any line item that does not have `tax_rates` set.
	DefaultTaxRates []*string `form:"default_tax_rates"`
	// A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
	Description *string `form:"description"`
	// The discounts applied to the quote. You can only set up to one discount.
	Discounts []*QuoteDiscountParams `form:"discounts"`
	// A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
	ExpiresAt *int64 `form:"expires_at"`
	// A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
	Footer *string `form:"footer"`
	// Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.
	FromQuote *QuoteFromQuoteParams `form:"from_quote"`
	// A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
	Header *string `form:"header"`
	// All invoices will be billed using the specified settings.
	InvoiceSettings *QuoteInvoiceSettingsParams `form:"invoice_settings"`
	// A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
	LineItems []*QuoteLineItemParams `form:"line_items"`
	// The account on behalf of which to charge.
	OnBehalfOf *string `form:"on_behalf_of"`
	// When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
	SubscriptionData *QuoteSubscriptionDataParams `form:"subscription_data"`
	// ID of the test clock to attach to the quote.
	TestClock *string `form:"test_clock"`
	// The data with which to automatically create a Transfer for each of the invoices.
	TransferData *QuoteTransferDataParams `form:"transfer_data"`
}

Retrieves the quote with the given ID.

type QuoteStatus

type QuoteStatus string

The status of the quote.

const (
	QuoteStatusAccepted QuoteStatus = "accepted"
	QuoteStatusCanceled QuoteStatus = "canceled"
	QuoteStatusDraft    QuoteStatus = "draft"
	QuoteStatusOpen     QuoteStatus = "open"
)

List of values that QuoteStatus can take

type QuoteStatusTransitions

type QuoteStatusTransitions struct {
	// The time that the quote was accepted. Measured in seconds since Unix epoch.
	AcceptedAt int64 `json:"accepted_at"`
	// The time that the quote was canceled. Measured in seconds since Unix epoch.
	CanceledAt int64 `json:"canceled_at"`
	// The time that the quote was finalized. Measured in seconds since Unix epoch.
	FinalizedAt int64 `json:"finalized_at"`
}

type QuoteSubscriptionData

type QuoteSubscriptionData struct {
	// The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
	Description string `json:"description"`
	// When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
	EffectiveDate int64 `json:"effective_date"`
	// Integer representing the number of trial period days before the customer is charged for the first time.
	TrialPeriodDays int64 `json:"trial_period_days"`
}

type QuoteSubscriptionDataParams

type QuoteSubscriptionDataParams struct {
	// The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
	Description *string `form:"description"`
	// When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
	EffectiveDate                 *int64 `form:"effective_date"`
	EffectiveDateCurrentPeriodEnd *bool  `form:"-"` // See custom AppendTo
	// Integer representing the number of trial period days before the customer is charged for the first time.
	TrialPeriodDays *int64 `form:"trial_period_days"`
}

When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.

func (*QuoteSubscriptionDataParams) AppendTo

func (q *QuoteSubscriptionDataParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for QuoteSubscriptionDataParams.

type QuoteTotalDetails

type QuoteTotalDetails struct {
	// This is the sum of all the discounts.
	AmountDiscount int64 `json:"amount_discount"`
	// This is the sum of all the shipping amounts.
	AmountShipping int64 `json:"amount_shipping"`
	// This is the sum of all the tax amounts.
	AmountTax int64                       `json:"amount_tax"`
	Breakdown *QuoteTotalDetailsBreakdown `json:"breakdown"`
}

type QuoteTotalDetailsBreakdown

type QuoteTotalDetailsBreakdown struct {
	// The aggregated discounts.
	Discounts []*QuoteTotalDetailsBreakdownDiscount `json:"discounts"`
	// The aggregated tax amounts by rate.
	Taxes []*QuoteTotalDetailsBreakdownTax `json:"taxes"`
}

type QuoteTotalDetailsBreakdownDiscount

type QuoteTotalDetailsBreakdownDiscount struct {
	// The amount discounted.
	Amount int64 `json:"amount"`
	// A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
	// It contains information about when the discount began, when it will end, and what it is applied to.
	//
	// Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
	Discount *Discount `json:"discount"`
}

The aggregated discounts.

type QuoteTotalDetailsBreakdownTax

type QuoteTotalDetailsBreakdownTax struct {
	// Amount of tax applied for this rate.
	Amount int64 `json:"amount"`
	// Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
	//
	// Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).
	Rate *TaxRate `json:"rate"`
}

The aggregated tax amounts by rate.

type QuoteTransferData

type QuoteTransferData struct {
	// The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.
	Amount int64 `json:"amount"`
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount will be transferred to the destination.
	AmountPercent float64 `json:"amount_percent"`
	// The account where funds from the payment will be transferred to upon payment success.
	Destination *Account `json:"destination"`
}

The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.

type QuoteTransferDataParams

type QuoteTransferDataParams struct {
	// The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
	Amount *int64 `form:"amount"`
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
	AmountPercent *float64 `form:"amount_percent"`
	// ID of an existing, connected Stripe account.
	Destination *string `form:"destination"`
}

The data with which to automatically create a Transfer for each of the invoices.

type RadarEarlyFraudWarning

type RadarEarlyFraudWarning struct {
	APIResource
	// An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later.
	Actionable bool `json:"actionable"`
	// ID of the charge this early fraud warning is for, optionally expanded.
	Charge *Charge `json:"charge"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`.
	FraudType RadarEarlyFraudWarningFraudType `json:"fraud_type"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// ID of the Payment Intent this early fraud warning is for, optionally expanded.
	PaymentIntent *PaymentIntent `json:"payment_intent"`
}

An early fraud warning indicates that the card issuer has notified us that a charge may be fraudulent.

Related guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings).

type RadarEarlyFraudWarningFraudType

type RadarEarlyFraudWarningFraudType string

The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`.

const (
	RadarEarlyFraudWarningFraudTypeCardNeverReceived         RadarEarlyFraudWarningFraudType = "card_never_received"
	RadarEarlyFraudWarningFraudTypeFraudulentCardApplication RadarEarlyFraudWarningFraudType = "fraudulent_card_application"
	RadarEarlyFraudWarningFraudTypeMadeWithCounterfeitCard   RadarEarlyFraudWarningFraudType = "made_with_counterfeit_card"
	RadarEarlyFraudWarningFraudTypeMadeWithLostCard          RadarEarlyFraudWarningFraudType = "made_with_lost_card"
	RadarEarlyFraudWarningFraudTypeMadeWithStolenCard        RadarEarlyFraudWarningFraudType = "made_with_stolen_card"
	RadarEarlyFraudWarningFraudTypeMisc                      RadarEarlyFraudWarningFraudType = "misc"
	RadarEarlyFraudWarningFraudTypeUnauthorizedUseOfCard     RadarEarlyFraudWarningFraudType = "unauthorized_use_of_card"
)

List of values that RadarEarlyFraudWarningFraudType can take

type RadarEarlyFraudWarningList

type RadarEarlyFraudWarningList struct {
	APIResource
	ListMeta
	Data []*RadarEarlyFraudWarning `json:"data"`
}

RadarEarlyFraudWarningList is a list of EarlyFraudWarnings as retrieved from a list endpoint.

type RadarEarlyFraudWarningListParams

type RadarEarlyFraudWarningListParams struct {
	ListParams `form:"*"`
	// Only return early fraud warnings for the charge specified by this charge ID.
	Charge *string `form:"charge"`
	// Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID.
	PaymentIntent *string `form:"payment_intent"`
}

Returns a list of early fraud warnings.

type RadarEarlyFraudWarningParams

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

Retrieves the details of an early fraud warning that has previously been created.

Please refer to the [early fraud warning](https://stripe.com/docs/api#early_fraud_warning_object) object reference for more details.

type RadarValueList

type RadarValueList struct {
	APIResource
	// The name of the value list for use in rules.
	Alias string `json:"alias"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The name or email address of the user who created this value list.
	CreatedBy string `json:"created_by"`
	Deleted   bool   `json:"deleted"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.
	ItemType RadarValueListItemType `json:"item_type"`
	// List of items contained within this value list.
	ListItems *RadarValueListItemList `json:"list_items"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// The name of the value list.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
}

Value lists allow you to group values together which can then be referenced in rules.

Related guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items).

type RadarValueListItem

type RadarValueListItem struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The name or email address of the user who added this item to the value list.
	CreatedBy string `json:"created_by"`
	Deleted   bool   `json:"deleted"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The value of the item.
	Value string `json:"value"`
	// The identifier of the value list this item belongs to.
	ValueList string `json:"value_list"`
}

Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.

Related guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items).

type RadarValueListItemList

type RadarValueListItemList struct {
	APIResource
	ListMeta
	Data []*RadarValueListItem `json:"data"`
}

RadarValueListItemList is a list of ValueListItems as retrieved from a list endpoint.

type RadarValueListItemListParams

type RadarValueListItemListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// Return items belonging to the parent list whose value matches the specified value (using an "is like" match).
	Value *string `form:"value"`
	// Identifier for the parent value list this item belongs to.
	ValueList *string `form:"value_list"`
}

Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

type RadarValueListItemParams

type RadarValueListItemParams struct {
	Params `form:"*"`
	// The value of the item (whose type must match the type of the parent value list).
	Value *string `form:"value"`
	// The identifier of the value list which the created item will be added to.
	ValueList *string `form:"value_list"`
}

Creates a new ValueListItem object, which is added to the specified parent value list.

type RadarValueListItemType

type RadarValueListItemType string

The type of items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.

const (
	RadarValueListItemTypeCardBin             RadarValueListItemType = "card_bin"
	RadarValueListItemTypeCardFingerprint     RadarValueListItemType = "card_fingerprint"
	RadarValueListItemTypeCaseSensitiveString RadarValueListItemType = "case_sensitive_string"
	RadarValueListItemTypeCountry             RadarValueListItemType = "country"
	RadarValueListItemTypeCustomerID          RadarValueListItemType = "customer_id"
	RadarValueListItemTypeEmail               RadarValueListItemType = "email"
	RadarValueListItemTypeIPAddress           RadarValueListItemType = "ip_address"
	RadarValueListItemTypeString              RadarValueListItemType = "string"
)

List of values that RadarValueListItemType can take

type RadarValueListList

type RadarValueListList struct {
	APIResource
	ListMeta
	Data []*RadarValueList `json:"data"`
}

RadarValueListList is a list of ValueLists as retrieved from a list endpoint.

type RadarValueListListParams

type RadarValueListListParams struct {
	ListParams `form:"*"`
	// The alias used to reference the value list when writing rules.
	Alias *string `form:"alias"`
	// A value contained within a value list - returns all value lists containing this value.
	Contains     *string           `form:"contains"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
}

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

type RadarValueListParams

type RadarValueListParams struct {
	Params `form:"*"`
	// The name of the value list for use in rules.
	Alias *string `form:"alias"`
	// Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed.
	ItemType *string `form:"item_type"`
	// The human-readable name of the value list.
	Name *string `form:"name"`
}

Creates a new ValueList object, which can then be referenced in rules.

type RangeQueryParams

type RangeQueryParams struct {
	// GreaterThan specifies that values should be a greater than this
	// timestamp.
	GreaterThan int64 `form:"gt"`

	// GreaterThanOrEqual specifies that values should be greater than or equal
	// to this timestamp.
	GreaterThanOrEqual int64 `form:"gte"`

	// LesserThan specifies that values should be lesser than this timetamp.
	LesserThan int64 `form:"lt"`

	// LesserThanOrEqual specifies that values should be lesser than or
	// equalthis timetamp.
	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 Refund

type Refund struct {
	APIResource
	// Amount, in %s.
	Amount int64 `json:"amount"`
	// Balance transaction that describes the impact on your account balance.
	BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
	// ID of the charge that was refunded.
	Charge *Charge `json:"charge"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only)
	Description string `json:"description"`
	// If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
	FailureBalanceTransaction *BalanceTransaction `json:"failure_balance_transaction"`
	// If the refund failed, the reason for refund failure if known. Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, or `unknown`.
	FailureReason RefundFailureReason `json:"failure_reason"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Email to which refund instructions, if required, are sent to.
	InstructionsEmail string `json:"instructions_email"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata   map[string]string `json:"metadata"`
	NextAction *RefundNextAction `json:"next_action"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// ID of the PaymentIntent that was refunded.
	PaymentIntent *PaymentIntent `json:"payment_intent"`
	// Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).
	Reason RefundReason `json:"reason"`
	// This is the transaction number that appears on email receipts sent for this refund.
	ReceiptNumber string `json:"receipt_number"`
	// The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details.
	SourceTransferReversal *TransferReversal `json:"source_transfer_reversal"`
	// Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details.
	Status RefundStatus `json:"status"`
	// If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter.
	TransferReversal *TransferReversal `json:"transfer_reversal"`
}

`Refund` objects allow you to refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.

Related guide: [Refunds](https://stripe.com/docs/refunds).

func (*Refund) UnmarshalJSON

func (r *Refund) UnmarshalJSON(data []byte) error

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 RefundCancelParams

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

Cancels a refund with a status of requires_action.

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

type RefundFailureReason

type RefundFailureReason string

If the refund failed, the reason for refund failure if known. Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, or `unknown`.

const (
	RefundFailureReasonExpiredOrCanceledCard RefundFailureReason = "expired_or_canceled_card"
	RefundFailureReasonLostOrStolenCard      RefundFailureReason = "lost_or_stolen_card"
	RefundFailureReasonUnknown               RefundFailureReason = "unknown"
)

List of values that RefundFailureReason can take

type RefundList

type RefundList struct {
	APIResource
	ListMeta
	Data []*Refund `json:"data"`
}

RefundList is a list of Refunds as retrieved from a list endpoint.

type RefundListParams

type RefundListParams struct {
	ListParams `form:"*"`
	// Only return refunds for the charge specified by this charge ID.
	Charge       *string           `form:"charge"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return refunds for the PaymentIntent specified by this ID.
	PaymentIntent *string `form:"payment_intent"`
}

Returns a list of all refunds you've previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

type RefundNextAction

type RefundNextAction struct {
	// Contains the refund details.
	DisplayDetails *RefundNextActionDisplayDetails `json:"display_details"`
	// Type of the next action to perform.
	Type string `json:"type"`
}

type RefundNextActionDisplayDetails

type RefundNextActionDisplayDetails struct {
	EmailSent *RefundNextActionDisplayDetailsEmailSent `json:"email_sent"`
	// The expiry timestamp.
	ExpiresAt int64 `json:"expires_at"`
}

Contains the refund details.

type RefundNextActionDisplayDetailsEmailSent

type RefundNextActionDisplayDetailsEmailSent struct {
	// The timestamp when the email was sent.
	EmailSentAt int64 `json:"email_sent_at"`
	// The recipient's email address.
	EmailSentTo string `json:"email_sent_to"`
}

type RefundParams

type RefundParams struct {
	Params `form:"*"`
	// A positive integer representing how much to refund.
	Amount *int64  `form:"amount"`
	Charge *string `form:"charge"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// Customer whose customer balance to refund from.
	Customer *string `form:"customer"`
	// Address to send refund email, use customer email if not specified
	InstructionsEmail *string `form:"instructions_email"`
	// Origin of the refund
	Origin               *string `form:"origin"`
	PaymentIntent        *string `form:"payment_intent"`
	Reason               *string `form:"reason"`
	RefundApplicationFee *bool   `form:"refund_application_fee"`
	ReverseTransfer      *bool   `form:"reverse_transfer"`
}

Create a refund.

type RefundReason

type RefundReason string

Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).

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

List of values that RefundReason can take

type RefundStatus

type RefundStatus string

Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details.

const (
	RefundStatusCanceled  RefundStatus = "canceled"
	RefundStatusFailed    RefundStatus = "failed"
	RefundStatusPending   RefundStatus = "pending"
	RefundStatusSucceeded RefundStatus = "succeeded"
)

List of values that RefundStatus can take

type ReportingReportRun

type ReportingReportRun struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// If something should go wrong during the run, a message about the failure (populated when
	//  `status=failed`).
	Error string `json:"error"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// `true` if the report is run on live mode data and `false` if it is run on test mode data.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object     string                        `json:"object"`
	Parameters *ReportingReportRunParameters `json:"parameters"`
	// The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`.
	ReportType string `json:"report_type"`
	// The file object representing the result of the report run (populated when
	//  `status=succeeded`).
	Result *File `json:"result"`
	// Status of this report run. This will be `pending` when the run is initially created.
	//  When the run finishes, this will be set to `succeeded` and the `result` field will be populated.
	//  Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.
	Status ReportingReportRunStatus `json:"status"`
	// Timestamp at which this run successfully finished (populated when
	//  `status=succeeded`). Measured in seconds since the Unix epoch.
	SucceededAt int64 `json:"succeeded_at"`
}

The Report Run object represents an instance of a report type generated with specific run parameters. Once the object is created, Stripe begins processing the report. When the report has finished running, it will give you a reference to a file where you can retrieve your results. For an overview, see [API Access to Reports](https://stripe.com/docs/reporting/statements/api).

Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).

type ReportingReportRunList

type ReportingReportRunList struct {
	APIResource
	ListMeta
	Data []*ReportingReportRun `json:"data"`
}

ReportingReportRunList is a list of ReportRuns as retrieved from a list endpoint.

type ReportingReportRunListParams

type ReportingReportRunListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
}

Returns a list of Report Runs, with the most recent appearing first.

type ReportingReportRunParameters

type ReportingReportRunParameters struct {
	// The set of output columns requested for inclusion in the report run.
	Columns []string `json:"columns"`
	// Connected account ID by which to filter the report run.
	ConnectedAccount string `json:"connected_account"`
	// Currency of objects to be included in the report run.
	Currency Currency `json:"currency"`
	// Ending timestamp of data to be included in the report run (exclusive).
	IntervalEnd int64 `json:"interval_end"`
	// Starting timestamp of data to be included in the report run.
	IntervalStart int64 `json:"interval_start"`
	// Payout ID by which to filter the report run.
	Payout string `json:"payout"`
	// Category of balance transactions to be included in the report run.
	ReportingCategory string `json:"reporting_category"`
	// Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
	Timezone string `json:"timezone"`
}

type ReportingReportRunParametersParams

type ReportingReportRunParametersParams struct {
	// The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set.
	Columns []*string `form:"columns"`
	// Connected account ID to filter for in the report run.
	ConnectedAccount *string `form:"connected_account"`
	// Currency of objects to be included in the report run.
	Currency *string `form:"currency"`
	// Ending timestamp of data to be included in the report run (exclusive).
	IntervalEnd *int64 `form:"interval_end"`
	// Starting timestamp of data to be included in the report run.
	IntervalStart *int64 `form:"interval_start"`
	// Payout ID by which to filter the report run.
	Payout *string `form:"payout"`
	// Category of balance transactions to be included in the report run.
	ReportingCategory *string `form:"reporting_category"`
	// Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
	Timezone *string `form:"timezone"`
}

Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.

type ReportingReportRunParams

type ReportingReportRunParams struct {
	Params `form:"*"`
	// Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.
	Parameters *ReportingReportRunParametersParams `form:"parameters"`
	// The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`.
	ReportType *string `form:"report_type"`
}

Retrieves the details of an existing Report Run.

type ReportingReportRunStatus

type ReportingReportRunStatus string

Status of this report run. This will be `pending` when the run is initially created.

When the run finishes, this will be set to `succeeded` and the `result` field will be populated.
Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.
const (
	ReportingReportRunStatusFailed    ReportingReportRunStatus = "failed"
	ReportingReportRunStatusPending   ReportingReportRunStatus = "pending"
	ReportingReportRunStatusSucceeded ReportingReportRunStatus = "succeeded"
)

List of values that ReportingReportRunStatus can take

type ReportingReportType

type ReportingReportType struct {
	APIResource
	// Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.
	DataAvailableEnd int64 `json:"data_available_end"`
	// Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.
	DataAvailableStart int64 `json:"data_available_start"`
	// List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.)
	DefaultColumns []string `json:"default_columns"`
	// The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Human-readable name of the Report Type
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// When this Report Type was latest updated. Measured in seconds since the Unix epoch.
	Updated int64 `json:"updated"`
	// Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.
	Version int64 `json:"version"`
}

The Report Type resource corresponds to a particular type of report, such as the "Activity summary" or "Itemized payouts" reports. These objects are identified by an ID belonging to a set of enumerated values. See [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) for those Report Type IDs, along with required and optional parameters.

Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).

type ReportingReportTypeList

type ReportingReportTypeList struct {
	APIResource
	ListMeta
	Data []*ReportingReportType `json:"data"`
}

ReportingReportTypeList is a list of ReportTypes as retrieved from a list endpoint.

type ReportingReportTypeListParams

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

Returns a full list of Report Types.

type ReportingReportTypeParams

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

Retrieves the details of a Report Type. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)

type Review

type Review struct {
	APIResource
	// The ZIP or postal code of the card used, if applicable.
	BillingZip string `json:"billing_zip"`
	// The charge associated with this review.
	Charge *Charge `json:"charge"`
	// The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.
	ClosedReason ReviewClosedReason `json:"closed_reason"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The IP address where the payment originated.
	IPAddress string `json:"ip_address"`
	// Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address.
	IPAddressLocation *ReviewIPAddressLocation `json:"ip_address_location"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// If `true`, the review needs action.
	Open bool `json:"open"`
	// The reason the review was opened. One of `rule` or `manual`.
	OpenedReason ReviewOpenedReason `json:"opened_reason"`
	// The PaymentIntent ID associated with this review, if one exists.
	PaymentIntent *PaymentIntent `json:"payment_intent"`
	// The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.
	Reason ReviewReason `json:"reason"`
	// Information related to the browsing session of the user who initiated the payment.
	Session *ReviewSession `json:"session"`
}

Reviews can be used to supplement automated fraud detection with human expertise.

Learn more about [Radar](https://stripe.com/radar) and reviewing payments [here](https://stripe.com/docs/radar/reviews).

func (*Review) UnmarshalJSON

func (r *Review) UnmarshalJSON(data []byte) error

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

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

Approves a Review object, closing it and removing it from the list of reviews.

type ReviewClosedReason

type ReviewClosedReason string

The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.

const (
	ReviewClosedReasonApproved        ReviewClosedReason = "approved"
	ReviewClosedReasonDisputed        ReviewClosedReason = "disputed"
	ReviewClosedReasonRedacted        ReviewClosedReason = "redacted"
	ReviewClosedReasonRefunded        ReviewClosedReason = "refunded"
	ReviewClosedReasonRefundedAsFraud ReviewClosedReason = "refunded_as_fraud"
)

List of values that ReviewClosedReason can take

type ReviewIPAddressLocation

type ReviewIPAddressLocation struct {
	// The city where the payment originated.
	City string `json:"city"`
	// Two-letter ISO code representing the country where the payment originated.
	Country string `json:"country"`
	// The geographic latitude where the payment originated.
	Latitude float64 `json:"latitude"`
	// The geographic longitude where the payment originated.
	Longitude float64 `json:"longitude"`
	// The state/county/province/region where the payment originated.
	Region string `json:"region"`
}

Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address.

type ReviewList

type ReviewList struct {
	APIResource
	ListMeta
	Data []*Review `json:"data"`
}

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

type ReviewListParams

type ReviewListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
}

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

type ReviewOpenedReason

type ReviewOpenedReason string

The reason the review was opened. One of `rule` or `manual`.

const (
	ReviewOpenedReasonManual ReviewOpenedReason = "manual"
	ReviewOpenedReasonRule   ReviewOpenedReason = "rule"
)

List of values that ReviewOpenedReason can take

type ReviewParams

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

Retrieves a Review object.

type ReviewReason

type ReviewReason string

The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.

const (
	ReviewReasonApproved        ReviewReason = "approved"
	ReviewReasonDisputed        ReviewReason = "disputed"
	ReviewReasonManual          ReviewReason = "manual"
	ReviewReasonRefunded        ReviewReason = "refunded"
	ReviewReasonRefundedAsFraud ReviewReason = "refunded_as_fraud"
	ReviewReasonRule            ReviewReason = "rule"
)

List of values that ReviewReason can take

type ReviewSession

type ReviewSession struct {
	// The browser used in this browser session (e.g., `Chrome`).
	Browser string `json:"browser"`
	// Information about the device used for the browser session (e.g., `Samsung SM-G930T`).
	Device string `json:"device"`
	// The platform for the browser session (e.g., `Macintosh`).
	Platform string `json:"platform"`
	// The version for the browser session (e.g., `61.0.3163.100`).
	Version string `json:"version"`
}

Information related to the browsing session of the user who initiated the payment.

type SKU deprecated

type SKU struct {
	APIResource
	// Whether the SKU is available for purchase.
	Active bool `json:"active"`
	// A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`.
	Attributes map[string]string `json:"attributes"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	Deleted  bool     `json:"deleted"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The URL of an image for this SKU, meant to be displayable to the customer.
	Image     string        `json:"image"`
	Inventory *SKUInventory `json:"inventory"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The dimensions of this SKU for shipping purposes.
	PackageDimensions *SKUPackageDimensions `json:"package_dimensions"`
	// The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency).
	Price int64 `json:"price"`
	// The ID of the product this SKU is associated with. The product must be currently active.
	Product *Product `json:"product"`
	// Time at which the object was last updated. Measured in seconds since the Unix epoch.
	Updated int64 `json:"updated"`
}

Deprecated: This will be replaced by https://stripe.com/docs/api/orders_v2 Stores representations of [stock keeping units](http://en.wikipedia.org/wiki/Stock_keeping_unit). SKUs describe specific product variations, taking into account any combination of: attributes, currency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents the `size: large`, `color: red` version of that shirt.

Can also be used to manage inventory.

type SKUInventory

type SKUInventory struct {
	// The count of inventory available. Will be present if and only if `type` is `finite`.
	Quantity int64 `json:"quantity"`
	// Inventory type. Possible values are `finite`, `bucket` (not quantified), and `infinite`.
	Type SKUInventoryType `json:"type"`
	// An indicator of the inventory available. Possible values are `in_stock`, `limited`, and `out_of_stock`. Will be present if and only if `type` is `bucket`.
	Value SKUInventoryValue `json:"value"`
}

type SKUInventoryParams

type SKUInventoryParams struct {
	// The count of inventory available. Required if `type` is `finite`.
	Quantity *int64 `form:"quantity"`
	// Inventory type. Possible values are `finite`, `bucket` (not quantified), and `infinite`.
	Type *string `form:"type"`
	// An indicator of the inventory available. Possible values are `in_stock`, `limited`, and `out_of_stock`. Will be present if and only if `type` is `bucket`.
	Value *string `form:"value"`
}

Description of the SKU's inventory.

type SKUInventoryType

type SKUInventoryType string

Inventory type. Possible values are `finite`, `bucket` (not quantified), and `infinite`.

const (
	SKUInventoryTypeBucket   SKUInventoryType = "bucket"
	SKUInventoryTypeFinite   SKUInventoryType = "finite"
	SKUInventoryTypeInfinite SKUInventoryType = "infinite"
)

List of values that SKUInventoryType can take

type SKUInventoryValue

type SKUInventoryValue string

An indicator of the inventory available. Possible values are `in_stock`, `limited`, and `out_of_stock`. Will be present if and only if `type` is `bucket`.

const (
	SKUInventoryValueInStock    SKUInventoryValue = "in_stock"
	SKUInventoryValueLimited    SKUInventoryValue = "limited"
	SKUInventoryValueOutOfStock SKUInventoryValue = "out_of_stock"
)

List of values that SKUInventoryValue can take

type SKUList

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

SKUList is a list of Skus as retrieved from a list endpoint.

type SKUListParams

type SKUListParams struct {
	ListParams `form:"*"`
	// Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products).
	Active *bool `form:"active"`
	// Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`.
	Attributes map[string]string `form:"attributes"`
	// Only return SKUs with the given IDs.
	IDs []*string `form:"ids"`
	// Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned.
	InStock *bool `form:"in_stock"`
	// The ID of the product whose SKUs will be retrieved. Must be a product with type `good`.
	Product *string `form:"product"`
}

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

type SKUPackageDimensions

type SKUPackageDimensions struct {
	// Height, in inches.
	Height float64 `json:"height"`
	// Length, in inches.
	Length float64 `json:"length"`
	// Weight, in ounces.
	Weight float64 `json:"weight"`
	// Width, in inches.
	Width float64 `json:"width"`
}

The dimensions of this SKU for shipping purposes.

type SKUPackageDimensionsParams

type SKUPackageDimensionsParams struct {
	// Height, in inches. Maximum precision is 2 decimal places.
	Height *float64 `form:"height"`
	// Length, in inches. Maximum precision is 2 decimal places.
	Length *float64 `form:"length"`
	// Weight, in ounces. Maximum precision is 2 decimal places.
	Weight *float64 `form:"weight"`
	// Width, in inches. Maximum precision is 2 decimal places.
	Width *float64 `form:"width"`
}

The dimensions of this SKU for shipping purposes.

type SKUParams deprecated

type SKUParams struct {
	Params `form:"*"`
	// Whether the SKU is available for purchase. Default to `true`.
	Active *bool `form:"active"`
	// A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`.
	Attributes map[string]string `form:"attributes"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated.
	ID *string `form:"id"`
	// The URL of an image for this SKU, meant to be displayable to the customer.
	Image *string `form:"image"`
	// Description of the SKU's inventory.
	Inventory *SKUInventoryParams `form:"inventory"`
	// The dimensions of this SKU for shipping purposes.
	PackageDimensions *SKUPackageDimensionsParams `form:"package_dimensions"`
	// The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency).
	Price *int64 `form:"price"`
	// The ID of the product this SKU is associated with. Must be a product with type `good`.
	Product *string `form:"product"`
}

Deprecated: This will be replaced by https://stripe.com/docs/api/orders_v2 Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

type SearchContainer

type SearchContainer interface {
	GetSearchMeta() *SearchMeta
}

SearchContainer is a general interface for which all search result object structs should comply. They achieve this by embedding a SearchMeta struct and inheriting its implementation of this interface.

type SearchIter

type SearchIter struct {
	// contains filtered or unexported fields
}

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

func GetSearchIter

func GetSearchIter(container SearchParamsContainer, query SearchQuery) *SearchIter

GetSearchIter returns a new SearchIter for a given query and its options.

func (*SearchIter) Current

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

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

func (*SearchIter) Err

func (it *SearchIter) Err() error

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

func (*SearchIter) Meta

func (it *SearchIter) Meta() *SearchMeta

Meta returns the search metadata.

func (*SearchIter) Next

func (it *SearchIter) Next() bool

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

func (*SearchIter) SearchResult

func (it *SearchIter) SearchResult() SearchContainer

SearchResult returns the current search result container which the iterator is currently using. Objects will change as new API calls are made to continue pagination.

type SearchMeta

type SearchMeta struct {
	HasMore  bool    `json:"has_more"`
	NextPage *string `json:"next_page"`
	URL      string  `json:"url"`
	// TotalCount is the total number of objects in the search result (beyond just
	// on the current page).
	// The value is returned only when `total_count` is specified in `expand` parameter.
	TotalCount *uint32 `json:"total_count"`
}

SearchMeta is the structure that contains the common properties of the search iterators

func (*SearchMeta) GetSearchMeta

func (l *SearchMeta) GetSearchMeta() *SearchMeta

GetSearchMeta returns a SearchMeta struct (itself). It exists because any structs that embed SearchMeta will inherit it, and thus implement the SearchContainer interface.

type SearchParams

type SearchParams struct {
	// Context used for request. It may carry deadlines, cancelation signals,
	// and other request-scoped values across API boundaries and between
	// processes.
	//
	// Note that a cancelled or timed out context does not provide any
	// guarantee whether the operation was or was not completed on Stripe's API
	// servers. For certainty, you must either retry with the same idempotency
	// key or query the state of the API.
	Context context.Context `form:"-"`

	Query  string    `form:"query"`
	Limit  *int64    `form:"limit"`
	Page   *string   `form:"page"`
	Expand []*string `form:"expand"`

	// Single specifies whether this is a single page iterator. By default,
	// listing through an iterator will automatically grab additional pages as
	// the query progresses. To change this behavior and just load a single
	// page, set this to true.
	Single bool `form:"-"` // Not an API parameter

	// StripeAccount may contain the ID of a connected account. By including
	// this field, the request is made as if it originated from the connected
	// account instead of under the account of the owner of the configured
	// Stripe key.
	StripeAccount *string `form:"-"` // Passed as header
}

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

func (*SearchParams) AddExpand

func (p *SearchParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*SearchParams) GetParams

func (p *SearchParams) GetParams() *Params

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

func (*SearchParams) GetSearchParams

func (p *SearchParams) GetSearchParams() *SearchParams

GetSearchParams returns a SearchParams struct (itself). It exists because any structs that embed SearchParams will inherit it, and thus implement the SearchParamsContainer interface.

func (*SearchParams) SetStripeAccount

func (p *SearchParams) SetStripeAccount(val string)

SetStripeAccount sets a value for the Stripe-Account header.

func (*SearchParams) ToParams

func (p *SearchParams) ToParams() *Params

ToParams converts a SearchParams 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 SearchParams is only used to build a set of parameters.

type SearchParamsContainer

type SearchParamsContainer interface {
	GetSearchParams() *SearchParams
}

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

type SearchQuery

type SearchQuery func(*Params, *form.Values) ([]interface{}, SearchContainer, error)

SearchQuery is the function used to get search results.

type SetupAttempt

type SetupAttempt struct {
	APIResource
	// The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.
	Application *Application `json:"application"`
	// If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
	//
	// It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
	AttachToSelf bool `json:"attach_to_self"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.
	Customer *Customer `json:"customer"`
	// Indicates the directions of money movement for which this payment method is intended to be used.
	//
	// Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
	FlowDirections []SetupAttemptFlowDirection `json:"flow_directions"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.
	OnBehalfOf *Account `json:"on_behalf_of"`
	// ID of the payment method used with this SetupAttempt.
	PaymentMethod        *PaymentMethod                    `json:"payment_method"`
	PaymentMethodDetails *SetupAttemptPaymentMethodDetails `json:"payment_method_details"`
	// The error encountered during this attempt to confirm the SetupIntent, if any.
	SetupError *Error `json:"setup_error"`
	// ID of the SetupIntent that this attempt belongs to.
	SetupIntent *SetupIntent `json:"setup_intent"`
	// Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.
	Status SetupAttemptStatus `json:"status"`
	// The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.
	Usage SetupAttemptUsage `json:"usage"`
}

A SetupAttempt describes one attempted confirmation of a SetupIntent, whether that confirmation was successful or unsuccessful. You can use SetupAttempts to inspect details of a specific attempt at setting up a payment method using a SetupIntent.

func (*SetupAttempt) UnmarshalJSON

func (s *SetupAttempt) UnmarshalJSON(data []byte) error

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

type SetupAttemptFlowDirection

type SetupAttemptFlowDirection string

Indicates the directions of money movement for which this payment method is intended to be used.

Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.

const (
	SetupAttemptFlowDirectionInbound  SetupAttemptFlowDirection = "inbound"
	SetupAttemptFlowDirectionOutbound SetupAttemptFlowDirection = "outbound"
)

List of values that SetupAttemptFlowDirection can take

type SetupAttemptList

type SetupAttemptList struct {
	APIResource
	ListMeta
	Data []*SetupAttempt `json:"data"`
}

SetupAttemptList is a list of SetupAttempts as retrieved from a list endpoint.

type SetupAttemptListParams

type SetupAttemptListParams struct {
	ListParams `form:"*"`
	// A filter on the list, based on the object `created` field. The value
	// can be a string with an integer Unix timestamp, or it can be a
	// dictionary with a number of different query options.
	Created *int64 `form:"created"`
	// A filter on the list, based on the object `created` field. The value
	// can be a string with an integer Unix timestamp, or it can be a
	// dictionary with a number of different query options.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return SetupAttempts created by the SetupIntent specified by
	// this ID.
	SetupIntent *string `form:"setup_intent"`
}

Returns a list of SetupAttempts associated with a provided SetupIntent.

type SetupAttemptPaymentMethodDetails

type SetupAttemptPaymentMethodDetails struct {
	ACSSDebit   *SetupAttemptPaymentMethodDetailsACSSDebit   `json:"acss_debit"`
	AUBECSDebit *SetupAttemptPaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"`
	BACSDebit   *SetupAttemptPaymentMethodDetailsBACSDebit   `json:"bacs_debit"`
	Bancontact  *SetupAttemptPaymentMethodDetailsBancontact  `json:"bancontact"`
	BLIK        *SetupAttemptPaymentMethodDetailsBLIK        `json:"blik"`
	Boleto      *SetupAttemptPaymentMethodDetailsBoleto      `json:"boleto"`
	Card        *SetupAttemptPaymentMethodDetailsCard        `json:"card"`
	CardPresent *SetupAttemptPaymentMethodDetailsCardPresent `json:"card_present"`
	IDEAL       *SetupAttemptPaymentMethodDetailsIDEAL       `json:"ideal"`
	Link        *SetupAttemptPaymentMethodDetailsLink        `json:"link"`
	SEPADebit   *SetupAttemptPaymentMethodDetailsSEPADebit   `json:"sepa_debit"`
	Sofort      *SetupAttemptPaymentMethodDetailsSofort      `json:"sofort"`
	// The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.
	Type          SetupAttemptPaymentMethodDetailsType           `json:"type"`
	USBankAccount *SetupAttemptPaymentMethodDetailsUSBankAccount `json:"us_bank_account"`
}

type SetupAttemptPaymentMethodDetailsACSSDebit

type SetupAttemptPaymentMethodDetailsACSSDebit struct{}

type SetupAttemptPaymentMethodDetailsAUBECSDebit

type SetupAttemptPaymentMethodDetailsAUBECSDebit struct{}

type SetupAttemptPaymentMethodDetailsBACSDebit

type SetupAttemptPaymentMethodDetailsBACSDebit struct{}

type SetupAttemptPaymentMethodDetailsBLIK

type SetupAttemptPaymentMethodDetailsBLIK struct{}

type SetupAttemptPaymentMethodDetailsBancontact

type SetupAttemptPaymentMethodDetailsBancontact struct {
	// Bank code of bank associated with the bank account.
	BankCode string `json:"bank_code"`
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Bank Identifier Code of the bank associated with the bank account.
	BIC string `json:"bic"`
	// The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
	GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"`
	// The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
	GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"`
	// Last four characters of the IBAN.
	IBANLast4 string `json:"iban_last4"`
	// Preferred language of the Bancontact authorization page that the customer is redirected to.
	// Can be one of `en`, `de`, `fr`, or `nl`
	PreferredLanguage string `json:"preferred_language"`
	// Owner's verified full name. Values are verified or provided by Bancontact directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	VerifiedName string `json:"verified_name"`
}

type SetupAttemptPaymentMethodDetailsBoleto

type SetupAttemptPaymentMethodDetailsBoleto struct{}

type SetupAttemptPaymentMethodDetailsCard

type SetupAttemptPaymentMethodDetailsCard struct {
	// Populated if this authorization used 3D Secure authentication.
	ThreeDSecure *SetupAttemptPaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"`
}

type SetupAttemptPaymentMethodDetailsCardPresent

type SetupAttemptPaymentMethodDetailsCardPresent struct {
	// The ID of the Card PaymentMethod which was generated by this SetupAttempt.
	GeneratedCard *PaymentMethod `json:"generated_card"`
}

type SetupAttemptPaymentMethodDetailsCardThreeDSecure

type SetupAttemptPaymentMethodDetailsCardThreeDSecure struct {
	// For authenticated transactions: how the customer was authenticated by
	// the issuing bank.
	AuthenticationFlow SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow `json:"authentication_flow"`
	// Indicates the outcome of 3D Secure authentication.
	Result SetupAttemptPaymentMethodDetailsCardThreeDSecureResult `json:"result"`
	// Additional information about why 3D Secure succeeded or failed based
	// on the `result`.
	ResultReason SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason `json:"result_reason"`
	// The version of 3D Secure that was used.
	Version string `json:"version"`
}

Populated if this authorization used 3D Secure authentication.

type SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow

type SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow string

For authenticated transactions: how the customer was authenticated by the issuing bank.

const (
	SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlowChallenge    SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "challenge"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlowFrictionless SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow = "frictionless"
)

List of values that SetupAttemptPaymentMethodDetailsCardThreeDSecureAuthenticationFlow can take

type SetupAttemptPaymentMethodDetailsCardThreeDSecureResult

type SetupAttemptPaymentMethodDetailsCardThreeDSecureResult string

Indicates the outcome of 3D Secure authentication.

const (
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultAttemptAcknowledged SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "attempt_acknowledged"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultAuthenticated       SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "authenticated"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultExempted            SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "exempted"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultFailed              SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "failed"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultNotSupported        SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "not_supported"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultProcessingError     SetupAttemptPaymentMethodDetailsCardThreeDSecureResult = "processing_error"
)

List of values that SetupAttemptPaymentMethodDetailsCardThreeDSecureResult can take

type SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason

type SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason string

Additional information about why 3D Secure succeeded or failed based on the `result`.

const (
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonAbandoned           SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "abandoned"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonBypassed            SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "bypassed"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonCanceled            SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "canceled"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonCardNotEnrolled     SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "card_not_enrolled"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonNetworkNotSupported SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "network_not_supported"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonProtocolError       SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "protocol_error"
	SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReasonRejected            SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason = "rejected"
)

List of values that SetupAttemptPaymentMethodDetailsCardThreeDSecureResultReason can take

type SetupAttemptPaymentMethodDetailsIDEAL

type SetupAttemptPaymentMethodDetailsIDEAL struct {
	// The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`.
	Bank string `json:"bank"`
	// The Bank Identifier Code of the customer's bank.
	BIC string `json:"bic"`
	// The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
	GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"`
	// The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
	GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"`
	// Last four characters of the IBAN.
	IBANLast4 string `json:"iban_last4"`
	// Owner's verified full name. Values are verified or provided by iDEAL directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	VerifiedName string `json:"verified_name"`
}
type SetupAttemptPaymentMethodDetailsLink struct{}

type SetupAttemptPaymentMethodDetailsSEPADebit

type SetupAttemptPaymentMethodDetailsSEPADebit struct{}

type SetupAttemptPaymentMethodDetailsSofort

type SetupAttemptPaymentMethodDetailsSofort struct {
	// Bank code of bank associated with the bank account.
	BankCode string `json:"bank_code"`
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Bank Identifier Code of the bank associated with the bank account.
	BIC string `json:"bic"`
	// The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
	GeneratedSEPADebit *PaymentMethod `json:"generated_sepa_debit"`
	// The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt.
	GeneratedSEPADebitMandate *Mandate `json:"generated_sepa_debit_mandate"`
	// Last four characters of the IBAN.
	IBANLast4 string `json:"iban_last4"`
	// Preferred language of the Sofort authorization page that the customer is redirected to.
	// Can be one of `en`, `de`, `fr`, or `nl`
	PreferredLanguage string `json:"preferred_language"`
	// Owner's verified full name. Values are verified or provided by Sofort directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	VerifiedName string `json:"verified_name"`
}

type SetupAttemptPaymentMethodDetailsType

type SetupAttemptPaymentMethodDetailsType string

The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method.

const (
	SetupAttemptPaymentMethodDetailsTypeCard SetupAttemptPaymentMethodDetailsType = "card"
)

List of values that SetupAttemptPaymentMethodDetailsType can take

type SetupAttemptPaymentMethodDetailsUSBankAccount

type SetupAttemptPaymentMethodDetailsUSBankAccount struct{}

type SetupAttemptStatus

type SetupAttemptStatus string

Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.

const (
	SetupAttemptStatusAbandoned            SetupAttemptStatus = "abandoned"
	SetupAttemptStatusFailed               SetupAttemptStatus = "failed"
	SetupAttemptStatusProcessing           SetupAttemptStatus = "processing"
	SetupAttemptStatusRequiresAction       SetupAttemptStatus = "requires_action"
	SetupAttemptStatusRequiresConfirmation SetupAttemptStatus = "requires_confirmation"
	SetupAttemptStatusSucceeded            SetupAttemptStatus = "succeeded"
)

List of values that SetupAttemptStatus can take

type SetupAttemptUsage

type SetupAttemptUsage string

The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.

const (
	SetupAttemptUsageOffSession SetupAttemptUsage = "off_session"
	SetupAttemptUsageOnSession  SetupAttemptUsage = "on_session"
)

List of values that SetupAttemptUsage can take

type SetupIntent

type SetupIntent struct {
	APIResource
	// ID of the Connect application that created the SetupIntent.
	Application *Application `json:"application"`
	// If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
	//
	// It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
	AttachToSelf bool `json:"attach_to_self"`
	// Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.
	CancellationReason SetupIntentCancellationReason `json:"cancellation_reason"`
	// The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
	//
	// The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
	ClientSecret string `json:"client_secret"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// ID of the Customer this SetupIntent belongs to, if one exists.
	//
	// If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
	Customer *Customer `json:"customer"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// Indicates the directions of money movement for which this payment method is intended to be used.
	//
	// Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
	FlowDirections []SetupIntentFlowDirection `json:"flow_directions"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The error encountered in the previous SetupIntent confirmation.
	LastSetupError *Error `json:"last_setup_error"`
	// The most recent SetupAttempt for this SetupIntent.
	LatestAttempt *SetupAttempt `json:"latest_attempt"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// ID of the multi use Mandate generated by the SetupIntent.
	Mandate *Mandate `json:"mandate"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
	NextAction *SetupIntentNextAction `json:"next_action"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The account (if any) for which the setup is intended.
	OnBehalfOf *Account `json:"on_behalf_of"`
	// ID of the payment method used with this SetupIntent.
	PaymentMethod *PaymentMethod `json:"payment_method"`
	// Payment-method-specific configuration for this SetupIntent.
	PaymentMethodOptions *SetupIntentPaymentMethodOptions `json:"payment_method_options"`
	// The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
	PaymentMethodTypes []string `json:"payment_method_types"`
	// ID of the single_use Mandate generated by the SetupIntent.
	SingleUseMandate *Mandate `json:"single_use_mandate"`
	// [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.
	Status SetupIntentStatus `json:"status"`
	// Indicates how the payment method is intended to be used in the future.
	//
	// Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.
	Usage SetupIntentUsage `json:"usage"`
}

A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.

Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides you through the setup process.

Successful SetupIntents result in payment credentials that are optimized for future payments. For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) may need to be run through [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) at the time of payment method collection in order to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). If the SetupIntent is used with a Customer(https://stripe.com/docs/api#setup_intent_object-customer), upon success, it will automatically attach the resulting payment method to that Customer. We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on PaymentIntents to save payment methods in order to prevent saving invalid or unoptimized payment methods.

By using SetupIntents, you ensure that your customers experience the minimum set of required friction, even as regulations change over time.

Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents).

func (*SetupIntent) UnmarshalJSON

func (s *SetupIntent) UnmarshalJSON(data []byte) error

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

type SetupIntentCancelParams struct {
	Params `form:"*"`
	// Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate`
	CancellationReason *string `form:"cancellation_reason"`
}

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

type SetupIntentCancellationReason

type SetupIntentCancellationReason string

Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.

const (
	SetupIntentCancellationReasonAbandoned           SetupIntentCancellationReason = "abandoned"
	SetupIntentCancellationReasonDuplicate           SetupIntentCancellationReason = "duplicate"
	SetupIntentCancellationReasonRequestedByCustomer SetupIntentCancellationReason = "requested_by_customer"
)

List of values that SetupIntentCancellationReason can take

type SetupIntentConfirmParams

type SetupIntentConfirmParams struct {
	Params `form:"*"`
	// This hash contains details about the Mandate to create
	MandateData *SetupIntentMandateDataParams `form:"mandate_data"`
	// ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
	PaymentMethod *string `form:"payment_method"`
	// When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
	// value in the SetupIntent.
	PaymentMethodData *SetupIntentConfirmPaymentMethodDataParams `form:"payment_method_data"`
	// Payment-method-specific configuration for this SetupIntent.
	PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"`
	// The URL to redirect your customer back to after they authenticate on the payment method's app or site.
	// If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
	// This parameter is only used for cards and other redirect-based payment methods.
	ReturnURL *string `form:"return_url"`
}

Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.

If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.

Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status.

type SetupIntentConfirmPaymentMethodDataACSSDebitParams

type SetupIntentConfirmPaymentMethodDataACSSDebitParams struct {
	// Customer's bank account number.
	AccountNumber *string `form:"account_number"`
	// Institution number of the customer's bank.
	InstitutionNumber *string `form:"institution_number"`
	// Transit number of the customer's bank.
	TransitNumber *string `form:"transit_number"`
}

If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.

type SetupIntentConfirmPaymentMethodDataAUBECSDebitParams

type SetupIntentConfirmPaymentMethodDataAUBECSDebitParams struct {
	// The account number for the bank account.
	AccountNumber *string `form:"account_number"`
	// Bank-State-Branch number of the bank account.
	BSBNumber *string `form:"bsb_number"`
}

If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.

type SetupIntentConfirmPaymentMethodDataAffirmParams

type SetupIntentConfirmPaymentMethodDataAffirmParams struct{}

If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.

type SetupIntentConfirmPaymentMethodDataAfterpayClearpayParams

type SetupIntentConfirmPaymentMethodDataAfterpayClearpayParams struct{}

If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.

type SetupIntentConfirmPaymentMethodDataAlipayParams

type SetupIntentConfirmPaymentMethodDataAlipayParams struct{}

If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.

type SetupIntentConfirmPaymentMethodDataBACSDebitParams

type SetupIntentConfirmPaymentMethodDataBACSDebitParams struct {
	// Account number of the bank account that the funds will be debited from.
	AccountNumber *string `form:"account_number"`
	// Sort code of the bank account. (e.g., `10-20-30`)
	SortCode *string `form:"sort_code"`
}

If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.

type SetupIntentConfirmPaymentMethodDataBLIKParams

type SetupIntentConfirmPaymentMethodDataBLIKParams struct{}

If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.

type SetupIntentConfirmPaymentMethodDataBancontactParams

type SetupIntentConfirmPaymentMethodDataBancontactParams struct{}

If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.

type SetupIntentConfirmPaymentMethodDataBillingDetailsParams

type SetupIntentConfirmPaymentMethodDataBillingDetailsParams struct {
	// Billing address.
	Address *AddressParams `form:"address"`
	// Email address.
	Email *string `form:"email"`
	// Full name.
	Name *string `form:"name"`
	// Billing phone number (including extension).
	Phone *string `form:"phone"`
}

Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

type SetupIntentConfirmPaymentMethodDataBoletoParams

type SetupIntentConfirmPaymentMethodDataBoletoParams struct {
	// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
	TaxID *string `form:"tax_id"`
}

If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.

type SetupIntentConfirmPaymentMethodDataCustomerBalanceParams

type SetupIntentConfirmPaymentMethodDataCustomerBalanceParams struct{}

If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.

type SetupIntentConfirmPaymentMethodDataEPSParams

type SetupIntentConfirmPaymentMethodDataEPSParams struct {
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.

type SetupIntentConfirmPaymentMethodDataFPXParams

type SetupIntentConfirmPaymentMethodDataFPXParams struct {
	// Account holder type for FPX transaction
	AccountHolderType *string `form:"account_holder_type"`
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.

type SetupIntentConfirmPaymentMethodDataGiropayParams

type SetupIntentConfirmPaymentMethodDataGiropayParams struct{}

If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.

type SetupIntentConfirmPaymentMethodDataGrabpayParams

type SetupIntentConfirmPaymentMethodDataGrabpayParams struct{}

If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.

type SetupIntentConfirmPaymentMethodDataIDEALParams

type SetupIntentConfirmPaymentMethodDataIDEALParams struct {
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.

type SetupIntentConfirmPaymentMethodDataInteracPresentParams

type SetupIntentConfirmPaymentMethodDataInteracPresentParams struct{}

If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.

type SetupIntentConfirmPaymentMethodDataKlarnaDOBParams

type SetupIntentConfirmPaymentMethodDataKlarnaDOBParams struct {
	// The day of birth, between 1 and 31.
	Day *int64 `form:"day"`
	// The month of birth, between 1 and 12.
	Month *int64 `form:"month"`
	// The four-digit year of birth.
	Year *int64 `form:"year"`
}

Customer's date of birth

type SetupIntentConfirmPaymentMethodDataKlarnaParams

type SetupIntentConfirmPaymentMethodDataKlarnaParams struct {
	// Customer's date of birth
	DOB *SetupIntentConfirmPaymentMethodDataKlarnaDOBParams `form:"dob"`
}

If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.

type SetupIntentConfirmPaymentMethodDataKonbiniParams

type SetupIntentConfirmPaymentMethodDataKonbiniParams struct{}

If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.

type SetupIntentConfirmPaymentMethodDataLinkParams

type SetupIntentConfirmPaymentMethodDataLinkParams struct{}

If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.

type SetupIntentConfirmPaymentMethodDataOXXOParams

type SetupIntentConfirmPaymentMethodDataOXXOParams struct{}

If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.

type SetupIntentConfirmPaymentMethodDataP24Params

type SetupIntentConfirmPaymentMethodDataP24Params struct {
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.

type SetupIntentConfirmPaymentMethodDataParams

type SetupIntentConfirmPaymentMethodDataParams struct {
	// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
	ACSSDebit *SetupIntentConfirmPaymentMethodDataACSSDebitParams `form:"acss_debit"`
	// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
	Affirm *SetupIntentConfirmPaymentMethodDataAffirmParams `form:"affirm"`
	// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
	AfterpayClearpay *SetupIntentConfirmPaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"`
	// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
	Alipay *SetupIntentConfirmPaymentMethodDataAlipayParams `form:"alipay"`
	// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
	AUBECSDebit *SetupIntentConfirmPaymentMethodDataAUBECSDebitParams `form:"au_becs_debit"`
	// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
	BACSDebit *SetupIntentConfirmPaymentMethodDataBACSDebitParams `form:"bacs_debit"`
	// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
	Bancontact *SetupIntentConfirmPaymentMethodDataBancontactParams `form:"bancontact"`
	// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
	BillingDetails *SetupIntentConfirmPaymentMethodDataBillingDetailsParams `form:"billing_details"`
	// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
	BLIK *SetupIntentConfirmPaymentMethodDataBLIKParams `form:"blik"`
	// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
	Boleto *SetupIntentConfirmPaymentMethodDataBoletoParams `form:"boleto"`
	// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
	CustomerBalance *SetupIntentConfirmPaymentMethodDataCustomerBalanceParams `form:"customer_balance"`
	// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
	EPS *SetupIntentConfirmPaymentMethodDataEPSParams `form:"eps"`
	// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
	FPX *SetupIntentConfirmPaymentMethodDataFPXParams `form:"fpx"`
	// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
	Giropay *SetupIntentConfirmPaymentMethodDataGiropayParams `form:"giropay"`
	// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
	Grabpay *SetupIntentConfirmPaymentMethodDataGrabpayParams `form:"grabpay"`
	// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
	IDEAL *SetupIntentConfirmPaymentMethodDataIDEALParams `form:"ideal"`
	// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
	InteracPresent *SetupIntentConfirmPaymentMethodDataInteracPresentParams `form:"interac_present"`
	// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
	Klarna *SetupIntentConfirmPaymentMethodDataKlarnaParams `form:"klarna"`
	// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
	Konbini *SetupIntentConfirmPaymentMethodDataKonbiniParams `form:"konbini"`
	// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
	Link *SetupIntentConfirmPaymentMethodDataLinkParams `form:"link"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
	OXXO *SetupIntentConfirmPaymentMethodDataOXXOParams `form:"oxxo"`
	// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
	P24 *SetupIntentConfirmPaymentMethodDataP24Params `form:"p24"`
	// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
	PayNow *SetupIntentConfirmPaymentMethodDataPayNowParams `form:"paynow"`
	// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
	PromptPay *SetupIntentConfirmPaymentMethodDataPromptPayParams `form:"promptpay"`
	// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
	RadarOptions *SetupIntentConfirmPaymentMethodDataRadarOptionsParams `form:"radar_options"`
	// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
	SEPADebit *SetupIntentConfirmPaymentMethodDataSEPADebitParams `form:"sepa_debit"`
	// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
	Sofort *SetupIntentConfirmPaymentMethodDataSofortParams `form:"sofort"`
	// The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
	Type *string `form:"type"`
	// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
	USBankAccount *SetupIntentConfirmPaymentMethodDataUSBankAccountParams `form:"us_bank_account"`
	// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
	WeChatPay *SetupIntentConfirmPaymentMethodDataWeChatPayParams `form:"wechat_pay"`
}

When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) value in the SetupIntent.

type SetupIntentConfirmPaymentMethodDataPayNowParams

type SetupIntentConfirmPaymentMethodDataPayNowParams struct{}

If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.

type SetupIntentConfirmPaymentMethodDataPromptPayParams

type SetupIntentConfirmPaymentMethodDataPromptPayParams struct{}

If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.

type SetupIntentConfirmPaymentMethodDataRadarOptionsParams

type SetupIntentConfirmPaymentMethodDataRadarOptionsParams struct {
	// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
	Session *string `form:"session"`
}

Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.

type SetupIntentConfirmPaymentMethodDataSEPADebitParams

type SetupIntentConfirmPaymentMethodDataSEPADebitParams struct {
	// IBAN of the bank account.
	IBAN *string `form:"iban"`
}

If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.

type SetupIntentConfirmPaymentMethodDataSofortParams

type SetupIntentConfirmPaymentMethodDataSofortParams struct {
	// Two-letter ISO code representing the country the bank account is located in.
	Country *string `form:"country"`
}

If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.

type SetupIntentConfirmPaymentMethodDataUSBankAccountParams

type SetupIntentConfirmPaymentMethodDataUSBankAccountParams struct {
	// Account holder type: individual or company.
	AccountHolderType *string `form:"account_holder_type"`
	// Account number of the bank account.
	AccountNumber *string `form:"account_number"`
	// Account type: checkings or savings. Defaults to checking if omitted.
	AccountType *string `form:"account_type"`
	// The ID of a Financial Connections Account to use as a payment method.
	FinancialConnectionsAccount *string `form:"financial_connections_account"`
	// Routing number of the bank account.
	RoutingNumber *string `form:"routing_number"`
}

If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.

type SetupIntentConfirmPaymentMethodDataWeChatPayParams

type SetupIntentConfirmPaymentMethodDataWeChatPayParams struct{}

If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.

type SetupIntentFlowDirection

type SetupIntentFlowDirection string

Indicates the directions of money movement for which this payment method is intended to be used.

Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.

const (
	SetupIntentFlowDirectionInbound  SetupIntentFlowDirection = "inbound"
	SetupIntentFlowDirectionOutbound SetupIntentFlowDirection = "outbound"
)

List of values that SetupIntentFlowDirection can take

type SetupIntentList

type SetupIntentList struct {
	APIResource
	ListMeta
	Data []*SetupIntent `json:"data"`
}

SetupIntentList is a list of SetupIntents as retrieved from a list endpoint.

type SetupIntentListParams

type SetupIntentListParams struct {
	ListParams `form:"*"`
	// If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
	//
	// It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
	AttachToSelf *bool `form:"attach_to_self"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	Created *int64 `form:"created"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return SetupIntents for the customer specified by this customer ID.
	Customer *string `form:"customer"`
	// Only return SetupIntents associated with the specified payment method.
	PaymentMethod *string `form:"payment_method"`
}

Returns a list of SetupIntents.

type SetupIntentMandateDataCustomerAcceptanceOfflineParams

type SetupIntentMandateDataCustomerAcceptanceOfflineParams struct{}

If this is a Mandate accepted offline, this hash contains details about the offline acceptance.

type SetupIntentMandateDataCustomerAcceptanceOnlineParams

type SetupIntentMandateDataCustomerAcceptanceOnlineParams struct {
	// The IP address from which the Mandate was accepted by the customer.
	IPAddress *string `form:"ip_address"`
	// The user agent of the browser from which the Mandate was accepted by the customer.
	UserAgent *string `form:"user_agent"`
}

If this is a Mandate accepted online, this hash contains details about the online acceptance.

type SetupIntentMandateDataCustomerAcceptanceParams

type SetupIntentMandateDataCustomerAcceptanceParams struct {
	// The time at which the customer accepted the Mandate.
	AcceptedAt *int64 `form:"accepted_at"`
	// If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
	Offline *SetupIntentMandateDataCustomerAcceptanceOfflineParams `form:"offline"`
	// If this is a Mandate accepted online, this hash contains details about the online acceptance.
	Online *SetupIntentMandateDataCustomerAcceptanceOnlineParams `form:"online"`
	// The type of customer acceptance information included with the Mandate.
	Type MandateCustomerAcceptanceType `form:"type"`
}

This hash contains details about the customer acceptance of the Mandate.

type SetupIntentMandateDataParams

type SetupIntentMandateDataParams struct {
	// This hash contains details about the customer acceptance of the Mandate.
	CustomerAcceptance *SetupIntentMandateDataCustomerAcceptanceParams `form:"customer_acceptance"`
}

This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).

type SetupIntentNextAction

type SetupIntentNextAction struct {
	RedirectToURL *SetupIntentNextActionRedirectToURL `json:"redirect_to_url"`
	// Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
	Type SetupIntentNextActionType `json:"type"`
	// When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
	UseStripeSDK            *SetupIntentNextActionUseStripeSDK            `json:"use_stripe_sdk"`
	VerifyWithMicrodeposits *SetupIntentNextActionVerifyWithMicrodeposits `json:"verify_with_microdeposits"`
}

If present, this property tells you what actions you need to take in order for your customer to continue payment setup.

type SetupIntentNextActionRedirectToURL

type SetupIntentNextActionRedirectToURL struct {
	// If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion.
	ReturnURL string `json:"return_url"`
	// The URL you must redirect your customer to in order to authenticate.
	URL string `json:"url"`
}

type SetupIntentNextActionType

type SetupIntentNextActionType string

Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.

const (
	SetupIntentNextActionTypeRedirectToURL SetupIntentNextActionType = "redirect_to_url"
)

List of values that SetupIntentNextActionType can take

type SetupIntentNextActionUseStripeSDK

type SetupIntentNextActionUseStripeSDK struct{}

When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.

type SetupIntentNextActionVerifyWithMicrodeposits

type SetupIntentNextActionVerifyWithMicrodeposits struct {
	// The timestamp when the microdeposits are expected to land.
	ArrivalDate int64 `json:"arrival_date"`
	// The URL for the hosted verification page, which allows customers to verify their bank account.
	HostedVerificationURL string `json:"hosted_verification_url"`
	// The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
	MicrodepositType SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType `json:"microdeposit_type"`
}

type SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType

type SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType string

The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.

const (
	SetupIntentNextActionVerifyWithMicrodepositsMicrodepositTypeAmounts        SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType = "amounts"
	SetupIntentNextActionVerifyWithMicrodepositsMicrodepositTypeDescriptorCode SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType = "descriptor_code"
)

List of values that SetupIntentNextActionVerifyWithMicrodepositsMicrodepositType can take

type SetupIntentParams

type SetupIntentParams struct {
	Params `form:"*"`
	// If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
	//
	// It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
	AttachToSelf *bool `form:"attach_to_self"`
	// The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent.
	ClientSecret *string `form:"client_secret"`
	// Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required.
	Confirm *bool `form:"confirm"`
	// ID of the Customer this SetupIntent belongs to, if one exists.
	//
	// If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
	Customer *string `form:"customer"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// Indicates the directions of money movement for which this payment method is intended to be used.
	//
	// Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
	FlowDirections []*string `form:"flow_directions"`
	// This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
	MandateData *SetupIntentMandateDataParams `form:"mandate_data"`
	// The Stripe account ID for which this SetupIntent is created.
	OnBehalfOf *string `form:"on_behalf_of"`
	// ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
	PaymentMethod *string `form:"payment_method"`
	// When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
	// value in the SetupIntent.
	PaymentMethodData *SetupIntentPaymentMethodDataParams `form:"payment_method_data"`
	// Payment-method-specific configuration for this SetupIntent.
	PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"`
	// The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"].
	PaymentMethodTypes []*string `form:"payment_method_types"`
	// The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
	ReturnURL *string `form:"return_url"`
	// If this hash is populated, this SetupIntent will generate a single_use Mandate on success.
	SingleUse *SetupIntentSingleUseParams `form:"single_use"`
	// Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`.
	Usage *string `form:"usage"`
}

Creates a SetupIntent object.

After the SetupIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm) to collect any required permissions to charge the payment method later.

type SetupIntentPaymentMethodDataACSSDebitParams

type SetupIntentPaymentMethodDataACSSDebitParams struct {
	// Customer's bank account number.
	AccountNumber *string `form:"account_number"`
	// Institution number of the customer's bank.
	InstitutionNumber *string `form:"institution_number"`
	// Transit number of the customer's bank.
	TransitNumber *string `form:"transit_number"`
}

If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.

type SetupIntentPaymentMethodDataAUBECSDebitParams

type SetupIntentPaymentMethodDataAUBECSDebitParams struct {
	// The account number for the bank account.
	AccountNumber *string `form:"account_number"`
	// Bank-State-Branch number of the bank account.
	BSBNumber *string `form:"bsb_number"`
}

If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.

type SetupIntentPaymentMethodDataAffirmParams

type SetupIntentPaymentMethodDataAffirmParams struct{}

If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.

type SetupIntentPaymentMethodDataAfterpayClearpayParams

type SetupIntentPaymentMethodDataAfterpayClearpayParams struct{}

If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.

type SetupIntentPaymentMethodDataAlipayParams

type SetupIntentPaymentMethodDataAlipayParams struct{}

If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.

type SetupIntentPaymentMethodDataBACSDebitParams

type SetupIntentPaymentMethodDataBACSDebitParams struct {
	// Account number of the bank account that the funds will be debited from.
	AccountNumber *string `form:"account_number"`
	// Sort code of the bank account. (e.g., `10-20-30`)
	SortCode *string `form:"sort_code"`
}

If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.

type SetupIntentPaymentMethodDataBLIKParams

type SetupIntentPaymentMethodDataBLIKParams struct{}

If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.

type SetupIntentPaymentMethodDataBancontactParams

type SetupIntentPaymentMethodDataBancontactParams struct{}

If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.

type SetupIntentPaymentMethodDataBillingDetailsParams

type SetupIntentPaymentMethodDataBillingDetailsParams struct {
	// Billing address.
	Address *AddressParams `form:"address"`
	// Email address.
	Email *string `form:"email"`
	// Full name.
	Name *string `form:"name"`
	// Billing phone number (including extension).
	Phone *string `form:"phone"`
}

Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

type SetupIntentPaymentMethodDataBoletoParams

type SetupIntentPaymentMethodDataBoletoParams struct {
	// The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
	TaxID *string `form:"tax_id"`
}

If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.

type SetupIntentPaymentMethodDataCustomerBalanceParams

type SetupIntentPaymentMethodDataCustomerBalanceParams struct{}

If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.

type SetupIntentPaymentMethodDataEPSParams

type SetupIntentPaymentMethodDataEPSParams struct {
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.

type SetupIntentPaymentMethodDataFPXParams

type SetupIntentPaymentMethodDataFPXParams struct {
	// Account holder type for FPX transaction
	AccountHolderType *string `form:"account_holder_type"`
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.

type SetupIntentPaymentMethodDataGiropayParams

type SetupIntentPaymentMethodDataGiropayParams struct{}

If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.

type SetupIntentPaymentMethodDataGrabpayParams

type SetupIntentPaymentMethodDataGrabpayParams struct{}

If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.

type SetupIntentPaymentMethodDataIDEALParams

type SetupIntentPaymentMethodDataIDEALParams struct {
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.

type SetupIntentPaymentMethodDataInteracPresentParams

type SetupIntentPaymentMethodDataInteracPresentParams struct{}

If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.

type SetupIntentPaymentMethodDataKlarnaDOBParams

type SetupIntentPaymentMethodDataKlarnaDOBParams struct {
	// The day of birth, between 1 and 31.
	Day *int64 `form:"day"`
	// The month of birth, between 1 and 12.
	Month *int64 `form:"month"`
	// The four-digit year of birth.
	Year *int64 `form:"year"`
}

Customer's date of birth

type SetupIntentPaymentMethodDataKlarnaParams

type SetupIntentPaymentMethodDataKlarnaParams struct {
	// Customer's date of birth
	DOB *SetupIntentPaymentMethodDataKlarnaDOBParams `form:"dob"`
}

If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.

type SetupIntentPaymentMethodDataKonbiniParams

type SetupIntentPaymentMethodDataKonbiniParams struct{}

If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.

type SetupIntentPaymentMethodDataLinkParams

type SetupIntentPaymentMethodDataLinkParams struct{}

If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.

type SetupIntentPaymentMethodDataOXXOParams

type SetupIntentPaymentMethodDataOXXOParams struct{}

If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.

type SetupIntentPaymentMethodDataP24Params

type SetupIntentPaymentMethodDataP24Params struct {
	// The customer's bank.
	Bank *string `form:"bank"`
}

If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.

type SetupIntentPaymentMethodDataParams

type SetupIntentPaymentMethodDataParams struct {
	// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
	ACSSDebit *SetupIntentPaymentMethodDataACSSDebitParams `form:"acss_debit"`
	// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
	Affirm *SetupIntentPaymentMethodDataAffirmParams `form:"affirm"`
	// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
	AfterpayClearpay *SetupIntentPaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"`
	// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
	Alipay *SetupIntentPaymentMethodDataAlipayParams `form:"alipay"`
	// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
	AUBECSDebit *SetupIntentPaymentMethodDataAUBECSDebitParams `form:"au_becs_debit"`
	// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
	BACSDebit *SetupIntentPaymentMethodDataBACSDebitParams `form:"bacs_debit"`
	// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
	Bancontact *SetupIntentPaymentMethodDataBancontactParams `form:"bancontact"`
	// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
	BillingDetails *SetupIntentPaymentMethodDataBillingDetailsParams `form:"billing_details"`
	// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
	BLIK *SetupIntentPaymentMethodDataBLIKParams `form:"blik"`
	// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
	Boleto *SetupIntentPaymentMethodDataBoletoParams `form:"boleto"`
	// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
	CustomerBalance *SetupIntentPaymentMethodDataCustomerBalanceParams `form:"customer_balance"`
	// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
	EPS *SetupIntentPaymentMethodDataEPSParams `form:"eps"`
	// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
	FPX *SetupIntentPaymentMethodDataFPXParams `form:"fpx"`
	// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
	Giropay *SetupIntentPaymentMethodDataGiropayParams `form:"giropay"`
	// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
	Grabpay *SetupIntentPaymentMethodDataGrabpayParams `form:"grabpay"`
	// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
	IDEAL *SetupIntentPaymentMethodDataIDEALParams `form:"ideal"`
	// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
	InteracPresent *SetupIntentPaymentMethodDataInteracPresentParams `form:"interac_present"`
	// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
	Klarna *SetupIntentPaymentMethodDataKlarnaParams `form:"klarna"`
	// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
	Konbini *SetupIntentPaymentMethodDataKonbiniParams `form:"konbini"`
	// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
	Link *SetupIntentPaymentMethodDataLinkParams `form:"link"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
	OXXO *SetupIntentPaymentMethodDataOXXOParams `form:"oxxo"`
	// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
	P24 *SetupIntentPaymentMethodDataP24Params `form:"p24"`
	// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
	PayNow *SetupIntentPaymentMethodDataPayNowParams `form:"paynow"`
	// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
	PromptPay *SetupIntentPaymentMethodDataPromptPayParams `form:"promptpay"`
	// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
	RadarOptions *SetupIntentPaymentMethodDataRadarOptionsParams `form:"radar_options"`
	// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
	SEPADebit *SetupIntentPaymentMethodDataSEPADebitParams `form:"sepa_debit"`
	// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
	Sofort *SetupIntentPaymentMethodDataSofortParams `form:"sofort"`
	// The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
	Type *string `form:"type"`
	// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
	USBankAccount *SetupIntentPaymentMethodDataUSBankAccountParams `form:"us_bank_account"`
	// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
	WeChatPay *SetupIntentPaymentMethodDataWeChatPayParams `form:"wechat_pay"`
}

When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) value in the SetupIntent.

type SetupIntentPaymentMethodDataPayNowParams

type SetupIntentPaymentMethodDataPayNowParams struct{}

If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.

type SetupIntentPaymentMethodDataPromptPayParams

type SetupIntentPaymentMethodDataPromptPayParams struct{}

If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.

type SetupIntentPaymentMethodDataRadarOptionsParams

type SetupIntentPaymentMethodDataRadarOptionsParams struct {
	// A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
	Session *string `form:"session"`
}

Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.

type SetupIntentPaymentMethodDataSEPADebitParams

type SetupIntentPaymentMethodDataSEPADebitParams struct {
	// IBAN of the bank account.
	IBAN *string `form:"iban"`
}

If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.

type SetupIntentPaymentMethodDataSofortParams

type SetupIntentPaymentMethodDataSofortParams struct {
	// Two-letter ISO code representing the country the bank account is located in.
	Country *string `form:"country"`
}

If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.

type SetupIntentPaymentMethodDataUSBankAccountParams

type SetupIntentPaymentMethodDataUSBankAccountParams struct {
	// Account holder type: individual or company.
	AccountHolderType *string `form:"account_holder_type"`
	// Account number of the bank account.
	AccountNumber *string `form:"account_number"`
	// Account type: checkings or savings. Defaults to checking if omitted.
	AccountType *string `form:"account_type"`
	// The ID of a Financial Connections Account to use as a payment method.
	FinancialConnectionsAccount *string `form:"financial_connections_account"`
	// Routing number of the bank account.
	RoutingNumber *string `form:"routing_number"`
}

If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.

type SetupIntentPaymentMethodDataWeChatPayParams

type SetupIntentPaymentMethodDataWeChatPayParams struct{}

If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.

type SetupIntentPaymentMethodOptions

type SetupIntentPaymentMethodOptions struct {
	ACSSDebit     *SetupIntentPaymentMethodOptionsACSSDebit     `json:"acss_debit"`
	BLIK          *SetupIntentPaymentMethodOptionsBLIK          `json:"blik"`
	Card          *SetupIntentPaymentMethodOptionsCard          `json:"card"`
	Link          *SetupIntentPaymentMethodOptionsLink          `json:"link"`
	SEPADebit     *SetupIntentPaymentMethodOptionsSEPADebit     `json:"sepa_debit"`
	USBankAccount *SetupIntentPaymentMethodOptionsUSBankAccount `json:"us_bank_account"`
}

Payment-method-specific configuration for this SetupIntent.

type SetupIntentPaymentMethodOptionsACSSDebit

type SetupIntentPaymentMethodOptionsACSSDebit struct {
	// Currency supported by the bank account
	Currency       SetupIntentPaymentMethodOptionsACSSDebitCurrency        `json:"currency"`
	MandateOptions *SetupIntentPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"`
	// Bank account verification method.
	VerificationMethod SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"`
}

type SetupIntentPaymentMethodOptionsACSSDebitCurrency

type SetupIntentPaymentMethodOptionsACSSDebitCurrency string

Currency supported by the bank account

const (
	SetupIntentPaymentMethodOptionsACSSDebitCurrencyCAD SetupIntentPaymentMethodOptionsACSSDebitCurrency = "cad"
	SetupIntentPaymentMethodOptionsACSSDebitCurrencyUSD SetupIntentPaymentMethodOptionsACSSDebitCurrency = "usd"
)

List of values that SetupIntentPaymentMethodOptionsACSSDebitCurrency can take

type SetupIntentPaymentMethodOptionsACSSDebitMandateOptions

type SetupIntentPaymentMethodOptionsACSSDebitMandateOptions struct {
	// A URL for custom mandate text
	CustomMandateURL string `json:"custom_mandate_url"`
	// List of Stripe products where this mandate can be selected automatically.
	DefaultFor []SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor `json:"default_for"`
	// Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
	IntervalDescription string `json:"interval_description"`
	// Payment schedule for the mandate.
	PaymentSchedule SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule `json:"payment_schedule"`
	// Transaction type of the mandate.
	TransactionType SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"`
}

type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor

type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor string

List of Stripe products where this mandate can be selected automatically.

const (
	SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultForInvoice      SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "invoice"
	SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultForSubscription SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor = "subscription"
)

List of values that SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsDefaultFor can take

type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsParams

type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsParams struct {
	// A URL for custom mandate text to render during confirmation step.
	// The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
	// or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
	CustomMandateURL *string `form:"custom_mandate_url"`
	// List of Stripe products where this mandate can be selected automatically.
	DefaultFor []*string `form:"default_for"`
	// Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
	IntervalDescription *string `form:"interval_description"`
	// Payment schedule for the mandate.
	PaymentSchedule *string `form:"payment_schedule"`
	// Transaction type of the mandate.
	TransactionType *string `form:"transaction_type"`
}

Additional fields for Mandate creation

type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule

type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule string

Payment schedule for the mandate.

const (
	SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleCombined SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "combined"
	SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleInterval SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "interval"
	SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentScheduleSporadic SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule = "sporadic"
)

List of values that SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsPaymentSchedule can take

type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType

type SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string

Transaction type of the mandate.

const (
	SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business"
	SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal"
)

List of values that SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take

type SetupIntentPaymentMethodOptionsACSSDebitParams

type SetupIntentPaymentMethodOptionsACSSDebitParams struct {
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// Additional fields for Mandate creation
	MandateOptions *SetupIntentPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"`
	// Verification method for the intent
	VerificationMethod *string `form:"verification_method"`
}

If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.

type SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod

type SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod string

Bank account verification method.

const (
	SetupIntentPaymentMethodOptionsACSSDebitVerificationMethodAutomatic     SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod = "automatic"
	SetupIntentPaymentMethodOptionsACSSDebitVerificationMethodInstant       SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod = "instant"
	SetupIntentPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits"
)

List of values that SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod can take

type SetupIntentPaymentMethodOptionsBLIK

type SetupIntentPaymentMethodOptionsBLIK struct {
	MandateOptions *SetupIntentPaymentMethodOptionsBLIKMandateOptions `json:"mandate_options"`
}

type SetupIntentPaymentMethodOptionsBLIKMandateOptions

type SetupIntentPaymentMethodOptionsBLIKMandateOptions struct {
	// Date at which the mandate expires.
	ExpiresAfter int64                                                        `json:"expires_after"`
	OffSession   *SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSession `json:"off_session"`
	// Type of the mandate.
	Type SetupIntentPaymentMethodOptionsBLIKMandateOptionsType `json:"type"`
}

type SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSession

type SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSession struct {
	// Amount of each recurring payment.
	Amount int64 `json:"amount"`
	// Currency of each recurring payment.
	Currency Currency `json:"currency"`
	// Frequency interval of each recurring payment.
	Interval SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionInterval `json:"interval"`
	// Frequency indicator of each recurring payment.
	IntervalCount int64 `json:"interval_count"`
}

type SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionInterval

type SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionInterval string

Frequency interval of each recurring payment.

const (
	SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionIntervalDay   SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionInterval = "day"
	SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionIntervalMonth SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionInterval = "month"
	SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionIntervalWeek  SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionInterval = "week"
	SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionIntervalYear  SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionInterval = "year"
)

List of values that SetupIntentPaymentMethodOptionsBLIKMandateOptionsOffSessionInterval can take

type SetupIntentPaymentMethodOptionsBLIKMandateOptionsType

type SetupIntentPaymentMethodOptionsBLIKMandateOptionsType string

Type of the mandate.

const (
	SetupIntentPaymentMethodOptionsBLIKMandateOptionsTypeOffSession SetupIntentPaymentMethodOptionsBLIKMandateOptionsType = "off_session"
	SetupIntentPaymentMethodOptionsBLIKMandateOptionsTypeOnSession  SetupIntentPaymentMethodOptionsBLIKMandateOptionsType = "on_session"
)

List of values that SetupIntentPaymentMethodOptionsBLIKMandateOptionsType can take

type SetupIntentPaymentMethodOptionsBLIKParams

type SetupIntentPaymentMethodOptionsBLIKParams struct {
	// The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
	Code *string `form:"code"`
}

If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.

type SetupIntentPaymentMethodOptionsCard

type SetupIntentPaymentMethodOptionsCard struct {
	// Configuration options for setting up an eMandate for cards issued in India.
	MandateOptions *SetupIntentPaymentMethodOptionsCardMandateOptions `json:"mandate_options"`
	// Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time.
	Network SetupIntentPaymentMethodOptionsCardNetwork `json:"network"`
	// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
	RequestThreeDSecure SetupIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`
}

type SetupIntentPaymentMethodOptionsCardMandateOptions

type SetupIntentPaymentMethodOptionsCardMandateOptions struct {
	// Amount to be charged for future payments.
	Amount int64 `json:"amount"`
	// One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
	AmountType SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType `json:"amount_type"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// A description of the mandate or subscription that is meant to be displayed to the customer.
	Description string `json:"description"`
	// End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
	EndDate int64 `json:"end_date"`
	// Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
	Interval SetupIntentPaymentMethodOptionsCardMandateOptionsInterval `json:"interval"`
	// The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
	IntervalCount int64 `json:"interval_count"`
	// Unique identifier for the mandate or subscription.
	Reference string `json:"reference"`
	// Start date of the mandate or subscription. Start date should not be lesser than yesterday.
	StartDate int64 `json:"start_date"`
	// Specifies the type of mandates supported. Possible values are `india`.
	SupportedTypes []SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedType `json:"supported_types"`
}

Configuration options for setting up an eMandate for cards issued in India.

type SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType

type SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType string

One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.

const (
	SetupIntentPaymentMethodOptionsCardMandateOptionsAmountTypeFixed   SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType = "fixed"
	SetupIntentPaymentMethodOptionsCardMandateOptionsAmountTypeMaximum SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType = "maximum"
)

List of values that SetupIntentPaymentMethodOptionsCardMandateOptionsAmountType can take

type SetupIntentPaymentMethodOptionsCardMandateOptionsInterval

type SetupIntentPaymentMethodOptionsCardMandateOptionsInterval string

Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.

const (
	SetupIntentPaymentMethodOptionsCardMandateOptionsIntervalDay      SetupIntentPaymentMethodOptionsCardMandateOptionsInterval = "day"
	SetupIntentPaymentMethodOptionsCardMandateOptionsIntervalMonth    SetupIntentPaymentMethodOptionsCardMandateOptionsInterval = "month"
	SetupIntentPaymentMethodOptionsCardMandateOptionsIntervalSporadic SetupIntentPaymentMethodOptionsCardMandateOptionsInterval = "sporadic"
	SetupIntentPaymentMethodOptionsCardMandateOptionsIntervalWeek     SetupIntentPaymentMethodOptionsCardMandateOptionsInterval = "week"
	SetupIntentPaymentMethodOptionsCardMandateOptionsIntervalYear     SetupIntentPaymentMethodOptionsCardMandateOptionsInterval = "year"
)

List of values that SetupIntentPaymentMethodOptionsCardMandateOptionsInterval can take

type SetupIntentPaymentMethodOptionsCardMandateOptionsParams

type SetupIntentPaymentMethodOptionsCardMandateOptionsParams struct {
	// Amount to be charged for future payments.
	Amount *int64 `form:"amount"`
	// One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
	AmountType *string `form:"amount_type"`
	// Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// A description of the mandate or subscription that is meant to be displayed to the customer.
	Description *string `form:"description"`
	// End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
	EndDate *int64 `form:"end_date"`
	// Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
	Interval *string `form:"interval"`
	// The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
	IntervalCount *int64 `form:"interval_count"`
	// Unique identifier for the mandate or subscription.
	Reference *string `form:"reference"`
	// Start date of the mandate or subscription. Start date should not be lesser than yesterday.
	StartDate *int64 `form:"start_date"`
	// Specifies the type of mandates supported. Possible values are `india`.
	SupportedTypes []*string `form:"supported_types"`
}

Configuration options for setting up an eMandate for cards issued in India.

type SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedType

type SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedType string

Specifies the type of mandates supported. Possible values are `india`.

const (
	SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedTypeIndia SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedType = "india"
)

List of values that SetupIntentPaymentMethodOptionsCardMandateOptionsSupportedType can take

type SetupIntentPaymentMethodOptionsCardNetwork

type SetupIntentPaymentMethodOptionsCardNetwork string

Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time.

const (
	SetupIntentPaymentMethodOptionsCardNetworkAmex            SetupIntentPaymentMethodOptionsCardNetwork = "amex"
	SetupIntentPaymentMethodOptionsCardNetworkCartesBancaires SetupIntentPaymentMethodOptionsCardNetwork = "cartes_bancaires"
	SetupIntentPaymentMethodOptionsCardNetworkDiners          SetupIntentPaymentMethodOptionsCardNetwork = "diners"
	SetupIntentPaymentMethodOptionsCardNetworkDiscover        SetupIntentPaymentMethodOptionsCardNetwork = "discover"
	SetupIntentPaymentMethodOptionsCardNetworkInterac         SetupIntentPaymentMethodOptionsCardNetwork = "interac"
	SetupIntentPaymentMethodOptionsCardNetworkJCB             SetupIntentPaymentMethodOptionsCardNetwork = "jcb"
	SetupIntentPaymentMethodOptionsCardNetworkMastercard      SetupIntentPaymentMethodOptionsCardNetwork = "mastercard"
	SetupIntentPaymentMethodOptionsCardNetworkUnionpay        SetupIntentPaymentMethodOptionsCardNetwork = "unionpay"
	SetupIntentPaymentMethodOptionsCardNetworkUnknown         SetupIntentPaymentMethodOptionsCardNetwork = "unknown"
	SetupIntentPaymentMethodOptionsCardNetworkVisa            SetupIntentPaymentMethodOptionsCardNetwork = "visa"
)

List of values that SetupIntentPaymentMethodOptionsCardNetwork can take

type SetupIntentPaymentMethodOptionsCardParams

type SetupIntentPaymentMethodOptionsCardParams struct {
	// Configuration options for setting up an eMandate for cards issued in India.
	MandateOptions *SetupIntentPaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"`
	// When specified, this parameter signals that a card has been collected
	// as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
	// parameter can only be provided during confirmation.
	MOTO *bool `form:"moto"`
	// Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
	Network *string `form:"network"`
	// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
	RequestThreeDSecure *string `form:"request_three_d_secure"`
}

Configuration for any card setup attempted on this SetupIntent.

type SetupIntentPaymentMethodOptionsCardRequestThreeDSecure

type SetupIntentPaymentMethodOptionsCardRequestThreeDSecure string

We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.

const (
	SetupIntentPaymentMethodOptionsCardRequestThreeDSecureAny           SetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "any"
	SetupIntentPaymentMethodOptionsCardRequestThreeDSecureAutomatic     SetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "automatic"
	SetupIntentPaymentMethodOptionsCardRequestThreeDSecureChallengeOnly SetupIntentPaymentMethodOptionsCardRequestThreeDSecure = "challenge_only"
)

List of values that SetupIntentPaymentMethodOptionsCardRequestThreeDSecure can take

type SetupIntentPaymentMethodOptionsLink struct {
	// Token used for persistent Link logins.
	PersistentToken string `json:"persistent_token"`
}

type SetupIntentPaymentMethodOptionsLinkParams

type SetupIntentPaymentMethodOptionsLinkParams struct {
	// Token used for persistent Link logins.
	PersistentToken *string `form:"persistent_token"`
}

If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.

type SetupIntentPaymentMethodOptionsParams

type SetupIntentPaymentMethodOptionsParams struct {
	// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
	ACSSDebit *SetupIntentPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
	// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
	BLIK *SetupIntentPaymentMethodOptionsBLIKParams `form:"blik"`
	// Configuration for any card setup attempted on this SetupIntent.
	Card *SetupIntentPaymentMethodOptionsCardParams `form:"card"`
	// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
	Link *SetupIntentPaymentMethodOptionsLinkParams `form:"link"`
	// If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
	SEPADebit *SetupIntentPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
	// If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
	USBankAccount *SetupIntentPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
}

Payment-method-specific configuration for this SetupIntent.

type SetupIntentPaymentMethodOptionsSEPADebit

type SetupIntentPaymentMethodOptionsSEPADebit struct {
	MandateOptions *SetupIntentPaymentMethodOptionsSEPADebitMandateOptions `json:"mandate_options"`
}

type SetupIntentPaymentMethodOptionsSEPADebitMandateOptions

type SetupIntentPaymentMethodOptionsSEPADebitMandateOptions struct{}

type SetupIntentPaymentMethodOptionsSEPADebitMandateOptionsParams

type SetupIntentPaymentMethodOptionsSEPADebitMandateOptionsParams struct{}

Additional fields for Mandate creation

type SetupIntentPaymentMethodOptionsSEPADebitParams

type SetupIntentPaymentMethodOptionsSEPADebitParams struct {
	// Additional fields for Mandate creation
	MandateOptions *SetupIntentPaymentMethodOptionsSEPADebitMandateOptionsParams `form:"mandate_options"`
}

If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.

type SetupIntentPaymentMethodOptionsUSBankAccount

type SetupIntentPaymentMethodOptionsUSBankAccount struct {
	FinancialConnections *SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"`
	// Bank account verification method.
	VerificationMethod SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"`
}

type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnections

type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnections struct {
	// The list of permissions to request. The `payment_method` permission must be included.
	Permissions []SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"`
	// For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
	ReturnURL string `json:"return_url"`
}

type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams

type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
	// The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
	Permissions []*string `form:"permissions"`
	// For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
	ReturnURL *string `form:"return_url"`
}

Additional fields for Financial Connections Session creation

type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission

type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string

The list of permissions to request. The `payment_method` permission must be included.

const (
	SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances      SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances"
	SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership     SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "ownership"
	SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method"
	SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions  SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions"
)

List of values that SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take

type SetupIntentPaymentMethodOptionsUSBankAccountNetworksParams

type SetupIntentPaymentMethodOptionsUSBankAccountNetworksParams struct {
	// Triggers validations to run across the selected networks
	Requested []*string `form:"requested"`
}

Additional fields for network related functions

type SetupIntentPaymentMethodOptionsUSBankAccountParams

type SetupIntentPaymentMethodOptionsUSBankAccountParams struct {
	// Additional fields for Financial Connections Session creation
	FinancialConnections *SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
	// Additional fields for network related functions
	Networks *SetupIntentPaymentMethodOptionsUSBankAccountNetworksParams `form:"networks"`
	// Verification method for the intent
	VerificationMethod *string `form:"verification_method"`
}

If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.

type SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod

type SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod string

Bank account verification method.

const (
	SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic     SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic"
	SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethodInstant       SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "instant"
	SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethodMicrodeposits SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod = "microdeposits"
)

List of values that SetupIntentPaymentMethodOptionsUSBankAccountVerificationMethod can take

type SetupIntentSingleUseParams

type SetupIntentSingleUseParams struct {
	// Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
}

If this hash is populated, this SetupIntent will generate a single_use Mandate on success.

type SetupIntentStatus

type SetupIntentStatus string

[Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.

const (
	SetupIntentStatusCanceled              SetupIntentStatus = "canceled"
	SetupIntentStatusProcessing            SetupIntentStatus = "processing"
	SetupIntentStatusRequiresAction        SetupIntentStatus = "requires_action"
	SetupIntentStatusRequiresConfirmation  SetupIntentStatus = "requires_confirmation"
	SetupIntentStatusRequiresPaymentMethod SetupIntentStatus = "requires_payment_method"
	SetupIntentStatusSucceeded             SetupIntentStatus = "succeeded"
)

List of values that SetupIntentStatus can take

type SetupIntentUsage

type SetupIntentUsage string

Indicates how the payment method is intended to be used in the future.

Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.

const (
	SetupIntentUsageOffSession SetupIntentUsage = "off_session"
	SetupIntentUsageOnSession  SetupIntentUsage = "on_session"
)

List of values that SetupIntentUsage can take

type SetupIntentVerifyMicrodepositsParams

type SetupIntentVerifyMicrodepositsParams struct {
	Params `form:"*"`
	// Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account.
	Amounts []*int64 `form:"amounts"`
	// A six-character code starting with SM present in the microdeposit sent to the bank account.
	DescriptorCode *string `form:"descriptor_code"`
}

Verifies microdeposits on a SetupIntent object.

type ShippingDetails

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

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 ShippingRate

type ShippingRate struct {
	APIResource
	// Whether the shipping rate can be used for new purchases. Defaults to `true`.
	Active bool `json:"active"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
	DeliveryEstimate *ShippingRateDeliveryEstimate `json:"delivery_estimate"`
	// The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
	DisplayName string                   `json:"display_name"`
	FixedAmount *ShippingRateFixedAmount `json:"fixed_amount"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
	TaxBehavior ShippingRateTaxBehavior `json:"tax_behavior"`
	// A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
	TaxCode *TaxCode `json:"tax_code"`
	// The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.
	Type ShippingRateType `json:"type"`
}

Shipping rates describe the price of shipping presented to your customers and can be applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs.

func (*ShippingRate) UnmarshalJSON

func (s *ShippingRate) UnmarshalJSON(data []byte) error

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

type ShippingRateDeliveryEstimate

type ShippingRateDeliveryEstimate struct {
	// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
	Maximum *ShippingRateDeliveryEstimateMaximum `json:"maximum"`
	// The lower bound of the estimated range. If empty, represents no lower bound.
	Minimum *ShippingRateDeliveryEstimateMinimum `json:"minimum"`
}

The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.

type ShippingRateDeliveryEstimateMaximum

type ShippingRateDeliveryEstimateMaximum struct {
	// A unit of time.
	Unit ShippingRateDeliveryEstimateMaximumUnit `json:"unit"`
	// Must be greater than 0.
	Value int64 `json:"value"`
}

The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.

type ShippingRateDeliveryEstimateMaximumParams

type ShippingRateDeliveryEstimateMaximumParams struct {
	// A unit of time.
	Unit *string `form:"unit"`
	// Must be greater than 0.
	Value *int64 `form:"value"`
}

The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.

type ShippingRateDeliveryEstimateMaximumUnit

type ShippingRateDeliveryEstimateMaximumUnit string

A unit of time.

const (
	ShippingRateDeliveryEstimateMaximumUnitBusinessDay ShippingRateDeliveryEstimateMaximumUnit = "business_day"
	ShippingRateDeliveryEstimateMaximumUnitDay         ShippingRateDeliveryEstimateMaximumUnit = "day"
	ShippingRateDeliveryEstimateMaximumUnitHour        ShippingRateDeliveryEstimateMaximumUnit = "hour"
	ShippingRateDeliveryEstimateMaximumUnitMonth       ShippingRateDeliveryEstimateMaximumUnit = "month"
	ShippingRateDeliveryEstimateMaximumUnitWeek        ShippingRateDeliveryEstimateMaximumUnit = "week"
)

List of values that ShippingRateDeliveryEstimateMaximumUnit can take

type ShippingRateDeliveryEstimateMinimum

type ShippingRateDeliveryEstimateMinimum struct {
	// A unit of time.
	Unit ShippingRateDeliveryEstimateMinimumUnit `json:"unit"`
	// Must be greater than 0.
	Value int64 `json:"value"`
}

The lower bound of the estimated range. If empty, represents no lower bound.

type ShippingRateDeliveryEstimateMinimumParams

type ShippingRateDeliveryEstimateMinimumParams struct {
	// A unit of time.
	Unit *string `form:"unit"`
	// Must be greater than 0.
	Value *int64 `form:"value"`
}

The lower bound of the estimated range. If empty, represents no lower bound.

type ShippingRateDeliveryEstimateMinimumUnit

type ShippingRateDeliveryEstimateMinimumUnit string

A unit of time.

const (
	ShippingRateDeliveryEstimateMinimumUnitBusinessDay ShippingRateDeliveryEstimateMinimumUnit = "business_day"
	ShippingRateDeliveryEstimateMinimumUnitDay         ShippingRateDeliveryEstimateMinimumUnit = "day"
	ShippingRateDeliveryEstimateMinimumUnitHour        ShippingRateDeliveryEstimateMinimumUnit = "hour"
	ShippingRateDeliveryEstimateMinimumUnitMonth       ShippingRateDeliveryEstimateMinimumUnit = "month"
	ShippingRateDeliveryEstimateMinimumUnitWeek        ShippingRateDeliveryEstimateMinimumUnit = "week"
)

List of values that ShippingRateDeliveryEstimateMinimumUnit can take

type ShippingRateDeliveryEstimateParams

type ShippingRateDeliveryEstimateParams struct {
	// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
	Maximum *ShippingRateDeliveryEstimateMaximumParams `form:"maximum"`
	// The lower bound of the estimated range. If empty, represents no lower bound.
	Minimum *ShippingRateDeliveryEstimateMinimumParams `form:"minimum"`
}

The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.

type ShippingRateFixedAmount

type ShippingRateFixedAmount struct {
	// A non-negative integer in cents representing how much to charge.
	Amount int64 `json:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
	CurrencyOptions map[string]*ShippingRateFixedAmountCurrencyOptions `json:"currency_options"`
}

type ShippingRateFixedAmountCurrencyOptions

type ShippingRateFixedAmountCurrencyOptions struct {
	// A non-negative integer in cents representing how much to charge.
	Amount int64 `json:"amount"`
	// Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
	TaxBehavior ShippingRateFixedAmountCurrencyOptionsTaxBehavior `json:"tax_behavior"`
}

Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

type ShippingRateFixedAmountCurrencyOptionsParams

type ShippingRateFixedAmountCurrencyOptionsParams struct {
	// A non-negative integer in cents representing how much to charge.
	Amount *int64 `form:"amount"`
	// Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
	TaxBehavior *string `form:"tax_behavior"`
}

Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).

type ShippingRateFixedAmountCurrencyOptionsTaxBehavior

type ShippingRateFixedAmountCurrencyOptionsTaxBehavior string

Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.

const (
	ShippingRateFixedAmountCurrencyOptionsTaxBehaviorExclusive   ShippingRateFixedAmountCurrencyOptionsTaxBehavior = "exclusive"
	ShippingRateFixedAmountCurrencyOptionsTaxBehaviorInclusive   ShippingRateFixedAmountCurrencyOptionsTaxBehavior = "inclusive"
	ShippingRateFixedAmountCurrencyOptionsTaxBehaviorUnspecified ShippingRateFixedAmountCurrencyOptionsTaxBehavior = "unspecified"
)

List of values that ShippingRateFixedAmountCurrencyOptionsTaxBehavior can take

type ShippingRateFixedAmountParams

type ShippingRateFixedAmountParams struct {
	// A non-negative integer in cents representing how much to charge.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
	CurrencyOptions map[string]*ShippingRateFixedAmountCurrencyOptionsParams `form:"currency_options"`
}

Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.

type ShippingRateList

type ShippingRateList struct {
	APIResource
	ListMeta
	Data []*ShippingRate `json:"data"`
}

ShippingRateList is a list of ShippingRates as retrieved from a list endpoint.

type ShippingRateListParams

type ShippingRateListParams struct {
	ListParams `form:"*"`
	// Only return shipping rates that are active or inactive.
	Active *bool `form:"active"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	Created *int64 `form:"created"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return shipping rates for the given currency.
	Currency *string `form:"currency"`
}

Returns a list of your shipping rates.

type ShippingRateParams

type ShippingRateParams struct {
	Params `form:"*"`
	// Whether the shipping rate can be used for new purchases. Defaults to `true`.
	Active *bool `form:"active"`
	// The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
	DeliveryEstimate *ShippingRateDeliveryEstimateParams `form:"delivery_estimate"`
	// The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
	DisplayName *string `form:"display_name"`
	// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
	FixedAmount *ShippingRateFixedAmountParams `form:"fixed_amount"`
	// Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
	TaxBehavior *string `form:"tax_behavior"`
	// A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
	TaxCode *string `form:"tax_code"`
	// The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.
	Type *string `form:"type"`
}

Creates a new shipping rate object.

type ShippingRateTaxBehavior

type ShippingRateTaxBehavior string

Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.

const (
	ShippingRateTaxBehaviorExclusive   ShippingRateTaxBehavior = "exclusive"
	ShippingRateTaxBehaviorInclusive   ShippingRateTaxBehavior = "inclusive"
	ShippingRateTaxBehaviorUnspecified ShippingRateTaxBehavior = "unspecified"
)

List of values that ShippingRateTaxBehavior can take

type ShippingRateType

type ShippingRateType string

The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now.

const (
	ShippingRateTypeFixedAmount ShippingRateType = "fixed_amount"
)

List of values that ShippingRateType can take

type SigmaScheduledQueryRun

type SigmaScheduledQueryRun struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// When the query was run, Sigma contained a snapshot of your Stripe data at this time.
	DataLoadTime int64                        `json:"data_load_time"`
	Error        *SigmaScheduledQueryRunError `json:"error"`
	// The file object representing the results of the query.
	File *File `json:"file"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Time at which the result expires and is no longer available for download.
	ResultAvailableUntil int64 `json:"result_available_until"`
	// SQL for the query.
	SQL string `json:"sql"`
	// The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.
	Status SigmaScheduledQueryRunStatus `json:"status"`
	// Title of the query.
	Title string `json:"title"`
}

If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll receive a `sigma.scheduled_query_run.created` webhook each time the query runs. The webhook contains a `ScheduledQueryRun` object, which you can use to retrieve the query results.

type SigmaScheduledQueryRunError

type SigmaScheduledQueryRunError struct {
	// Information about the run failure.
	Message string `json:"message"`
}

type SigmaScheduledQueryRunList

type SigmaScheduledQueryRunList struct {
	APIResource
	ListMeta
	Data []*SigmaScheduledQueryRun `json:"data"`
}

SigmaScheduledQueryRunList is a list of ScheduledQueryRuns as retrieved from a list endpoint.

type SigmaScheduledQueryRunListParams

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

Returns a list of scheduled query runs.

type SigmaScheduledQueryRunParams

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

Retrieves the details of an scheduled query run.

type SigmaScheduledQueryRunStatus

type SigmaScheduledQueryRunStatus string

The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.

const (
	SigmaScheduledQueryRunStatusCanceled  SigmaScheduledQueryRunStatus = "canceled"
	SigmaScheduledQueryRunStatusCompleted SigmaScheduledQueryRunStatus = "completed"
	SigmaScheduledQueryRunStatusFailed    SigmaScheduledQueryRunStatus = "failed"
	SigmaScheduledQueryRunStatusTimedOut  SigmaScheduledQueryRunStatus = "timed_out"
)

List of values that SigmaScheduledQueryRunStatus can take

type Source

type Source struct {
	APIResource
	ACHCreditTransfer *SourceACHCreditTransfer `json:"ach_credit_transfer"`
	ACHDebit          *SourceACHDebit          `json:"ach_debit"`
	ACSSDebit         *SourceACSSDebit         `json:"acss_debit"`
	Alipay            *SourceAlipay            `json:"alipay"`
	// A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources.
	Amount      int64              `json:"amount"`
	AUBECSDebit *SourceAUBECSDebit `json:"au_becs_debit"`
	Bancontact  *SourceBancontact  `json:"bancontact"`
	Card        *SourceCard        `json:"card"`
	CardPresent *SourceCardPresent `json:"card_present"`
	// The client secret of the source. Used for client-side retrieval using a publishable key.
	ClientSecret     string                  `json:"client_secret"`
	CodeVerification *SourceCodeVerification `json:"code_verification"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources.
	Currency Currency `json:"currency"`
	// The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
	Customer string     `json:"customer"`
	EPS      *SourceEPS `json:"eps"`
	// The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.
	Flow    SourceFlow     `json:"flow"`
	Giropay *SourceGiropay `json:"giropay"`
	// Unique identifier for the object.
	ID     string        `json:"id"`
	IDEAL  *SourceIDEAL  `json:"ideal"`
	Klarna *SourceKlarna `json:"klarna"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata   map[string]string `json:"metadata"`
	Multibanco *SourceMultibanco `json:"multibanco"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Information about the owner of the payment instrument that may be used or required by particular source types.
	Owner              *SourceOwner              `json:"owner"`
	P24                *SourceP24                `json:"p24"`
	Receiver           *SourceReceiver           `json:"receiver"`
	Redirect           *SourceRedirect           `json:"redirect"`
	SEPACreditTransfer *SourceSEPACreditTransfer `json:"sepa_credit_transfer"`
	SEPADebit          *SourceSEPADebit          `json:"sepa_debit"`
	Sofort             *SourceSofort             `json:"sofort"`
	SourceOrder        *SourceSourceOrder        `json:"source_order"`
	// Extra information about a source. This will appear on your customer's statement every time you charge the source.
	StatementDescriptor string `json:"statement_descriptor"`
	// The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.
	Status       SourceStatus        `json:"status"`
	ThreeDSecure *SourceThreeDSecure `json:"three_d_secure"`
	// The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used.
	Type string `json:"type"`
	// Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
	Usage  SourceUsage   `json:"usage"`
	WeChat *SourceWeChat `json:"wechat"`
}

`Source` objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like a `Card` object: once chargeable, they can be charged, or can be attached to customers.

Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).

func (*Source) UnmarshalJSON

func (s *Source) UnmarshalJSON(data []byte) error

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

type SourceACHCreditTransfer

type SourceACHCreditTransfer struct {
	AccountNumber           string `json:"account_number"`
	BankName                string `json:"bank_name"`
	Fingerprint             string `json:"fingerprint"`
	RefundAccountHolderName string `json:"refund_account_holder_name"`
	RefundAccountHolderType string `json:"refund_account_holder_type"`
	RefundRoutingNumber     string `json:"refund_routing_number"`
	RoutingNumber           string `json:"routing_number"`
	SwiftCode               string `json:"swift_code"`
}

type SourceACHDebit

type SourceACHDebit struct {
	BankName      string `json:"bank_name"`
	Country       string `json:"country"`
	Fingerprint   string `json:"fingerprint"`
	Last4         string `json:"last4"`
	RoutingNumber string `json:"routing_number"`
	Type          string `json:"type"`
}

type SourceACSSDebit

type SourceACSSDebit struct {
	BankAddressCity       string `json:"bank_address_city"`
	BankAddressLine1      string `json:"bank_address_line_1"`
	BankAddressLine2      string `json:"bank_address_line_2"`
	BankAddressPostalCode string `json:"bank_address_postal_code"`
	BankName              string `json:"bank_name"`
	Category              string `json:"category"`
	Country               string `json:"country"`
	Fingerprint           string `json:"fingerprint"`
	Last4                 string `json:"last4"`
	RoutingNumber         string `json:"routing_number"`
}

type SourceAUBECSDebit

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

type SourceAlipay

type SourceAlipay struct {
	DataString          string `json:"data_string"`
	NativeURL           string `json:"native_url"`
	StatementDescriptor string `json:"statement_descriptor"`
}

type SourceBancontact

type SourceBancontact 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"`
	StatementDescriptor string `json:"statement_descriptor"`
}

type SourceCard

type SourceCard struct {
	AddressLine1Check  string `json:"address_line1_check"`
	AddressZipCheck    string `json:"address_zip_check"`
	Brand              string `json:"brand"`
	Country            string `json:"country"`
	CVCCheck           string `json:"cvc_check"`
	Description        string `json:"description"`
	DynamicLast4       string `json:"dynamic_last4"`
	ExpMonth           int64  `json:"exp_month"`
	ExpYear            int64  `json:"exp_year"`
	Fingerprint        string `json:"fingerprint"`
	Funding            string `json:"funding"`
	IIN                string `json:"iin"`
	Issuer             string `json:"issuer"`
	Last4              string `json:"last4"`
	Name               string `json:"name"`
	ThreeDSecure       string `json:"three_d_secure"`
	TokenizationMethod string `json:"tokenization_method"`
}

type SourceCardPresent

type SourceCardPresent struct {
	ApplicationCryptogram          string `json:"application_cryptogram"`
	ApplicationPreferredName       string `json:"application_preferred_name"`
	AuthorizationCode              string `json:"authorization_code"`
	AuthorizationResponseCode      string `json:"authorization_response_code"`
	Brand                          string `json:"brand"`
	Country                        string `json:"country"`
	CVMType                        string `json:"cvm_type"`
	DataType                       string `json:"data_type"`
	DedicatedFileName              string `json:"dedicated_file_name"`
	Description                    string `json:"description"`
	EmvAuthData                    string `json:"emv_auth_data"`
	EvidenceCustomerSignature      string `json:"evidence_customer_signature"`
	EvidenceTransactionCertificate string `json:"evidence_transaction_certificate"`
	ExpMonth                       int64  `json:"exp_month"`
	ExpYear                        int64  `json:"exp_year"`
	Fingerprint                    string `json:"fingerprint"`
	Funding                        string `json:"funding"`
	IIN                            string `json:"iin"`
	Issuer                         string `json:"issuer"`
	Last4                          string `json:"last4"`
	POSDeviceID                    string `json:"pos_device_id"`
	POSEntryMode                   string `json:"pos_entry_mode"`
	Reader                         string `json:"reader"`
	ReadMethod                     string `json:"read_method"`
	TerminalVerificationResults    string `json:"terminal_verification_results"`
	TransactionStatusInformation   string `json:"transaction_status_information"`
}

type SourceCodeVerification

type SourceCodeVerification struct {
	// The number of attempts remaining to authenticate the source object with a verification code.
	AttemptsRemaining int64 `json:"attempts_remaining"`
	// The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).
	Status SourceCodeVerificationStatus `json:"status"`
}

type SourceCodeVerificationStatus

type SourceCodeVerificationStatus string

The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).

const (
	SourceCodeVerificationStatusFailed    SourceCodeVerificationStatus = "failed"
	SourceCodeVerificationStatusPending   SourceCodeVerificationStatus = "pending"
	SourceCodeVerificationStatusSucceeded SourceCodeVerificationStatus = "succeeded"
)

List of values that SourceCodeVerificationStatus can take

type SourceDetachParams

type SourceDetachParams struct {
	Params   `form:"*"`
	Customer *string `form:"-"` // Included in URL
}

Delete a specified source for a given customer.

type SourceEPS

type SourceEPS struct {
	Reference           string `json:"reference"`
	StatementDescriptor string `json:"statement_descriptor"`
}

type SourceFlow

type SourceFlow string

The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.

const (
	SourceFlowCodeVerification SourceFlow = "code_verification"
	SourceFlowNone             SourceFlow = "none"
	SourceFlowReceiver         SourceFlow = "receiver"
	SourceFlowRedirect         SourceFlow = "redirect"
)

List of values that SourceFlow can take

type SourceGiropay

type SourceGiropay struct {
	BankCode            string `json:"bank_code"`
	BankName            string `json:"bank_name"`
	BIC                 string `json:"bic"`
	StatementDescriptor string `json:"statement_descriptor"`
}

type SourceIDEAL

type SourceIDEAL struct {
	Bank                string `json:"bank"`
	BIC                 string `json:"bic"`
	IBANLast4           string `json:"iban_last4"`
	StatementDescriptor string `json:"statement_descriptor"`
}

type SourceKlarna

type SourceKlarna struct {
	BackgroundImageURL              string `json:"background_image_url"`
	ClientToken                     string `json:"client_token"`
	FirstName                       string `json:"first_name"`
	LastName                        string `json:"last_name"`
	Locale                          string `json:"locale"`
	LogoURL                         string `json:"logo_url"`
	PageTitle                       string `json:"page_title"`
	PayLaterAssetURLsDescriptive    string `json:"pay_later_asset_urls_descriptive"`
	PayLaterAssetURLsStandard       string `json:"pay_later_asset_urls_standard"`
	PayLaterName                    string `json:"pay_later_name"`
	PayLaterRedirectURL             string `json:"pay_later_redirect_url"`
	PaymentMethodCategories         string `json:"payment_method_categories"`
	PayNowAssetURLsDescriptive      string `json:"pay_now_asset_urls_descriptive"`
	PayNowAssetURLsStandard         string `json:"pay_now_asset_urls_standard"`
	PayNowName                      string `json:"pay_now_name"`
	PayNowRedirectURL               string `json:"pay_now_redirect_url"`
	PayOverTimeAssetURLsDescriptive string `json:"pay_over_time_asset_urls_descriptive"`
	PayOverTimeAssetURLsStandard    string `json:"pay_over_time_asset_urls_standard"`
	PayOverTimeName                 string `json:"pay_over_time_name"`
	PayOverTimeRedirectURL          string `json:"pay_over_time_redirect_url"`
	PurchaseCountry                 string `json:"purchase_country"`
	PurchaseType                    string `json:"purchase_type"`
	RedirectURL                     string `json:"redirect_url"`
	ShippingDelay                   int64  `json:"shipping_delay"`
	ShippingFirstName               string `json:"shipping_first_name"`
	ShippingLastName                string `json:"shipping_last_name"`
}

type SourceMandateAcceptanceOfflineParams

type SourceMandateAcceptanceOfflineParams struct {
	// An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
	ContactEmail *string `form:"contact_email"`
}

The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`

type SourceMandateAcceptanceOnlineParams

type SourceMandateAcceptanceOnlineParams struct {
	// The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
	Date *int64 `form:"date"`
	// The IP address from which the mandate was accepted or refused by the customer.
	IP *string `form:"ip"`
	// The user agent of the browser from which the mandate was accepted or refused by the customer.
	UserAgent *string `form:"user_agent"`
}

The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`

type SourceMandateAcceptanceParams

type SourceMandateAcceptanceParams struct {
	// The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
	Date *int64 `form:"date"`
	// The IP address from which the mandate was accepted or refused by the customer.
	IP *string `form:"ip"`
	// The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
	Offline *SourceMandateAcceptanceOfflineParams `form:"offline"`
	// The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
	Online *SourceMandateAcceptanceOnlineParams `form:"online"`
	// The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
	Status *string `form:"status"`
	// The type of acceptance information included with the mandate. Either `online` or `offline`
	Type *string `form:"type"`
	// The user agent of the browser from which the mandate was accepted or refused by the customer.
	UserAgent *string `form:"user_agent"`
}

The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.

type SourceMandateParams

type SourceMandateParams struct {
	// The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
	Acceptance *SourceMandateAcceptanceParams `form:"acceptance"`
	// The amount specified by the mandate. (Leave null for a mandate covering all amounts)
	Amount *int64 `form:"amount"`
	// The currency specified by the mandate. (Must match `currency` of the source)
	Currency *string `form:"currency"`
	// The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
	Interval *string `form:"interval"`
	// The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
	NotificationMethod *string `form:"notification_method"`
}

Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.

type SourceMultibanco

type SourceMultibanco struct {
	Entity                               string `json:"entity"`
	Reference                            string `json:"reference"`
	RefundAccountHolderAddressCity       string `json:"refund_account_holder_address_city"`
	RefundAccountHolderAddressCountry    string `json:"refund_account_holder_address_country"`
	RefundAccountHolderAddressLine1      string `json:"refund_account_holder_address_line1"`
	RefundAccountHolderAddressLine2      string `json:"refund_account_holder_address_line2"`
	RefundAccountHolderAddressPostalCode string `json:"refund_account_holder_address_postal_code"`
	RefundAccountHolderAddressState      string `json:"refund_account_holder_address_state"`
	RefundAccountHolderName              string `json:"refund_account_holder_name"`
	RefundIBAN                           string `json:"refund_iban"`
}

type SourceOwner

type SourceOwner struct {
	// Owner's address.
	Address *Address `json:"address"`
	// Owner's email address.
	Email string `json:"email"`
	// Owner's full name.
	Name string `json:"name"`
	// Owner's phone number (including extension).
	Phone string `json:"phone"`
	// Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
	VerifiedAddress *Address `json:"verified_address"`
	// Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
	VerifiedEmail string `json:"verified_email"`
	// Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
	VerifiedName string `json:"verified_name"`
	// Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
	VerifiedPhone string `json:"verified_phone"`
}

Information about the owner of the payment instrument that may be used or required by particular source types.

type SourceOwnerParams

type SourceOwnerParams struct {
	// Owner's address.
	Address *AddressParams `form:"address"`
	// Owner's email address.
	Email *string `form:"email"`
	// Owner's full name.
	Name *string `form:"name"`
	// Owner's phone number.
	Phone *string `form:"phone"`
}

Information about the owner of the payment instrument that may be used or required by particular source types.

type SourceP24

type SourceP24 struct {
	Reference string `json:"reference"`
}

type SourceParams

type SourceParams struct {
	Params `form:"*"`
	// Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.
	Amount *int64 `form:"amount"`
	// The client secret of the source. Required if a publishable key is used to retrieve the source.
	ClientSecret *string `form:"client_secret"`
	// Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.
	Currency *string `form:"currency"`
	// The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).
	Customer *string `form:"customer"`
	// The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.
	Flow *string `form:"flow"`
	// Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
	Mandate *SourceMandateParams `form:"mandate"`
	// The source to share.
	OriginalSource *string `form:"original_source"`
	// Information about the owner of the payment instrument that may be used or required by particular source types.
	Owner *SourceOwnerParams `form:"owner"`
	// Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).
	Receiver *SourceReceiverParams `form:"receiver"`
	// Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).
	Redirect *SourceRedirectParams `form:"redirect"`
	// Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
	SourceOrder *SourceSourceOrderParams `form:"source_order"`
	// An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.
	StatementDescriptor *string `form:"statement_descriptor"`
	// An optional token used to create the source. When passed, token properties will override source parameters.
	Token *string `form:"token"`
	// The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide)
	Type  *string `form:"type"`
	Usage *string `form:"usage"`
}

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

type SourceReceiver

type SourceReceiver struct {
	// The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.
	Address string `json:"address"`
	// The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency.
	AmountCharged int64 `json:"amount_charged"`
	// The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency.
	AmountReceived int64 `json:"amount_received"`
	// The total amount that was returned to the customer. The amount returned is expressed in the source's currency.
	AmountReturned int64 `json:"amount_returned"`
	// Type of refund attribute method, one of `email`, `manual`, or `none`.
	RefundAttributesMethod SourceReceiverRefundAttributesMethod `json:"refund_attributes_method"`
	// Type of refund attribute status, one of `missing`, `requested`, or `available`.
	RefundAttributesStatus SourceReceiverRefundAttributesStatus `json:"refund_attributes_status"`
}

type SourceReceiverParams

type SourceReceiverParams struct {
	// The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required.
	RefundAttributesMethod *string `form:"refund_attributes_method"`
}

Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).

type SourceReceiverRefundAttributesMethod

type SourceReceiverRefundAttributesMethod string

Type of refund attribute method, one of `email`, `manual`, or `none`.

const (
	SourceReceiverRefundAttributesMethodEmail  SourceReceiverRefundAttributesMethod = "email"
	SourceReceiverRefundAttributesMethodManual SourceReceiverRefundAttributesMethod = "manual"
)

List of values that SourceReceiverRefundAttributesMethod can take

type SourceReceiverRefundAttributesStatus

type SourceReceiverRefundAttributesStatus string

Type of refund attribute status, one of `missing`, `requested`, or `available`.

const (
	SourceReceiverRefundAttributesStatusAvailable SourceReceiverRefundAttributesStatus = "available"
	SourceReceiverRefundAttributesStatusMissing   SourceReceiverRefundAttributesStatus = "missing"
	SourceReceiverRefundAttributesStatusRequested SourceReceiverRefundAttributesStatus = "requested"
)

List of values that SourceReceiverRefundAttributesStatus can take

type SourceRedirect

type SourceRedirect struct {
	// The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`.
	FailureReason SourceRedirectFailureReason `json:"failure_reason"`
	// The URL you provide to redirect the customer to after they authenticated their payment.
	ReturnURL string `json:"return_url"`
	// The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).
	Status SourceRedirectStatus `json:"status"`
	// The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.
	URL string `json:"url"`
}

type SourceRedirectFailureReason

type SourceRedirectFailureReason string

The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`.

const (
	SourceRedirectFailureReasonDeclined        SourceRedirectFailureReason = "declined"
	SourceRedirectFailureReasonProcessingError SourceRedirectFailureReason = "processing_error"
	SourceRedirectFailureReasonUserAbort       SourceRedirectFailureReason = "user_abort"
)

List of values that SourceRedirectFailureReason can take

type SourceRedirectParams

type SourceRedirectParams struct {
	// The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application.
	ReturnURL *string `form:"return_url"`
}

Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).

type SourceRedirectStatus

type SourceRedirectStatus string

The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).

const (
	SourceRedirectStatusFailed      SourceRedirectStatus = "failed"
	SourceRedirectStatusNotRequired SourceRedirectStatus = "not_required"
	SourceRedirectStatusPending     SourceRedirectStatus = "pending"
	SourceRedirectStatusSucceeded   SourceRedirectStatus = "succeeded"
)

List of values that SourceRedirectStatus can take

type SourceSEPACreditTransfer

type SourceSEPACreditTransfer struct {
	BankName                             string `json:"bank_name"`
	BIC                                  string `json:"bic"`
	IBAN                                 string `json:"iban"`
	RefundAccountHolderAddressCity       string `json:"refund_account_holder_address_city"`
	RefundAccountHolderAddressCountry    string `json:"refund_account_holder_address_country"`
	RefundAccountHolderAddressLine1      string `json:"refund_account_holder_address_line1"`
	RefundAccountHolderAddressLine2      string `json:"refund_account_holder_address_line2"`
	RefundAccountHolderAddressPostalCode string `json:"refund_account_holder_address_postal_code"`
	RefundAccountHolderAddressState      string `json:"refund_account_holder_address_state"`
	RefundAccountHolderName              string `json:"refund_account_holder_name"`
	RefundIBAN                           string `json:"refund_iban"`
}

type SourceSEPADebit

type SourceSEPADebit struct {
	BankCode         string `json:"bank_code"`
	BranchCode       string `json:"branch_code"`
	Country          string `json:"country"`
	Fingerprint      string `json:"fingerprint"`
	Last4            string `json:"last4"`
	MandateReference string `json:"mandate_reference"`
	MandateURL       string `json:"mandate_url"`
}

type SourceSofort

type SourceSofort struct {
	BankCode            string `json:"bank_code"`
	BankName            string `json:"bank_name"`
	BIC                 string `json:"bic"`
	Country             string `json:"country"`
	IBANLast4           string `json:"iban_last4"`
	PreferredLanguage   string `json:"preferred_language"`
	StatementDescriptor string `json:"statement_descriptor"`
}

type SourceSourceOrder

type SourceSourceOrder struct {
	// A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.
	Amount int64 `json:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// The email address of the customer placing the order.
	Email string `json:"email"`
	// List of items constituting the order.
	Items    []*SourceSourceOrderItem `json:"items"`
	Shipping ShippingDetails          `json:"shipping"`
}

type SourceSourceOrderItem

type SourceSourceOrderItem struct {
	// The amount (price) for this order item.
	Amount int64 `json:"amount"`
	// This currency of this order item. Required when `amount` is present.
	Currency Currency `json:"currency"`
	// Human-readable description for this order item.
	Description string `json:"description"`
	// The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU).
	Parent string `json:"parent"`
	// The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
	Quantity int64 `json:"quantity"`
	// The type of this order item. Must be `sku`, `tax`, or `shipping`.
	Type SourceSourceOrderItemType `json:"type"`
}

List of items constituting the order.

type SourceSourceOrderItemParams

type SourceSourceOrderItemParams struct {
	Amount      *int64  `form:"amount"`
	Currency    *string `form:"currency"`
	Description *string `form:"description"`
	// The ID of the SKU being ordered.
	Parent *string `form:"parent"`
	// The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
	Quantity *int64  `form:"quantity"`
	Type     *string `form:"type"`
}

List of items constituting the order.

type SourceSourceOrderItemType

type SourceSourceOrderItemType string

The type of this order item. Must be `sku`, `tax`, or `shipping`.

const (
	SourceSourceOrderItemTypeDiscount SourceSourceOrderItemType = "discount"
	SourceSourceOrderItemTypeSKU      SourceSourceOrderItemType = "sku"
	SourceSourceOrderItemTypeShipping SourceSourceOrderItemType = "shipping"
	SourceSourceOrderItemTypeTax      SourceSourceOrderItemType = "tax"
)

List of values that SourceSourceOrderItemType can take

type SourceSourceOrderParams

type SourceSourceOrderParams struct {
	// List of items constituting the order.
	Items []*SourceSourceOrderItemParams `form:"items"`
	// Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
	Shipping *ShippingDetailsParams `form:"shipping"`
}

Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.

type SourceStatus

type SourceStatus string

The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.

const (
	SourceStatusCanceled   SourceStatus = "canceled"
	SourceStatusChargeable SourceStatus = "chargeable"
	SourceStatusConsumed   SourceStatus = "consumed"
	SourceStatusFailed     SourceStatus = "failed"
	SourceStatusPending    SourceStatus = "pending"
)

List of values that SourceStatus can take

type SourceThreeDSecure

type SourceThreeDSecure struct {
	AddressLine1Check  string `json:"address_line1_check"`
	AddressZipCheck    string `json:"address_zip_check"`
	Authenticated      bool   `json:"authenticated"`
	Brand              string `json:"brand"`
	Card               string `json:"card"`
	Country            string `json:"country"`
	Customer           string `json:"customer"`
	CVCCheck           string `json:"cvc_check"`
	Description        string `json:"description"`
	DynamicLast4       string `json:"dynamic_last4"`
	ExpMonth           int64  `json:"exp_month"`
	ExpYear            int64  `json:"exp_year"`
	Fingerprint        string `json:"fingerprint"`
	Funding            string `json:"funding"`
	IIN                string `json:"iin"`
	Issuer             string `json:"issuer"`
	Last4              string `json:"last4"`
	Name               string `json:"name"`
	ThreeDSecure       string `json:"three_d_secure"`
	TokenizationMethod string `json:"tokenization_method"`
}

type SourceTransaction

type SourceTransaction struct {
	ACHCreditTransfer *SourceTransactionACHCreditTransfer `json:"ach_credit_transfer"`
	// A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver.
	Amount            int64                               `json:"amount"`
	CHFCreditTransfer *SourceTransactionCHFCreditTransfer `json:"chf_credit_transfer"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency          Currency                            `json:"currency"`
	GBPCreditTransfer *SourceTransactionGBPCreditTransfer `json:"gbp_credit_transfer"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object             string                               `json:"object"`
	PaperCheck         *SourceTransactionPaperCheck         `json:"paper_check"`
	SEPACreditTransfer *SourceTransactionSEPACreditTransfer `json:"sepa_credit_transfer"`
	// The ID of the source this transaction is attached to.
	Source string `json:"source"`
	// The status of the transaction, one of `succeeded`, `pending`, or `failed`.
	Status string `json:"status"`
	// The type of source this transaction is attached to.
	Type string `json:"type"`
}

Some payment methods have no required amount that a customer must send. Customers can be instructed to send any amount, and it can be made up of multiple transactions. As such, sources can have multiple associated transactions.

type SourceTransactionACHCreditTransfer

type SourceTransactionACHCreditTransfer struct {
	// Customer data associated with the transfer.
	CustomerData string `json:"customer_data"`
	// Bank account fingerprint associated with the transfer.
	Fingerprint string `json:"fingerprint"`
	// Last 4 digits of the account number associated with the transfer.
	Last4 string `json:"last4"`
	// Routing number associated with the transfer.
	RoutingNumber string `json:"routing_number"`
}

type SourceTransactionCHFCreditTransfer

type SourceTransactionCHFCreditTransfer struct {
	// Reference associated with the transfer.
	Reference string `json:"reference"`
	// Sender's country address.
	SenderAddressCountry string `json:"sender_address_country"`
	// Sender's line 1 address.
	SenderAddressLine1 string `json:"sender_address_line1"`
	// Sender's bank account IBAN.
	SenderIBAN string `json:"sender_iban"`
	// Sender's name.
	SenderName string `json:"sender_name"`
}

type SourceTransactionGBPCreditTransfer

type SourceTransactionGBPCreditTransfer struct {
	// Bank account fingerprint associated with the Stripe owned bank account receiving the transfer.
	Fingerprint string `json:"fingerprint"`
	// The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported.
	FundingMethod string `json:"funding_method"`
	// Last 4 digits of sender account number associated with the transfer.
	Last4 string `json:"last4"`
	// Sender entered arbitrary information about the transfer.
	Reference string `json:"reference"`
	// Sender account number associated with the transfer.
	SenderAccountNumber string `json:"sender_account_number"`
	// Sender name associated with the transfer.
	SenderName string `json:"sender_name"`
	// Sender sort code associated with the transfer.
	SenderSortCode string `json:"sender_sort_code"`
}

type SourceTransactionList

type SourceTransactionList struct {
	APIResource
	ListMeta
	Data []*SourceTransaction `json:"data"`
}

SourceTransactionList is a list of SourceTransactions as retrieved from a list endpoint.

type SourceTransactionListParams

type SourceTransactionListParams struct {
	ListParams `form:"*"`
	Source     *string `form:"-"` // Included in URL
}

List source transactions for a given source.

type SourceTransactionPaperCheck

type SourceTransactionPaperCheck struct {
	// Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch.
	AvailableAt string `json:"available_at"`
	// Comma-separated list of invoice IDs associated with the paper check.
	Invoices string `json:"invoices"`
}

type SourceTransactionSEPACreditTransfer

type SourceTransactionSEPACreditTransfer struct {
	// Reference associated with the transfer.
	Reference string `json:"reference"`
	// Sender's bank account IBAN.
	SenderIBAN string `json:"sender_iban"`
	// Sender's name.
	SenderName string `json:"sender_name"`
}

type SourceUsage

type SourceUsage string

Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.

const (
	SourceUsageReusable  SourceUsage = "reusable"
	SourceUsageSingleUse SourceUsage = "single_use"
)

List of values that SourceUsage can take

type SourceWeChat

type SourceWeChat struct {
	PrepayID            string `json:"prepay_id"`
	QRCodeURL           string `json:"qr_code_url"`
	StatementDescriptor string `json:"statement_descriptor"`
}

type StreamingAPIResponse

type StreamingAPIResponse struct {
	Header         http.Header
	IdempotencyKey string
	Body           io.ReadCloser
	RequestID      string
	Status         string
	StatusCode     int
}

StreamingAPIResponse encapsulates some common features of a response from the Stripe API whose body can be streamed. This is used for "file downloads", and the `Body` property is an io.ReadCloser, so the user can stream it to another location such as a file or network request without buffering the entire body into memory.

type StreamingLastResponseSetter

type StreamingLastResponseSetter interface {
	SetLastResponse(response *StreamingAPIResponse)
}

StreamingLastResponseSetter defines a type that contains an HTTP response from a Stripe API endpoint.

type Subscription

type Subscription struct {
	APIResource
	// ID of the Connect Application that created the subscription.
	Application *Application `json:"application"`
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.
	ApplicationFeePercent float64                   `json:"application_fee_percent"`
	AutomaticTax          *SubscriptionAutomaticTax `json:"automatic_tax"`
	// Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.
	BillingCycleAnchor int64 `json:"billing_cycle_anchor"`
	// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
	BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"`
	// A date in the future at which the subscription will automatically get canceled
	CancelAt int64 `json:"cancel_at"`
	// If the subscription has been canceled with the `at_period_end` flag set to `true`, `cancel_at_period_end` on the subscription will be true. You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period.
	CancelAtPeriodEnd bool `json:"cancel_at_period_end"`
	// If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
	CanceledAt int64 `json:"canceled_at"`
	// Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.
	CollectionMethod SubscriptionCollectionMethod `json:"collection_method"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
	CurrentPeriodEnd int64 `json:"current_period_end"`
	// Start of the current period that the subscription has been invoiced for.
	CurrentPeriodStart int64 `json:"current_period_start"`
	// ID of the customer who owns the subscription.
	Customer *Customer `json:"customer"`
	// Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.
	DaysUntilDue int64 `json:"days_until_due"`
	// ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
	DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"`
	// ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
	DefaultSource *PaymentSource `json:"default_source"`
	// The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
	DefaultTaxRates []*TaxRate `json:"default_tax_rates"`
	// The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces.
	Description string `json:"description"`
	// Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis.
	Discount *Discount `json:"discount"`
	// If the subscription has ended, the date the subscription ended.
	EndedAt int64 `json:"ended_at"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// List of subscription items, each with an attached price.
	Items *SubscriptionItemList `json:"items"`
	// The most recent invoice this subscription has generated.
	LatestInvoice *Invoice `json:"latest_invoice"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.
	NextPendingInvoiceItemInvoice int64 `json:"next_pending_invoice_item_invoice"`
	// String representing the object's type. Objects of the same type share the same value.
	Object     string   `json:"object"`
	OnBehalfOf *Account `json:"on_behalf_of"`
	// If specified, payment collection for this subscription will be paused.
	PauseCollection *SubscriptionPauseCollection `json:"pause_collection"`
	// Payment settings passed on to invoices created by the subscription.
	PaymentSettings *SubscriptionPaymentSettings `json:"payment_settings"`
	// Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
	PendingInvoiceItemInterval *SubscriptionPendingInvoiceItemInterval `json:"pending_invoice_item_interval"`
	// You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).
	PendingSetupIntent *SetupIntent `json:"pending_setup_intent"`
	// If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.
	PendingUpdate *SubscriptionPendingUpdate `json:"pending_update"`
	// The schedule attached to the subscription
	Schedule *SubscriptionSchedule `json:"schedule"`
	// Date when the subscription was first created. The date might differ from the `created` date due to backdating.
	StartDate int64 `json:"start_date"`
	// Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`.
	//
	// For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated.
	//
	// A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.
	//
	// If subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts.
	//
	// If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
	Status SubscriptionStatus `json:"status"`
	// ID of the test clock this subscription belongs to.
	TestClock *TestHelpersTestClock `json:"test_clock"`
	// The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
	TransferData *SubscriptionTransferData `json:"transfer_data"`
	// If the subscription has a trial, the end of that trial.
	TrialEnd int64 `json:"trial_end"`
	// If the subscription has a trial, the beginning of that trial.
	TrialStart int64 `json:"trial_start"`
}

Subscriptions allow you to charge a customer on a recurring basis.

Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating).

func (*Subscription) UnmarshalJSON

func (s *Subscription) UnmarshalJSON(data []byte) error

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 SubscriptionAddInvoiceItemParams

type SubscriptionAddInvoiceItemParams struct {
	// The ID of the price object.
	Price *string `form:"price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
	PriceData *InvoiceItemPriceDataParams `form:"price_data"`
	// Quantity for this item. Defaults to 1.
	Quantity *int64 `form:"quantity"`
	// The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
	TaxRates []*string `form:"tax_rates"`
}

A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.

type SubscriptionAutomaticTax

type SubscriptionAutomaticTax struct {
	// Whether Stripe automatically computes tax on this subscription.
	Enabled bool `json:"enabled"`
}

type SubscriptionAutomaticTaxParams

type SubscriptionAutomaticTaxParams struct {
	// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
	Enabled *bool `form:"enabled"`
}

Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.

type SubscriptionBillingThresholds

type SubscriptionBillingThresholds struct {
	// Monetary threshold that triggers the subscription to create an invoice
	AmountGTE int64 `json:"amount_gte"`
	// Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
	ResetBillingCycleAnchor bool `json:"reset_billing_cycle_anchor"`
}

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period

type SubscriptionBillingThresholdsParams

type SubscriptionBillingThresholdsParams struct {
	// Monetary threshold that triggers the subscription to advance to a new billing period
	AmountGTE *int64 `form:"amount_gte"`
	// Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
	ResetBillingCycleAnchor *bool `form:"reset_billing_cycle_anchor"`
}

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.

type SubscriptionCancelParams

type SubscriptionCancelParams struct {
	Params `form:"*"`
	// Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items.
	InvoiceNow *bool `form:"invoice_now"`
	// Will generate a proration invoice item that credits remaining unused time until the subscription period end.
	Prorate *bool `form:"prorate"`
}

Cancels a customer's subscription immediately. The customer will not be charged again for the subscription.

Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

type SubscriptionCollectionMethod

type SubscriptionCollectionMethod string

Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.

const (
	SubscriptionCollectionMethodChargeAutomatically SubscriptionCollectionMethod = "charge_automatically"
	SubscriptionCollectionMethodSendInvoice         SubscriptionCollectionMethod = "send_invoice"
)

List of values that SubscriptionCollectionMethod can take

type SubscriptionDeleteDiscountParams

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

Removes the currently applied discount on a subscription.

type SubscriptionItem

type SubscriptionItem struct {
	APIResource
	// Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
	BillingThresholds *SubscriptionItemBillingThresholds `json:"billing_thresholds"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	Deleted bool  `json:"deleted"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
	//
	// Plans define the base price, currency, and billing cycle for recurring purchases of products.
	// [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.
	//
	// For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year.
	//
	// Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview).
	Plan *Plan `json:"plan"`
	// Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
	// [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
	//
	// For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
	//
	// Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).
	Price *Price `json:"price"`
	// The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed.
	Quantity int64 `json:"quantity"`
	// The `subscription` this `subscription_item` belongs to.
	Subscription string `json:"subscription"`
	// The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
	TaxRates []*TaxRate `json:"tax_rates"`
}

Subscription items allow you to create customer subscriptions with more than one plan, making it easy to represent complex billing relationships.

type SubscriptionItemBillingThresholds

type SubscriptionItemBillingThresholds struct {
	// Usage threshold that triggers the subscription to create an invoice
	UsageGTE int64 `json:"usage_gte"`
}

Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period

type SubscriptionItemBillingThresholdsParams

type SubscriptionItemBillingThresholdsParams struct {
	// Usage threshold that triggers the subscription to advance to a new billing period
	UsageGTE *int64 `form:"usage_gte"`
}

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.

type SubscriptionItemList

type SubscriptionItemList struct {
	APIResource
	ListMeta
	Data []*SubscriptionItem `json:"data"`
}

SubscriptionItemList is a list of SubscriptionItems as retrieved from a list endpoint.

type SubscriptionItemListParams

type SubscriptionItemListParams struct {
	ListParams `form:"*"`
	// The ID of the subscription whose items will be retrieved.
	Subscription *string `form:"subscription"`
}

Returns a list of your subscription items for a given subscription.

type SubscriptionItemParams

type SubscriptionItemParams struct {
	Params `form:"*"`
	// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
	BillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"`
	// Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`.
	ClearUsage *bool `form:"clear_usage"`
	// Only supported on update
	// Indicates if a customer is on or off-session while an invoice payment is attempted.
	OffSession *bool `form:"off_session"`
	// Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
	//
	// Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
	//
	// Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
	//
	// Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
	PaymentBehavior *string `form:"payment_behavior"`
	// The identifier of the new plan for this subscription item.
	Plan *string `form:"plan"`
	// The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
	Price *string `form:"price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
	PriceData *SubscriptionItemPriceDataParams `form:"price_data"`
	// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes.
	ProrationBehavior *string `form:"proration_behavior"`
	// If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
	ProrationDate *int64 `form:"proration_date"`
	// The quantity you'd like to apply to the subscription item you're creating.
	Quantity *int64 `form:"quantity"`
	// The identifier of the subscription to modify.
	Subscription *string `form:"subscription"`
	// A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
	TaxRates []*string `form:"tax_rates"`
}

Adds a new item to an existing subscription. No existing items will be changed or replaced.

type SubscriptionItemPriceDataParams

type SubscriptionItemPriceDataParams struct {
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// The ID of the product that this price will belong to.
	Product *string `form:"product"`
	// The recurring components of a price such as `interval` and `interval_count`.
	Recurring *SubscriptionItemPriceDataRecurringParams `form:"recurring"`
	// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
	TaxBehavior *string `form:"tax_behavior"`
	// A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
	UnitAmount *int64 `form:"unit_amount"`
	// Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
	UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
}

Data used to generate a new Price(https://stripe.com/docs/api/prices) object inline.

type SubscriptionItemPriceDataRecurringParams

type SubscriptionItemPriceDataRecurringParams struct {
	// Specifies billing frequency. Either `day`, `week`, `month` or `year`.
	Interval *string `form:"interval"`
	// The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
	IntervalCount *int64 `form:"interval_count"`
}

The recurring components of a price such as `interval` and `interval_count`.

type SubscriptionItemUsageRecordSummariesParams

type SubscriptionItemUsageRecordSummariesParams struct {
	ListParams       `form:"*"`
	SubscriptionItem *string `form:"-"` // Included in URL
}

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that's been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn't ended yet. Since new usage records can still be added, the returned summary information for the subscription item's ID should be seen as unstable until the subscription billing period ends.

type SubscriptionItemsParams

type SubscriptionItemsParams struct {
	Params `form:"*"`
	// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
	BillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"`
	// Delete all usage for a given subscription item. Allowed only when `deleted` is set to `true` and the current plan's `usage_type` is `metered`.
	ClearUsage *bool `form:"clear_usage"`
	// A flag that, if set to `true`, will delete the specified item.
	Deleted *bool `form:"deleted"`
	// Subscription item to update.
	ID *string `form:"id"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// Plan ID for this item, as a string.
	Plan *string `form:"plan"`
	// The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
	Price *string `form:"price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
	PriceData *SubscriptionItemPriceDataParams `form:"price_data"`
	// Quantity for this item.
	Quantity *int64 `form:"quantity"`
	// A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
	TaxRates []*string `form:"tax_rates"`
}

A list of up to 20 subscription items, each with an attached price.

type SubscriptionList

type SubscriptionList struct {
	APIResource
	ListMeta
	Data []*Subscription `json:"data"`
}

SubscriptionList is a list of Subscriptions as retrieved from a list endpoint.

type SubscriptionListParams

type SubscriptionListParams struct {
	ListParams `form:"*"`
	// The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.
	CollectionMethod        *string           `form:"collection_method"`
	Created                 *int64            `form:"created"`
	CreatedRange            *RangeQueryParams `form:"created"`
	CurrentPeriodEnd        *int64            `form:"current_period_end"`
	CurrentPeriodEndRange   *RangeQueryParams `form:"current_period_end"`
	CurrentPeriodStart      *int64            `form:"current_period_start"`
	CurrentPeriodStartRange *RangeQueryParams `form:"current_period_start"`
	// The ID of the customer whose subscriptions will be retrieved.
	Customer *string `form:"customer"`
	// The ID of the plan whose subscriptions will be retrieved.
	Plan *string `form:"plan"`
	// Filter for subscriptions that contain this recurring price ID.
	Price *string `form:"price"`
	// The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.
	Status *string `form:"status"`
	// Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.
	TestClock *string `form:"test_clock"`
}

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

type SubscriptionParams

type SubscriptionParams struct {
	Params `form:"*"`
	// A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
	AddInvoiceItems []*SubscriptionAddInvoiceItemParams `form:"add_invoice_items"`
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
	ApplicationFeePercent *float64 `form:"application_fee_percent"`
	// Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
	AutomaticTax *SubscriptionAutomaticTaxParams `form:"automatic_tax"`
	// For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
	BackdateStartDate *int64 `form:"backdate_start_date"`
	// Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
	BillingCycleAnchor          *int64 `form:"billing_cycle_anchor"`
	BillingCycleAnchorNow       *bool  `form:"-"` // See custom AppendTo
	BillingCycleAnchorUnchanged *bool  `form:"-"` // See custom AppendTo
	// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
	BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds"`
	// A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
	CancelAt *int64 `form:"cancel_at"`
	// Boolean indicating whether this subscription should cancel at the end of the current period.
	CancelAtPeriodEnd *bool `form:"cancel_at_period_end"`
	// Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`.
	CollectionMethod *string `form:"collection_method"`
	// The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription.
	Coupon *string `form:"coupon"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// The identifier of the customer to subscribe.
	Customer *string `form:"customer"`
	// Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
	DaysUntilDue *int64 `form:"days_until_due"`
	// ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
	DefaultPaymentMethod *string `form:"default_payment_method"`
	// ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
	DefaultSource *string `form:"default_source"`
	// The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates.
	DefaultTaxRates []*string `form:"default_tax_rates"`
	// The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces.
	Description *string `form:"description"`
	// A list of up to 20 subscription items, each with an attached price.
	Items []*SubscriptionItemsParams `form:"items"`
	// Indicates if a customer is on or off-session while an invoice payment is attempted.
	OffSession *bool   `form:"off_session"`
	OnBehalfOf *string `form:"on_behalf_of"`
	// If specified, payment collection for this subscription will be paused.
	PauseCollection *SubscriptionPauseCollectionParams `form:"pause_collection"`
	// Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
	//
	// Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
	//
	// Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
	//
	// Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
	PaymentBehavior *string `form:"payment_behavior"`
	// Payment settings to pass to invoices created by the subscription.
	PaymentSettings *SubscriptionPaymentSettingsParams `form:"payment_settings"`
	// Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
	PendingInvoiceItemInterval *SubscriptionPendingInvoiceItemIntervalParams `form:"pending_invoice_item_interval"`
	// The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription.
	PromotionCode *string `form:"promotion_code"`
	// Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes.
	ProrationBehavior *string `form:"proration_behavior"`
	// If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.
	ProrationDate *int64 `form:"proration_date"`
	// If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value.
	TransferData *SubscriptionTransferDataParams `form:"transfer_data"`
	// Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`.
	TrialEnd    *int64 `form:"trial_end"`
	TrialEndNow *bool  `form:"-"` // See custom AppendTo
	// Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
	TrialFromPlan *bool `form:"trial_from_plan"`
	// Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
	TrialPeriodDays *int64 `form:"trial_period_days"`
}

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. The payment_behavior parameter determines the exact behavior of the initial payment.

To start subscriptions where the first invoice always begins in a draft status, use [subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead. Schedules provide the flexibility to model more complex billing configurations that change over time.

func (*SubscriptionParams) AppendTo

func (s *SubscriptionParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for SubscriptionParams.

type SubscriptionPauseCollection

type SubscriptionPauseCollection struct {
	// The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
	Behavior SubscriptionPauseCollectionBehavior `json:"behavior"`
	// The time after which the subscription will resume collecting payments.
	ResumesAt int64 `json:"resumes_at"`
}

If specified, payment collection for this subscription will be paused.

type SubscriptionPauseCollectionBehavior

type SubscriptionPauseCollectionBehavior string

The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.

const (
	SubscriptionPauseCollectionBehaviorKeepAsDraft       SubscriptionPauseCollectionBehavior = "keep_as_draft"
	SubscriptionPauseCollectionBehaviorMarkUncollectible SubscriptionPauseCollectionBehavior = "mark_uncollectible"
	SubscriptionPauseCollectionBehaviorVoid              SubscriptionPauseCollectionBehavior = "void"
)

List of values that SubscriptionPauseCollectionBehavior can take

type SubscriptionPauseCollectionParams

type SubscriptionPauseCollectionParams struct {
	// The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
	Behavior *string `form:"behavior"`
	// The time after which the subscription will resume collecting payments.
	ResumesAt *int64 `form:"resumes_at"`
}

If specified, payment collection for this subscription will be paused.

type SubscriptionPaymentSettings

type SubscriptionPaymentSettings struct {
	// Payment-method-specific configuration to provide to invoices created by the subscription.
	PaymentMethodOptions *SubscriptionPaymentSettingsPaymentMethodOptions `json:"payment_method_options"`
	// The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
	PaymentMethodTypes []SubscriptionPaymentSettingsPaymentMethodType `json:"payment_method_types"`
	// Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds.
	SaveDefaultPaymentMethod SubscriptionPaymentSettingsSaveDefaultPaymentMethod `json:"save_default_payment_method"`
}

Payment settings passed on to invoices created by the subscription.

type SubscriptionPaymentSettingsParams

type SubscriptionPaymentSettingsParams struct {
	// Payment-method-specific configuration to provide to invoices created by the subscription.
	PaymentMethodOptions *SubscriptionPaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"`
	// The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
	PaymentMethodTypes []*string `form:"payment_method_types"`
	// Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds.
	SaveDefaultPaymentMethod *string `form:"save_default_payment_method"`
}

Payment settings to pass to invoices created by the subscription.

type SubscriptionPaymentSettingsPaymentMethodOptions

type SubscriptionPaymentSettingsPaymentMethodOptions struct {
	// This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.
	ACSSDebit *SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebit `json:"acss_debit"`
	// This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.
	Bancontact *SubscriptionPaymentSettingsPaymentMethodOptionsBancontact `json:"bancontact"`
	// This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.
	Card *SubscriptionPaymentSettingsPaymentMethodOptionsCard `json:"card"`
	// This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.
	CustomerBalance *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance `json:"customer_balance"`
	// This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.
	Konbini *SubscriptionPaymentSettingsPaymentMethodOptionsKonbini `json:"konbini"`
	// This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.
	USBankAccount *SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccount `json:"us_bank_account"`
}

Payment-method-specific configuration to provide to invoices created by the subscription.

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebit

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebit struct {
	MandateOptions *SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions `json:"mandate_options"`
	// Bank account verification method.
	VerificationMethod SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"`
}

This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptions struct {
	// Transaction type of the mandate.
	TransactionType SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType `json:"transaction_type"`
}

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams struct {
	// Transaction type of the mandate.
	TransactionType *string `form:"transaction_type"`
}

Additional fields for Mandate creation

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType string

Transaction type of the mandate.

const (
	SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypeBusiness SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "business"
	SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionTypePersonal SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType = "personal"
)

List of values that SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsTransactionType can take

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitParams

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitParams struct {
	// Additional fields for Mandate creation
	MandateOptions *SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"`
	// Verification method for the intent
	VerificationMethod *string `form:"verification_method"`
}

This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod

type SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod string

Bank account verification method.

const (
	SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodAutomatic     SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "automatic"
	SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodInstant       SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "instant"
	SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethodMicrodeposits SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod = "microdeposits"
)

List of values that SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitVerificationMethod can take

type SubscriptionPaymentSettingsPaymentMethodOptionsBancontact

type SubscriptionPaymentSettingsPaymentMethodOptionsBancontact struct {
	// Preferred language of the Bancontact authorization page that the customer is redirected to.
	PreferredLanguage string `json:"preferred_language"`
}

This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.

type SubscriptionPaymentSettingsPaymentMethodOptionsBancontactParams

type SubscriptionPaymentSettingsPaymentMethodOptionsBancontactParams struct {
	// Preferred language of the Bancontact authorization page that the customer is redirected to.
	PreferredLanguage *string `form:"preferred_language"`
}

This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.

type SubscriptionPaymentSettingsPaymentMethodOptionsCard

type SubscriptionPaymentSettingsPaymentMethodOptionsCard struct {
	MandateOptions *SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions `json:"mandate_options"`
	// Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
	Network SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork `json:"network"`
	// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
	RequestThreeDSecure SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`
}

This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.

type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions

type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptions struct {
	// Amount to be charged for future payments.
	Amount int64 `json:"amount"`
	// One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
	AmountType SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType `json:"amount_type"`
	// A description of the mandate or subscription that is meant to be displayed to the customer.
	Description string `json:"description"`
}

type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType

type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType string

One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.

const (
	SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountTypeFixed   SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType = "fixed"
	SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountTypeMaximum SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType = "maximum"
)

List of values that SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsAmountType can take

type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsParams

type SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsParams struct {
	// Amount to be charged for future payments.
	Amount *int64 `form:"amount"`
	// One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
	AmountType *string `form:"amount_type"`
	// A description of the mandate or subscription that is meant to be displayed to the customer.
	Description *string `form:"description"`
}

Configuration options for setting up an eMandate for cards issued in India.

type SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork

type SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork string

Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.

const (
	SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkAmex            SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "amex"
	SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkCartesBancaires SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "cartes_bancaires"
	SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkDiners          SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "diners"
	SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkDiscover        SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "discover"
	SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkInterac         SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "interac"
	SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkJCB             SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "jcb"
	SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkMastercard      SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "mastercard"
	SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkUnionpay        SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "unionpay"
	SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkUnknown         SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "unknown"
	SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkVisa            SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "visa"
)

List of values that SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork can take

type SubscriptionPaymentSettingsPaymentMethodOptionsCardParams

type SubscriptionPaymentSettingsPaymentMethodOptionsCardParams struct {
	// Configuration options for setting up an eMandate for cards issued in India.
	MandateOptions *SubscriptionPaymentSettingsPaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"`
	// Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
	Network *string `form:"network"`
	// We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
	RequestThreeDSecure *string `form:"request_three_d_secure"`
}

This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.

type SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure

type SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure string

We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.

const (
	SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAny       SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "any"
	SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecureAutomatic SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure = "automatic"
)

List of values that SubscriptionPaymentSettingsPaymentMethodOptionsCardRequestThreeDSecure can take

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalance struct {
	BankTransfer *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer `json:"bank_transfer"`
	// The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
	FundingType SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType `json:"funding_type"`
}

This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer struct {
	EUBankTransfer *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer `json:"eu_bank_transfer"`
	// The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
	Type string `json:"type"`
}

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer struct {
	// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
	Country string `json:"country"`
}

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams struct {
	// The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.
	Country *string `form:"country"`
}

Configuration for eu_bank_transfer funding type.

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams struct {
	// Configuration for eu_bank_transfer funding type.
	EUBankTransfer *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
	// The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`.
	Type *string `form:"type"`
}

Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType string

The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.

const (
	SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingTypeBankTransfer SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType = "bank_transfer"
)

List of values that SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceFundingType can take

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceParams

type SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct {
	// Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
	BankTransfer *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"`
	// The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
	FundingType *string `form:"funding_type"`
}

This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.

type SubscriptionPaymentSettingsPaymentMethodOptionsKonbini

type SubscriptionPaymentSettingsPaymentMethodOptionsKonbini struct{}

This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.

type SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniParams

type SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniParams struct{}

This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.

type SubscriptionPaymentSettingsPaymentMethodOptionsParams

type SubscriptionPaymentSettingsPaymentMethodOptionsParams struct {
	// This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
	ACSSDebit *SubscriptionPaymentSettingsPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
	// This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
	Bancontact *SubscriptionPaymentSettingsPaymentMethodOptionsBancontactParams `form:"bancontact"`
	// This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
	Card *SubscriptionPaymentSettingsPaymentMethodOptionsCardParams `form:"card"`
	// This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
	CustomerBalance *SubscriptionPaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
	// This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
	Konbini *SubscriptionPaymentSettingsPaymentMethodOptionsKonbiniParams `form:"konbini"`
	// This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
	USBankAccount *SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
}

Payment-method-specific configuration to provide to invoices created by the subscription.

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccount

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccount struct {
	FinancialConnections *SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"`
	// Bank account verification method.
	VerificationMethod SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"`
}

This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections struct {
	// The list of permissions to request. The `payment_method` permission must be included.
	Permissions []SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"`
}

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
	// The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
	Permissions []*string `form:"permissions"`
}

Additional fields for Financial Connections Session creation

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string

The list of permissions to request. The `payment_method` permission must be included.

const (
	SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances      SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances"
	SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method"
	SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions  SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions"
)

List of values that SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountParams

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountParams struct {
	// Additional fields for Financial Connections Session creation
	FinancialConnections *SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
	// Verification method for the intent
	VerificationMethod *string `form:"verification_method"`
}

This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod

type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod string

Bank account verification method.

const (
	SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodAutomatic     SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "automatic"
	SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodInstant       SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "instant"
	SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethodMicrodeposits SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod = "microdeposits"
)

List of values that SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountVerificationMethod can take

type SubscriptionPaymentSettingsPaymentMethodType

type SubscriptionPaymentSettingsPaymentMethodType string

The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).

const (
	SubscriptionPaymentSettingsPaymentMethodTypeACHCreditTransfer  SubscriptionPaymentSettingsPaymentMethodType = "ach_credit_transfer"
	SubscriptionPaymentSettingsPaymentMethodTypeACHDebit           SubscriptionPaymentSettingsPaymentMethodType = "ach_debit"
	SubscriptionPaymentSettingsPaymentMethodTypeACSSDebit          SubscriptionPaymentSettingsPaymentMethodType = "acss_debit"
	SubscriptionPaymentSettingsPaymentMethodTypeAUBECSDebit        SubscriptionPaymentSettingsPaymentMethodType = "au_becs_debit"
	SubscriptionPaymentSettingsPaymentMethodTypeBACSDebit          SubscriptionPaymentSettingsPaymentMethodType = "bacs_debit"
	SubscriptionPaymentSettingsPaymentMethodTypeBancontact         SubscriptionPaymentSettingsPaymentMethodType = "bancontact"
	SubscriptionPaymentSettingsPaymentMethodTypeBoleto             SubscriptionPaymentSettingsPaymentMethodType = "boleto"
	SubscriptionPaymentSettingsPaymentMethodTypeCard               SubscriptionPaymentSettingsPaymentMethodType = "card"
	SubscriptionPaymentSettingsPaymentMethodTypeCustomerBalance    SubscriptionPaymentSettingsPaymentMethodType = "customer_balance"
	SubscriptionPaymentSettingsPaymentMethodTypeFPX                SubscriptionPaymentSettingsPaymentMethodType = "fpx"
	SubscriptionPaymentSettingsPaymentMethodTypeGiropay            SubscriptionPaymentSettingsPaymentMethodType = "giropay"
	SubscriptionPaymentSettingsPaymentMethodTypeGrabpay            SubscriptionPaymentSettingsPaymentMethodType = "grabpay"
	SubscriptionPaymentSettingsPaymentMethodTypeIDEAL              SubscriptionPaymentSettingsPaymentMethodType = "ideal"
	SubscriptionPaymentSettingsPaymentMethodTypeKonbini            SubscriptionPaymentSettingsPaymentMethodType = "konbini"
	SubscriptionPaymentSettingsPaymentMethodTypeLink               SubscriptionPaymentSettingsPaymentMethodType = "link"
	SubscriptionPaymentSettingsPaymentMethodTypePayNow             SubscriptionPaymentSettingsPaymentMethodType = "paynow"
	SubscriptionPaymentSettingsPaymentMethodTypePromptPay          SubscriptionPaymentSettingsPaymentMethodType = "promptpay"
	SubscriptionPaymentSettingsPaymentMethodTypeSEPACreditTransfer SubscriptionPaymentSettingsPaymentMethodType = "sepa_credit_transfer"
	SubscriptionPaymentSettingsPaymentMethodTypeSEPADebit          SubscriptionPaymentSettingsPaymentMethodType = "sepa_debit"
	SubscriptionPaymentSettingsPaymentMethodTypeSofort             SubscriptionPaymentSettingsPaymentMethodType = "sofort"
	SubscriptionPaymentSettingsPaymentMethodTypeUSBankAccount      SubscriptionPaymentSettingsPaymentMethodType = "us_bank_account"
	SubscriptionPaymentSettingsPaymentMethodTypeWeChatPay          SubscriptionPaymentSettingsPaymentMethodType = "wechat_pay"
)

List of values that SubscriptionPaymentSettingsPaymentMethodType can take

type SubscriptionPaymentSettingsSaveDefaultPaymentMethod

type SubscriptionPaymentSettingsSaveDefaultPaymentMethod string

Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds.

const (
	SubscriptionPaymentSettingsSaveDefaultPaymentMethodOff            SubscriptionPaymentSettingsSaveDefaultPaymentMethod = "off"
	SubscriptionPaymentSettingsSaveDefaultPaymentMethodOnSubscription SubscriptionPaymentSettingsSaveDefaultPaymentMethod = "on_subscription"
)

List of values that SubscriptionPaymentSettingsSaveDefaultPaymentMethod can take

type SubscriptionPendingInvoiceItemInterval

type SubscriptionPendingInvoiceItemInterval struct {
	// Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
	Interval SubscriptionPendingInvoiceItemIntervalInterval `json:"interval"`
	// The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
	IntervalCount int64 `json:"interval_count"`
}

Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.

type SubscriptionPendingInvoiceItemIntervalInterval

type SubscriptionPendingInvoiceItemIntervalInterval string

Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.

const (
	SubscriptionPendingInvoiceItemIntervalIntervalDay   SubscriptionPendingInvoiceItemIntervalInterval = "day"
	SubscriptionPendingInvoiceItemIntervalIntervalMonth SubscriptionPendingInvoiceItemIntervalInterval = "month"
	SubscriptionPendingInvoiceItemIntervalIntervalWeek  SubscriptionPendingInvoiceItemIntervalInterval = "week"
	SubscriptionPendingInvoiceItemIntervalIntervalYear  SubscriptionPendingInvoiceItemIntervalInterval = "year"
)

List of values that SubscriptionPendingInvoiceItemIntervalInterval can take

type SubscriptionPendingInvoiceItemIntervalParams

type SubscriptionPendingInvoiceItemIntervalParams struct {
	// Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
	Interval *string `form:"interval"`
	// The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
	IntervalCount *int64 `form:"interval_count"`
}

Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.

type SubscriptionPendingUpdate

type SubscriptionPendingUpdate struct {
	// If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.
	BillingCycleAnchor int64 `json:"billing_cycle_anchor"`
	// The point after which the changes reflected by this update will be discarded and no longer applied.
	ExpiresAt int64 `json:"expires_at"`
	// List of subscription items, each with an attached plan, that will be set if the update is applied.
	SubscriptionItems []*SubscriptionItem `json:"subscription_items"`
	// Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied.
	TrialEnd int64 `json:"trial_end"`
	// Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
	TrialFromPlan bool `json:"trial_from_plan"`
}

If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.

type SubscriptionSchedule

type SubscriptionSchedule struct {
	APIResource
	// ID of the Connect Application that created the schedule.
	Application *Application `json:"application"`
	// Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
	CanceledAt int64 `json:"canceled_at"`
	// Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
	CompletedAt int64 `json:"completed_at"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.
	CurrentPhase *SubscriptionScheduleCurrentPhase `json:"current_phase"`
	// ID of the customer who owns the subscription schedule.
	Customer        *Customer                            `json:"customer"`
	DefaultSettings *SubscriptionScheduleDefaultSettings `json:"default_settings"`
	// Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` and `cancel`.
	EndBehavior SubscriptionScheduleEndBehavior `json:"end_behavior"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Configuration for the subscription schedule's phases.
	Phases []*SubscriptionSchedulePhase `json:"phases"`
	// Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
	ReleasedAt int64 `json:"released_at"`
	// ID of the subscription once managed by the subscription schedule (if it is released).
	ReleasedSubscription *Subscription `json:"released_subscription"`
	// The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).
	Status SubscriptionScheduleStatus `json:"status"`
	// ID of the subscription managed by the subscription schedule.
	Subscription *Subscription `json:"subscription"`
	// ID of the test clock this subscription schedule belongs to.
	TestClock *TestHelpersTestClock `json:"test_clock"`
}

A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.

Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules).

func (*SubscriptionSchedule) UnmarshalJSON

func (s *SubscriptionSchedule) UnmarshalJSON(data []byte) error

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

type SubscriptionScheduleCancelParams struct {
	Params `form:"*"`
	// If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
	InvoiceNow *bool `form:"invoice_now"`
	// If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
	Prorate *bool `form:"prorate"`
}

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

type SubscriptionScheduleCurrentPhase

type SubscriptionScheduleCurrentPhase struct {
	// The end of this phase of the subscription schedule.
	EndDate int64 `json:"end_date"`
	// The start of this phase of the subscription schedule.
	StartDate int64 `json:"start_date"`
}

Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.

type SubscriptionScheduleDefaultSettings

type SubscriptionScheduleDefaultSettings struct {
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.
	ApplicationFeePercent float64                   `json:"application_fee_percent"`
	AutomaticTax          *SubscriptionAutomaticTax `json:"automatic_tax"`
	// Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
	BillingCycleAnchor SubscriptionScheduleDefaultSettingsBillingCycleAnchor `json:"billing_cycle_anchor"`
	// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
	BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"`
	// Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.
	CollectionMethod *SubscriptionCollectionMethod `json:"collection_method"`
	// ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
	DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"`
	// Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
	Description string `json:"description"`
	// The subscription schedule's default invoice settings.
	InvoiceSettings *SubscriptionScheduleDefaultSettingsInvoiceSettings `json:"invoice_settings"`
	// The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
	TransferData *SubscriptionTransferData `json:"transfer_data"`
}

type SubscriptionScheduleDefaultSettingsBillingCycleAnchor

type SubscriptionScheduleDefaultSettingsBillingCycleAnchor string

Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).

const (
	SubscriptionScheduleDefaultSettingsBillingCycleAnchorAutomatic  SubscriptionScheduleDefaultSettingsBillingCycleAnchor = "automatic"
	SubscriptionScheduleDefaultSettingsBillingCycleAnchorPhaseStart SubscriptionScheduleDefaultSettingsBillingCycleAnchor = "phase_start"
)

List of values that SubscriptionScheduleDefaultSettingsBillingCycleAnchor can take

type SubscriptionScheduleDefaultSettingsInvoiceSettings

type SubscriptionScheduleDefaultSettingsInvoiceSettings struct {
	// Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
	DaysUntilDue int64 `json:"days_until_due"`
}

The subscription schedule's default invoice settings.

type SubscriptionScheduleDefaultSettingsInvoiceSettingsParams

type SubscriptionScheduleDefaultSettingsInvoiceSettingsParams struct {
	// Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
	DaysUntilDue *int64 `form:"days_until_due"`
}

All invoices will be billed using the specified settings.

type SubscriptionScheduleDefaultSettingsParams

type SubscriptionScheduleDefaultSettingsParams struct {
	Params `form:"*"`
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
	ApplicationFeePercent *float64 `form:"application_fee_percent,high_precision"`
	// Default settings for automatic tax computation.
	AutomaticTax *SubscriptionAutomaticTaxParams `form:"automatic_tax"`
	// Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
	BillingCycleAnchor *string `form:"billing_cycle_anchor"`
	// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
	BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds"`
	// Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically` on creation.
	CollectionMethod *string `form:"collection_method"`
	// ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
	DefaultPaymentMethod *string `form:"default_payment_method"`
	// Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
	Description *string `form:"description"`
	// All invoices will be billed using the specified settings.
	InvoiceSettings *SubscriptionScheduleDefaultSettingsInvoiceSettingsParams `form:"invoice_settings"`
	// The data with which to automatically create a Transfer for each of the associated subscription's invoices.
	TransferData *SubscriptionTransferDataParams `form:"transfer_data"`
}

Object representing the subscription schedule's default settings.

type SubscriptionScheduleEndBehavior

type SubscriptionScheduleEndBehavior string

Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` and `cancel`.

const (
	SubscriptionScheduleEndBehaviorCancel  SubscriptionScheduleEndBehavior = "cancel"
	SubscriptionScheduleEndBehaviorNone    SubscriptionScheduleEndBehavior = "none"
	SubscriptionScheduleEndBehaviorRelease SubscriptionScheduleEndBehavior = "release"
	SubscriptionScheduleEndBehaviorRenew   SubscriptionScheduleEndBehavior = "renew"
)

List of values that SubscriptionScheduleEndBehavior can take

type SubscriptionScheduleList

type SubscriptionScheduleList struct {
	APIResource
	ListMeta
	Data []*SubscriptionSchedule `json:"data"`
}

SubscriptionScheduleList is a list of SubscriptionSchedules as retrieved from a list endpoint.

type SubscriptionScheduleListParams

type SubscriptionScheduleListParams struct {
	ListParams `form:"*"`
	// Only return subscription schedules that were created canceled the given date interval.
	CanceledAt *int64 `form:"canceled_at"`
	// Only return subscription schedules that were created canceled the given date interval.
	CanceledAtRange *RangeQueryParams `form:"canceled_at"`
	// Only return subscription schedules that completed during the given date interval.
	CompletedAt *int64 `form:"completed_at"`
	// Only return subscription schedules that completed during the given date interval.
	CompletedAtRange *RangeQueryParams `form:"completed_at"`
	// Only return subscription schedules that were created during the given date interval.
	Created *int64 `form:"created"`
	// Only return subscription schedules that were created during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return subscription schedules for the given customer.
	Customer *string `form:"customer"`
	// Only return subscription schedules that were released during the given date interval.
	ReleasedAt *int64 `form:"released_at"`
	// Only return subscription schedules that were released during the given date interval.
	ReleasedAtRange *RangeQueryParams `form:"released_at"`
	// Only return subscription schedules that have not started yet.
	Scheduled *bool `form:"scheduled"`
}

Retrieves the list of your subscription schedules.

type SubscriptionScheduleParams

type SubscriptionScheduleParams struct {
	Params `form:"*"`
	// The identifier of the customer to create the subscription schedule for.
	Customer *string `form:"customer"`
	// Object representing the subscription schedule's default settings.
	DefaultSettings *SubscriptionScheduleDefaultSettingsParams `form:"default_settings"`
	// Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription.
	EndBehavior *string `form:"end_behavior"`
	// Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
	FromSubscription *string `form:"from_subscription"`
	// List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
	Phases []*SubscriptionSchedulePhaseParams `form:"phases"`
	// If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
	ProrationBehavior *string `form:"proration_behavior"`
	// When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
	StartDate    *int64 `form:"start_date"`
	StartDateNow *bool  `form:"-"` // See custom AppendTo
}

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

func (*SubscriptionScheduleParams) AppendTo

func (s *SubscriptionScheduleParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for SubscriptionScheduleParams.

type SubscriptionSchedulePhase

type SubscriptionSchedulePhase struct {
	// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
	AddInvoiceItems []*SubscriptionSchedulePhaseAddInvoiceItem `json:"add_invoice_items"`
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule.
	ApplicationFeePercent float64                   `json:"application_fee_percent"`
	AutomaticTax          *SubscriptionAutomaticTax `json:"automatic_tax"`
	// Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
	BillingCycleAnchor SubscriptionSchedulePhaseBillingCycleAnchor `json:"billing_cycle_anchor"`
	// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
	BillingThresholds *SubscriptionBillingThresholds `json:"billing_thresholds"`
	// Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.
	CollectionMethod *SubscriptionCollectionMethod `json:"collection_method"`
	// ID of the coupon to use during this phase of the subscription schedule.
	Coupon *Coupon `json:"coupon"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
	DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"`
	// The default tax rates to apply to the subscription during this phase of the subscription schedule.
	DefaultTaxRates []*TaxRate `json:"default_tax_rates"`
	// Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
	Description string `json:"description"`
	// The end of this phase of the subscription schedule.
	EndDate int64 `json:"end_date"`
	// The invoice settings applicable during this phase.
	InvoiceSettings *SubscriptionSchedulePhaseInvoiceSettings `json:"invoice_settings"`
	// Subscription items to configure the subscription to during this phase of the subscription schedule.
	Items []*SubscriptionSchedulePhaseItem `json:"items"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.
	Metadata map[string]string `json:"metadata"`
	// If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.
	ProrationBehavior SubscriptionSchedulePhaseProrationBehavior `json:"proration_behavior"`
	// The start of this phase of the subscription schedule.
	StartDate int64 `json:"start_date"`
	// The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
	TransferData *SubscriptionTransferData `json:"transfer_data"`
	// When the trial ends within the phase.
	TrialEnd int64 `json:"trial_end"`
}

Configuration for the subscription schedule's phases.

type SubscriptionSchedulePhaseAddInvoiceItem

type SubscriptionSchedulePhaseAddInvoiceItem struct {
	// ID of the price used to generate the invoice item.
	Price *Price `json:"price"`
	// The quantity of the invoice item.
	Quantity int64 `json:"quantity"`
	// The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
	TaxRates []*TaxRate `json:"tax_rates"`
}

A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.

type SubscriptionSchedulePhaseAddInvoiceItemParams

type SubscriptionSchedulePhaseAddInvoiceItemParams struct {
	// The ID of the price object.
	Price *string `form:"price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
	PriceData *InvoiceItemPriceDataParams `form:"price_data"`
	// Quantity for this item. Defaults to 1.
	Quantity *int64 `form:"quantity"`
	// The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
	TaxRates []*string `form:"tax_rates"`
}

A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.

type SubscriptionSchedulePhaseAutomaticTaxParams

type SubscriptionSchedulePhaseAutomaticTaxParams struct {
	// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
	Enabled *bool `form:"enabled"`
}

Automatic tax settings for this phase.

type SubscriptionSchedulePhaseBillingCycleAnchor

type SubscriptionSchedulePhaseBillingCycleAnchor string

Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).

const (
	SubscriptionSchedulePhaseBillingCycleAnchorAutomatic  SubscriptionSchedulePhaseBillingCycleAnchor = "automatic"
	SubscriptionSchedulePhaseBillingCycleAnchorPhaseStart SubscriptionSchedulePhaseBillingCycleAnchor = "phase_start"
)

List of values that SubscriptionSchedulePhaseBillingCycleAnchor can take

type SubscriptionSchedulePhaseInvoiceSettings

type SubscriptionSchedulePhaseInvoiceSettings struct {
	// Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
	DaysUntilDue int64 `json:"days_until_due"`
}

The invoice settings applicable during this phase.

type SubscriptionSchedulePhaseInvoiceSettingsParams

type SubscriptionSchedulePhaseInvoiceSettingsParams struct {
	// Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
	DaysUntilDue *int64 `form:"days_until_due"`
}

All invoices will be billed using the specified settings.

type SubscriptionSchedulePhaseItem

type SubscriptionSchedulePhaseItem struct {
	// Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
	BillingThresholds *SubscriptionItemBillingThresholds `json:"billing_thresholds"`
	// ID of the plan to which the customer should be subscribed.
	Plan *Plan `json:"plan"`
	// ID of the price to which the customer should be subscribed.
	Price *Price `json:"price"`
	// Quantity of the plan to which the customer should be subscribed.
	Quantity int64 `json:"quantity"`
	// The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.
	TaxRates []*TaxRate `json:"tax_rates"`
}

Subscription items to configure the subscription to during this phase of the subscription schedule.

type SubscriptionSchedulePhaseItemParams

type SubscriptionSchedulePhaseItemParams struct {
	// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
	BillingThresholds *SubscriptionItemBillingThresholdsParams `form:"billing_thresholds"`
	// The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
	Plan *string `form:"plan"`
	// The ID of the price object.
	Price *string `form:"price"`
	// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
	PriceData *SubscriptionItemPriceDataParams `form:"price_data"`
	// Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
	Quantity *int64 `form:"quantity"`
	// A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
	TaxRates []*string `form:"tax_rates"`
}

List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.

type SubscriptionSchedulePhaseParams

type SubscriptionSchedulePhaseParams struct {
	// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
	AddInvoiceItems []*SubscriptionSchedulePhaseAddInvoiceItemParams `form:"add_invoice_items"`
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
	ApplicationFeePercent *float64 `form:"application_fee_percent"`
	// Automatic tax settings for this phase.
	AutomaticTax *SubscriptionSchedulePhaseAutomaticTaxParams `form:"automatic_tax"`
	// Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
	BillingCycleAnchor *string `form:"billing_cycle_anchor"`
	// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
	BillingThresholds *SubscriptionBillingThresholdsParams `form:"billing_thresholds"`
	// Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically` on creation.
	CollectionMethod *string `form:"collection_method"`
	// The identifier of the coupon to apply to this phase of the subscription schedule.
	Coupon *string `form:"coupon"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
	DefaultPaymentMethod *string `form:"default_payment_method"`
	// A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
	DefaultTaxRates []*string `form:"default_tax_rates"`
	// Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
	Description *string `form:"description"`
	// The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
	EndDate    *int64 `form:"end_date"`
	EndDateNow *bool  `form:"-"` // See custom AppendTo
	// All invoices will be billed using the specified settings.
	InvoiceSettings *SubscriptionSchedulePhaseInvoiceSettingsParams `form:"invoice_settings"`
	// List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
	Items []*SubscriptionSchedulePhaseItemParams `form:"items"`
	// Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
	Iterations *int64 `form:"iterations"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
	Metadata map[string]string `form:"metadata"`
	// Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`.
	ProrationBehavior *string `form:"proration_behavior"`
	// The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
	StartDate    *int64 `form:"start_date"`
	StartDateNow *bool  `form:"-"` // See custom AppendTo
	// The data with which to automatically create a Transfer for each of the associated subscription's invoices.
	TransferData *SubscriptionTransferDataParams `form:"transfer_data"`
	// If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
	Trial *bool `form:"trial"`
	// Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
	TrialEnd    *int64 `form:"trial_end"`
	TrialEndNow *bool  `form:"-"` // See custom AppendTo
}

List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.

func (*SubscriptionSchedulePhaseParams) AppendTo

func (s *SubscriptionSchedulePhaseParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for SubscriptionSchedulePhaseParams.

type SubscriptionSchedulePhaseProrationBehavior

type SubscriptionSchedulePhaseProrationBehavior string

If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.

const (
	SubscriptionSchedulePhaseProrationBehaviorAlwaysInvoice    SubscriptionSchedulePhaseProrationBehavior = "always_invoice"
	SubscriptionSchedulePhaseProrationBehaviorCreateProrations SubscriptionSchedulePhaseProrationBehavior = "create_prorations"
	SubscriptionSchedulePhaseProrationBehaviorNone             SubscriptionSchedulePhaseProrationBehavior = "none"
)

List of values that SubscriptionSchedulePhaseProrationBehavior can take

type SubscriptionScheduleReleaseParams

type SubscriptionScheduleReleaseParams struct {
	Params `form:"*"`
	// Keep any cancellation on the subscription that the schedule has set
	PreserveCancelDate *bool `form:"preserve_cancel_date"`
}

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.

type SubscriptionScheduleStatus

type SubscriptionScheduleStatus string

The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).

const (
	SubscriptionScheduleStatusActive     SubscriptionScheduleStatus = "active"
	SubscriptionScheduleStatusCanceled   SubscriptionScheduleStatus = "canceled"
	SubscriptionScheduleStatusCompleted  SubscriptionScheduleStatus = "completed"
	SubscriptionScheduleStatusNotStarted SubscriptionScheduleStatus = "not_started"
	SubscriptionScheduleStatusReleased   SubscriptionScheduleStatus = "released"
)

List of values that SubscriptionScheduleStatus can take

type SubscriptionSearchParams

type SubscriptionSearchParams struct {
	SearchParams `form:"*"`
	// A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
	Page *string `form:"page"`
}

Search for subscriptions you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

type SubscriptionSearchResult

type SubscriptionSearchResult struct {
	APIResource
	SearchMeta
	Data []*Subscription `json:"data"`
}

SubscriptionSearchResult is a list of Subscription search results as retrieved from a search endpoint.

type SubscriptionStatus

type SubscriptionStatus string

Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, or `unpaid`.

For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this state can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` state. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal state, the open invoice will be voided and no further invoices will be generated.

A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.

If subscription `collection_method=charge_automatically` it becomes `past_due` when payment to renew it fails and `canceled` or `unpaid` (depending on your subscriptions settings) when Stripe has exhausted all payment retry attempts.

If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.

const (
	SubscriptionStatusActive            SubscriptionStatus = "active"
	SubscriptionStatusCanceled          SubscriptionStatus = "canceled"
	SubscriptionStatusIncomplete        SubscriptionStatus = "incomplete"
	SubscriptionStatusIncompleteExpired SubscriptionStatus = "incomplete_expired"
	SubscriptionStatusPastDue           SubscriptionStatus = "past_due"
	SubscriptionStatusTrialing          SubscriptionStatus = "trialing"
	SubscriptionStatusUnpaid            SubscriptionStatus = "unpaid"
)

List of values that SubscriptionStatus can take

type SubscriptionTransferData

type SubscriptionTransferData struct {
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
	AmountPercent float64 `json:"amount_percent"`
	// The account where funds from the payment will be transferred to upon payment success.
	Destination *Account `json:"destination"`
}

The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.

type SubscriptionTransferDataParams

type SubscriptionTransferDataParams struct {
	// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
	AmountPercent *float64 `form:"amount_percent"`
	// ID of an existing, connected Stripe account.
	Destination *string `form:"destination"`
}

If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.

type SupportedBackend

type SupportedBackend string

SupportedBackend is an enumeration of supported Stripe endpoints. Currently supported values are "api" and "uploads".

type TaxCode

type TaxCode struct {
	APIResource
	// A detailed description of which types of products the tax code represents.
	Description string `json:"description"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// A short name for the tax code.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
}

[Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.

func (*TaxCode) UnmarshalJSON

func (t *TaxCode) UnmarshalJSON(data []byte) error

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

type TaxCodeList

type TaxCodeList struct {
	APIResource
	ListMeta
	Data []*TaxCode `json:"data"`
}

TaxCodeList is a list of TaxCodes as retrieved from a list endpoint.

type TaxCodeListParams

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

A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.

type TaxCodeParams

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

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

type TaxID

type TaxID struct {
	APIResource
	// Two-letter ISO code representing the country of the tax ID.
	Country string `json:"country"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// ID of the customer.
	Customer *Customer `json:"customer"`
	Deleted  bool      `json:"deleted"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown`
	Type TaxIDType `json:"type"`
	// Value of the tax ID.
	Value string `json:"value"`
	// Tax ID verification information.
	Verification *TaxIDVerification `json:"verification"`
}

You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers). A customer's tax IDs are displayed on invoices and credit notes issued for the customer.

Related guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids).

func (*TaxID) UnmarshalJSON

func (t *TaxID) UnmarshalJSON(data []byte) error

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.

type TaxIDList

type TaxIDList struct {
	APIResource
	ListMeta
	Data []*TaxID `json:"data"`
}

TaxIDList is a list of TaxIds as retrieved from a list endpoint.

type TaxIDListParams

type TaxIDListParams struct {
	ListParams `form:"*"`
	Customer   *string `form:"-"` // Included in URL
}

Returns a list of tax IDs for a customer.

type TaxIDParams

type TaxIDParams struct {
	Params   `form:"*"`
	Customer *string `form:"-"` // Included in URL
	// Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`
	Type *string `form:"type"`
	// Value of the tax ID.
	Value *string `form:"value"`
}

Creates a new TaxID object for a customer.

type TaxIDType

type TaxIDType string

Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown`

const (
	TaxIDTypeAETRN    TaxIDType = "ae_trn"
	TaxIDTypeAUABN    TaxIDType = "au_abn"
	TaxIDTypeAUARN    TaxIDType = "au_arn"
	TaxIDTypeBGUIC    TaxIDType = "bg_uic"
	TaxIDTypeBRCNPJ   TaxIDType = "br_cnpj"
	TaxIDTypeBRCPF    TaxIDType = "br_cpf"
	TaxIDTypeCABN     TaxIDType = "ca_bn"
	TaxIDTypeCAGSTHST TaxIDType = "ca_gst_hst"
	TaxIDTypeCAPSTBC  TaxIDType = "ca_pst_bc"
	TaxIDTypeCAPSTMB  TaxIDType = "ca_pst_mb"
	TaxIDTypeCAPSTSK  TaxIDType = "ca_pst_sk"
	TaxIDTypeCAQST    TaxIDType = "ca_qst"
	TaxIDTypeCHVAT    TaxIDType = "ch_vat"
	TaxIDTypeCLTIN    TaxIDType = "cl_tin"
	TaxIDTypeESCIF    TaxIDType = "es_cif"
	TaxIDTypeEUOSSVAT TaxIDType = "eu_oss_vat"
	TaxIDTypeEUVAT    TaxIDType = "eu_vat"
	TaxIDTypeGBVAT    TaxIDType = "gb_vat"
	TaxIDTypeGEVAT    TaxIDType = "ge_vat"
	TaxIDTypeHKBR     TaxIDType = "hk_br"
	TaxIDTypeHUTIN    TaxIDType = "hu_tin"
	TaxIDTypeIDNPWP   TaxIDType = "id_npwp"
	TaxIDTypeILVAT    TaxIDType = "il_vat"
	TaxIDTypeINGST    TaxIDType = "in_gst"
	TaxIDTypeISVAT    TaxIDType = "is_vat"
	TaxIDTypeJPCN     TaxIDType = "jp_cn"
	TaxIDTypeJPRN     TaxIDType = "jp_rn"
	TaxIDTypeKRBRN    TaxIDType = "kr_brn"
	TaxIDTypeLIUID    TaxIDType = "li_uid"
	TaxIDTypeMXRFC    TaxIDType = "mx_rfc"
	TaxIDTypeMYFRP    TaxIDType = "my_frp"
	TaxIDTypeMYITN    TaxIDType = "my_itn"
	TaxIDTypeMYSST    TaxIDType = "my_sst"
	TaxIDTypeNOVAT    TaxIDType = "no_vat"
	TaxIDTypeNZGST    TaxIDType = "nz_gst"
	TaxIDTypeRUINN    TaxIDType = "ru_inn"
	TaxIDTypeRUKPP    TaxIDType = "ru_kpp"
	TaxIDTypeSAVAT    TaxIDType = "sa_vat"
	TaxIDTypeSGGST    TaxIDType = "sg_gst"
	TaxIDTypeSGUEN    TaxIDType = "sg_uen"
	TaxIDTypeSITIN    TaxIDType = "si_tin"
	TaxIDTypeTHVAT    TaxIDType = "th_vat"
	TaxIDTypeTWVAT    TaxIDType = "tw_vat"
	TaxIDTypeUAVAT    TaxIDType = "ua_vat"
	TaxIDTypeUnknown  TaxIDType = "unknown"
	TaxIDTypeUSEIN    TaxIDType = "us_ein"
	TaxIDTypeZAVAT    TaxIDType = "za_vat"
)

List of values that TaxIDType can take

type TaxIDVerification

type TaxIDVerification struct {
	// Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.
	Status TaxIDVerificationStatus `json:"status"`
	// Verified address.
	VerifiedAddress string `json:"verified_address"`
	// Verified name.
	VerifiedName string `json:"verified_name"`
}

Tax ID verification information.

type TaxIDVerificationStatus

type TaxIDVerificationStatus string

Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`.

const (
	TaxIDVerificationStatusPending     TaxIDVerificationStatus = "pending"
	TaxIDVerificationStatusUnavailable TaxIDVerificationStatus = "unavailable"
	TaxIDVerificationStatusUnverified  TaxIDVerificationStatus = "unverified"
	TaxIDVerificationStatusVerified    TaxIDVerificationStatus = "verified"
)

List of values that TaxIDVerificationStatus can take

type TaxRate

type TaxRate struct {
	APIResource
	// Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
	Active bool `json:"active"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country string `json:"country"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
	Description string `json:"description"`
	// The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
	DisplayName string `json:"display_name"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// This specifies if the tax rate is inclusive or exclusive.
	Inclusive bool `json:"inclusive"`
	// The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice.
	Jurisdiction string `json:"jurisdiction"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// This represents the tax rate percent out of 100.
	Percentage float64 `json:"percentage"`
	// [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
	State string `json:"state"`
	// The high-level tax type, such as `vat` or `sales_tax`.
	TaxType TaxRateTaxType `json:"tax_type"`
}

Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.

Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates).

func (*TaxRate) UnmarshalJSON

func (t *TaxRate) UnmarshalJSON(data []byte) error

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.

type TaxRateList

type TaxRateList struct {
	APIResource
	ListMeta
	Data []*TaxRate `json:"data"`
}

TaxRateList is a list of TaxRates as retrieved from a list endpoint.

type TaxRateListParams

type TaxRateListParams struct {
	ListParams `form:"*"`
	// Optional flag to filter by tax rates that are either active or inactive (archived).
	Active *bool `form:"active"`
	// Optional range for filtering created date.
	Created *int64 `form:"created"`
	// Optional range for filtering created date.
	CreatedRange *RangeQueryParams `form:"created"`
	// Optional flag to filter by tax rates that are inclusive (or those that are not inclusive).
	Inclusive *bool `form:"inclusive"`
}

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

type TaxRateParams

type TaxRateParams struct {
	Params `form:"*"`
	// Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
	Active *bool `form:"active"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country *string `form:"country"`
	// An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
	Description *string `form:"description"`
	// The display name of the tax rate, which will be shown to users.
	DisplayName *string `form:"display_name"`
	// This specifies if the tax rate is inclusive or exclusive.
	Inclusive *bool `form:"inclusive"`
	// The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice.
	Jurisdiction *string `form:"jurisdiction"`
	// This represents the tax rate percent out of 100.
	Percentage *float64 `form:"percentage"`
	// [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
	State *string `form:"state"`
	// The high-level tax type, such as `vat` or `sales_tax`.
	TaxType *string `form:"tax_type"`
}

Creates a new tax rate.

type TaxRateTaxType

type TaxRateTaxType string

The high-level tax type, such as `vat` or `sales_tax`.

const (
	TaxRateTaxTypeGST      TaxRateTaxType = "gst"
	TaxRateTaxTypeHST      TaxRateTaxType = "hst"
	TaxRateTaxTypeJCT      TaxRateTaxType = "jct"
	TaxRateTaxTypePST      TaxRateTaxType = "pst"
	TaxRateTaxTypeQST      TaxRateTaxType = "qst"
	TaxRateTaxTypeRST      TaxRateTaxType = "rst"
	TaxRateTaxTypeSalesTax TaxRateTaxType = "sales_tax"
	TaxRateTaxTypeVAT      TaxRateTaxType = "vat"
)

List of values that TaxRateTaxType can take

type TerminalConfiguration

type TerminalConfiguration struct {
	APIResource
	BBPOSWisePOSE *TerminalConfigurationBBPOSWisePOSE `json:"bbpos_wisepos_e"`
	Deleted       bool                                `json:"deleted"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Whether this Configuration is the default for your account
	IsAccountDefault bool `json:"is_account_default"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object       string                             `json:"object"`
	Tipping      *TerminalConfigurationTipping      `json:"tipping"`
	VerifoneP400 *TerminalConfigurationVerifoneP400 `json:"verifone_p400"`
}

A Configurations object represents how features should be configured for terminal readers.

type TerminalConfigurationBBPOSWisePOSE

type TerminalConfigurationBBPOSWisePOSE struct {
	// A File ID representing an image you would like displayed on the reader.
	Splashscreen *File `json:"splashscreen"`
}

type TerminalConfigurationBBPOSWisePOSEParams

type TerminalConfigurationBBPOSWisePOSEParams struct {
	// A File ID representing an image you would like displayed on the reader.
	Splashscreen *string `form:"splashscreen"`
}

An object containing device type specific settings for BBPOS WisePOS E readers

type TerminalConfigurationList

type TerminalConfigurationList struct {
	APIResource
	ListMeta
	Data []*TerminalConfiguration `json:"data"`
}

TerminalConfigurationList is a list of Configurations as retrieved from a list endpoint.

type TerminalConfigurationListParams

type TerminalConfigurationListParams struct {
	ListParams `form:"*"`
	// if present, only return the account default or non-default configurations.
	IsAccountDefault *bool `form:"is_account_default"`
}

Returns a list of Configuration objects.

type TerminalConfigurationParams

type TerminalConfigurationParams struct {
	Params `form:"*"`
	// An object containing device type specific settings for BBPOS WisePOS E readers
	BBPOSWisePOSE *TerminalConfigurationBBPOSWisePOSEParams `form:"bbpos_wisepos_e"`
	// Tipping configurations for readers supporting on-reader tips
	Tipping *TerminalConfigurationTippingParams `form:"tipping"`
	// An object containing device type specific settings for Verifone P400 readers
	VerifoneP400 *TerminalConfigurationVerifoneP400Params `form:"verifone_p400"`
}

Creates a new Configuration object.

type TerminalConfigurationTipping

type TerminalConfigurationTipping struct {
	AUD *TerminalConfigurationTippingAUD `json:"aud"`
	CAD *TerminalConfigurationTippingCAD `json:"cad"`
	CHF *TerminalConfigurationTippingCHF `json:"chf"`
	CZK *TerminalConfigurationTippingCZK `json:"czk"`
	DKK *TerminalConfigurationTippingDKK `json:"dkk"`
	EUR *TerminalConfigurationTippingEUR `json:"eur"`
	GBP *TerminalConfigurationTippingGBP `json:"gbp"`
	HKD *TerminalConfigurationTippingHKD `json:"hkd"`
	MYR *TerminalConfigurationTippingMYR `json:"myr"`
	NOK *TerminalConfigurationTippingNOK `json:"nok"`
	NZD *TerminalConfigurationTippingNZD `json:"nzd"`
	SEK *TerminalConfigurationTippingSEK `json:"sek"`
	SGD *TerminalConfigurationTippingSGD `json:"sgd"`
	USD *TerminalConfigurationTippingUSD `json:"usd"`
}

type TerminalConfigurationTippingAUD

type TerminalConfigurationTippingAUD struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingAUDParams

type TerminalConfigurationTippingAUDParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for AUD

type TerminalConfigurationTippingCAD

type TerminalConfigurationTippingCAD struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingCADParams

type TerminalConfigurationTippingCADParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for CAD

type TerminalConfigurationTippingCHF

type TerminalConfigurationTippingCHF struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingCHFParams

type TerminalConfigurationTippingCHFParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for CHF

type TerminalConfigurationTippingCZK

type TerminalConfigurationTippingCZK struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingCZKParams

type TerminalConfigurationTippingCZKParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for CZK

type TerminalConfigurationTippingDKK

type TerminalConfigurationTippingDKK struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingDKKParams

type TerminalConfigurationTippingDKKParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for DKK

type TerminalConfigurationTippingEUR

type TerminalConfigurationTippingEUR struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingEURParams

type TerminalConfigurationTippingEURParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for EUR

type TerminalConfigurationTippingGBP

type TerminalConfigurationTippingGBP struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingGBPParams

type TerminalConfigurationTippingGBPParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for GBP

type TerminalConfigurationTippingHKD

type TerminalConfigurationTippingHKD struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingHKDParams

type TerminalConfigurationTippingHKDParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for HKD

type TerminalConfigurationTippingMYR

type TerminalConfigurationTippingMYR struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingMYRParams

type TerminalConfigurationTippingMYRParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for MYR

type TerminalConfigurationTippingNOK

type TerminalConfigurationTippingNOK struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingNOKParams

type TerminalConfigurationTippingNOKParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for NOK

type TerminalConfigurationTippingNZD

type TerminalConfigurationTippingNZD struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingNZDParams

type TerminalConfigurationTippingNZDParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for NZD

type TerminalConfigurationTippingParams

type TerminalConfigurationTippingParams struct {
	// Tipping configuration for AUD
	AUD *TerminalConfigurationTippingAUDParams `form:"aud"`
	// Tipping configuration for CAD
	CAD *TerminalConfigurationTippingCADParams `form:"cad"`
	// Tipping configuration for CHF
	CHF *TerminalConfigurationTippingCHFParams `form:"chf"`
	// Tipping configuration for CZK
	CZK *TerminalConfigurationTippingCZKParams `form:"czk"`
	// Tipping configuration for DKK
	DKK *TerminalConfigurationTippingDKKParams `form:"dkk"`
	// Tipping configuration for EUR
	EUR *TerminalConfigurationTippingEURParams `form:"eur"`
	// Tipping configuration for GBP
	GBP *TerminalConfigurationTippingGBPParams `form:"gbp"`
	// Tipping configuration for HKD
	HKD *TerminalConfigurationTippingHKDParams `form:"hkd"`
	// Tipping configuration for MYR
	MYR *TerminalConfigurationTippingMYRParams `form:"myr"`
	// Tipping configuration for NOK
	NOK *TerminalConfigurationTippingNOKParams `form:"nok"`
	// Tipping configuration for NZD
	NZD *TerminalConfigurationTippingNZDParams `form:"nzd"`
	// Tipping configuration for SEK
	SEK *TerminalConfigurationTippingSEKParams `form:"sek"`
	// Tipping configuration for SGD
	SGD *TerminalConfigurationTippingSGDParams `form:"sgd"`
	// Tipping configuration for USD
	USD *TerminalConfigurationTippingUSDParams `form:"usd"`
}

Tipping configurations for readers supporting on-reader tips

type TerminalConfigurationTippingSEK

type TerminalConfigurationTippingSEK struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingSEKParams

type TerminalConfigurationTippingSEKParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for SEK

type TerminalConfigurationTippingSGD

type TerminalConfigurationTippingSGD struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingSGDParams

type TerminalConfigurationTippingSGDParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for SGD

type TerminalConfigurationTippingUSD

type TerminalConfigurationTippingUSD struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []int64 `json:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []int64 `json:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold int64 `json:"smart_tip_threshold"`
}

type TerminalConfigurationTippingUSDParams

type TerminalConfigurationTippingUSDParams struct {
	// Fixed amounts displayed when collecting a tip
	FixedAmounts []*int64 `form:"fixed_amounts"`
	// Percentages displayed when collecting a tip
	Percentages []*int64 `form:"percentages"`
	// Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
	SmartTipThreshold *int64 `form:"smart_tip_threshold"`
}

Tipping configuration for USD

type TerminalConfigurationVerifoneP400

type TerminalConfigurationVerifoneP400 struct {
	// A File ID representing an image you would like displayed on the reader.
	Splashscreen *File `json:"splashscreen"`
}

type TerminalConfigurationVerifoneP400Params

type TerminalConfigurationVerifoneP400Params struct {
	// A File ID representing an image you would like displayed on the reader.
	Splashscreen *string `form:"splashscreen"`
}

An object containing device type specific settings for Verifone P400 readers

type TerminalConnectionToken

type TerminalConnectionToken struct {
	APIResource
	// The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).
	Location string `json:"location"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Your application should pass this token to the Stripe Terminal SDK.
	Secret string `json:"secret"`
}

A Connection Token is used by the Stripe Terminal SDK to connect to a reader.

Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).

type TerminalConnectionTokenParams

type TerminalConnectionTokenParams struct {
	Params `form:"*"`
	// The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens).
	Location *string `form:"location"`
}

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

type TerminalLocation

type TerminalLocation struct {
	APIResource
	Address *Address `json:"address"`
	// The ID of a configuration that will be used to customize all readers in this location.
	ConfigurationOverrides string `json:"configuration_overrides"`
	Deleted                bool   `json:"deleted"`
	// The display name of the location.
	DisplayName string `json:"display_name"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
}

A Location represents a grouping of readers.

Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations).

func (*TerminalLocation) UnmarshalJSON

func (t *TerminalLocation) UnmarshalJSON(data []byte) error

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

type TerminalLocationList

type TerminalLocationList struct {
	APIResource
	ListMeta
	Data []*TerminalLocation `json:"data"`
}

TerminalLocationList is a list of Locations as retrieved from a list endpoint.

type TerminalLocationListParams

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

Returns a list of Location objects.

type TerminalLocationParams

type TerminalLocationParams struct {
	Params `form:"*"`
	// The full address of the location.
	Address *AddressParams `form:"address"`
	// The ID of a configuration that will be used to customize all readers in this location.
	ConfigurationOverrides *string `form:"configuration_overrides"`
	// A name for the location.
	DisplayName *string `form:"display_name"`
}

Retrieves a Location object.

type TerminalReader

type TerminalReader struct {
	APIResource
	// The most recent action performed by the reader.
	Action  *TerminalReaderAction `json:"action"`
	Deleted bool                  `json:"deleted"`
	// The current software version of the reader.
	DeviceSwVersion string `json:"device_sw_version"`
	// Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`.
	DeviceType TerminalReaderDeviceType `json:"device_type"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// The local IP address of the reader.
	IPAddress string `json:"ip_address"`
	// Custom label given to the reader for easier identification.
	Label string `json:"label"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// The location identifier of the reader.
	Location *TerminalLocation `json:"location"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Serial number of the reader.
	SerialNumber string `json:"serial_number"`
	// The networking status of the reader.
	Status string `json:"status"`
}

A Reader represents a physical device for accepting payment details.

Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader).

type TerminalReaderAction

type TerminalReaderAction struct {
	// Failure code, only set if status is `failed`.
	FailureCode string `json:"failure_code"`
	// Detailed failure message, only set if status is `failed`.
	FailureMessage string `json:"failure_message"`
	// Represents a reader action to process a payment intent
	ProcessPaymentIntent *TerminalReaderActionProcessPaymentIntent `json:"process_payment_intent"`
	// Represents a reader action to process a setup intent
	ProcessSetupIntent *TerminalReaderActionProcessSetupIntent `json:"process_setup_intent"`
	// Represents a reader action to set the reader display
	SetReaderDisplay *TerminalReaderActionSetReaderDisplay `json:"set_reader_display"`
	// Status of the action performed by the reader.
	Status TerminalReaderActionStatus `json:"status"`
	// Type of action performed by the reader.
	Type TerminalReaderActionType `json:"type"`
}

The most recent action performed by the reader.

type TerminalReaderActionProcessPaymentIntent

type TerminalReaderActionProcessPaymentIntent struct {
	// Most recent PaymentIntent processed by the reader.
	PaymentIntent *PaymentIntent `json:"payment_intent"`
	// Represents a per-transaction override of a reader configuration
	ProcessConfig *TerminalReaderActionProcessPaymentIntentProcessConfig `json:"process_config"`
}

Represents a reader action to process a payment intent

type TerminalReaderActionProcessPaymentIntentProcessConfig

type TerminalReaderActionProcessPaymentIntentProcessConfig struct {
	// Override showing a tipping selection screen on this transaction.
	SkipTipping bool `json:"skip_tipping"`
}

Represents a per-transaction override of a reader configuration

type TerminalReaderActionProcessSetupIntent

type TerminalReaderActionProcessSetupIntent struct {
	// ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod.
	GeneratedCard string `json:"generated_card"`
	// Most recent SetupIntent processed by the reader.
	SetupIntent *SetupIntent `json:"setup_intent"`
}

Represents a reader action to process a setup intent

type TerminalReaderActionSetReaderDisplay

type TerminalReaderActionSetReaderDisplay struct {
	// Cart object to be displayed by the reader.
	Cart *TerminalReaderActionSetReaderDisplayCart `json:"cart"`
	// Type of information to be displayed by the reader.
	Type TerminalReaderActionSetReaderDisplayType `json:"type"`
}

Represents a reader action to set the reader display

type TerminalReaderActionSetReaderDisplayCart

type TerminalReaderActionSetReaderDisplayCart struct {
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// List of line items in the cart.
	LineItems []*TerminalReaderActionSetReaderDisplayCartLineItem `json:"line_items"`
	// Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	Tax int64 `json:"tax"`
	// Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	Total int64 `json:"total"`
}

Cart object to be displayed by the reader.

type TerminalReaderActionSetReaderDisplayCartLineItem

type TerminalReaderActionSetReaderDisplayCartLineItem struct {
	// The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
	Amount int64 `json:"amount"`
	// Description of the line item.
	Description string `json:"description"`
	// The quantity of the line item.
	Quantity int64 `json:"quantity"`
}

List of line items in the cart.

type TerminalReaderActionSetReaderDisplayType

type TerminalReaderActionSetReaderDisplayType string

Type of information to be displayed by the reader.

const (
	TerminalReaderActionSetReaderDisplayTypeCart TerminalReaderActionSetReaderDisplayType = "cart"
)

List of values that TerminalReaderActionSetReaderDisplayType can take

type TerminalReaderActionStatus

type TerminalReaderActionStatus string

Status of the action performed by the reader.

const (
	TerminalReaderActionStatusFailed     TerminalReaderActionStatus = "failed"
	TerminalReaderActionStatusInProgress TerminalReaderActionStatus = "in_progress"
	TerminalReaderActionStatusSucceeded  TerminalReaderActionStatus = "succeeded"
)

List of values that TerminalReaderActionStatus can take

type TerminalReaderActionType

type TerminalReaderActionType string

Type of action performed by the reader.

const (
	TerminalReaderActionTypeProcessPaymentIntent TerminalReaderActionType = "process_payment_intent"
	TerminalReaderActionTypeProcessSetupIntent   TerminalReaderActionType = "process_setup_intent"
	TerminalReaderActionTypeSetReaderDisplay     TerminalReaderActionType = "set_reader_display"
)

List of values that TerminalReaderActionType can take

type TerminalReaderCancelActionParams

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

Cancels the current reader action.

type TerminalReaderDeviceType

type TerminalReaderDeviceType string

Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`.

const (
	TerminalReaderDeviceTypeBBPOSChipper2X    TerminalReaderDeviceType = "bbpos_chipper2x"
	TerminalReaderDeviceTypeBBPOSWisePad3     TerminalReaderDeviceType = "bbpos_wisepad3"
	TerminalReaderDeviceTypeBBPOSWisePOSE     TerminalReaderDeviceType = "bbpos_wisepos_e"
	TerminalReaderDeviceTypeSimulatedWisePOSE TerminalReaderDeviceType = "simulated_wisepos_e"
	TerminalReaderDeviceTypeStripeM2          TerminalReaderDeviceType = "stripe_m2"
	TerminalReaderDeviceTypeVerifoneP400      TerminalReaderDeviceType = "verifone_P400"
)

List of values that TerminalReaderDeviceType can take

type TerminalReaderList

type TerminalReaderList struct {
	APIResource
	ListMeta
	Data []*TerminalReader `json:"data"`
}

TerminalReaderList is a list of Readers as retrieved from a list endpoint.

type TerminalReaderListParams

type TerminalReaderListParams struct {
	ListParams `form:"*"`
	// Filters readers by device type
	DeviceType *string `form:"device_type"`
	// A location ID to filter the response list to only readers at the specific location
	Location *string `form:"location"`
	// A status filter to filter readers to only offline or online readers
	Status *string `form:"status"`
}

Returns a list of Reader objects.

type TerminalReaderParams

type TerminalReaderParams struct {
	Params `form:"*"`
	// Custom label given to the reader for easier identification. If no label is specified, the registration code will be used.
	Label *string `form:"label"`
	// The location to assign the reader to.
	Location *string `form:"location"`
	// A code generated by the reader used for registering to an account.
	RegistrationCode *string `form:"registration_code"`
}

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

type TerminalReaderProcessPaymentIntentParams

type TerminalReaderProcessPaymentIntentParams struct {
	Params `form:"*"`
	// PaymentIntent ID
	PaymentIntent *string `form:"payment_intent"`
	// Configuration overrides
	ProcessConfig *TerminalReaderProcessPaymentIntentProcessConfigParams `form:"process_config"`
}

Initiates a payment flow on a Reader.

type TerminalReaderProcessPaymentIntentProcessConfigParams

type TerminalReaderProcessPaymentIntentProcessConfigParams struct {
	// Override showing a tipping selection screen on this transaction.
	SkipTipping *bool `form:"skip_tipping"`
}

Configuration overrides

type TerminalReaderProcessSetupIntentParams

type TerminalReaderProcessSetupIntentParams struct {
	Params `form:"*"`
	// Customer Consent Collected
	CustomerConsentCollected *bool `form:"customer_consent_collected"`
	// SetupIntent ID
	SetupIntent *string `form:"setup_intent"`
}

Initiates a setup intent flow on a Reader.

type TerminalReaderSetReaderDisplayCartLineItemParams

type TerminalReaderSetReaderDisplayCartLineItemParams struct {
	// The price of the item in cents.
	Amount *int64 `form:"amount"`
	// The description or name of the item.
	Description *string `form:"description"`
	// The quantity of the line item being purchased.
	Quantity *int64 `form:"quantity"`
}

Array of line items that were purchased.

type TerminalReaderSetReaderDisplayCartParams

type TerminalReaderSetReaderDisplayCartParams struct {
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// Array of line items that were purchased.
	LineItems []*TerminalReaderSetReaderDisplayCartLineItemParams `form:"line_items"`
	// The amount of tax in cents.
	Tax *int64 `form:"tax"`
	// Total balance of cart due in cents.
	Total *int64 `form:"total"`
}

Cart

type TerminalReaderSetReaderDisplayParams

type TerminalReaderSetReaderDisplayParams struct {
	Params `form:"*"`
	// Cart
	Cart *TerminalReaderSetReaderDisplayCartParams `form:"cart"`
	// Type
	Type *string `form:"type"`
}

Sets reader display to show cart details.

type TestHelpersCustomerFundCashBalanceParams

type TestHelpersCustomerFundCashBalanceParams struct {
	Params `form:"*"`
	// Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs.
	Reference *string `form:"reference"`
}

Create an incoming testmode bank transfer

type TestHelpersIssuingCardDeliverCardParams

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

Updates the shipping status of the specified Issuing Card object to delivered.

type TestHelpersIssuingCardFailCardParams

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

Updates the shipping status of the specified Issuing Card object to failure.

type TestHelpersIssuingCardReturnCardParams

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

Updates the shipping status of the specified Issuing Card object to returned.

type TestHelpersIssuingCardShipCardParams

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

Updates the shipping status of the specified Issuing Card object to shipped.

type TestHelpersRefundExpireParams

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

Expire a refund with a status of requires_action.

type TestHelpersTerminalReaderPresentPaymentMethodCardPresentParams

type TestHelpersTerminalReaderPresentPaymentMethodCardPresentParams struct {
	// Card Number
	Number *string `form:"number"`
}

Simulated data for the card_present payment method

type TestHelpersTerminalReaderPresentPaymentMethodParams

type TestHelpersTerminalReaderPresentPaymentMethodParams struct {
	Params `form:"*"`
	// Simulated data for the card_present payment method
	CardPresent *TestHelpersTerminalReaderPresentPaymentMethodCardPresentParams `form:"card_present"`
	// Simulated payment type
	Type *string `form:"type"`
}

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

type TestHelpersTestClock

type TestHelpersTestClock struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	Deleted bool  `json:"deleted"`
	// Time at which this clock is scheduled to auto delete.
	DeletesAfter int64 `json:"deletes_after"`
	// Time at which all objects belonging to this clock are frozen.
	FrozenTime int64 `json:"frozen_time"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// The custom name supplied at creation.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The status of the Test Clock.
	Status TestHelpersTestClockStatus `json:"status"`
}

A test clock enables deterministic control over objects in testmode. With a test clock, you can create objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.

func (*TestHelpersTestClock) UnmarshalJSON

func (t *TestHelpersTestClock) UnmarshalJSON(data []byte) error

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

type TestHelpersTestClockAdvanceParams

type TestHelpersTestClockAdvanceParams struct {
	Params `form:"*"`
	// The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future.
	FrozenTime *int64 `form:"frozen_time"`
}

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

type TestHelpersTestClockList

type TestHelpersTestClockList struct {
	APIResource
	ListMeta
	Data []*TestHelpersTestClock `json:"data"`
}

TestHelpersTestClockList is a list of TestClocks as retrieved from a list endpoint.

type TestHelpersTestClockListParams

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

Returns a list of your test clocks.

type TestHelpersTestClockParams

type TestHelpersTestClockParams struct {
	Params `form:"*"`
	// The initial frozen time for this test clock.
	FrozenTime *int64 `form:"frozen_time"`
	// The name for this test clock.
	Name *string `form:"name"`
}

Retrieves a test clock.

type TestHelpersTestClockStatus

type TestHelpersTestClockStatus string

The status of the Test Clock.

const (
	TestHelpersTestClockStatusAdvancing       TestHelpersTestClockStatus = "advancing"
	TestHelpersTestClockStatusInternalFailure TestHelpersTestClockStatus = "internal_failure"
	TestHelpersTestClockStatusReady           TestHelpersTestClockStatus = "ready"
)

List of values that TestHelpersTestClockStatus can take

type TestHelpersTreasuryInboundTransferFailFailureDetailsParams

type TestHelpersTreasuryInboundTransferFailFailureDetailsParams struct {
	// Reason for the failure.
	Code *string `form:"code"`
}

Details about a failed InboundTransfer.

type TestHelpersTreasuryInboundTransferFailParams

type TestHelpersTreasuryInboundTransferFailParams struct {
	Params `form:"*"`
	// Details about a failed InboundTransfer.
	FailureDetails *TestHelpersTreasuryInboundTransferFailFailureDetailsParams `form:"failure_details"`
}

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

type TestHelpersTreasuryInboundTransferReturnInboundTransferParams

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

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

type TestHelpersTreasuryInboundTransferSucceedParams

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

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

type TestHelpersTreasuryOutboundPaymentFailParams

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

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

type TestHelpersTreasuryOutboundPaymentPostParams

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

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

type TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentParams

type TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentParams struct {
	Params `form:"*"`
	// Optional hash to set the the return code.
	ReturnedDetails *TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentReturnedDetailsParams `form:"returned_details"`
}

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

type TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentReturnedDetailsParams

type TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentReturnedDetailsParams struct {
	// The return code to be set on the OutboundPayment object.
	Code *string `form:"code"`
}

Optional hash to set the the return code.

type TestHelpersTreasuryOutboundTransferFailParams

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

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

type TestHelpersTreasuryOutboundTransferPostParams

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

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

type TestHelpersTreasuryOutboundTransferReturnOutboundTransferParams

type TestHelpersTreasuryOutboundTransferReturnOutboundTransferParams struct {
	Params `form:"*"`
	// Details about a returned OutboundTransfer.
	ReturnedDetails *TestHelpersTreasuryOutboundTransferReturnOutboundTransferReturnedDetailsParams `form:"returned_details"`
}

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

type TestHelpersTreasuryOutboundTransferReturnOutboundTransferReturnedDetailsParams

type TestHelpersTreasuryOutboundTransferReturnOutboundTransferReturnedDetailsParams struct {
	// Reason for the return.
	Code *string `form:"code"`
}

Details about a returned OutboundTransfer.

type TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsParams

type TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsParams struct {
	// The source type.
	Type *string `form:"type"`
	// Optional fields for `us_bank_account`.
	USBankAccount *TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccountParams `form:"us_bank_account"`
}

Initiating payment method details for the object.

type TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccountParams

type TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccountParams struct {
	// The bank account holder's name.
	AccountHolderName *string `form:"account_holder_name"`
	// The bank account number.
	AccountNumber *string `form:"account_number"`
	// The bank account's routing number.
	RoutingNumber *string `form:"routing_number"`
}

Optional fields for `us_bank_account`.

type TestHelpersTreasuryReceivedCreditParams

type TestHelpersTreasuryReceivedCreditParams struct {
	Params `form:"*"`
	// Amount (in cents) to be transferred.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// The FinancialAccount to send funds to.
	FinancialAccount *string `form:"financial_account"`
	// Initiating payment method details for the object.
	InitiatingPaymentMethodDetails *TestHelpersTreasuryReceivedCreditInitiatingPaymentMethodDetailsParams `form:"initiating_payment_method_details"`
	// The rails used for the object.
	Network *string `form:"network"`
}

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.

type TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsParams

type TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsParams struct {
	// The source type.
	Type *string `form:"type"`
	// Optional fields for `us_bank_account`.
	USBankAccount *TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccountParams `form:"us_bank_account"`
}

Initiating payment method details for the object.

type TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccountParams

type TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccountParams struct {
	// The bank account holder's name.
	AccountHolderName *string `form:"account_holder_name"`
	// The bank account number.
	AccountNumber *string `form:"account_number"`
	// The bank account's routing number.
	RoutingNumber *string `form:"routing_number"`
}

Optional fields for `us_bank_account`.

type TestHelpersTreasuryReceivedDebitParams

type TestHelpersTreasuryReceivedDebitParams struct {
	Params `form:"*"`
	// Amount (in cents) to be transferred.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// The FinancialAccount to pull funds from.
	FinancialAccount *string `form:"financial_account"`
	// Initiating payment method details for the object.
	InitiatingPaymentMethodDetails *TestHelpersTreasuryReceivedDebitInitiatingPaymentMethodDetailsParams `form:"initiating_payment_method_details"`
	// The rails used for the object.
	Network *string `form:"network"`
}

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.

type Token

type Token struct {
	APIResource
	// These bank accounts are payment methods on `Customer` objects.
	//
	// On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer
	// destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts).
	// They can be bank accounts or debit cards as well, and are documented in the links above.
	//
	// Related guide: [Bank Debits and Transfers](https://stripe.com/docs/payments/bank-debits-transfers).
	BankAccount *BankAccount `json:"bank_account"`
	// You can store multiple cards on a customer in order to charge the customer
	// later. You can also store multiple debit cards on a recipient in order to
	// transfer to those cards later.
	//
	// Related guide: [Card Payments with Sources](https://stripe.com/docs/sources/cards).
	Card *Card `json:"card"`
	// IP address of the client that generated the token.
	ClientIP string `json:"client_ip"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Type of the token: `account`, `bank_account`, `card`, or `pii`.
	Type TokenType `json:"type"`
	// Whether this token has already been used (tokens can be used only once).
	Used bool `json:"used"`
}

Tokenization is the process Stripe uses to collect sensitive card or bank account details, or personally identifiable information (PII), directly from your customers in a secure manner. A token representing this information is returned to your server to use. You should use our [recommended payments integrations](https://stripe.com/docs/payments) to perform this process client-side. This ensures that no sensitive card data touches your server, and allows your integration to operate in a PCI-compliant way.

If you cannot use client-side tokenization, you can also create tokens using the API with either your publishable or secret API key. Keep in mind that if your integration uses this method, you are responsible for any PCI compliance that may be required, and you must keep your secret API key safe. Unlike with client-side tokenization, your customer's information is not sent directly to Stripe, so we cannot determine how it is handled or stored.

Tokens cannot be stored or used more than once. To store card or bank account information for later use, you can create Customer(https://stripe.com/docs/api#customers) objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, performs best with integrations that use client-side tokenization.

Related guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token)

type TokenAccountParams

type TokenAccountParams struct {
	// The business type.
	BusinessType *string `form:"business_type"`
	// Information about the company or business.
	Company *AccountCompanyParams `form:"company"`
	// Information about the person represented by the account.
	Individual *PersonParams `form:"individual"`
	// Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://stripe.com/docs/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`.
	TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"`
}

Information for the account this token will represent.

type TokenCVCUpdateParams

type TokenCVCUpdateParams struct {
	// The CVC value, in string form.
	CVC *string `form:"cvc"`
}

The updated CVC value this token will represent.

type TokenPIIParams

type TokenPIIParams struct {
	// The `id_number` for the PII, in string form.
	IDNumber *string `form:"id_number"`
}

The PII this token will represent.

type TokenParams

type TokenParams struct {
	Params `form:"*"`
	// Information for the account this token will represent.
	Account *TokenAccountParams `form:"account"`
	// The bank account this token will represent.
	BankAccount *BankAccountParams `form:"bank_account"`
	Card        *CardParams        `form:"card"`
	// The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).
	Customer *string `form:"customer"`
	// The updated CVC value this token will represent.
	CVCUpdate *TokenCVCUpdateParams `form:"cvc_update"`
	// Information for the person this token will represent.
	Person *PersonParams `form:"person"`
	// The PII this token will represent.
	PII *TokenPIIParams `form:"pii"`
}

Retrieves the token with the given ID.

type TokenType

type TokenType string

Type of the token: `account`, `bank_account`, `card`, or `pii`.

const (
	TokenTypeAccount     TokenType = "account"
	TokenTypeBankAccount TokenType = "bank_account"
	TokenTypeCard        TokenType = "card"
	TokenTypeCVCUpdate   TokenType = "cvc_update"
	TokenTypePII         TokenType = "pii"
)

List of values that TokenType can take

type Topup

type Topup struct {
	APIResource
	// Amount transferred.
	Amount int64 `json:"amount"`
	// ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up.
	BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up.
	ExpectedAvailabilityDate int64 `json:"expected_availability_date"`
	// Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes).
	FailureCode string `json:"failure_code"`
	// Message to user further explaining reason for top-up failure if available.
	FailureMessage string `json:"failure_message"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account.
	Source *PaymentSource `json:"source"`
	// Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter.
	StatementDescriptor string `json:"statement_descriptor"`
	// The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`.
	Status TopupStatus `json:"status"`
	// A string that identifies this top-up as part of a group.
	TransferGroup string `json:"transfer_group"`

	// The following property is deprecated
	ArrivalDate int64 `json:"arrival_date"`
}

To top up your Stripe balance, you create a top-up object. You can retrieve individual top-ups, as well as list all top-ups. Top-ups are identified by a unique, random ID.

Related guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups).

func (*Topup) UnmarshalJSON

func (t *Topup) UnmarshalJSON(data []byte) error

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

type TopupList

type TopupList struct {
	APIResource
	ListMeta
	Data []*Topup `json:"data"`
}

TopupList is a list of Topups as retrieved from a list endpoint.

type TopupListParams

type TopupListParams struct {
	ListParams `form:"*"`
	// A positive integer representing how much to transfer.
	Amount *int64 `form:"amount"`
	// A positive integer representing how much to transfer.
	AmountRange *RangeQueryParams `form:"amount"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	Created *int64 `form:"created"`
	// A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`.
	Status *string `form:"status"`
}

Returns a list of top-ups.

type TopupParams

type TopupParams struct {
	Params `form:"*"`
	// A positive integer representing how much to transfer.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)).
	Source *string `form:"source"`
	// Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters.
	StatementDescriptor *string `form:"statement_descriptor"`
	// A string that identifies this top-up as part of a group.
	TransferGroup *string `form:"transfer_group"`
}

Top up the balance of an account

type TopupStatus

type TopupStatus string

The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`.

const (
	TopupStatusCanceled  TopupStatus = "canceled"
	TopupStatusFailed    TopupStatus = "failed"
	TopupStatusPending   TopupStatus = "pending"
	TopupStatusReversed  TopupStatus = "reversed"
	TopupStatusSucceeded TopupStatus = "succeeded"
)

List of values that TopupStatus can take

type Transfer

type Transfer struct {
	APIResource
	// Amount in %s to be transferred.
	Amount int64 `json:"amount"`
	// Amount in %s reversed (can be less than the amount attribute on the transfer if a partial reversal was issued).
	AmountReversed int64 `json:"amount_reversed"`
	// Balance transaction that describes the impact of this transfer on your account balance.
	BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
	// Time that this record of the transfer was first created.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// ID of the Stripe account the transfer was sent to.
	Destination *Account `json:"destination"`
	// If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer.
	DestinationPayment *Charge `json:"destination_payment"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// A list of reversals that have been applied to the transfer.
	Reversals *TransferReversalList `json:"reversals"`
	// Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false.
	Reversed bool `json:"reversed"`
	// ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance.
	SourceTransaction *Charge `json:"source_transaction"`
	// The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.
	SourceType TransferSourceType `json:"source_type"`
	// A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.
	TransferGroup string `json:"transfer_group"`
}

A `Transfer` object is created when you move funds between Stripe accounts as part of Connect.

Before April 6, 2017, transfers also represented movement of funds from a Stripe account to a card or bank account. This behavior has since been split out into a Payout(https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more information, read about the [transfer/payout split](https://stripe.com/docs/transfer-payout-split).

Related guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers).

func (*Transfer) UnmarshalJSON

func (t *Transfer) UnmarshalJSON(data []byte) error

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 TransferList

type TransferList struct {
	APIResource
	ListMeta
	Data []*Transfer `json:"data"`
}

TransferList is a list of Transfers as retrieved from a list endpoint.

type TransferListParams

type TransferListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return transfers for the destination specified by this account ID.
	Destination *string `form:"destination"`
	// Only return transfers with the specified transfer group.
	TransferGroup *string `form:"transfer_group"`
}

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

type TransferParams

type TransferParams struct {
	Params `form:"*"`
	// A positive integer in cents (or local equivalent) representing how much to transfer.
	Amount *int64 `form:"amount"`
	// 3-letter [ISO code for currency](https://stripe.com/docs/payouts).
	Currency *string `form:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// The ID of a connected Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details.
	Destination *string `form:"destination"`
	// You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details.
	SourceTransaction *string `form:"source_transaction"`
	// The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`.
	SourceType *string `form:"source_type"`
	// A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details.
	TransferGroup *string `form:"transfer_group"`
}

To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error.

type TransferReversal

type TransferReversal struct {
	APIResource
	// Amount, in %s.
	Amount int64 `json:"amount"`
	// Balance transaction that describes the impact on your account balance.
	BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// Linked payment refund for the transfer reversal.
	DestinationPaymentRefund *Refund `json:"destination_payment_refund"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// ID of the refund responsible for the transfer reversal.
	SourceRefund *Refund `json:"source_refund"`
	// ID of the transfer that was reversed.
	Transfer *Transfer `json:"transfer"`
}

[Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a connected account, either entirely or partially, and can also specify whether to refund any related application fees. Transfer reversals add to the platform's balance and subtract from the destination account's balance.

Reversing a transfer that was made for a [destination charge](https://stripe.com/docs/connect/destination-charges) is allowed only up to the amount of the charge. It is possible to reverse a [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options) transfer only if the destination account has enough balance to cover the reversal.

Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers).

func (*TransferReversal) UnmarshalJSON

func (t *TransferReversal) UnmarshalJSON(data []byte) error

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

type TransferReversalList

type TransferReversalList struct {
	APIResource
	ListMeta
	Data []*TransferReversal `json:"data"`
}

TransferReversalList is a list of TransferReversals as retrieved from a list endpoint.

type TransferReversalListParams

type TransferReversalListParams struct {
	ListParams `form:"*"`
	ID         *string `form:"-"` // Included in URL
}

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals.

type TransferReversalParams

type TransferReversalParams struct {
	Params `form:"*"`
	ID     *string `form:"-"` // Included in URL
	// A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount.
	Amount *int64 `form:"amount"`
	// An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value.
	Description *string `form:"description"`
	// Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed.
	RefundApplicationFee *bool `form:"refund_application_fee"`
}

When you create a new reversal, you must specify a transfer to create it on.

When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.

Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.

type TransferSourceType

type TransferSourceType string

The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`.

const (
	TransferSourceTypeBankAccount TransferSourceType = "bank_account"
	TransferSourceTypeCard        TransferSourceType = "card"
	TransferSourceTypeFPX         TransferSourceType = "fpx"
)

List of values that TransferSourceType can take

type TreasuryCreditReversal

type TreasuryCreditReversal struct {
	APIResource
	// Amount (in cents) transferred.
	Amount int64 `json:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// The FinancialAccount to reverse funds from.
	FinancialAccount string `json:"financial_account"`
	// A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
	HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// The rails used to reverse the funds.
	Network TreasuryCreditReversalNetwork `json:"network"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The ReceivedCredit being reversed.
	ReceivedCredit string `json:"received_credit"`
	// Status of the CreditReversal
	Status            TreasuryCreditReversalStatus             `json:"status"`
	StatusTransitions *TreasuryCreditReversalStatusTransitions `json:"status_transitions"`
	// The Transaction associated with this object.
	Transaction *TreasuryTransaction `json:"transaction"`
}

You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.

type TreasuryCreditReversalList

type TreasuryCreditReversalList struct {
	APIResource
	ListMeta
	Data []*TreasuryCreditReversal `json:"data"`
}

TreasuryCreditReversalList is a list of CreditReversals as retrieved from a list endpoint.

type TreasuryCreditReversalListParams

type TreasuryCreditReversalListParams struct {
	ListParams `form:"*"`
	// Returns objects associated with this FinancialAccount.
	FinancialAccount *string `form:"financial_account"`
	// Only return CreditReversals for the ReceivedCredit ID.
	ReceivedCredit *string `form:"received_credit"`
	// Only return CreditReversals for a given status.
	Status *string `form:"status"`
}

Returns a list of CreditReversals.

type TreasuryCreditReversalNetwork

type TreasuryCreditReversalNetwork string

The rails used to reverse the funds.

const (
	TreasuryCreditReversalNetworkACH    TreasuryCreditReversalNetwork = "ach"
	TreasuryCreditReversalNetworkStripe TreasuryCreditReversalNetwork = "stripe"
)

List of values that TreasuryCreditReversalNetwork can take

type TreasuryCreditReversalParams

type TreasuryCreditReversalParams struct {
	Params `form:"*"`
	// The ReceivedCredit to reverse.
	ReceivedCredit *string `form:"received_credit"`
}

Reverses a ReceivedCredit and creates a CreditReversal object.

type TreasuryCreditReversalStatus

type TreasuryCreditReversalStatus string

Status of the CreditReversal

const (
	TreasuryCreditReversalStatusCanceled   TreasuryCreditReversalStatus = "canceled"
	TreasuryCreditReversalStatusPosted     TreasuryCreditReversalStatus = "posted"
	TreasuryCreditReversalStatusProcessing TreasuryCreditReversalStatus = "processing"
)

List of values that TreasuryCreditReversalStatus can take

type TreasuryCreditReversalStatusTransitions

type TreasuryCreditReversalStatusTransitions struct {
	// Timestamp describing when the CreditReversal changed status to `posted`
	PostedAt int64 `json:"posted_at"`
}

type TreasuryDebitReversal

type TreasuryDebitReversal struct {
	APIResource
	// Amount (in cents) transferred.
	Amount int64 `json:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// The FinancialAccount to reverse funds from.
	FinancialAccount string `json:"financial_account"`
	// A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
	HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Other flows linked to a DebitReversal.
	LinkedFlows *TreasuryDebitReversalLinkedFlows `json:"linked_flows"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// The rails used to reverse the funds.
	Network TreasuryDebitReversalNetwork `json:"network"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The ReceivedDebit being reversed.
	ReceivedDebit string `json:"received_debit"`
	// Status of the DebitReversal
	Status            TreasuryDebitReversalStatus             `json:"status"`
	StatusTransitions *TreasuryDebitReversalStatusTransitions `json:"status_transitions"`
	// The Transaction associated with this object.
	Transaction *TreasuryTransaction `json:"transaction"`
}

You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.

type TreasuryDebitReversalLinkedFlows

type TreasuryDebitReversalLinkedFlows struct {
	// Set if there is an Issuing dispute associated with the DebitReversal.
	IssuingDispute string `json:"issuing_dispute"`
}

Other flows linked to a DebitReversal.

type TreasuryDebitReversalList

type TreasuryDebitReversalList struct {
	APIResource
	ListMeta
	Data []*TreasuryDebitReversal `json:"data"`
}

TreasuryDebitReversalList is a list of DebitReversals as retrieved from a list endpoint.

type TreasuryDebitReversalListParams

type TreasuryDebitReversalListParams struct {
	ListParams `form:"*"`
	// Returns objects associated with this FinancialAccount.
	FinancialAccount *string `form:"financial_account"`
	// Only return DebitReversals for the ReceivedDebit ID.
	ReceivedDebit *string `form:"received_debit"`
	// Only return DebitReversals for a given resolution.
	Resolution *string `form:"resolution"`
	// Only return DebitReversals for a given status.
	Status *string `form:"status"`
}

Returns a list of DebitReversals.

type TreasuryDebitReversalNetwork

type TreasuryDebitReversalNetwork string

The rails used to reverse the funds.

const (
	TreasuryDebitReversalNetworkACH  TreasuryDebitReversalNetwork = "ach"
	TreasuryDebitReversalNetworkCard TreasuryDebitReversalNetwork = "card"
)

List of values that TreasuryDebitReversalNetwork can take

type TreasuryDebitReversalParams

type TreasuryDebitReversalParams struct {
	Params `form:"*"`
	// The ReceivedDebit to reverse.
	ReceivedDebit *string `form:"received_debit"`
}

Reverses a ReceivedDebit and creates a DebitReversal object.

type TreasuryDebitReversalStatus

type TreasuryDebitReversalStatus string

Status of the DebitReversal

const (
	TreasuryDebitReversalStatusFailed     TreasuryDebitReversalStatus = "failed"
	TreasuryDebitReversalStatusProcessing TreasuryDebitReversalStatus = "processing"
	TreasuryDebitReversalStatusSucceeded  TreasuryDebitReversalStatus = "succeeded"
)

List of values that TreasuryDebitReversalStatus can take

type TreasuryDebitReversalStatusTransitions

type TreasuryDebitReversalStatusTransitions struct {
	// Timestamp describing when the DebitReversal changed status to `completed`.
	CompletedAt int64 `json:"completed_at"`
}

type TreasuryFinancialAccount

type TreasuryFinancialAccount struct {
	APIResource
	// The array of paths to active Features in the Features hash.
	ActiveFeatures []TreasuryFinancialAccountActiveFeature `json:"active_features"`
	// Balance information for the FinancialAccount
	Balance *TreasuryFinancialAccountBalance `json:"balance"`
	// Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
	Country string `json:"country"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.
	// Stripe or the platform can control Features via the requested field.
	Features *TreasuryFinancialAccountFeatures `json:"features"`
	// The set of credentials that resolve to a FinancialAccount.
	FinancialAddresses []*TreasuryFinancialAccountFinancialAddress `json:"financial_addresses"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The array of paths to pending Features in the Features hash.
	PendingFeatures []TreasuryFinancialAccountPendingFeature `json:"pending_features"`
	// The set of functionalities that the platform can restrict on the FinancialAccount.
	PlatformRestrictions *TreasuryFinancialAccountPlatformRestrictions `json:"platform_restrictions"`
	// The array of paths to restricted Features in the Features hash.
	RestrictedFeatures []TreasuryFinancialAccountRestrictedFeature `json:"restricted_features"`
	// The enum specifying what state the account is in.
	Status        TreasuryFinancialAccountStatus         `json:"status"`
	StatusDetails *TreasuryFinancialAccountStatusDetails `json:"status_details"`
	// The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
	SupportedCurrencies []Currency `json:"supported_currencies"`
}

Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. FinancialAccounts serve as the source and destination of Treasury's money movement APIs.

type TreasuryFinancialAccountActiveFeature

type TreasuryFinancialAccountActiveFeature string

The array of paths to active Features in the Features hash.

const (
	TreasuryFinancialAccountActiveFeatureCardIssuing                     TreasuryFinancialAccountActiveFeature = "card_issuing"
	TreasuryFinancialAccountActiveFeatureDepositInsurance                TreasuryFinancialAccountActiveFeature = "deposit_insurance"
	TreasuryFinancialAccountActiveFeatureFinancialAddressesAba           TreasuryFinancialAccountActiveFeature = "financial_addresses.aba"
	TreasuryFinancialAccountActiveFeatureInboundTransfersACH             TreasuryFinancialAccountActiveFeature = "inbound_transfers.ach"
	TreasuryFinancialAccountActiveFeatureIntraStripeFlows                TreasuryFinancialAccountActiveFeature = "intra_stripe_flows"
	TreasuryFinancialAccountActiveFeatureOutboundPaymentsACH             TreasuryFinancialAccountActiveFeature = "outbound_payments.ach"
	TreasuryFinancialAccountActiveFeatureOutboundPaymentsUSDomesticWire  TreasuryFinancialAccountActiveFeature = "outbound_payments.us_domestic_wire"
	TreasuryFinancialAccountActiveFeatureOutboundTransfersACH            TreasuryFinancialAccountActiveFeature = "outbound_transfers.ach"
	TreasuryFinancialAccountActiveFeatureOutboundTransfersUSDomesticWire TreasuryFinancialAccountActiveFeature = "outbound_transfers.us_domestic_wire"
	TreasuryFinancialAccountActiveFeatureRemoteDepositCapture            TreasuryFinancialAccountActiveFeature = "remote_deposit_capture"
)

List of values that TreasuryFinancialAccountActiveFeature can take

type TreasuryFinancialAccountBalance

type TreasuryFinancialAccountBalance struct {
	// Funds the user can spend right now.
	Cash map[string]int64 `json:"cash"`
	// Funds not spendable yet, but will become available at a later time.
	InboundPending map[string]int64 `json:"inbound_pending"`
	// Funds in the account, but not spendable because they are being held for pending outbound flows.
	OutboundPending map[string]int64 `json:"outbound_pending"`
}

Balance information for the FinancialAccount

type TreasuryFinancialAccountFeatures

type TreasuryFinancialAccountFeatures struct {
	APIResource
	// Toggle settings for enabling/disabling a feature
	CardIssuing *TreasuryFinancialAccountFeaturesCardIssuing `json:"card_issuing"`
	// Toggle settings for enabling/disabling a feature
	DepositInsurance *TreasuryFinancialAccountFeaturesDepositInsurance `json:"deposit_insurance"`
	// Settings related to Financial Addresses features on a Financial Account
	FinancialAddresses *TreasuryFinancialAccountFeaturesFinancialAddresses `json:"financial_addresses"`
	// InboundTransfers contains inbound transfers features for a FinancialAccount.
	InboundTransfers *TreasuryFinancialAccountFeaturesInboundTransfers `json:"inbound_transfers"`
	// Toggle settings for enabling/disabling a feature
	IntraStripeFlows *TreasuryFinancialAccountFeaturesIntraStripeFlows `json:"intra_stripe_flows"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Settings related to Outbound Payments features on a Financial Account
	OutboundPayments *TreasuryFinancialAccountFeaturesOutboundPayments `json:"outbound_payments"`
	// OutboundTransfers contains outbound transfers features for a FinancialAccount.
	OutboundTransfers *TreasuryFinancialAccountFeaturesOutboundTransfers `json:"outbound_transfers"`
}

Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. Stripe or the platform can control Features via the requested field.

type TreasuryFinancialAccountFeaturesCardIssuing

type TreasuryFinancialAccountFeaturesCardIssuing struct {
	// Whether the FinancialAccount should have the Feature.
	Requested bool `json:"requested"`
	// Whether the Feature is operational.
	Status TreasuryFinancialAccountFeaturesCardIssuingStatus `json:"status"`
	// Additional details; includes at least one entry when the status is not `active`.
	StatusDetails []*TreasuryFinancialAccountFeaturesCardIssuingStatusDetail `json:"status_details"`
}

Toggle settings for enabling/disabling a feature

type TreasuryFinancialAccountFeaturesCardIssuingParams

type TreasuryFinancialAccountFeaturesCardIssuingParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.

type TreasuryFinancialAccountFeaturesCardIssuingStatus

type TreasuryFinancialAccountFeaturesCardIssuingStatus string

Whether the Feature is operational.

const (
	TreasuryFinancialAccountFeaturesCardIssuingStatusActive     TreasuryFinancialAccountFeaturesCardIssuingStatus = "active"
	TreasuryFinancialAccountFeaturesCardIssuingStatusPending    TreasuryFinancialAccountFeaturesCardIssuingStatus = "pending"
	TreasuryFinancialAccountFeaturesCardIssuingStatusRestricted TreasuryFinancialAccountFeaturesCardIssuingStatus = "restricted"
)

List of values that TreasuryFinancialAccountFeaturesCardIssuingStatus can take

type TreasuryFinancialAccountFeaturesCardIssuingStatusDetail

type TreasuryFinancialAccountFeaturesCardIssuingStatusDetail struct {
	// Represents the reason why the status is `pending` or `restricted`.
	Code TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode `json:"code"`
	// Represents what the user should do, if anything, to activate the Feature.
	Resolution TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution `json:"resolution"`
	// The `platform_restrictions` that are restricting this Feature.
	Restriction TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction `json:"restriction"`
}

Additional details; includes at least one entry when the status is not `active`.

type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode

type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode string

Represents the reason why the status is `pending` or `restricted`.

const (
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeActivating                      TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "activating"
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeCapabilityNotRequested          TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "capability_not_requested"
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeFinancialAccountClosed          TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "financial_account_closed"
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRejectedOther                   TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "rejected_other"
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRejectedUnsupportedBusiness     TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "rejected_unsupported_business"
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRequirementsPastDue             TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "requirements_past_due"
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "requirements_pending_verification"
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRestrictedByPlatform            TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "restricted_by_platform"
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCodeRestrictedOther                 TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode = "restricted_other"
)

List of values that TreasuryFinancialAccountFeaturesCardIssuingStatusDetailCode can take

type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution

type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution string

Represents what the user should do, if anything, to activate the Feature.

const (
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolutionContactStripe      TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution = "contact_stripe"
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution = "provide_information"
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolutionRemoveRestriction  TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution = "remove_restriction"
)

List of values that TreasuryFinancialAccountFeaturesCardIssuingStatusDetailResolution can take

type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction

type TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction string

The `platform_restrictions` that are restricting this Feature.

const (
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestrictionInboundFlows  TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction = "inbound_flows"
	TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction = "outbound_flows"
)

List of values that TreasuryFinancialAccountFeaturesCardIssuingStatusDetailRestriction can take

type TreasuryFinancialAccountFeaturesDepositInsurance

type TreasuryFinancialAccountFeaturesDepositInsurance struct {
	// Whether the FinancialAccount should have the Feature.
	Requested bool `json:"requested"`
	// Whether the Feature is operational.
	Status TreasuryFinancialAccountFeaturesDepositInsuranceStatus `json:"status"`
	// Additional details; includes at least one entry when the status is not `active`.
	StatusDetails []*TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetail `json:"status_details"`
}

Toggle settings for enabling/disabling a feature

type TreasuryFinancialAccountFeaturesDepositInsuranceParams

type TreasuryFinancialAccountFeaturesDepositInsuranceParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.

type TreasuryFinancialAccountFeaturesDepositInsuranceStatus

type TreasuryFinancialAccountFeaturesDepositInsuranceStatus string

Whether the Feature is operational.

const (
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusActive     TreasuryFinancialAccountFeaturesDepositInsuranceStatus = "active"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusPending    TreasuryFinancialAccountFeaturesDepositInsuranceStatus = "pending"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusRestricted TreasuryFinancialAccountFeaturesDepositInsuranceStatus = "restricted"
)

List of values that TreasuryFinancialAccountFeaturesDepositInsuranceStatus can take

type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetail

type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetail struct {
	// Represents the reason why the status is `pending` or `restricted`.
	Code TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode `json:"code"`
	// Represents what the user should do, if anything, to activate the Feature.
	Resolution TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution `json:"resolution"`
	// The `platform_restrictions` that are restricting this Feature.
	Restriction TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction `json:"restriction"`
}

Additional details; includes at least one entry when the status is not `active`.

type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode

type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode string

Represents the reason why the status is `pending` or `restricted`.

const (
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeActivating                      TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "activating"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeCapabilityNotRequested          TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "capability_not_requested"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeFinancialAccountClosed          TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "financial_account_closed"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRejectedOther                   TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "rejected_other"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRejectedUnsupportedBusiness     TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "rejected_unsupported_business"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRequirementsPastDue             TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "requirements_past_due"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "requirements_pending_verification"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRestrictedByPlatform            TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "restricted_by_platform"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCodeRestrictedOther                 TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode = "restricted_other"
)

List of values that TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailCode can take

type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution

type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution string

Represents what the user should do, if anything, to activate the Feature.

const (
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolutionContactStripe      TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution = "contact_stripe"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution = "provide_information"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolutionRemoveRestriction  TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution = "remove_restriction"
)

List of values that TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailResolution can take

type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction

type TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction string

The `platform_restrictions` that are restricting this Feature.

const (
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestrictionInboundFlows  TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction = "inbound_flows"
	TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction = "outbound_flows"
)

List of values that TreasuryFinancialAccountFeaturesDepositInsuranceStatusDetailRestriction can take

type TreasuryFinancialAccountFeaturesFinancialAddresses

type TreasuryFinancialAccountFeaturesFinancialAddresses struct {
	// Toggle settings for enabling/disabling a feature
	Aba *TreasuryFinancialAccountFeaturesFinancialAddressesAba `json:"aba"`
}

Settings related to Financial Addresses features on a Financial Account

type TreasuryFinancialAccountFeaturesFinancialAddressesAba

type TreasuryFinancialAccountFeaturesFinancialAddressesAba struct {
	// Whether the FinancialAccount should have the Feature.
	Requested bool `json:"requested"`
	// Whether the Feature is operational.
	Status TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatus `json:"status"`
	// Additional details; includes at least one entry when the status is not `active`.
	StatusDetails []*TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetail `json:"status_details"`
}

Toggle settings for enabling/disabling a feature

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaParams

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Adds an ABA FinancialAddress to the FinancialAccount.

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatus

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatus string

Whether the Feature is operational.

const (
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusActive     TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatus = "active"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusPending    TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatus = "pending"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusRestricted TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatus = "restricted"
)

List of values that TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatus can take

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetail

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetail struct {
	// Represents the reason why the status is `pending` or `restricted`.
	Code TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode `json:"code"`
	// Represents what the user should do, if anything, to activate the Feature.
	Resolution TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailResolution `json:"resolution"`
	// The `platform_restrictions` that are restricting this Feature.
	Restriction TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailRestriction `json:"restriction"`
}

Additional details; includes at least one entry when the status is not `active`.

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode string

Represents the reason why the status is `pending` or `restricted`.

const (
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCodeActivating                      TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode = "activating"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCodeCapabilityNotRequested          TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode = "capability_not_requested"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCodeFinancialAccountClosed          TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode = "financial_account_closed"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCodeRejectedOther                   TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode = "rejected_other"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCodeRejectedUnsupportedBusiness     TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode = "rejected_unsupported_business"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCodeRequirementsPastDue             TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode = "requirements_past_due"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode = "requirements_pending_verification"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCodeRestrictedByPlatform            TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode = "restricted_by_platform"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCodeRestrictedOther                 TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode = "restricted_other"
)

List of values that TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailCode can take

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailResolution

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailResolution string

Represents what the user should do, if anything, to activate the Feature.

const (
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailResolutionContactStripe      TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailResolution = "contact_stripe"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailResolution = "provide_information"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailResolutionRemoveRestriction  TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailResolution = "remove_restriction"
)

List of values that TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailResolution can take

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailRestriction

type TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailRestriction string

The `platform_restrictions` that are restricting this Feature.

const (
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailRestrictionInboundFlows  TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailRestriction = "inbound_flows"
	TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailRestriction = "outbound_flows"
)

List of values that TreasuryFinancialAccountFeaturesFinancialAddressesAbaStatusDetailRestriction can take

type TreasuryFinancialAccountFeaturesFinancialAddressesParams

type TreasuryFinancialAccountFeaturesFinancialAddressesParams struct {
	// Adds an ABA FinancialAddress to the FinancialAccount.
	Aba *TreasuryFinancialAccountFeaturesFinancialAddressesAbaParams `form:"aba"`
}

Contains Features that add FinancialAddresses to the FinancialAccount.

type TreasuryFinancialAccountFeaturesInboundTransfers

type TreasuryFinancialAccountFeaturesInboundTransfers struct {
	// Toggle settings for enabling/disabling a feature
	ACH *TreasuryFinancialAccountFeaturesInboundTransfersACH `json:"ach"`
}

InboundTransfers contains inbound transfers features for a FinancialAccount.

type TreasuryFinancialAccountFeaturesInboundTransfersACH

type TreasuryFinancialAccountFeaturesInboundTransfersACH struct {
	// Whether the FinancialAccount should have the Feature.
	Requested bool `json:"requested"`
	// Whether the Feature is operational.
	Status TreasuryFinancialAccountFeaturesInboundTransfersACHStatus `json:"status"`
	// Additional details; includes at least one entry when the status is not `active`.
	StatusDetails []*TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetail `json:"status_details"`
}

Toggle settings for enabling/disabling a feature

type TreasuryFinancialAccountFeaturesInboundTransfersACHParams

type TreasuryFinancialAccountFeaturesInboundTransfersACHParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Enables ACH Debits via the InboundTransfers API.

type TreasuryFinancialAccountFeaturesInboundTransfersACHStatus

type TreasuryFinancialAccountFeaturesInboundTransfersACHStatus string

Whether the Feature is operational.

const (
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusActive     TreasuryFinancialAccountFeaturesInboundTransfersACHStatus = "active"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusPending    TreasuryFinancialAccountFeaturesInboundTransfersACHStatus = "pending"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusRestricted TreasuryFinancialAccountFeaturesInboundTransfersACHStatus = "restricted"
)

List of values that TreasuryFinancialAccountFeaturesInboundTransfersACHStatus can take

type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetail

type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetail struct {
	// Represents the reason why the status is `pending` or `restricted`.
	Code TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode `json:"code"`
	// Represents what the user should do, if anything, to activate the Feature.
	Resolution TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution `json:"resolution"`
	// The `platform_restrictions` that are restricting this Feature.
	Restriction TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction `json:"restriction"`
}

Additional details; includes at least one entry when the status is not `active`.

type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode

type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode string

Represents the reason why the status is `pending` or `restricted`.

const (
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeActivating                      TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "activating"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeCapabilityNotRequested          TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "capability_not_requested"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeFinancialAccountClosed          TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "financial_account_closed"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRejectedOther                   TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "rejected_other"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRejectedUnsupportedBusiness     TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "rejected_unsupported_business"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRequirementsPastDue             TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "requirements_past_due"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "requirements_pending_verification"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRestrictedByPlatform            TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "restricted_by_platform"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCodeRestrictedOther                 TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode = "restricted_other"
)

List of values that TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailCode can take

type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution

type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution string

Represents what the user should do, if anything, to activate the Feature.

const (
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolutionContactStripe      TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution = "contact_stripe"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution = "provide_information"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolutionRemoveRestriction  TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution = "remove_restriction"
)

List of values that TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailResolution can take

type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction

type TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction string

The `platform_restrictions` that are restricting this Feature.

const (
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestrictionInboundFlows  TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction = "inbound_flows"
	TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction = "outbound_flows"
)

List of values that TreasuryFinancialAccountFeaturesInboundTransfersACHStatusDetailRestriction can take

type TreasuryFinancialAccountFeaturesInboundTransfersParams

type TreasuryFinancialAccountFeaturesInboundTransfersParams struct {
	// Enables ACH Debits via the InboundTransfers API.
	ACH *TreasuryFinancialAccountFeaturesInboundTransfersACHParams `form:"ach"`
}

Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.

type TreasuryFinancialAccountFeaturesIntraStripeFlows

type TreasuryFinancialAccountFeaturesIntraStripeFlows struct {
	// Whether the FinancialAccount should have the Feature.
	Requested bool `json:"requested"`
	// Whether the Feature is operational.
	Status TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus `json:"status"`
	// Additional details; includes at least one entry when the status is not `active`.
	StatusDetails []*TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetail `json:"status_details"`
}

Toggle settings for enabling/disabling a feature

type TreasuryFinancialAccountFeaturesIntraStripeFlowsParams

type TreasuryFinancialAccountFeaturesIntraStripeFlowsParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).

type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus

type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus string

Whether the Feature is operational.

const (
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusActive     TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus = "active"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusPending    TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus = "pending"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusRestricted TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus = "restricted"
)

List of values that TreasuryFinancialAccountFeaturesIntraStripeFlowsStatus can take

type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetail

type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetail struct {
	// Represents the reason why the status is `pending` or `restricted`.
	Code TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode `json:"code"`
	// Represents what the user should do, if anything, to activate the Feature.
	Resolution TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution `json:"resolution"`
	// The `platform_restrictions` that are restricting this Feature.
	Restriction TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction `json:"restriction"`
}

Additional details; includes at least one entry when the status is not `active`.

type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode

type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode string

Represents the reason why the status is `pending` or `restricted`.

const (
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeActivating                      TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "activating"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeCapabilityNotRequested          TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "capability_not_requested"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeFinancialAccountClosed          TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "financial_account_closed"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRejectedOther                   TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "rejected_other"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRejectedUnsupportedBusiness     TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "rejected_unsupported_business"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRequirementsPastDue             TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "requirements_past_due"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "requirements_pending_verification"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRestrictedByPlatform            TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "restricted_by_platform"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCodeRestrictedOther                 TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode = "restricted_other"
)

List of values that TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailCode can take

type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution

type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution string

Represents what the user should do, if anything, to activate the Feature.

const (
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolutionContactStripe      TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution = "contact_stripe"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution = "provide_information"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolutionRemoveRestriction  TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution = "remove_restriction"
)

List of values that TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailResolution can take

type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction

type TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction string

The `platform_restrictions` that are restricting this Feature.

const (
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestrictionInboundFlows  TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction = "inbound_flows"
	TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction = "outbound_flows"
)

List of values that TreasuryFinancialAccountFeaturesIntraStripeFlowsStatusDetailRestriction can take

type TreasuryFinancialAccountFeaturesOutboundPayments

type TreasuryFinancialAccountFeaturesOutboundPayments struct {
	// Toggle settings for enabling/disabling a feature
	ACH *TreasuryFinancialAccountFeaturesOutboundPaymentsACH `json:"ach"`
	// Toggle settings for enabling/disabling a feature
	USDomesticWire *TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWire `json:"us_domestic_wire"`
}

Settings related to Outbound Payments features on a Financial Account

type TreasuryFinancialAccountFeaturesOutboundPaymentsACH

type TreasuryFinancialAccountFeaturesOutboundPaymentsACH struct {
	// Whether the FinancialAccount should have the Feature.
	Requested bool `json:"requested"`
	// Whether the Feature is operational.
	Status TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus `json:"status"`
	// Additional details; includes at least one entry when the status is not `active`.
	StatusDetails []*TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetail `json:"status_details"`
}

Toggle settings for enabling/disabling a feature

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHParams

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Enables ACH transfers via the OutboundPayments API.

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus string

Whether the Feature is operational.

const (
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusActive     TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus = "active"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusPending    TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus = "pending"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusRestricted TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus = "restricted"
)

List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatus can take

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetail

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetail struct {
	// Represents the reason why the status is `pending` or `restricted`.
	Code TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode `json:"code"`
	// Represents what the user should do, if anything, to activate the Feature.
	Resolution TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution `json:"resolution"`
	// The `platform_restrictions` that are restricting this Feature.
	Restriction TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction `json:"restriction"`
}

Additional details; includes at least one entry when the status is not `active`.

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode string

Represents the reason why the status is `pending` or `restricted`.

const (
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeActivating                      TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "activating"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeCapabilityNotRequested          TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "capability_not_requested"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeFinancialAccountClosed          TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "financial_account_closed"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRejectedOther                   TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "rejected_other"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRejectedUnsupportedBusiness     TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "rejected_unsupported_business"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRequirementsPastDue             TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "requirements_past_due"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "requirements_pending_verification"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRestrictedByPlatform            TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "restricted_by_platform"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCodeRestrictedOther                 TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode = "restricted_other"
)

List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailCode can take

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution string

Represents what the user should do, if anything, to activate the Feature.

const (
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolutionContactStripe      TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution = "contact_stripe"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution = "provide_information"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolutionRemoveRestriction  TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution = "remove_restriction"
)

List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailResolution can take

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction

type TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction string

The `platform_restrictions` that are restricting this Feature.

const (
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestrictionInboundFlows  TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction = "inbound_flows"
	TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction = "outbound_flows"
)

List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsACHStatusDetailRestriction can take

type TreasuryFinancialAccountFeaturesOutboundPaymentsParams

type TreasuryFinancialAccountFeaturesOutboundPaymentsParams struct {
	// Enables ACH transfers via the OutboundPayments API.
	ACH *TreasuryFinancialAccountFeaturesOutboundPaymentsACHParams `form:"ach"`
	// Enables US domestic wire tranfers via the OutboundPayments API.
	USDomesticWire *TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireParams `form:"us_domestic_wire"`
}

Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWire

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWire struct {
	// Whether the FinancialAccount should have the Feature.
	Requested bool `json:"requested"`
	// Whether the Feature is operational.
	Status TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus `json:"status"`
	// Additional details; includes at least one entry when the status is not `active`.
	StatusDetails []*TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetail `json:"status_details"`
}

Toggle settings for enabling/disabling a feature

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireParams

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Enables US domestic wire tranfers via the OutboundPayments API.

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus string

Whether the Feature is operational.

const (
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusActive     TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus = "active"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusPending    TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus = "pending"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusRestricted TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus = "restricted"
)

List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatus can take

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetail

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetail struct {
	// Represents the reason why the status is `pending` or `restricted`.
	Code TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode `json:"code"`
	// Represents what the user should do, if anything, to activate the Feature.
	Resolution TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution `json:"resolution"`
	// The `platform_restrictions` that are restricting this Feature.
	Restriction TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction `json:"restriction"`
}

Additional details; includes at least one entry when the status is not `active`.

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode string

Represents the reason why the status is `pending` or `restricted`.

const (
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeActivating                      TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "activating"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeCapabilityNotRequested          TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "capability_not_requested"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeFinancialAccountClosed          TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "financial_account_closed"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRejectedOther                   TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "rejected_other"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRejectedUnsupportedBusiness     TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "rejected_unsupported_business"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRequirementsPastDue             TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "requirements_past_due"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "requirements_pending_verification"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRestrictedByPlatform            TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "restricted_by_platform"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCodeRestrictedOther                 TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode = "restricted_other"
)

List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailCode can take

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution string

Represents what the user should do, if anything, to activate the Feature.

const (
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolutionContactStripe      TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution = "contact_stripe"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution = "provide_information"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolutionRemoveRestriction  TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution = "remove_restriction"
)

List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailResolution can take

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction

type TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction string

The `platform_restrictions` that are restricting this Feature.

const (
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestrictionInboundFlows  TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction = "inbound_flows"
	TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction = "outbound_flows"
)

List of values that TreasuryFinancialAccountFeaturesOutboundPaymentsUSDomesticWireStatusDetailRestriction can take

type TreasuryFinancialAccountFeaturesOutboundTransfers

type TreasuryFinancialAccountFeaturesOutboundTransfers struct {
	// Toggle settings for enabling/disabling a feature
	ACH *TreasuryFinancialAccountFeaturesOutboundTransfersACH `json:"ach"`
	// Toggle settings for enabling/disabling a feature
	USDomesticWire *TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWire `json:"us_domestic_wire"`
}

OutboundTransfers contains outbound transfers features for a FinancialAccount.

type TreasuryFinancialAccountFeaturesOutboundTransfersACH

type TreasuryFinancialAccountFeaturesOutboundTransfersACH struct {
	// Whether the FinancialAccount should have the Feature.
	Requested bool `json:"requested"`
	// Whether the Feature is operational.
	Status TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus `json:"status"`
	// Additional details; includes at least one entry when the status is not `active`.
	StatusDetails []*TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetail `json:"status_details"`
}

Toggle settings for enabling/disabling a feature

type TreasuryFinancialAccountFeaturesOutboundTransfersACHParams

type TreasuryFinancialAccountFeaturesOutboundTransfersACHParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Enables ACH transfers via the OutboundTransfers API.

type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus

type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus string

Whether the Feature is operational.

const (
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusActive     TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus = "active"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusPending    TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus = "pending"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusRestricted TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus = "restricted"
)

List of values that TreasuryFinancialAccountFeaturesOutboundTransfersACHStatus can take

type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetail

type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetail struct {
	// Represents the reason why the status is `pending` or `restricted`.
	Code TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode `json:"code"`
	// Represents what the user should do, if anything, to activate the Feature.
	Resolution TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution `json:"resolution"`
	// The `platform_restrictions` that are restricting this Feature.
	Restriction TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction `json:"restriction"`
}

Additional details; includes at least one entry when the status is not `active`.

type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode

type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode string

Represents the reason why the status is `pending` or `restricted`.

const (
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeActivating                      TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "activating"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeCapabilityNotRequested          TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "capability_not_requested"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeFinancialAccountClosed          TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "financial_account_closed"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRejectedOther                   TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "rejected_other"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRejectedUnsupportedBusiness     TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "rejected_unsupported_business"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRequirementsPastDue             TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "requirements_past_due"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "requirements_pending_verification"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRestrictedByPlatform            TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "restricted_by_platform"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCodeRestrictedOther                 TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode = "restricted_other"
)

List of values that TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailCode can take

type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution

type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution string

Represents what the user should do, if anything, to activate the Feature.

const (
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolutionContactStripe      TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution = "contact_stripe"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution = "provide_information"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolutionRemoveRestriction  TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution = "remove_restriction"
)

List of values that TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailResolution can take

type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction

type TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction string

The `platform_restrictions` that are restricting this Feature.

const (
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestrictionInboundFlows  TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction = "inbound_flows"
	TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction = "outbound_flows"
)

List of values that TreasuryFinancialAccountFeaturesOutboundTransfersACHStatusDetailRestriction can take

type TreasuryFinancialAccountFeaturesOutboundTransfersParams

type TreasuryFinancialAccountFeaturesOutboundTransfersParams struct {
	// Enables ACH transfers via the OutboundTransfers API.
	ACH *TreasuryFinancialAccountFeaturesOutboundTransfersACHParams `form:"ach"`
	// Enables US domestic wire tranfers via the OutboundTransfers API.
	USDomesticWire *TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireParams `form:"us_domestic_wire"`
}

Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWire

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWire struct {
	// Whether the FinancialAccount should have the Feature.
	Requested bool `json:"requested"`
	// Whether the Feature is operational.
	Status TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus `json:"status"`
	// Additional details; includes at least one entry when the status is not `active`.
	StatusDetails []*TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetail `json:"status_details"`
}

Toggle settings for enabling/disabling a feature

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireParams

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Enables US domestic wire tranfers via the OutboundTransfers API.

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus string

Whether the Feature is operational.

const (
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusActive     TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus = "active"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusPending    TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus = "pending"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusRestricted TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus = "restricted"
)

List of values that TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatus can take

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetail

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetail struct {
	// Represents the reason why the status is `pending` or `restricted`.
	Code TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode `json:"code"`
	// Represents what the user should do, if anything, to activate the Feature.
	Resolution TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution `json:"resolution"`
	// The `platform_restrictions` that are restricting this Feature.
	Restriction TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction `json:"restriction"`
}

Additional details; includes at least one entry when the status is not `active`.

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode string

Represents the reason why the status is `pending` or `restricted`.

const (
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeActivating                      TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "activating"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeCapabilityNotRequested          TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "capability_not_requested"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeFinancialAccountClosed          TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "financial_account_closed"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRejectedOther                   TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "rejected_other"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRejectedUnsupportedBusiness     TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "rejected_unsupported_business"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRequirementsPastDue             TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "requirements_past_due"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRequirementsPendingVerification TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "requirements_pending_verification"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRestrictedByPlatform            TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "restricted_by_platform"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCodeRestrictedOther                 TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode = "restricted_other"
)

List of values that TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailCode can take

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution string

Represents what the user should do, if anything, to activate the Feature.

const (
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolutionContactStripe      TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution = "contact_stripe"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolutionProvideInformation TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution = "provide_information"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolutionRemoveRestriction  TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution = "remove_restriction"
)

List of values that TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailResolution can take

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction

type TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction string

The `platform_restrictions` that are restricting this Feature.

const (
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestrictionInboundFlows  TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction = "inbound_flows"
	TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestrictionOutboundFlows TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction = "outbound_flows"
)

List of values that TreasuryFinancialAccountFeaturesOutboundTransfersUSDomesticWireStatusDetailRestriction can take

type TreasuryFinancialAccountFeaturesParams

type TreasuryFinancialAccountFeaturesParams struct {
	// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
	CardIssuing *TreasuryFinancialAccountFeaturesCardIssuingParams `form:"card_issuing"`
	// Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
	DepositInsurance *TreasuryFinancialAccountFeaturesDepositInsuranceParams `form:"deposit_insurance"`
	// Contains Features that add FinancialAddresses to the FinancialAccount.
	FinancialAddresses *TreasuryFinancialAccountFeaturesFinancialAddressesParams `form:"financial_addresses"`
	// Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
	InboundTransfers *TreasuryFinancialAccountFeaturesInboundTransfersParams `form:"inbound_transfers"`
	// Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
	IntraStripeFlows *TreasuryFinancialAccountFeaturesIntraStripeFlowsParams `form:"intra_stripe_flows"`
	// Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
	OutboundPayments *TreasuryFinancialAccountFeaturesOutboundPaymentsParams `form:"outbound_payments"`
	// Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
	OutboundTransfers *TreasuryFinancialAccountFeaturesOutboundTransfersParams `form:"outbound_transfers"`
}

Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.

type TreasuryFinancialAccountFinancialAddress

type TreasuryFinancialAccountFinancialAddress struct {
	// ABA Records contain U.S. bank account details per the ABA format.
	Aba *TreasuryFinancialAccountFinancialAddressAba `json:"aba"`
	// The list of networks that the address supports
	SupportedNetworks []TreasuryFinancialAccountFinancialAddressSupportedNetwork `json:"supported_networks"`
	// The type of financial address
	Type TreasuryFinancialAccountFinancialAddressType `json:"type"`
}

The set of credentials that resolve to a FinancialAccount.

type TreasuryFinancialAccountFinancialAddressAba

type TreasuryFinancialAccountFinancialAddressAba struct {
	// The name of the person or business that owns the bank account.
	AccountHolderName string `json:"account_holder_name"`
	// The account number.
	AccountNumber string `json:"account_number"`
	// The last four characters of the account number.
	AccountNumberLast4 string `json:"account_number_last4"`
	// Name of the bank.
	BankName string `json:"bank_name"`
	// Routing number for the account.
	RoutingNumber string `json:"routing_number"`
}

ABA Records contain U.S. bank account details per the ABA format.

type TreasuryFinancialAccountFinancialAddressSupportedNetwork

type TreasuryFinancialAccountFinancialAddressSupportedNetwork string

The list of networks that the address supports

const (
	TreasuryFinancialAccountFinancialAddressSupportedNetworkACH            TreasuryFinancialAccountFinancialAddressSupportedNetwork = "ach"
	TreasuryFinancialAccountFinancialAddressSupportedNetworkUSDomesticWire TreasuryFinancialAccountFinancialAddressSupportedNetwork = "us_domestic_wire"
)

List of values that TreasuryFinancialAccountFinancialAddressSupportedNetwork can take

type TreasuryFinancialAccountFinancialAddressType

type TreasuryFinancialAccountFinancialAddressType string

The type of financial address

const (
	TreasuryFinancialAccountFinancialAddressTypeAba TreasuryFinancialAccountFinancialAddressType = "aba"
)

List of values that TreasuryFinancialAccountFinancialAddressType can take

type TreasuryFinancialAccountList

type TreasuryFinancialAccountList struct {
	APIResource
	ListMeta
	Data []*TreasuryFinancialAccount `json:"data"`
}

TreasuryFinancialAccountList is a list of FinancialAccounts as retrieved from a list endpoint.

type TreasuryFinancialAccountListParams

type TreasuryFinancialAccountListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
}

Returns a list of FinancialAccounts.

type TreasuryFinancialAccountParams

type TreasuryFinancialAccountParams struct {
	Params `form:"*"`
	// Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.
	Features *TreasuryFinancialAccountFeaturesParams `form:"features"`
	// The set of functionalities that the platform can restrict on the FinancialAccount.
	PlatformRestrictions *TreasuryFinancialAccountPlatformRestrictionsParams `form:"platform_restrictions"`
	// The currencies the FinancialAccount can hold a balance in.
	SupportedCurrencies []*string `form:"supported_currencies"`
}

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

type TreasuryFinancialAccountPendingFeature

type TreasuryFinancialAccountPendingFeature string

The array of paths to pending Features in the Features hash.

const (
	TreasuryFinancialAccountPendingFeatureCardIssuing                     TreasuryFinancialAccountPendingFeature = "card_issuing"
	TreasuryFinancialAccountPendingFeatureDepositInsurance                TreasuryFinancialAccountPendingFeature = "deposit_insurance"
	TreasuryFinancialAccountPendingFeatureFinancialAddressesAba           TreasuryFinancialAccountPendingFeature = "financial_addresses.aba"
	TreasuryFinancialAccountPendingFeatureInboundTransfersACH             TreasuryFinancialAccountPendingFeature = "inbound_transfers.ach"
	TreasuryFinancialAccountPendingFeatureIntraStripeFlows                TreasuryFinancialAccountPendingFeature = "intra_stripe_flows"
	TreasuryFinancialAccountPendingFeatureOutboundPaymentsACH             TreasuryFinancialAccountPendingFeature = "outbound_payments.ach"
	TreasuryFinancialAccountPendingFeatureOutboundPaymentsUSDomesticWire  TreasuryFinancialAccountPendingFeature = "outbound_payments.us_domestic_wire"
	TreasuryFinancialAccountPendingFeatureOutboundTransfersACH            TreasuryFinancialAccountPendingFeature = "outbound_transfers.ach"
	TreasuryFinancialAccountPendingFeatureOutboundTransfersUSDomesticWire TreasuryFinancialAccountPendingFeature = "outbound_transfers.us_domestic_wire"
	TreasuryFinancialAccountPendingFeatureRemoteDepositCapture            TreasuryFinancialAccountPendingFeature = "remote_deposit_capture"
)

List of values that TreasuryFinancialAccountPendingFeature can take

type TreasuryFinancialAccountPlatformRestrictions

type TreasuryFinancialAccountPlatformRestrictions struct {
	// Restricts all inbound money movement.
	InboundFlows TreasuryFinancialAccountPlatformRestrictionsInboundFlows `json:"inbound_flows"`
	// Restricts all outbound money movement.
	OutboundFlows TreasuryFinancialAccountPlatformRestrictionsOutboundFlows `json:"outbound_flows"`
}

The set of functionalities that the platform can restrict on the FinancialAccount.

type TreasuryFinancialAccountPlatformRestrictionsInboundFlows

type TreasuryFinancialAccountPlatformRestrictionsInboundFlows string

Restricts all inbound money movement.

const (
	TreasuryFinancialAccountPlatformRestrictionsInboundFlowsRestricted   TreasuryFinancialAccountPlatformRestrictionsInboundFlows = "restricted"
	TreasuryFinancialAccountPlatformRestrictionsInboundFlowsUnrestricted TreasuryFinancialAccountPlatformRestrictionsInboundFlows = "unrestricted"
)

List of values that TreasuryFinancialAccountPlatformRestrictionsInboundFlows can take

type TreasuryFinancialAccountPlatformRestrictionsOutboundFlows

type TreasuryFinancialAccountPlatformRestrictionsOutboundFlows string

Restricts all outbound money movement.

const (
	TreasuryFinancialAccountPlatformRestrictionsOutboundFlowsRestricted   TreasuryFinancialAccountPlatformRestrictionsOutboundFlows = "restricted"
	TreasuryFinancialAccountPlatformRestrictionsOutboundFlowsUnrestricted TreasuryFinancialAccountPlatformRestrictionsOutboundFlows = "unrestricted"
)

List of values that TreasuryFinancialAccountPlatformRestrictionsOutboundFlows can take

type TreasuryFinancialAccountPlatformRestrictionsParams

type TreasuryFinancialAccountPlatformRestrictionsParams struct {
	// Restricts all inbound money movement.
	InboundFlows *string `form:"inbound_flows"`
	// Restricts all outbound money movement.
	OutboundFlows *string `form:"outbound_flows"`
}

The set of functionalities that the platform can restrict on the FinancialAccount.

type TreasuryFinancialAccountRestrictedFeature

type TreasuryFinancialAccountRestrictedFeature string

The array of paths to restricted Features in the Features hash.

const (
	TreasuryFinancialAccountRestrictedFeatureCardIssuing                     TreasuryFinancialAccountRestrictedFeature = "card_issuing"
	TreasuryFinancialAccountRestrictedFeatureDepositInsurance                TreasuryFinancialAccountRestrictedFeature = "deposit_insurance"
	TreasuryFinancialAccountRestrictedFeatureFinancialAddressesAba           TreasuryFinancialAccountRestrictedFeature = "financial_addresses.aba"
	TreasuryFinancialAccountRestrictedFeatureInboundTransfersACH             TreasuryFinancialAccountRestrictedFeature = "inbound_transfers.ach"
	TreasuryFinancialAccountRestrictedFeatureIntraStripeFlows                TreasuryFinancialAccountRestrictedFeature = "intra_stripe_flows"
	TreasuryFinancialAccountRestrictedFeatureOutboundPaymentsACH             TreasuryFinancialAccountRestrictedFeature = "outbound_payments.ach"
	TreasuryFinancialAccountRestrictedFeatureOutboundPaymentsUSDomesticWire  TreasuryFinancialAccountRestrictedFeature = "outbound_payments.us_domestic_wire"
	TreasuryFinancialAccountRestrictedFeatureOutboundTransfersACH            TreasuryFinancialAccountRestrictedFeature = "outbound_transfers.ach"
	TreasuryFinancialAccountRestrictedFeatureOutboundTransfersUSDomesticWire TreasuryFinancialAccountRestrictedFeature = "outbound_transfers.us_domestic_wire"
	TreasuryFinancialAccountRestrictedFeatureRemoteDepositCapture            TreasuryFinancialAccountRestrictedFeature = "remote_deposit_capture"
)

List of values that TreasuryFinancialAccountRestrictedFeature can take

type TreasuryFinancialAccountRetrieveFeaturesParams

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

Retrieves Features information associated with the FinancialAccount.

type TreasuryFinancialAccountStatus

type TreasuryFinancialAccountStatus string

The enum specifying what state the account is in.

const (
	TreasuryFinancialAccountStatusClosed TreasuryFinancialAccountStatus = "closed"
	TreasuryFinancialAccountStatusOpen   TreasuryFinancialAccountStatus = "open"
)

List of values that TreasuryFinancialAccountStatus can take

type TreasuryFinancialAccountStatusDetails

type TreasuryFinancialAccountStatusDetails struct {
	// Details related to the closure of this FinancialAccount
	Closed *TreasuryFinancialAccountStatusDetailsClosed `json:"closed"`
}

type TreasuryFinancialAccountStatusDetailsClosed

type TreasuryFinancialAccountStatusDetailsClosed struct {
	// The array that contains reasons for a FinancialAccount closure.
	Reasons []TreasuryFinancialAccountStatusDetailsClosedReason `json:"reasons"`
}

Details related to the closure of this FinancialAccount

type TreasuryFinancialAccountStatusDetailsClosedReason

type TreasuryFinancialAccountStatusDetailsClosedReason string

The array that contains reasons for a FinancialAccount closure.

const (
	TreasuryFinancialAccountStatusDetailsClosedReasonAccountRejected  TreasuryFinancialAccountStatusDetailsClosedReason = "account_rejected"
	TreasuryFinancialAccountStatusDetailsClosedReasonClosedByPlatform TreasuryFinancialAccountStatusDetailsClosedReason = "closed_by_platform"
	TreasuryFinancialAccountStatusDetailsClosedReasonOther            TreasuryFinancialAccountStatusDetailsClosedReason = "other"
)

List of values that TreasuryFinancialAccountStatusDetailsClosedReason can take

type TreasuryFinancialAccountUpdateFeaturesCardIssuingParams

type TreasuryFinancialAccountUpdateFeaturesCardIssuingParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.

type TreasuryFinancialAccountUpdateFeaturesDepositInsuranceParams

type TreasuryFinancialAccountUpdateFeaturesDepositInsuranceParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.

type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesAbaParams

type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesAbaParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Adds an ABA FinancialAddress to the FinancialAccount.

type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesParams

type TreasuryFinancialAccountUpdateFeaturesFinancialAddressesParams struct {
	// Adds an ABA FinancialAddress to the FinancialAccount.
	Aba *TreasuryFinancialAccountUpdateFeaturesFinancialAddressesAbaParams `form:"aba"`
}

Contains Features that add FinancialAddresses to the FinancialAccount.

type TreasuryFinancialAccountUpdateFeaturesInboundTransfersACHParams

type TreasuryFinancialAccountUpdateFeaturesInboundTransfersACHParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Enables ACH Debits via the InboundTransfers API.

type TreasuryFinancialAccountUpdateFeaturesInboundTransfersParams

type TreasuryFinancialAccountUpdateFeaturesInboundTransfersParams struct {
	// Enables ACH Debits via the InboundTransfers API.
	ACH *TreasuryFinancialAccountUpdateFeaturesInboundTransfersACHParams `form:"ach"`
}

Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.

type TreasuryFinancialAccountUpdateFeaturesIntraStripeFlowsParams

type TreasuryFinancialAccountUpdateFeaturesIntraStripeFlowsParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).

type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsACHParams

type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsACHParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Enables ACH transfers via the OutboundPayments API.

type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsParams

type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsParams struct {
	// Enables ACH transfers via the OutboundPayments API.
	ACH *TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsACHParams `form:"ach"`
	// Enables US domestic wire tranfers via the OutboundPayments API.
	USDomesticWire *TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsUSDomesticWireParams `form:"us_domestic_wire"`
}

Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.

type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsUSDomesticWireParams

type TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsUSDomesticWireParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Enables US domestic wire tranfers via the OutboundPayments API.

type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersACHParams

type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersACHParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Enables ACH transfers via the OutboundTransfers API.

type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersParams

type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersParams struct {
	// Enables ACH transfers via the OutboundTransfers API.
	ACH *TreasuryFinancialAccountUpdateFeaturesOutboundTransfersACHParams `form:"ach"`
	// Enables US domestic wire tranfers via the OutboundTransfers API.
	USDomesticWire *TreasuryFinancialAccountUpdateFeaturesOutboundTransfersUSDomesticWireParams `form:"us_domestic_wire"`
}

Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.

type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersUSDomesticWireParams

type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersUSDomesticWireParams struct {
	// Whether the FinancialAccount should have the Feature.
	Requested *bool `form:"requested"`
}

Enables US domestic wire tranfers via the OutboundTransfers API.

type TreasuryFinancialAccountUpdateFeaturesParams

type TreasuryFinancialAccountUpdateFeaturesParams struct {
	Params `form:"*"`
	// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
	CardIssuing *TreasuryFinancialAccountUpdateFeaturesCardIssuingParams `form:"card_issuing"`
	// Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
	DepositInsurance *TreasuryFinancialAccountUpdateFeaturesDepositInsuranceParams `form:"deposit_insurance"`
	// Contains Features that add FinancialAddresses to the FinancialAccount.
	FinancialAddresses *TreasuryFinancialAccountUpdateFeaturesFinancialAddressesParams `form:"financial_addresses"`
	// Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
	InboundTransfers *TreasuryFinancialAccountUpdateFeaturesInboundTransfersParams `form:"inbound_transfers"`
	// Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
	IntraStripeFlows *TreasuryFinancialAccountUpdateFeaturesIntraStripeFlowsParams `form:"intra_stripe_flows"`
	// Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
	OutboundPayments *TreasuryFinancialAccountUpdateFeaturesOutboundPaymentsParams `form:"outbound_payments"`
	// Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
	OutboundTransfers *TreasuryFinancialAccountUpdateFeaturesOutboundTransfersParams `form:"outbound_transfers"`
}

Updates the Features associated with a FinancialAccount.

type TreasuryInboundTransfer

type TreasuryInboundTransfer struct {
	APIResource
	// Amount (in cents) transferred.
	Amount int64 `json:"amount"`
	// Returns `true` if the InboundTransfer is able to be canceled.
	Cancelable bool `json:"cancelable"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// Details about this InboundTransfer's failure. Only set when status is `failed`.
	FailureDetails *TreasuryInboundTransferFailureDetails `json:"failure_details"`
	// The FinancialAccount that received the funds.
	FinancialAccount string `json:"financial_account"`
	// A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
	HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"`
	// Unique identifier for the object.
	ID          string                              `json:"id"`
	LinkedFlows *TreasuryInboundTransferLinkedFlows `json:"linked_flows"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The origin payment method to be debited for an InboundTransfer.
	OriginPaymentMethod string `json:"origin_payment_method"`
	// Details about the PaymentMethod for an InboundTransfer.
	OriginPaymentMethodDetails *TreasuryInboundTransferOriginPaymentMethodDetails `json:"origin_payment_method_details"`
	// Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.
	Returned bool `json:"returned"`
	// Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`.
	StatementDescriptor string `json:"statement_descriptor"`
	// Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.
	Status            TreasuryInboundTransferStatus             `json:"status"`
	StatusTransitions *TreasuryInboundTransferStatusTransitions `json:"status_transitions"`
	// The Transaction associated with this object.
	Transaction *TreasuryTransaction `json:"transaction"`
}

Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.

type TreasuryInboundTransferCancelParams

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

Cancels an InboundTransfer.

type TreasuryInboundTransferFailureDetails

type TreasuryInboundTransferFailureDetails struct {
	// Reason for the failure.
	Code TreasuryInboundTransferFailureDetailsCode `json:"code"`
}

Details about this InboundTransfer's failure. Only set when status is `failed`.

type TreasuryInboundTransferFailureDetailsCode

type TreasuryInboundTransferFailureDetailsCode string

Reason for the failure.

const (
	TreasuryInboundTransferFailureDetailsCodeAccountClosed                 TreasuryInboundTransferFailureDetailsCode = "account_closed"
	TreasuryInboundTransferFailureDetailsCodeAccountFrozen                 TreasuryInboundTransferFailureDetailsCode = "account_frozen"
	TreasuryInboundTransferFailureDetailsCodeBankAccountRestricted         TreasuryInboundTransferFailureDetailsCode = "bank_account_restricted"
	TreasuryInboundTransferFailureDetailsCodeBankOwnershipChanged          TreasuryInboundTransferFailureDetailsCode = "bank_ownership_changed"
	TreasuryInboundTransferFailureDetailsCodeDebitNotAuthorized            TreasuryInboundTransferFailureDetailsCode = "debit_not_authorized"
	TreasuryInboundTransferFailureDetailsCodeIncorrectAccountHolderAddress TreasuryInboundTransferFailureDetailsCode = "incorrect_account_holder_address"
	TreasuryInboundTransferFailureDetailsCodeIncorrectAccountHolderName    TreasuryInboundTransferFailureDetailsCode = "incorrect_account_holder_name"
	TreasuryInboundTransferFailureDetailsCodeIncorrectAccountHolderTaxID   TreasuryInboundTransferFailureDetailsCode = "incorrect_account_holder_tax_id"
	TreasuryInboundTransferFailureDetailsCodeInsufficientFunds             TreasuryInboundTransferFailureDetailsCode = "insufficient_funds"
	TreasuryInboundTransferFailureDetailsCodeInvalidAccountNumber          TreasuryInboundTransferFailureDetailsCode = "invalid_account_number"
	TreasuryInboundTransferFailureDetailsCodeInvalidCurrency               TreasuryInboundTransferFailureDetailsCode = "invalid_currency"
	TreasuryInboundTransferFailureDetailsCodeNoAccount                     TreasuryInboundTransferFailureDetailsCode = "no_account"
	TreasuryInboundTransferFailureDetailsCodeOther                         TreasuryInboundTransferFailureDetailsCode = "other"
)

List of values that TreasuryInboundTransferFailureDetailsCode can take

type TreasuryInboundTransferLinkedFlows

type TreasuryInboundTransferLinkedFlows struct {
	// If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return.
	ReceivedDebit string `json:"received_debit"`
}

type TreasuryInboundTransferList

type TreasuryInboundTransferList struct {
	APIResource
	ListMeta
	Data []*TreasuryInboundTransfer `json:"data"`
}

TreasuryInboundTransferList is a list of InboundTransfers as retrieved from a list endpoint.

type TreasuryInboundTransferListParams

type TreasuryInboundTransferListParams struct {
	ListParams `form:"*"`
	// Returns objects associated with this FinancialAccount.
	FinancialAccount *string `form:"financial_account"`
	// Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`.
	Status *string `form:"status"`
}

Returns a list of InboundTransfers sent from the specified FinancialAccount.

type TreasuryInboundTransferOriginPaymentMethodDetails

type TreasuryInboundTransferOriginPaymentMethodDetails struct {
	BillingDetails *TreasuryInboundTransferOriginPaymentMethodDetailsBillingDetails `json:"billing_details"`
	// The type of the payment method used in the InboundTransfer.
	Type          TreasuryInboundTransferOriginPaymentMethodDetailsType           `json:"type"`
	USBankAccount *TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccount `json:"us_bank_account"`
}

Details about the PaymentMethod for an InboundTransfer.

type TreasuryInboundTransferOriginPaymentMethodDetailsBillingDetails

type TreasuryInboundTransferOriginPaymentMethodDetailsBillingDetails struct {
	Address *Address `json:"address"`
	// Email address.
	Email string `json:"email"`
	// Full name.
	Name string `json:"name"`
}

type TreasuryInboundTransferOriginPaymentMethodDetailsType

type TreasuryInboundTransferOriginPaymentMethodDetailsType string

The type of the payment method used in the InboundTransfer.

const (
	TreasuryInboundTransferOriginPaymentMethodDetailsTypeUSBankAccount TreasuryInboundTransferOriginPaymentMethodDetailsType = "us_bank_account"
)

List of values that TreasuryInboundTransferOriginPaymentMethodDetailsType can take

type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccount

type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccount struct {
	// Account holder type: individual or company.
	AccountHolderType TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"`
	// Account type: checkings or savings. Defaults to checking if omitted.
	AccountType TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType `json:"account_type"`
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
	// The US bank account network used to debit funds.
	Network TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork `json:"network"`
	// Routing number of the bank account.
	RoutingNumber string `json:"routing_number"`
}

type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType

type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType string

Account holder type: individual or company.

const (
	TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderTypeCompany    TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType = "company"
	TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderTypeIndividual TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType = "individual"
)

List of values that TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountHolderType can take

type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType

type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType string

Account type: checkings or savings. Defaults to checking if omitted.

const (
	TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountTypeChecking TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType = "checking"
	TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountTypeSavings  TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType = "savings"
)

List of values that TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountAccountType can take

type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork

type TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork string

The US bank account network used to debit funds.

const (
	TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetworkACH TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork = "ach"
)

List of values that TreasuryInboundTransferOriginPaymentMethodDetailsUSBankAccountNetwork can take

type TreasuryInboundTransferParams

type TreasuryInboundTransferParams struct {
	Params `form:"*"`
	// Amount (in cents) to be transferred.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// The FinancialAccount to send funds to.
	FinancialAccount *string `form:"financial_account"`
	// The origin payment method to be debited for the InboundTransfer.
	OriginPaymentMethod *string `form:"origin_payment_method"`
	// The complete description that appears on your customers' statements. Maximum 10 characters.
	StatementDescriptor *string `form:"statement_descriptor"`
}

Creates an InboundTransfer.

type TreasuryInboundTransferStatus

type TreasuryInboundTransferStatus string

Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.

const (
	TreasuryInboundTransferStatusCanceled   TreasuryInboundTransferStatus = "canceled"
	TreasuryInboundTransferStatusFailed     TreasuryInboundTransferStatus = "failed"
	TreasuryInboundTransferStatusProcessing TreasuryInboundTransferStatus = "processing"
	TreasuryInboundTransferStatusSucceeded  TreasuryInboundTransferStatus = "succeeded"
)

List of values that TreasuryInboundTransferStatus can take

type TreasuryInboundTransferStatusTransitions

type TreasuryInboundTransferStatusTransitions struct {
	// Timestamp describing when an InboundTransfer changed status to `canceled`.
	CanceledAt int64 `json:"canceled_at"`
	// Timestamp describing when an InboundTransfer changed status to `failed`.
	FailedAt int64 `json:"failed_at"`
	// Timestamp describing when an InboundTransfer changed status to `succeeded`.
	SucceededAt int64 `json:"succeeded_at"`
}

type TreasuryOutboundPayment

type TreasuryOutboundPayment struct {
	APIResource
	// Amount (in cents) transferred.
	Amount int64 `json:"amount"`
	// Returns `true` if the object can be canceled, and `false` otherwise.
	Cancelable bool `json:"cancelable"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent.
	Customer string `json:"customer"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`.
	DestinationPaymentMethod string `json:"destination_payment_method"`
	// Details about the PaymentMethod for an OutboundPayment.
	DestinationPaymentMethodDetails *TreasuryOutboundPaymentDestinationPaymentMethodDetails `json:"destination_payment_method_details"`
	// Details about the end user.
	EndUserDetails *TreasuryOutboundPaymentEndUserDetails `json:"end_user_details"`
	// The date when funds are expected to arrive in the destination account.
	ExpectedArrivalDate int64 `json:"expected_arrival_date"`
	// The FinancialAccount that funds were pulled from.
	FinancialAccount string `json:"financial_account"`
	// A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
	HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Details about a returned OutboundPayment. Only set when the status is `returned`.
	ReturnedDetails *TreasuryOutboundPaymentReturnedDetails `json:"returned_details"`
	// The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
	StatementDescriptor string `json:"statement_descriptor"`
	// Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.
	Status            TreasuryOutboundPaymentStatus             `json:"status"`
	StatusTransitions *TreasuryOutboundPaymentStatusTransitions `json:"status_transitions"`
	// The Transaction associated with this object.
	Transaction *TreasuryTransaction `json:"transaction"`
}

Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).

Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.

type TreasuryOutboundPaymentCancelParams

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

Cancel an OutboundPayment.

type TreasuryOutboundPaymentDestinationPaymentMethodDataBillingDetailsParams

type TreasuryOutboundPaymentDestinationPaymentMethodDataBillingDetailsParams struct {
	// Billing address.
	Address *AddressParams `form:"address"`
	// Email address.
	Email *string `form:"email"`
	// Full name.
	Name *string `form:"name"`
	// Billing phone number (including extension).
	Phone *string `form:"phone"`
}

Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

type TreasuryOutboundPaymentDestinationPaymentMethodDataParams

type TreasuryOutboundPaymentDestinationPaymentMethodDataParams struct {
	// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
	BillingDetails *TreasuryOutboundPaymentDestinationPaymentMethodDataBillingDetailsParams `form:"billing_details"`
	// Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
	FinancialAccount *string `form:"financial_account"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
	Metadata map[string]string `form:"metadata"`
	// The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
	Type *string `form:"type"`
	// Required hash if type is set to `us_bank_account`.
	USBankAccount *TreasuryOutboundPaymentDestinationPaymentMethodDataUSBankAccountParams `form:"us_bank_account"`
}

Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.

type TreasuryOutboundPaymentDestinationPaymentMethodDataUSBankAccountParams

type TreasuryOutboundPaymentDestinationPaymentMethodDataUSBankAccountParams struct {
	// Account holder type: individual or company.
	AccountHolderType *string `form:"account_holder_type"`
	// Account number of the bank account.
	AccountNumber *string `form:"account_number"`
	// Account type: checkings or savings. Defaults to checking if omitted.
	AccountType *string `form:"account_type"`
	// The ID of a Financial Connections Account to use as a payment method.
	FinancialConnectionsAccount *string `form:"financial_connections_account"`
	// Routing number of the bank account.
	RoutingNumber *string `form:"routing_number"`
}

Required hash if type is set to `us_bank_account`.

type TreasuryOutboundPaymentDestinationPaymentMethodDetails

type TreasuryOutboundPaymentDestinationPaymentMethodDetails struct {
	BillingDetails   *TreasuryOutboundPaymentDestinationPaymentMethodDetailsBillingDetails   `json:"billing_details"`
	FinancialAccount *TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccount `json:"financial_account"`
	// The type of the payment method used in the OutboundPayment.
	Type          TreasuryOutboundPaymentDestinationPaymentMethodDetailsType           `json:"type"`
	USBankAccount *TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccount `json:"us_bank_account"`
}

Details about the PaymentMethod for an OutboundPayment.

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsBillingDetails

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsBillingDetails struct {
	Address *Address `json:"address"`
	// Email address.
	Email string `json:"email"`
	// Full name.
	Name string `json:"name"`
}

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccount

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccount struct {
	// Token of the FinancialAccount.
	ID string `json:"id"`
	// The rails used to send funds.
	Network TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetwork `json:"network"`
}

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetwork

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetwork string

The rails used to send funds.

const (
	TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetworkStripe TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetwork = "stripe"
)

List of values that TreasuryOutboundPaymentDestinationPaymentMethodDetailsFinancialAccountNetwork can take

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsType

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsType string

The type of the payment method used in the OutboundPayment.

const (
	TreasuryOutboundPaymentDestinationPaymentMethodDetailsTypeFinancialAccount TreasuryOutboundPaymentDestinationPaymentMethodDetailsType = "financial_account"
	TreasuryOutboundPaymentDestinationPaymentMethodDetailsTypeUSBankAccount    TreasuryOutboundPaymentDestinationPaymentMethodDetailsType = "us_bank_account"
)

List of values that TreasuryOutboundPaymentDestinationPaymentMethodDetailsType can take

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccount

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccount struct {
	// Account holder type: individual or company.
	AccountHolderType TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"`
	// Account type: checkings or savings. Defaults to checking if omitted.
	AccountType TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType `json:"account_type"`
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
	// The US bank account network used to send funds.
	Network TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork `json:"network"`
	// Routing number of the bank account.
	RoutingNumber string `json:"routing_number"`
}

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType string

Account holder type: individual or company.

const (
	TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderTypeCompany    TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType = "company"
	TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderTypeIndividual TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType = "individual"
)

List of values that TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountHolderType can take

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType string

Account type: checkings or savings. Defaults to checking if omitted.

const (
	TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountTypeChecking TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType = "checking"
	TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountTypeSavings  TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType = "savings"
)

List of values that TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountAccountType can take

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork

type TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork string

The US bank account network used to send funds.

const (
	TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetworkACH            TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork = "ach"
	TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetworkUSDomesticWire TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork = "us_domestic_wire"
)

List of values that TreasuryOutboundPaymentDestinationPaymentMethodDetailsUSBankAccountNetwork can take

type TreasuryOutboundPaymentDestinationPaymentMethodOptionsParams

type TreasuryOutboundPaymentDestinationPaymentMethodOptionsParams struct {
	// Optional fields for `us_bank_account`.
	USBankAccount *TreasuryOutboundPaymentDestinationPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
}

Payment method-specific configuration for this OutboundPayment.

type TreasuryOutboundPaymentDestinationPaymentMethodOptionsUSBankAccountParams

type TreasuryOutboundPaymentDestinationPaymentMethodOptionsUSBankAccountParams struct {
	// The US bank account network that must be used for this OutboundPayment. If not set, we will default to the PaymentMethod's preferred network.
	Network *string `form:"network"`
}

Optional fields for `us_bank_account`.

type TreasuryOutboundPaymentEndUserDetails

type TreasuryOutboundPaymentEndUserDetails struct {
	// IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked.
	IPAddress string `json:"ip_address"`
	// `true“ if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
	Present bool `json:"present"`
}

Details about the end user.

type TreasuryOutboundPaymentEndUserDetailsParams

type TreasuryOutboundPaymentEndUserDetailsParams struct {
	// IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`.
	IPAddress *string `form:"ip_address"`
	// `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
	Present *bool `form:"present"`
}

End user details.

type TreasuryOutboundPaymentList

type TreasuryOutboundPaymentList struct {
	APIResource
	ListMeta
	Data []*TreasuryOutboundPayment `json:"data"`
}

TreasuryOutboundPaymentList is a list of OutboundPayments as retrieved from a list endpoint.

type TreasuryOutboundPaymentListParams

type TreasuryOutboundPaymentListParams struct {
	ListParams `form:"*"`
	// Only return OutboundPayments sent to this customer.
	Customer *string `form:"customer"`
	// Returns objects associated with this FinancialAccount.
	FinancialAccount *string `form:"financial_account"`
	// Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`.
	Status *string `form:"status"`
}

Returns a list of OutboundPayments sent from the specified FinancialAccount.

type TreasuryOutboundPaymentParams

type TreasuryOutboundPaymentParams struct {
	Params `form:"*"`
	// Amount (in cents) to be transferred.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.
	Customer *string `form:"customer"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.
	DestinationPaymentMethod *string `form:"destination_payment_method"`
	// Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.
	DestinationPaymentMethodData *TreasuryOutboundPaymentDestinationPaymentMethodDataParams `form:"destination_payment_method_data"`
	// Payment method-specific configuration for this OutboundPayment.
	DestinationPaymentMethodOptions *TreasuryOutboundPaymentDestinationPaymentMethodOptionsParams `form:"destination_payment_method_options"`
	// End user details.
	EndUserDetails *TreasuryOutboundPaymentEndUserDetailsParams `form:"end_user_details"`
	// The FinancialAccount to pull funds from.
	FinancialAccount *string `form:"financial_account"`
	// The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`.
	StatementDescriptor *string `form:"statement_descriptor"`
}

Creates an OutboundPayment.

type TreasuryOutboundPaymentReturnedDetails

type TreasuryOutboundPaymentReturnedDetails struct {
	// Reason for the return.
	Code TreasuryOutboundPaymentReturnedDetailsCode `json:"code"`
	// The Transaction associated with this object.
	Transaction *TreasuryTransaction `json:"transaction"`
}

Details about a returned OutboundPayment. Only set when the status is `returned`.

type TreasuryOutboundPaymentReturnedDetailsCode

type TreasuryOutboundPaymentReturnedDetailsCode string

Reason for the return.

const (
	TreasuryOutboundPaymentReturnedDetailsCodeAccountClosed              TreasuryOutboundPaymentReturnedDetailsCode = "account_closed"
	TreasuryOutboundPaymentReturnedDetailsCodeAccountFrozen              TreasuryOutboundPaymentReturnedDetailsCode = "account_frozen"
	TreasuryOutboundPaymentReturnedDetailsCodeBankAccountRestricted      TreasuryOutboundPaymentReturnedDetailsCode = "bank_account_restricted"
	TreasuryOutboundPaymentReturnedDetailsCodeBankOwnershipChanged       TreasuryOutboundPaymentReturnedDetailsCode = "bank_ownership_changed"
	TreasuryOutboundPaymentReturnedDetailsCodeDeclined                   TreasuryOutboundPaymentReturnedDetailsCode = "declined"
	TreasuryOutboundPaymentReturnedDetailsCodeIncorrectAccountHolderName TreasuryOutboundPaymentReturnedDetailsCode = "incorrect_account_holder_name"
	TreasuryOutboundPaymentReturnedDetailsCodeInvalidAccountNumber       TreasuryOutboundPaymentReturnedDetailsCode = "invalid_account_number"
	TreasuryOutboundPaymentReturnedDetailsCodeInvalidCurrency            TreasuryOutboundPaymentReturnedDetailsCode = "invalid_currency"
	TreasuryOutboundPaymentReturnedDetailsCodeNoAccount                  TreasuryOutboundPaymentReturnedDetailsCode = "no_account"
	TreasuryOutboundPaymentReturnedDetailsCodeOther                      TreasuryOutboundPaymentReturnedDetailsCode = "other"
)

List of values that TreasuryOutboundPaymentReturnedDetailsCode can take

type TreasuryOutboundPaymentStatus

type TreasuryOutboundPaymentStatus string

Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.

const (
	TreasuryOutboundPaymentStatusCanceled   TreasuryOutboundPaymentStatus = "canceled"
	TreasuryOutboundPaymentStatusFailed     TreasuryOutboundPaymentStatus = "failed"
	TreasuryOutboundPaymentStatusPosted     TreasuryOutboundPaymentStatus = "posted"
	TreasuryOutboundPaymentStatusProcessing TreasuryOutboundPaymentStatus = "processing"
	TreasuryOutboundPaymentStatusReturned   TreasuryOutboundPaymentStatus = "returned"
)

List of values that TreasuryOutboundPaymentStatus can take

type TreasuryOutboundPaymentStatusTransitions

type TreasuryOutboundPaymentStatusTransitions struct {
	// Timestamp describing when an OutboundPayment changed status to `canceled`.
	CanceledAt int64 `json:"canceled_at"`
	// Timestamp describing when an OutboundPayment changed status to `failed`.
	FailedAt int64 `json:"failed_at"`
	// Timestamp describing when an OutboundPayment changed status to `posted`.
	PostedAt int64 `json:"posted_at"`
	// Timestamp describing when an OutboundPayment changed status to `returned`.
	ReturnedAt int64 `json:"returned_at"`
}

type TreasuryOutboundTransfer

type TreasuryOutboundTransfer struct {
	APIResource
	// Amount (in cents) transferred.
	Amount int64 `json:"amount"`
	// Returns `true` if the object can be canceled, and `false` otherwise.
	Cancelable bool `json:"cancelable"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// The PaymentMethod used as the payment instrument for an OutboundTransfer.
	DestinationPaymentMethod        string                                                   `json:"destination_payment_method"`
	DestinationPaymentMethodDetails *TreasuryOutboundTransferDestinationPaymentMethodDetails `json:"destination_payment_method_details"`
	// The date when funds are expected to arrive in the destination account.
	ExpectedArrivalDate int64 `json:"expected_arrival_date"`
	// The FinancialAccount that funds were pulled from.
	FinancialAccount string `json:"financial_account"`
	// A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
	HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Details about a returned OutboundTransfer. Only set when the status is `returned`.
	ReturnedDetails *TreasuryOutboundTransferReturnedDetails `json:"returned_details"`
	// Information about the OutboundTransfer to be sent to the recipient account.
	StatementDescriptor string `json:"statement_descriptor"`
	// Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`.
	Status            TreasuryOutboundTransferStatus             `json:"status"`
	StatusTransitions *TreasuryOutboundTransferStatusTransitions `json:"status_transitions"`
	// The Transaction associated with this object.
	Transaction *TreasuryTransaction `json:"transaction"`
}

Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.

Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.

type TreasuryOutboundTransferCancelParams

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

An OutboundTransfer can be canceled if the funds have not yet been paid out.

type TreasuryOutboundTransferDestinationPaymentMethodDetails

type TreasuryOutboundTransferDestinationPaymentMethodDetails struct {
	BillingDetails *TreasuryOutboundTransferDestinationPaymentMethodDetailsBillingDetails `json:"billing_details"`
	// The type of the payment method used in the OutboundTransfer.
	Type          TreasuryOutboundTransferDestinationPaymentMethodDetailsType           `json:"type"`
	USBankAccount *TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccount `json:"us_bank_account"`
}

type TreasuryOutboundTransferDestinationPaymentMethodDetailsBillingDetails

type TreasuryOutboundTransferDestinationPaymentMethodDetailsBillingDetails struct {
	Address *Address `json:"address"`
	// Email address.
	Email string `json:"email"`
	// Full name.
	Name string `json:"name"`
}

type TreasuryOutboundTransferDestinationPaymentMethodDetailsType

type TreasuryOutboundTransferDestinationPaymentMethodDetailsType string

The type of the payment method used in the OutboundTransfer.

const (
	TreasuryOutboundTransferDestinationPaymentMethodDetailsTypeUSBankAccount TreasuryOutboundTransferDestinationPaymentMethodDetailsType = "us_bank_account"
)

List of values that TreasuryOutboundTransferDestinationPaymentMethodDetailsType can take

type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccount

type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccount struct {
	// Account holder type: individual or company.
	AccountHolderType TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"`
	// Account type: checkings or savings. Defaults to checking if omitted.
	AccountType TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType `json:"account_type"`
	// Name of the bank associated with the bank account.
	BankName string `json:"bank_name"`
	// Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
	Fingerprint string `json:"fingerprint"`
	// Last four digits of the bank account number.
	Last4 string `json:"last4"`
	// The US bank account network used to send funds.
	Network TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork `json:"network"`
	// Routing number of the bank account.
	RoutingNumber string `json:"routing_number"`
}

type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType

type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType string

Account holder type: individual or company.

const (
	TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderTypeCompany    TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType = "company"
	TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderTypeIndividual TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType = "individual"
)

List of values that TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountHolderType can take

type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType

type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType string

Account type: checkings or savings. Defaults to checking if omitted.

const (
	TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountTypeChecking TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType = "checking"
	TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountTypeSavings  TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType = "savings"
)

List of values that TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountAccountType can take

type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork

type TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork string

The US bank account network used to send funds.

const (
	TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetworkACH            TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork = "ach"
	TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetworkUSDomesticWire TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork = "us_domestic_wire"
)

List of values that TreasuryOutboundTransferDestinationPaymentMethodDetailsUSBankAccountNetwork can take

type TreasuryOutboundTransferDestinationPaymentMethodOptionsParams

type TreasuryOutboundTransferDestinationPaymentMethodOptionsParams struct {
	// Optional fields for `us_bank_account`.
	USBankAccount *TreasuryOutboundTransferDestinationPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
}

Hash describing payment method configuration details.

type TreasuryOutboundTransferDestinationPaymentMethodOptionsUSBankAccountParams

type TreasuryOutboundTransferDestinationPaymentMethodOptionsUSBankAccountParams struct {
	// Designate the OutboundTransfer as using a US bank account network configuration.
	Network *string `form:"network"`
}

Optional fields for `us_bank_account`.

type TreasuryOutboundTransferList

type TreasuryOutboundTransferList struct {
	APIResource
	ListMeta
	Data []*TreasuryOutboundTransfer `json:"data"`
}

TreasuryOutboundTransferList is a list of OutboundTransfers as retrieved from a list endpoint.

type TreasuryOutboundTransferListParams

type TreasuryOutboundTransferListParams struct {
	ListParams `form:"*"`
	// Returns objects associated with this FinancialAccount.
	FinancialAccount *string `form:"financial_account"`
	// Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`.
	Status *string `form:"status"`
}

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

type TreasuryOutboundTransferParams

type TreasuryOutboundTransferParams struct {
	Params `form:"*"`
	// Amount (in cents) to be transferred.
	Amount *int64 `form:"amount"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency *string `form:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// The PaymentMethod to use as the payment instrument for the OutboundTransfer.
	DestinationPaymentMethod *string `form:"destination_payment_method"`
	// Hash describing payment method configuration details.
	DestinationPaymentMethodOptions *TreasuryOutboundTransferDestinationPaymentMethodOptionsParams `form:"destination_payment_method_options"`
	// The FinancialAccount to pull funds from.
	FinancialAccount *string `form:"financial_account"`
	// Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`.
	StatementDescriptor *string `form:"statement_descriptor"`
}

Creates an OutboundTransfer.

type TreasuryOutboundTransferReturnedDetails

type TreasuryOutboundTransferReturnedDetails struct {
	// Reason for the return.
	Code TreasuryOutboundTransferReturnedDetailsCode `json:"code"`
	// The Transaction associated with this object.
	Transaction *TreasuryTransaction `json:"transaction"`
}

Details about a returned OutboundTransfer. Only set when the status is `returned`.

type TreasuryOutboundTransferReturnedDetailsCode

type TreasuryOutboundTransferReturnedDetailsCode string

Reason for the return.

const (
	TreasuryOutboundTransferReturnedDetailsCodeAccountClosed              TreasuryOutboundTransferReturnedDetailsCode = "account_closed"
	TreasuryOutboundTransferReturnedDetailsCodeAccountFrozen              TreasuryOutboundTransferReturnedDetailsCode = "account_frozen"
	TreasuryOutboundTransferReturnedDetailsCodeBankAccountRestricted      TreasuryOutboundTransferReturnedDetailsCode = "bank_account_restricted"
	TreasuryOutboundTransferReturnedDetailsCodeBankOwnershipChanged       TreasuryOutboundTransferReturnedDetailsCode = "bank_ownership_changed"
	TreasuryOutboundTransferReturnedDetailsCodeDeclined                   TreasuryOutboundTransferReturnedDetailsCode = "declined"
	TreasuryOutboundTransferReturnedDetailsCodeIncorrectAccountHolderName TreasuryOutboundTransferReturnedDetailsCode = "incorrect_account_holder_name"
	TreasuryOutboundTransferReturnedDetailsCodeInvalidAccountNumber       TreasuryOutboundTransferReturnedDetailsCode = "invalid_account_number"
	TreasuryOutboundTransferReturnedDetailsCodeInvalidCurrency            TreasuryOutboundTransferReturnedDetailsCode = "invalid_currency"
	TreasuryOutboundTransferReturnedDetailsCodeNoAccount                  TreasuryOutboundTransferReturnedDetailsCode = "no_account"
	TreasuryOutboundTransferReturnedDetailsCodeOther                      TreasuryOutboundTransferReturnedDetailsCode = "other"
)

List of values that TreasuryOutboundTransferReturnedDetailsCode can take

type TreasuryOutboundTransferStatus

type TreasuryOutboundTransferStatus string

Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`.

const (
	TreasuryOutboundTransferStatusCanceled   TreasuryOutboundTransferStatus = "canceled"
	TreasuryOutboundTransferStatusFailed     TreasuryOutboundTransferStatus = "failed"
	TreasuryOutboundTransferStatusPosted     TreasuryOutboundTransferStatus = "posted"
	TreasuryOutboundTransferStatusProcessing TreasuryOutboundTransferStatus = "processing"
	TreasuryOutboundTransferStatusReturned   TreasuryOutboundTransferStatus = "returned"
)

List of values that TreasuryOutboundTransferStatus can take

type TreasuryOutboundTransferStatusTransitions

type TreasuryOutboundTransferStatusTransitions struct {
	// Timestamp describing when an OutboundTransfer changed status to `canceled`
	CanceledAt int64 `json:"canceled_at"`
	// Timestamp describing when an OutboundTransfer changed status to `failed`
	FailedAt int64 `json:"failed_at"`
	// Timestamp describing when an OutboundTransfer changed status to `posted`
	PostedAt int64 `json:"posted_at"`
	// Timestamp describing when an OutboundTransfer changed status to `returned`
	ReturnedAt int64 `json:"returned_at"`
}

type TreasuryReceivedCredit

type TreasuryReceivedCredit struct {
	APIResource
	// Amount (in cents) transferred.
	Amount int64 `json:"amount"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.
	FailureCode TreasuryReceivedCreditFailureCode `json:"failure_code"`
	// The FinancialAccount that received the funds.
	FinancialAccount string `json:"financial_account"`
	// A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
	HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"`
	// Unique identifier for the object.
	ID                             string                                                `json:"id"`
	InitiatingPaymentMethodDetails *TreasuryReceivedCreditInitiatingPaymentMethodDetails `json:"initiating_payment_method_details"`
	LinkedFlows                    *TreasuryReceivedCreditLinkedFlows                    `json:"linked_flows"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// The rails used to send the funds.
	Network TreasuryReceivedCreditNetwork `json:"network"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Details describing when a ReceivedCredit may be reversed.
	ReversalDetails *TreasuryReceivedCreditReversalDetails `json:"reversal_details"`
	// Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field.
	Status TreasuryReceivedCreditStatus `json:"status"`
	// The Transaction associated with this object.
	Transaction *TreasuryTransaction `json:"transaction"`
}

ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.

type TreasuryReceivedCreditFailureCode

type TreasuryReceivedCreditFailureCode string

Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.

const (
	TreasuryReceivedCreditFailureCodeAccountClosed TreasuryReceivedCreditFailureCode = "account_closed"
	TreasuryReceivedCreditFailureCodeAccountFrozen TreasuryReceivedCreditFailureCode = "account_frozen"
	TreasuryReceivedCreditFailureCodeOther         TreasuryReceivedCreditFailureCode = "other"
)

List of values that TreasuryReceivedCreditFailureCode can take

type TreasuryReceivedCreditInitiatingPaymentMethodDetails

type TreasuryReceivedCreditInitiatingPaymentMethodDetails struct {
	// Set when `type` is `balance`.
	Balance          TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalance           `json:"balance"`
	BillingDetails   *TreasuryReceivedCreditInitiatingPaymentMethodDetailsBillingDetails   `json:"billing_details"`
	FinancialAccount *TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount `json:"financial_account"`
	// Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID.
	IssuingCard string `json:"issuing_card"`
	// Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
	Type          TreasuryReceivedCreditInitiatingPaymentMethodDetailsType           `json:"type"`
	USBankAccount *TreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccount `json:"us_bank_account"`
}

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalance

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalance string

Set when `type` is `balance`.

const (
	TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalancePayments TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalance = "payments"
)

List of values that TreasuryReceivedCreditInitiatingPaymentMethodDetailsBalance can take

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsBillingDetails

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsBillingDetails struct {
	Address *Address `json:"address"`
	// Email address.
	Email string `json:"email"`
	// Full name.
	Name string `json:"name"`
}

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccount struct {
	// The FinancialAccount ID.
	ID string `json:"id"`
	// The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.
	Network TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetwork `json:"network"`
}

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetwork

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetwork string

The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.

const (
	TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetworkStripe TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetwork = "stripe"
)

List of values that TreasuryReceivedCreditInitiatingPaymentMethodDetailsFinancialAccountNetwork can take

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsType

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsType string

Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.

const (
	TreasuryReceivedCreditInitiatingPaymentMethodDetailsTypeBalance          TreasuryReceivedCreditInitiatingPaymentMethodDetailsType = "balance"
	TreasuryReceivedCreditInitiatingPaymentMethodDetailsTypeFinancialAccount TreasuryReceivedCreditInitiatingPaymentMethodDetailsType = "financial_account"
	TreasuryReceivedCreditInitiatingPaymentMethodDetailsTypeIssuingCard      TreasuryReceivedCreditInitiatingPaymentMethodDetailsType = "issuing_card"
	TreasuryReceivedCreditInitiatingPaymentMethodDetailsTypeStripe           TreasuryReceivedCreditInitiatingPaymentMethodDetailsType = "stripe"
	TreasuryReceivedCreditInitiatingPaymentMethodDetailsTypeUSBankAccount    TreasuryReceivedCreditInitiatingPaymentMethodDetailsType = "us_bank_account"
)

List of values that TreasuryReceivedCreditInitiatingPaymentMethodDetailsType can take

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccount

type TreasuryReceivedCreditInitiatingPaymentMethodDetailsUSBankAccount struct {
	// Bank name.
	BankName string `json:"bank_name"`
	// The last four digits of the bank account number.
	Last4 string `json:"last4"`
	// The routing number for the bank account.
	RoutingNumber string `json:"routing_number"`
}

type TreasuryReceivedCreditLinkedFlows

type TreasuryReceivedCreditLinkedFlows struct {
	// The CreditReversal created as a result of this ReceivedCredit being reversed.
	CreditReversal string `json:"credit_reversal"`
	// Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.
	IssuingAuthorization string `json:"issuing_authorization"`
	// Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object.
	IssuingTransaction string `json:"issuing_transaction"`
	// ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals.
	SourceFlow string `json:"source_flow"`
	// The expandable object of the source flow.
	SourceFlowDetails *TreasuryReceivedCreditLinkedFlowsSourceFlowDetails `json:"source_flow_details"`
	// The type of flow that originated the ReceivedCredit (for example, `outbound_payment`).
	SourceFlowType string `json:"source_flow_type"`
}

type TreasuryReceivedCreditLinkedFlowsSourceFlowDetails

type TreasuryReceivedCreditLinkedFlowsSourceFlowDetails struct {
	// You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
	CreditReversal *TreasuryCreditReversal `json:"credit_reversal"`
	// Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
	//
	// Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
	OutboundPayment *TreasuryOutboundPayment `json:"outbound_payment"`
	// A `Payout` object is created when you receive funds from Stripe, or when you
	// initiate a payout to either a bank account or debit card of a [connected
	// Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts,
	// as well as list all payouts. Payouts are made on [varying
	// schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and
	// industry.
	//
	// Related guide: [Receiving Payouts](https://stripe.com/docs/payouts).
	Payout *Payout `json:"payout"`
	// The type of the source flow that originated the ReceivedCredit.
	Type TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType `json:"type"`
}

The expandable object of the source flow.

type TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType

type TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType string

The type of the source flow that originated the ReceivedCredit.

const (
	TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsTypeCreditReversal  TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType = "credit_reversal"
	TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsTypeOther           TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType = "other"
	TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsTypeOutboundPayment TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType = "outbound_payment"
	TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsTypePayout          TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType = "payout"
)

List of values that TreasuryReceivedCreditLinkedFlowsSourceFlowDetailsType can take

type TreasuryReceivedCreditList

type TreasuryReceivedCreditList struct {
	APIResource
	ListMeta
	Data []*TreasuryReceivedCredit `json:"data"`
}

TreasuryReceivedCreditList is a list of ReceivedCredits as retrieved from a list endpoint.

type TreasuryReceivedCreditListLinkedFlowsParams

type TreasuryReceivedCreditListLinkedFlowsParams struct {
	// The source flow type.
	SourceFlowType *string `form:"source_flow_type"`
}

Only return ReceivedCredits described by the flow.

type TreasuryReceivedCreditListParams

type TreasuryReceivedCreditListParams struct {
	ListParams `form:"*"`
	// The FinancialAccount that received the funds.
	FinancialAccount *string `form:"financial_account"`
	// Only return ReceivedCredits described by the flow.
	LinkedFlows *TreasuryReceivedCreditListLinkedFlowsParams `form:"linked_flows"`
	// Only return ReceivedCredits that have the given status: `succeeded` or `failed`.
	Status *string `form:"status"`
}

Returns a list of ReceivedCredits.

type TreasuryReceivedCreditNetwork

type TreasuryReceivedCreditNetwork string

The rails used to send the funds.

const (
	TreasuryReceivedCreditNetworkACH            TreasuryReceivedCreditNetwork = "ach"
	TreasuryReceivedCreditNetworkCard           TreasuryReceivedCreditNetwork = "card"
	TreasuryReceivedCreditNetworkStripe         TreasuryReceivedCreditNetwork = "stripe"
	TreasuryReceivedCreditNetworkUSDomesticWire TreasuryReceivedCreditNetwork = "us_domestic_wire"
)

List of values that TreasuryReceivedCreditNetwork can take

type TreasuryReceivedCreditParams

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

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

type TreasuryReceivedCreditReversalDetails

type TreasuryReceivedCreditReversalDetails struct {
	// Time before which a ReceivedCredit can be reversed.
	Deadline int64 `json:"deadline"`
	// Set if a ReceivedCredit cannot be reversed.
	RestrictedReason TreasuryReceivedCreditReversalDetailsRestrictedReason `json:"restricted_reason"`
}

Details describing when a ReceivedCredit may be reversed.

type TreasuryReceivedCreditReversalDetailsRestrictedReason

type TreasuryReceivedCreditReversalDetailsRestrictedReason string

Set if a ReceivedCredit cannot be reversed.

const (
	TreasuryReceivedCreditReversalDetailsRestrictedReasonAlreadyReversed      TreasuryReceivedCreditReversalDetailsRestrictedReason = "already_reversed"
	TreasuryReceivedCreditReversalDetailsRestrictedReasonDeadlinePassed       TreasuryReceivedCreditReversalDetailsRestrictedReason = "deadline_passed"
	TreasuryReceivedCreditReversalDetailsRestrictedReasonNetworkRestricted    TreasuryReceivedCreditReversalDetailsRestrictedReason = "network_restricted"
	TreasuryReceivedCreditReversalDetailsRestrictedReasonOther                TreasuryReceivedCreditReversalDetailsRestrictedReason = "other"
	TreasuryReceivedCreditReversalDetailsRestrictedReasonSourceFlowRestricted TreasuryReceivedCreditReversalDetailsRestrictedReason = "source_flow_restricted"
)

List of values that TreasuryReceivedCreditReversalDetailsRestrictedReason can take

type TreasuryReceivedCreditStatus

type TreasuryReceivedCreditStatus string

Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field.

const (
	TreasuryReceivedCreditStatusFailed    TreasuryReceivedCreditStatus = "failed"
	TreasuryReceivedCreditStatusSucceeded TreasuryReceivedCreditStatus = "succeeded"
)

List of values that TreasuryReceivedCreditStatus can take

type TreasuryReceivedDebit

type TreasuryReceivedDebit struct {
	APIResource
	// Amount (in cents) transferred.
	Amount int64 `json:"amount"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.
	FailureCode TreasuryReceivedDebitFailureCode `json:"failure_code"`
	// The FinancialAccount that funds were pulled from.
	FinancialAccount string `json:"financial_account"`
	// A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
	HostedRegulatoryReceiptURL string `json:"hosted_regulatory_receipt_url"`
	// Unique identifier for the object.
	ID                             string                                               `json:"id"`
	InitiatingPaymentMethodDetails *TreasuryReceivedDebitInitiatingPaymentMethodDetails `json:"initiating_payment_method_details"`
	LinkedFlows                    *TreasuryReceivedDebitLinkedFlows                    `json:"linked_flows"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// The network used for the ReceivedDebit.
	Network TreasuryReceivedDebitNetwork `json:"network"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Details describing when a ReceivedDebit might be reversed.
	ReversalDetails *TreasuryReceivedDebitReversalDetails `json:"reversal_details"`
	// Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`.
	Status TreasuryReceivedDebitStatus `json:"status"`
	// The Transaction associated with this object.
	Transaction *TreasuryTransaction `json:"transaction"`
}

ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.

type TreasuryReceivedDebitFailureCode

type TreasuryReceivedDebitFailureCode string

Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen.

const (
	TreasuryReceivedDebitFailureCodeAccountClosed     TreasuryReceivedDebitFailureCode = "account_closed"
	TreasuryReceivedDebitFailureCodeAccountFrozen     TreasuryReceivedDebitFailureCode = "account_frozen"
	TreasuryReceivedDebitFailureCodeInsufficientFunds TreasuryReceivedDebitFailureCode = "insufficient_funds"
	TreasuryReceivedDebitFailureCodeOther             TreasuryReceivedDebitFailureCode = "other"
)

List of values that TreasuryReceivedDebitFailureCode can take

type TreasuryReceivedDebitInitiatingPaymentMethodDetails

type TreasuryReceivedDebitInitiatingPaymentMethodDetails struct {
	// Set when `type` is `balance`.
	Balance          TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalance           `json:"balance"`
	BillingDetails   *TreasuryReceivedDebitInitiatingPaymentMethodDetailsBillingDetails   `json:"billing_details"`
	FinancialAccount *TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount `json:"financial_account"`
	// Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID.
	IssuingCard string `json:"issuing_card"`
	// Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.
	Type          TreasuryReceivedDebitInitiatingPaymentMethodDetailsType           `json:"type"`
	USBankAccount *TreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccount `json:"us_bank_account"`
}

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalance

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalance string

Set when `type` is `balance`.

const (
	TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalancePayments TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalance = "payments"
)

List of values that TreasuryReceivedDebitInitiatingPaymentMethodDetailsBalance can take

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsBillingDetails

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsBillingDetails struct {
	Address *Address `json:"address"`
	// Email address.
	Email string `json:"email"`
	// Full name.
	Name string `json:"name"`
}

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccount struct {
	// The FinancialAccount ID.
	ID string `json:"id"`
	// The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.
	Network TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetwork `json:"network"`
}

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetwork

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetwork string

The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`.

const (
	TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetworkStripe TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetwork = "stripe"
)

List of values that TreasuryReceivedDebitInitiatingPaymentMethodDetailsFinancialAccountNetwork can take

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsType

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsType string

Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount.

const (
	TreasuryReceivedDebitInitiatingPaymentMethodDetailsTypeBalance          TreasuryReceivedDebitInitiatingPaymentMethodDetailsType = "balance"
	TreasuryReceivedDebitInitiatingPaymentMethodDetailsTypeFinancialAccount TreasuryReceivedDebitInitiatingPaymentMethodDetailsType = "financial_account"
	TreasuryReceivedDebitInitiatingPaymentMethodDetailsTypeIssuingCard      TreasuryReceivedDebitInitiatingPaymentMethodDetailsType = "issuing_card"
	TreasuryReceivedDebitInitiatingPaymentMethodDetailsTypeStripe           TreasuryReceivedDebitInitiatingPaymentMethodDetailsType = "stripe"
	TreasuryReceivedDebitInitiatingPaymentMethodDetailsTypeUSBankAccount    TreasuryReceivedDebitInitiatingPaymentMethodDetailsType = "us_bank_account"
)

List of values that TreasuryReceivedDebitInitiatingPaymentMethodDetailsType can take

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccount

type TreasuryReceivedDebitInitiatingPaymentMethodDetailsUSBankAccount struct {
	// Bank name.
	BankName string `json:"bank_name"`
	// The last four digits of the bank account number.
	Last4 string `json:"last4"`
	// The routing number for the bank account.
	RoutingNumber string `json:"routing_number"`
}

type TreasuryReceivedDebitLinkedFlows

type TreasuryReceivedDebitLinkedFlows struct {
	// The DebitReversal created as a result of this ReceivedDebit being reversed.
	DebitReversal string `json:"debit_reversal"`
	// Set if the ReceivedDebit is associated with an InboundTransfer's return of funds.
	InboundTransfer string `json:"inbound_transfer"`
	// Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object.
	IssuingAuthorization string `json:"issuing_authorization"`
	// Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object.
	IssuingTransaction string `json:"issuing_transaction"`
}

type TreasuryReceivedDebitList

type TreasuryReceivedDebitList struct {
	APIResource
	ListMeta
	Data []*TreasuryReceivedDebit `json:"data"`
}

TreasuryReceivedDebitList is a list of ReceivedDebits as retrieved from a list endpoint.

type TreasuryReceivedDebitListParams

type TreasuryReceivedDebitListParams struct {
	ListParams `form:"*"`
	// The FinancialAccount that funds were pulled from.
	FinancialAccount *string `form:"financial_account"`
	// Only return ReceivedDebits that have the given status: `succeeded` or `failed`.
	Status *string `form:"status"`
}

Returns a list of ReceivedDebits.

type TreasuryReceivedDebitNetwork

type TreasuryReceivedDebitNetwork string

The network used for the ReceivedDebit.

const (
	TreasuryReceivedDebitNetworkACH    TreasuryReceivedDebitNetwork = "ach"
	TreasuryReceivedDebitNetworkCard   TreasuryReceivedDebitNetwork = "card"
	TreasuryReceivedDebitNetworkStripe TreasuryReceivedDebitNetwork = "stripe"
)

List of values that TreasuryReceivedDebitNetwork can take

type TreasuryReceivedDebitParams

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

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

type TreasuryReceivedDebitReversalDetails

type TreasuryReceivedDebitReversalDetails struct {
	// Time before which a ReceivedDebit can be reversed.
	Deadline int64 `json:"deadline"`
	// Set if a ReceivedDebit can't be reversed.
	RestrictedReason TreasuryReceivedDebitReversalDetailsRestrictedReason `json:"restricted_reason"`
}

Details describing when a ReceivedDebit might be reversed.

type TreasuryReceivedDebitReversalDetailsRestrictedReason

type TreasuryReceivedDebitReversalDetailsRestrictedReason string

Set if a ReceivedDebit can't be reversed.

const (
	TreasuryReceivedDebitReversalDetailsRestrictedReasonAlreadyReversed      TreasuryReceivedDebitReversalDetailsRestrictedReason = "already_reversed"
	TreasuryReceivedDebitReversalDetailsRestrictedReasonDeadlinePassed       TreasuryReceivedDebitReversalDetailsRestrictedReason = "deadline_passed"
	TreasuryReceivedDebitReversalDetailsRestrictedReasonNetworkRestricted    TreasuryReceivedDebitReversalDetailsRestrictedReason = "network_restricted"
	TreasuryReceivedDebitReversalDetailsRestrictedReasonOther                TreasuryReceivedDebitReversalDetailsRestrictedReason = "other"
	TreasuryReceivedDebitReversalDetailsRestrictedReasonSourceFlowRestricted TreasuryReceivedDebitReversalDetailsRestrictedReason = "source_flow_restricted"
)

List of values that TreasuryReceivedDebitReversalDetailsRestrictedReason can take

type TreasuryReceivedDebitStatus

type TreasuryReceivedDebitStatus string

Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`.

const (
	TreasuryReceivedDebitStatusFailed    TreasuryReceivedDebitStatus = "failed"
	TreasuryReceivedDebitStatusSucceeded TreasuryReceivedDebitStatus = "succeeded"
)

List of values that TreasuryReceivedDebitStatus can take

type TreasuryTransaction

type TreasuryTransaction struct {
	APIResource
	// Amount (in cents) transferred.
	Amount int64 `json:"amount"`
	// Change to a FinancialAccount's balance
	BalanceImpact *TreasuryTransactionBalanceImpact `json:"balance_impact"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.
	Entries *TreasuryTransactionEntryList `json:"entries"`
	// The FinancialAccount associated with this object.
	FinancialAccount string `json:"financial_account"`
	// ID of the flow that created the Transaction.
	Flow string `json:"flow"`
	// Details of the flow that created the Transaction.
	FlowDetails *TreasuryTransactionFlowDetails `json:"flow_details"`
	// Type of the flow that created the Transaction.
	FlowType TreasuryTransactionFlowType `json:"flow_type"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Status of the Transaction.
	Status            TreasuryTransactionStatus             `json:"status"`
	StatusTransitions *TreasuryTransactionStatusTransitions `json:"status_transitions"`
}

Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance.

func (*TreasuryTransaction) UnmarshalJSON

func (t *TreasuryTransaction) UnmarshalJSON(data []byte) error

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

type TreasuryTransactionBalanceImpact

type TreasuryTransactionBalanceImpact struct {
	// The change made to funds the user can spend right now.
	Cash int64 `json:"cash"`
	// The change made to funds that are not spendable yet, but will become available at a later time.
	InboundPending int64 `json:"inbound_pending"`
	// The change made to funds in the account, but not spendable because they are being held for pending outbound flows.
	OutboundPending int64 `json:"outbound_pending"`
}

Change to a FinancialAccount's balance

type TreasuryTransactionEntry

type TreasuryTransactionEntry struct {
	APIResource
	// Change to a FinancialAccount's balance
	BalanceImpact *TreasuryTransactionEntryBalanceImpact `json:"balance_impact"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
	Currency Currency `json:"currency"`
	// When the TransactionEntry will impact the FinancialAccount's balance.
	EffectiveAt int64 `json:"effective_at"`
	// The FinancialAccount associated with this object.
	FinancialAccount string `json:"financial_account"`
	// Token of the flow associated with the TransactionEntry.
	Flow string `json:"flow"`
	// Details of the flow associated with the TransactionEntry.
	FlowDetails *TreasuryTransactionEntryFlowDetails `json:"flow_details"`
	// Type of the flow associated with the TransactionEntry.
	FlowType TreasuryTransactionEntryFlowType `json:"flow_type"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The Transaction associated with this object.
	Transaction *TreasuryTransaction `json:"transaction"`
	// The specific money movement that generated the TransactionEntry.
	Type TreasuryTransactionEntryType `json:"type"`
}

TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions).

type TreasuryTransactionEntryBalanceImpact

type TreasuryTransactionEntryBalanceImpact struct {
	// The change made to funds the user can spend right now.
	Cash int64 `json:"cash"`
	// The change made to funds that are not spendable yet, but will become available at a later time.
	InboundPending int64 `json:"inbound_pending"`
	// The change made to funds in the account, but not spendable because they are being held for pending outbound flows.
	OutboundPending int64 `json:"outbound_pending"`
}

Change to a FinancialAccount's balance

type TreasuryTransactionEntryFlowDetails

type TreasuryTransactionEntryFlowDetails struct {
	// You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
	CreditReversal *TreasuryCreditReversal `json:"credit_reversal"`
	// You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
	DebitReversal *TreasuryDebitReversal `json:"debit_reversal"`
	// Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
	InboundTransfer *TreasuryInboundTransfer `json:"inbound_transfer"`
	// When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
	// object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
	// purchase to be completed successfully.
	//
	// Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).
	IssuingAuthorization *IssuingAuthorization `json:"issuing_authorization"`
	// Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
	//
	// Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
	OutboundPayment *TreasuryOutboundPayment `json:"outbound_payment"`
	// Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
	//
	// Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
	OutboundTransfer *TreasuryOutboundTransfer `json:"outbound_transfer"`
	// ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
	ReceivedCredit *TreasuryReceivedCredit `json:"received_credit"`
	// ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
	ReceivedDebit *TreasuryReceivedDebit `json:"received_debit"`
	// Type of the flow that created the Transaction. Set to the same value as `flow_type`.
	Type TreasuryTransactionEntryFlowDetailsType `json:"type"`
}

Details of the flow associated with the TransactionEntry.

type TreasuryTransactionEntryFlowDetailsType

type TreasuryTransactionEntryFlowDetailsType string

Type of the flow that created the Transaction. Set to the same value as `flow_type`.

const (
	TreasuryTransactionEntryFlowDetailsTypeCreditReversal       TreasuryTransactionEntryFlowDetailsType = "credit_reversal"
	TreasuryTransactionEntryFlowDetailsTypeDebitReversal        TreasuryTransactionEntryFlowDetailsType = "debit_reversal"
	TreasuryTransactionEntryFlowDetailsTypeInboundTransfer      TreasuryTransactionEntryFlowDetailsType = "inbound_transfer"
	TreasuryTransactionEntryFlowDetailsTypeIssuingAuthorization TreasuryTransactionEntryFlowDetailsType = "issuing_authorization"
	TreasuryTransactionEntryFlowDetailsTypeOther                TreasuryTransactionEntryFlowDetailsType = "other"
	TreasuryTransactionEntryFlowDetailsTypeOutboundPayment      TreasuryTransactionEntryFlowDetailsType = "outbound_payment"
	TreasuryTransactionEntryFlowDetailsTypeOutboundTransfer     TreasuryTransactionEntryFlowDetailsType = "outbound_transfer"
	TreasuryTransactionEntryFlowDetailsTypeReceivedCredit       TreasuryTransactionEntryFlowDetailsType = "received_credit"
	TreasuryTransactionEntryFlowDetailsTypeReceivedDebit        TreasuryTransactionEntryFlowDetailsType = "received_debit"
)

List of values that TreasuryTransactionEntryFlowDetailsType can take

type TreasuryTransactionEntryFlowType

type TreasuryTransactionEntryFlowType string

Type of the flow associated with the TransactionEntry.

const (
	TreasuryTransactionEntryFlowTypeCreditReversal       TreasuryTransactionEntryFlowType = "credit_reversal"
	TreasuryTransactionEntryFlowTypeDebitReversal        TreasuryTransactionEntryFlowType = "debit_reversal"
	TreasuryTransactionEntryFlowTypeInboundTransfer      TreasuryTransactionEntryFlowType = "inbound_transfer"
	TreasuryTransactionEntryFlowTypeIssuingAuthorization TreasuryTransactionEntryFlowType = "issuing_authorization"
	TreasuryTransactionEntryFlowTypeOther                TreasuryTransactionEntryFlowType = "other"
	TreasuryTransactionEntryFlowTypeOutboundPayment      TreasuryTransactionEntryFlowType = "outbound_payment"
	TreasuryTransactionEntryFlowTypeOutboundTransfer     TreasuryTransactionEntryFlowType = "outbound_transfer"
	TreasuryTransactionEntryFlowTypeReceivedCredit       TreasuryTransactionEntryFlowType = "received_credit"
	TreasuryTransactionEntryFlowTypeReceivedDebit        TreasuryTransactionEntryFlowType = "received_debit"
)

List of values that TreasuryTransactionEntryFlowType can take

type TreasuryTransactionEntryList

type TreasuryTransactionEntryList struct {
	APIResource
	ListMeta
	Data []*TreasuryTransactionEntry `json:"data"`
}

TreasuryTransactionEntryList is a list of TransactionEntries as retrieved from a list endpoint.

type TreasuryTransactionEntryListParams

type TreasuryTransactionEntryListParams struct {
	ListParams       `form:"*"`
	Created          *int64            `form:"created"`
	CreatedRange     *RangeQueryParams `form:"created"`
	EffectiveAt      *int64            `form:"effective_at"`
	EffectiveAtRange *RangeQueryParams `form:"effective_at"`
	// Returns objects associated with this FinancialAccount.
	FinancialAccount *string `form:"financial_account"`
	// The results are in reverse chronological order by `created` or `effective_at`. The default is `created`.
	OrderBy *string `form:"order_by"`
	// Only return TransactionEntries associated with this Transaction.
	Transaction *string `form:"transaction"`
}

Retrieves a list of TransactionEntry objects.

type TreasuryTransactionEntryParams

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

Retrieves a TransactionEntry object.

type TreasuryTransactionEntryType

type TreasuryTransactionEntryType string

The specific money movement that generated the TransactionEntry.

const (
	TreasuryTransactionEntryTypeCreditReversal               TreasuryTransactionEntryType = "credit_reversal"
	TreasuryTransactionEntryTypeCreditReversalPosting        TreasuryTransactionEntryType = "credit_reversal_posting"
	TreasuryTransactionEntryTypeDebitReversal                TreasuryTransactionEntryType = "debit_reversal"
	TreasuryTransactionEntryTypeInboundTransfer              TreasuryTransactionEntryType = "inbound_transfer"
	TreasuryTransactionEntryTypeInboundTransferReturn        TreasuryTransactionEntryType = "inbound_transfer_return"
	TreasuryTransactionEntryTypeIssuingAuthorizationHold     TreasuryTransactionEntryType = "issuing_authorization_hold"
	TreasuryTransactionEntryTypeIssuingAuthorizationRelease  TreasuryTransactionEntryType = "issuing_authorization_release"
	TreasuryTransactionEntryTypeOther                        TreasuryTransactionEntryType = "other"
	TreasuryTransactionEntryTypeOutboundPayment              TreasuryTransactionEntryType = "outbound_payment"
	TreasuryTransactionEntryTypeOutboundPaymentCancellation  TreasuryTransactionEntryType = "outbound_payment_cancellation"
	TreasuryTransactionEntryTypeOutboundPaymentFailure       TreasuryTransactionEntryType = "outbound_payment_failure"
	TreasuryTransactionEntryTypeOutboundPaymentPosting       TreasuryTransactionEntryType = "outbound_payment_posting"
	TreasuryTransactionEntryTypeOutboundPaymentReturn        TreasuryTransactionEntryType = "outbound_payment_return"
	TreasuryTransactionEntryTypeOutboundTransfer             TreasuryTransactionEntryType = "outbound_transfer"
	TreasuryTransactionEntryTypeOutboundTransferCancellation TreasuryTransactionEntryType = "outbound_transfer_cancellation"
	TreasuryTransactionEntryTypeOutboundTransferFailure      TreasuryTransactionEntryType = "outbound_transfer_failure"
	TreasuryTransactionEntryTypeOutboundTransferPosting      TreasuryTransactionEntryType = "outbound_transfer_posting"
	TreasuryTransactionEntryTypeOutboundTransferReturn       TreasuryTransactionEntryType = "outbound_transfer_return"
	TreasuryTransactionEntryTypeReceivedCredit               TreasuryTransactionEntryType = "received_credit"
	TreasuryTransactionEntryTypeReceivedDebit                TreasuryTransactionEntryType = "received_debit"
)

List of values that TreasuryTransactionEntryType can take

type TreasuryTransactionFlowDetails

type TreasuryTransactionFlowDetails struct {
	// You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
	CreditReversal *TreasuryCreditReversal `json:"credit_reversal"`
	// You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
	DebitReversal *TreasuryDebitReversal `json:"debit_reversal"`
	// Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
	InboundTransfer *TreasuryInboundTransfer `json:"inbound_transfer"`
	// When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization`
	// object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the
	// purchase to be completed successfully.
	//
	// Related guide: [Issued Card Authorizations](https://stripe.com/docs/issuing/purchases/authorizations).
	IssuingAuthorization *IssuingAuthorization `json:"issuing_authorization"`
	// Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
	//
	// Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
	OutboundPayment *TreasuryOutboundPayment `json:"outbound_payment"`
	// Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
	//
	// Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
	OutboundTransfer *TreasuryOutboundTransfer `json:"outbound_transfer"`
	// ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.
	ReceivedCredit *TreasuryReceivedCredit `json:"received_credit"`
	// ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.
	ReceivedDebit *TreasuryReceivedDebit `json:"received_debit"`
	// Type of the flow that created the Transaction. Set to the same value as `flow_type`.
	Type TreasuryTransactionFlowDetailsType `json:"type"`
}

Details of the flow that created the Transaction.

type TreasuryTransactionFlowDetailsType

type TreasuryTransactionFlowDetailsType string

Type of the flow that created the Transaction. Set to the same value as `flow_type`.

const (
	TreasuryTransactionFlowDetailsTypeCreditReversal       TreasuryTransactionFlowDetailsType = "credit_reversal"
	TreasuryTransactionFlowDetailsTypeDebitReversal        TreasuryTransactionFlowDetailsType = "debit_reversal"
	TreasuryTransactionFlowDetailsTypeInboundTransfer      TreasuryTransactionFlowDetailsType = "inbound_transfer"
	TreasuryTransactionFlowDetailsTypeIssuingAuthorization TreasuryTransactionFlowDetailsType = "issuing_authorization"
	TreasuryTransactionFlowDetailsTypeOther                TreasuryTransactionFlowDetailsType = "other"
	TreasuryTransactionFlowDetailsTypeOutboundPayment      TreasuryTransactionFlowDetailsType = "outbound_payment"
	TreasuryTransactionFlowDetailsTypeOutboundTransfer     TreasuryTransactionFlowDetailsType = "outbound_transfer"
	TreasuryTransactionFlowDetailsTypeReceivedCredit       TreasuryTransactionFlowDetailsType = "received_credit"
	TreasuryTransactionFlowDetailsTypeReceivedDebit        TreasuryTransactionFlowDetailsType = "received_debit"
)

List of values that TreasuryTransactionFlowDetailsType can take

type TreasuryTransactionFlowType

type TreasuryTransactionFlowType string

Type of the flow that created the Transaction.

const (
	TreasuryTransactionFlowTypeCreditReversal       TreasuryTransactionFlowType = "credit_reversal"
	TreasuryTransactionFlowTypeDebitReversal        TreasuryTransactionFlowType = "debit_reversal"
	TreasuryTransactionFlowTypeInboundTransfer      TreasuryTransactionFlowType = "inbound_transfer"
	TreasuryTransactionFlowTypeIssuingAuthorization TreasuryTransactionFlowType = "issuing_authorization"
	TreasuryTransactionFlowTypeOther                TreasuryTransactionFlowType = "other"
	TreasuryTransactionFlowTypeOutboundPayment      TreasuryTransactionFlowType = "outbound_payment"
	TreasuryTransactionFlowTypeOutboundTransfer     TreasuryTransactionFlowType = "outbound_transfer"
	TreasuryTransactionFlowTypeReceivedCredit       TreasuryTransactionFlowType = "received_credit"
	TreasuryTransactionFlowTypeReceivedDebit        TreasuryTransactionFlowType = "received_debit"
)

List of values that TreasuryTransactionFlowType can take

type TreasuryTransactionList

type TreasuryTransactionList struct {
	APIResource
	ListMeta
	Data []*TreasuryTransaction `json:"data"`
}

TreasuryTransactionList is a list of Transactions as retrieved from a list endpoint.

type TreasuryTransactionListParams

type TreasuryTransactionListParams struct {
	ListParams   `form:"*"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
	// Returns objects associated with this FinancialAccount.
	FinancialAccount *string `form:"financial_account"`
	// The results are in reverse chronological order by `created` or `posted_at`. The default is `created`.
	OrderBy *string `form:"order_by"`
	// Only return Transactions that have the given status: `open`, `posted`, or `void`.
	Status *string `form:"status"`
	// A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.
	StatusTransitions *TreasuryTransactionListStatusTransitionsParams `form:"status_transitions"`
}

Retrieves a list of Transaction objects.

type TreasuryTransactionListStatusTransitionsParams

type TreasuryTransactionListStatusTransitionsParams struct {
	// Returns Transactions with `posted_at` within the specified range.
	PostedAt *int64 `form:"posted_at"`
	// Returns Transactions with `posted_at` within the specified range.
	PostedAtRange *RangeQueryParams `form:"posted_at"`
}

A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified.

type TreasuryTransactionParams

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

Retrieves the details of an existing Transaction.

type TreasuryTransactionStatus

type TreasuryTransactionStatus string

Status of the Transaction.

const (
	TreasuryTransactionStatusOpen   TreasuryTransactionStatus = "open"
	TreasuryTransactionStatusPosted TreasuryTransactionStatus = "posted"
	TreasuryTransactionStatusVoid   TreasuryTransactionStatus = "void"
)

List of values that TreasuryTransactionStatus can take

type TreasuryTransactionStatusTransitions

type TreasuryTransactionStatusTransitions struct {
	// Timestamp describing when the Transaction changed status to `posted`.
	PostedAt int64 `json:"posted_at"`
	// Timestamp describing when the Transaction changed status to `void`.
	VoidAt int64 `json:"void_at"`
}

type UsageRecord

type UsageRecord struct {
	APIResource
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The usage quantity for the specified date.
	Quantity int64 `json:"quantity"`
	// The ID of the subscription item this usage record contains data for.
	SubscriptionItem string `json:"subscription_item"`
	// The timestamp when this usage occurred.
	Timestamp int64 `json:"timestamp"`
}

Usage records allow you to report customer usage and metrics to Stripe for metered billing of subscription prices.

Related guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing).

type UsageRecordParams

type UsageRecordParams struct {
	Params           `form:"*"`
	SubscriptionItem *string `form:"-"` // Included in URL
	// Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value.
	Action *string `form:"action"`
	// The usage quantity for the specified timestamp.
	Quantity *int64 `form:"quantity"`
	// The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided.
	Timestamp    *int64 `form:"timestamp"`
	TimestampNow *bool  `form:"-"` // See custom AppendTo
}

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the [metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing) plan, Stripe helps you send accurate invoices to your customers.

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan's aggregate_usage [parameter](https://stripe.com/docs/api/plans/create#create_plan-aggregate_usage). When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

The default pricing model for metered billing is [per-unit pricing. For finer granularity, you can configure metered billing to have a <a href="https://stripe.com/docs/billing/subscriptions/tiers">tiered pricing](https://stripe.com/docs/api/plans/object#plan_object-billing_scheme) model.

func (*UsageRecordParams) AppendTo

func (u *UsageRecordParams) AppendTo(body *form.Values, keyParts []string)

AppendTo implements custom encoding logic for UsageRecordParams.

type UsageRecordSummary

type UsageRecordSummary struct {
	// Unique identifier for the object.
	ID string `json:"id"`
	// The invoice in which this usage period has been billed for.
	Invoice string `json:"invoice"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string  `json:"object"`
	Period *Period `json:"period"`
	// The ID of the subscription item this summary is describing.
	SubscriptionItem string `json:"subscription_item"`
	// The total usage within this usage period.
	TotalUsage int64 `json:"total_usage"`
}

type UsageRecordSummaryList

type UsageRecordSummaryList struct {
	APIResource
	ListMeta
	Data []*UsageRecordSummary `json:"data"`
}

UsageRecordSummaryList is a list of UsageRecordSummaries as retrieved from a list endpoint.

type UsageRecordSummaryListParams

type UsageRecordSummaryListParams struct {
	ListParams       `form:"*"`
	SubscriptionItem *string `form:"-"` // Included in URL
}

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that's been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn't ended yet. Since new usage records can still be added, the returned summary information for the subscription item's ID should be seen as unstable until the subscription billing period ends.

type VerificationFieldsList

type VerificationFieldsList struct {
	AdditionalFields []string `json:"additional"`
	Minimum          []string `json:"minimum"`
}

VerificationFieldsList lists the fields needed for an account verification. For more details see https://stripe.com/docs/api#country_spec_object-verification_fields.

type WebhookEndpoint

type WebhookEndpoint struct {
	APIResource
	// The API version events are rendered as for this webhook endpoint.
	APIVersion string `json:"api_version"`
	// The ID of the associated Connect application.
	Application string `json:"application"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	Deleted bool  `json:"deleted"`
	// An optional description of what the webhook is used for.
	Description string `json:"description"`
	// The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.
	EnabledEvents []string `json:"enabled_events"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
	Livemode bool `json:"livemode"`
	// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
	Metadata map[string]string `json:"metadata"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation.
	Secret string `json:"secret"`
	// The status of the webhook. It can be `enabled` or `disabled`.
	Status string `json:"status"`
	// The URL of the webhook endpoint.
	URL string `json:"url"`
}

You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be notified about events that happen in your Stripe account or connected accounts.

Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.

Related guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure).

type WebhookEndpointList

type WebhookEndpointList struct {
	APIResource
	ListMeta
	Data []*WebhookEndpoint `json:"data"`
}

WebhookEndpointList is a list of WebhookEndpoints as retrieved from a list endpoint.

type WebhookEndpointListParams

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

Returns a list of your webhook endpoints.

type WebhookEndpointParams

type WebhookEndpointParams struct {
	Params `form:"*"`
	// Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.
	Connect *bool `form:"connect"`
	// An optional description of what the webhook is used for.
	Description *string `form:"description"`
	// Disable the webhook endpoint if set to true.
	Disabled *bool `form:"disabled"`
	// The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
	EnabledEvents []*string `form:"enabled_events"`
	// The URL of the webhook endpoint.
	URL *string `form:"url"`
	// This parameter is only available on creation.
	// We recommend setting the API version that the library is pinned to. See apiversion in stripe.go
	// Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.
	APIVersion *string `form:"api_version"`
}

A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.

Source Files

Directories

Path Synopsis
Package account provides the /accounts APIs
Package account provides the /accounts APIs
Package accountlink provides the /account_links APIs
Package accountlink provides the /account_links APIs
Package applepaydomain provides the /apple_pay/domains APIs
Package applepaydomain provides the /apple_pay/domains APIs
Package applicationfee provides the /application_fees APIs
Package applicationfee provides the /application_fees APIs
apps
secret
Package secret provides the /apps/secrets APIs
Package secret provides the /apps/secrets APIs
Package balance provides the /balance APIs
Package balance provides the /balance APIs
Package balancetransaction provides the /balance_transactions APIs
Package balancetransaction provides the /balance_transactions APIs
Package bankaccount provides the bankaccount related APIs
Package bankaccount provides the bankaccount related APIs
billingportal
configuration
Package configuration provides the /billing_portal/configurations APIs
Package configuration provides the /billing_portal/configurations APIs
session
Package session provides the /billing_portal/sessions APIs
Package session provides the /billing_portal/sessions APIs
Package capability provides the /accounts/{account}/capabilities APIs
Package capability provides the /accounts/{account}/capabilities APIs
Package card provides the card related APIs
Package card provides the card related APIs
Package cashbalance provides the /customers/{customer}/cash_balance APIs
Package cashbalance provides the /customers/{customer}/cash_balance APIs
Package charge provides the /charges APIs
Package charge provides the /charges APIs
checkout
session
Package session provides the /checkout/sessions APIs
Package session provides the /checkout/sessions APIs
Package client provides a Stripe client for invoking APIs across all resources
Package client provides a Stripe client for invoking APIs across all resources
Package countryspec provides the /country_specs APIs
Package countryspec provides the /country_specs APIs
Package coupon provides the /coupons APIs
Package coupon provides the /coupons APIs
Package creditnote provides the /credit_notes APIs
Package creditnote provides the /credit_notes APIs
Package customer provides the /customers APIs
Package customer provides the /customers APIs
Package customerbalancetransaction provides the /customers/{customer}/balance_transactions APIs
Package customerbalancetransaction provides the /customers/{customer}/balance_transactions APIs
Package customercashbalancetransaction provides the /customers/{customer}/cash_balance_transactions APIs
Package customercashbalancetransaction provides the /customers/{customer}/cash_balance_transactions APIs
Package dispute provides the /disputes APIs
Package dispute provides the /disputes APIs
Package ephemeralkey provides the /ephemeral_keys APIs
Package ephemeralkey provides the /ephemeral_keys APIs
Package event provides the /events APIs
Package event provides the /events APIs
Package feerefund provides the /application_fees/{id}/refunds APIs
Package feerefund provides the /application_fees/{id}/refunds APIs
Package file provides the /files APIs
Package file provides the /files APIs
Package filelink provides the /file_links APIs
Package filelink provides the /file_links APIs
financialconnections
account
Package account provides the /financial_connections/accounts APIs
Package account provides the /financial_connections/accounts APIs
session
Package session provides the /financial_connections/sessions APIs
Package session provides the /financial_connections/sessions APIs
identity
verificationreport
Package verificationreport provides the /identity/verification_reports APIs
Package verificationreport provides the /identity/verification_reports APIs
verificationsession
Package verificationsession provides the /identity/verification_sessions APIs
Package verificationsession provides the /identity/verification_sessions APIs
Package invoice provides the /invoices APIs
Package invoice provides the /invoices APIs
Package invoiceitem provides the /invoiceitems APIs
Package invoiceitem provides the /invoiceitems APIs
issuing
authorization
Package authorization provides the /issuing/authorizations APIs
Package authorization provides the /issuing/authorizations APIs
card
Package card provides the /issuing/cards APIs
Package card provides the /issuing/cards APIs
cardholder
Package cardholder provides the /issuing/cardholders APIs For more details, see: https://stripe.com/docs/api/?lang=go#issuing_cardholders
Package cardholder provides the /issuing/cardholders APIs For more details, see: https://stripe.com/docs/api/?lang=go#issuing_cardholders
dispute
Package dispute provides the /issuing/disputes APIs
Package dispute provides the /issuing/disputes APIs
transaction
Package transaction provides the /issuing/transactions APIs
Package transaction provides the /issuing/transactions APIs
Package loginlink provides the /accounts/{account}/login_links APIs
Package loginlink provides the /accounts/{account}/login_links APIs
Package mandate provides the /mandates APIs
Package mandate provides the /mandates APIs
Package oauth provides the OAuth APIs
Package oauth provides the OAuth APIs
Package paymentintent provides the /payment_intents APIs
Package paymentintent provides the /payment_intents APIs
Package paymentlink provides the /payment_links APIs
Package paymentlink provides the /payment_links APIs
Package paymentmethod provides the /payment_methods APIs
Package paymentmethod provides the /payment_methods APIs
Package paymentsource provides the /customers/{customer}/sources APIs
Package paymentsource provides the /customers/{customer}/sources APIs
Package payout provides the /payouts APIs
Package payout provides the /payouts APIs
Package person provides the /accounts/{account}/persons APIs
Package person provides the /accounts/{account}/persons APIs
Package plan provides the /plans APIs
Package plan provides the /plans APIs
Package price provides the /prices APIs
Package price provides the /prices APIs
Package product provides the /products APIs
Package product provides the /products APIs
Package promotioncode provides the /promotion_codes APIs
Package promotioncode provides the /promotion_codes APIs
Package quote provides the /quotes APIs
Package quote provides the /quotes APIs
radar
earlyfraudwarning
Package earlyfraudwarning provides the /radar/early_fraud_warnings APIs
Package earlyfraudwarning provides the /radar/early_fraud_warnings APIs
valuelist
Package valuelist provides the /radar/value_lists APIs
Package valuelist provides the /radar/value_lists APIs
valuelistitem
Package valuelistitem provides the /radar/value_list_items APIs For more details, see: https://stripe.com/docs/api/radar/list_items?lang=go
Package valuelistitem provides the /radar/value_list_items APIs For more details, see: https://stripe.com/docs/api/radar/list_items?lang=go
Package refund provides the /refunds APIs
Package refund provides the /refunds APIs
reporting
reportrun
Package reportrun provides the /reporting/report_runs APIs
Package reportrun provides the /reporting/report_runs APIs
reporttype
Package reporttype provides the /reporting/report_types APIs
Package reporttype provides the /reporting/report_types APIs
Package review provides the /reviews APIs
Package review provides the /reviews APIs
scripts
check_api_clients
A script that tries to make sure that all API clients (structs called `Client`) defined throughout all subpackages are included in the master list as a field on the `client.API` type.
A script that tries to make sure that all API clients (structs called `Client`) defined throughout all subpackages are included in the master list as a field on the `client.API` type.
test_with_stripe_mock
A script that wraps the run of the project test suite and starts stripe-mock with a custom OpenAPI + fixtures bundle if one was found in the appropriate spot (see `pathSpec` below).
A script that wraps the run of the project test suite and starts stripe-mock with a custom OpenAPI + fixtures bundle if one was found in the appropriate spot (see `pathSpec` below).
Package setupattempt provides the /setup_attempts APIs For more details, see: https://stripe.com/docs/api/?lang=go#setup_attempts
Package setupattempt provides the /setup_attempts APIs For more details, see: https://stripe.com/docs/api/?lang=go#setup_attempts
Package setupintent provides the /setup_intents APIs
Package setupintent provides the /setup_intents APIs
Package shippingrate provides the /shipping_rates APIs
Package shippingrate provides the /shipping_rates APIs
sigma
scheduledqueryrun
Package scheduledqueryrun provides the /sigma/scheduled_query_runs APIs For more details, see: https://stripe.com/docs/api#scheduled_queries
Package scheduledqueryrun provides the /sigma/scheduled_query_runs APIs For more details, see: https://stripe.com/docs/api#scheduled_queries
Package sku provides the /skus APIs
Package sku provides the /skus APIs
Package source provides the /sources APIs
Package source provides the /sources APIs
Package sourcetransaction provides the TODO APIs
Package sourcetransaction provides the TODO APIs
Package subscription provides the /subscriptions APIs
Package subscription provides the /subscriptions APIs
Package subscriptionitem provides the /subscription_items APIs
Package subscriptionitem provides the /subscription_items APIs
Package subscriptionschedule provides the /subscription_schedules APIs
Package subscriptionschedule provides the /subscription_schedules APIs
Package taxcode provides the /tax_codes APIs
Package taxcode provides the /tax_codes APIs
Package taxid provides the /customers/{customer}/tax_ids APIs
Package taxid provides the /customers/{customer}/tax_ids APIs
Package taxrate provides the /tax_rates APIs
Package taxrate provides the /tax_rates APIs
terminal
configuration
Package configuration provides the /terminal/configurations APIs
Package configuration provides the /terminal/configurations APIs
connectiontoken
Package connectiontoken provides the /terminal/connection_tokens APIs
Package connectiontoken provides the /terminal/connection_tokens APIs
location
Package location provides the /terminal/locations APIs
Package location provides the /terminal/locations APIs
reader
Package reader provides the /terminal/readers APIs
Package reader provides the /terminal/readers APIs
testhelpers
customer
Package customer provides the /customers APIs
Package customer provides the /customers APIs
issuing/card
Package card provides the /issuing/cards APIs
Package card provides the /issuing/cards APIs
refund
Package refund provides the /refunds APIs
Package refund provides the /refunds APIs
terminal/reader
Package reader provides the /terminal/readers APIs
Package reader provides the /terminal/readers APIs
testclock
Package testclock provides the /test_helpers/test_clocks APIs
Package testclock provides the /test_helpers/test_clocks APIs
treasury/inboundtransfer
Package inboundtransfer provides the /treasury/inbound_transfers APIs
Package inboundtransfer provides the /treasury/inbound_transfers APIs
treasury/outboundpayment
Package outboundpayment provides the /treasury/outbound_payments APIs
Package outboundpayment provides the /treasury/outbound_payments APIs
treasury/outboundtransfer
Package outboundtransfer provides the /treasury/outbound_transfers APIs
Package outboundtransfer provides the /treasury/outbound_transfers APIs
treasury/receivedcredit
Package receivedcredit provides the /treasury/received_credits APIs
Package receivedcredit provides the /treasury/received_credits APIs
treasury/receiveddebit
Package receiveddebit provides the /treasury/received_debits APIs
Package receiveddebit provides the /treasury/received_debits APIs
Package token provides the /tokens APIs
Package token provides the /tokens APIs
Package topup provides the /topups APIs
Package topup provides the /topups APIs
Package transfer provides the /transfers APIs
Package transfer provides the /transfers APIs
Package transferreversal provides the /transfers/{id}/reversals APIs
Package transferreversal provides the /transfers/{id}/reversals APIs
treasury
creditreversal
Package creditreversal provides the /treasury/credit_reversals APIs
Package creditreversal provides the /treasury/credit_reversals APIs
debitreversal
Package debitreversal provides the /treasury/debit_reversals APIs
Package debitreversal provides the /treasury/debit_reversals APIs
financialaccount
Package financialaccount provides the /treasury/financial_accounts APIs
Package financialaccount provides the /treasury/financial_accounts APIs
inboundtransfer
Package inboundtransfer provides the /treasury/inbound_transfers APIs
Package inboundtransfer provides the /treasury/inbound_transfers APIs
outboundpayment
Package outboundpayment provides the /treasury/outbound_payments APIs
Package outboundpayment provides the /treasury/outbound_payments APIs
outboundtransfer
Package outboundtransfer provides the /treasury/outbound_transfers APIs
Package outboundtransfer provides the /treasury/outbound_transfers APIs
receivedcredit
Package receivedcredit provides the /treasury/received_credits APIs
Package receivedcredit provides the /treasury/received_credits APIs
receiveddebit
Package receiveddebit provides the /treasury/received_debits APIs
Package receiveddebit provides the /treasury/received_debits APIs
transaction
Package transaction provides the /treasury/transactions APIs
Package transaction provides the /treasury/transactions APIs
transactionentry
Package transactionentry provides the /treasury/transaction_entries APIs
Package transactionentry provides the /treasury/transaction_entries APIs
Package usagerecord provides the /subscription_items/{subscription_item}/usage_records APIs
Package usagerecord provides the /subscription_items/{subscription_item}/usage_records APIs
Package usagerecordsummary provides the /subscription_items/{subscription_item}/usage_record_summaries APIs
Package usagerecordsummary provides the /subscription_items/{subscription_item}/usage_record_summaries APIs
Package webhookendpoint provides the /webhook_endpoints APIs
Package webhookendpoint provides the /webhook_endpoints APIs

Jump to

Keyboard shortcuts

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