stripe

package module
v81.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 26 Imported by: 74

README

Go Stripe

Go Reference Build Status

The official Stripe Go client library.

Requirements

  • Go 1.15 or later

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/v81"
	"github.com/stripe/stripe-go/v81/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/v81

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/v81"
	"github.com/stripe/stripe-go/v81/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/v81"
	"github.com/stripe/stripe-go/v81/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/v81"
	"github.com/stripe/stripe-go/v81/$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/v81"
	"github.com/stripe/stripe-go/v81/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/v81"
	"github.com/stripe/stripe-go/v81/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 := webhook.GenerateTestSignedPayload(&webhook.UnsignedPayload{Payload: payloadBytes, Secret: testSecret})
event, err := webhook.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.

Telemetry

By default, the library sends telemetry to Stripe regarding request latency and feature usage. These numbers help Stripe improve the overall latency of its API for all users, and improve popular features.

You can disable this behavior if you prefer:

config := &stripe.BackendConfig{
	EnableTelemetry: stripe.Bool(false),
}
Mocking clients for unit tests

To mock a Stripe client for a unit tests using GoMock:

  1. Generate a Backend type mock.
mockgen -destination=mocks/backend.go -package=mocks github.com/stripe/stripe-go/v81 Backend
  1. Use the Backend mock to initialize and call methods on the client.

import (
	"example/hello/mocks"
	"testing"

	"github.com/golang/mock/gomock"
	"github.com/stretchr/testify/assert"
	"github.com/stripe/stripe-go/v81"
	"github.com/stripe/stripe-go/v81/account"
)

func UseMockedStripeClient(t *testing.T) {
	// Create a mock controller
	mockCtrl := gomock.NewController(t)
	defer mockCtrl.Finish()
	// Create a mock stripe backend
	mockBackend := mocks.NewMockBackend(mockCtrl)
	client := account.Client{B: mockBackend, Key: "key_123"}

	// Set up a mock call
	mockBackend.EXPECT().Call("GET", "/v1/accounts/acc_123", gomock.Any(), gomock.Any(), gomock.Any()).
		// Return nil error
		Return(nil).
		Do(func(method string, path string, key string, params stripe.ParamsContainer, v *stripe.Account) {
			// Set the return value for the method
			*v = stripe.Account{
				ID: "acc_123",
			}
		}).Times(1)

	// Call the client method
	acc, _ := client.GetByID("acc_123", nil)

	// Asset the result
	assert.Equal(t, acc.ID, "acc_123")
}
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/v81@beta

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, set the stripe.APIVersion field using the stripe.AddBetaVersion function to set it:

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

stripe.AddBetaVersion("feature_beta", "v3")
Custom Request

If you would like to send a request to an API that is:

  • not yet supported in stripe-go (like any /v2/... endpoints), or
  • undocumented (like a private beta), or
  • public, but you prefer to bypass the method definitions in the library and specify your request details directly

You can use the rawrequest package:

import (
	"encoding/json"
	"fmt"

	"github.com/stripe/stripe-go/v81"
	"github.com/stripe/stripe-go/v81/form"
	"github.com/stripe/stripe-go/v81/rawrequest"
)

func make_raw_request() error {
	stripe.Key = "sk_test_123"

	b, err := stripe.GetRawRequestBackend(stripe.APIBackend)
	if err != nil {
		return err
	}

	client := rawrequest.Client{B: b, Key: apiKey}

	payload := map[string]interface{}{
		"event_name": "hotdogs_eaten",
		"payload": map[string]string{
			"value":              "123",
			"stripe_customer_id": "cus_Quq8itmW58RMet",
		},
	}

	// for a v2 request, json encode the payload
	body, err := json.Marshal(payload)
	if err != nil {
		return err
	}

	v2_resp, err := client.RawRequest(http.MethodPost, "/v2/billing/meter_events", string(body), nil)
	if err != nil {
		return err
	}

	var v2_response map[string]interface{}
	err = json.Unmarshal(v2_resp.RawJSON, &v2_response)
	if err != nil {
		return err
	}
	fmt.Printf("%#v\n", v2_response)

	// for a v1 request, form encode the payload
	formValues := &form.Values{}
	form.AppendTo(formValues, payload)
	content := formValues.Encode()

	v1_resp, err := client.RawRequest(http.MethodPost, "/v1/billing/meter_events", content, nil)
	if err != nil {
		return err
	}

	var v1_response map[string]interface{}
	err = json.Unmarshal(v1_resp.RawJSON, &v1_response)
	if err != nil {
		return err
	}
	fmt.Printf("%#v\n", v1_response)

	return nil
}

See more examples in the /example/v2 folder.

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 just test succeeds.

Other contribution guidelines for this project

Test

We use just for conveniently running development tasks. You can use them directly, or copy the commands out of the justfile. To our help docs, run just.

This package 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:

just test
# or: go test ./...

Run tests for one package:

just test ./invoice
# or: go test ./invoice

Run a single test:

just test ./invoice -run TestInvoiceGet
# or: 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

	MeterEventsBackend SupportedBackend = "meterevents"

	MeterEventsURL = "https://meter-events.stripe.com"

	// 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 APIMode

type APIMode string
var V1APIMode APIMode = "v1"
var V2APIMode APIMode = "v2"

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
	// contains filtered or unexported fields
}

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

func RawRequest

func RawRequest(method, path string, content string, params *RawParams) (*APIResponse, error)

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. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
	BusinessType AccountBusinessType  `json:"business_type"`
	Capabilities *AccountCapabilities `json:"capabilities"`
	// Whether the account can process 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. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](https://stripe.com/connect/onboarding) to finish submitting account details.
	DetailsSubmitted bool `json:"details_submitted"`
	// An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform.
	Email string `json:"email"`
	// External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true.
	ExternalAccounts   *AccountExternalAccountList `json:"external_accounts"`
	FutureRequirements *AccountFutureRequirements  `json:"future_requirements"`
	// The groups associated with the account.
	Groups *AccountGroups `json:"groups"`
	// 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 person for an account where [account.controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.
	//
	// See the [Standard onboarding](https://stripe.com/connect/standard-accounts) or [Express onboarding](https://stripe.com/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](https://stripe.com/connect/handling-api-verification#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 the funds in this account can be paid out.
	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`, `custom`, or `none`.
	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 requirements or if the account is enabled to make live charges or receive payouts.

For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, the properties below are always returned.

For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, some properties are only returned until you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions) to start Connect Onboarding. Learn about the [differences between accounts](https://stripe.com/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 applicant's gross annual revenue for its preceding fiscal year.
	AnnualRevenue *AccountBusinessProfileAnnualRevenue `json:"annual_revenue"`
	// An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
	EstimatedWorkerCount int64 `json:"estimated_worker_count"`
	// [The merchant category code for the account](https://stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
	MCC                     string                                         `json:"mcc"`
	MonthlyEstimatedRevenue *AccountBusinessProfileMonthlyEstimatedRevenue `json:"monthly_estimated_revenue"`
	// 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 AccountBusinessProfileAnnualRevenue

type AccountBusinessProfileAnnualRevenue struct {
	// A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/currencies#zero-decimal).
	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 close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
	FiscalYearEnd string `json:"fiscal_year_end"`
}

The applicant's gross annual revenue for its preceding fiscal year.

type AccountBusinessProfileAnnualRevenueParams

type AccountBusinessProfileAnnualRevenueParams struct {
	// A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/currencies#zero-decimal).
	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 close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023.
	FiscalYearEnd *string `form:"fiscal_year_end"`
}

The applicant's gross annual revenue for its preceding fiscal year.

type AccountBusinessProfileMonthlyEstimatedRevenue

type AccountBusinessProfileMonthlyEstimatedRevenue struct {
	// A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/currencies#zero-decimal).
	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"`
}

type AccountBusinessProfileMonthlyEstimatedRevenueParams

type AccountBusinessProfileMonthlyEstimatedRevenueParams struct {
	// A non-negative integer representing how much to charge in the [smallest currency unit](https://stripe.com/currencies#zero-decimal).
	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 estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.

type AccountBusinessProfileParams

type AccountBusinessProfileParams struct {
	// The applicant's gross annual revenue for its preceding fiscal year.
	AnnualRevenue *AccountBusinessProfileAnnualRevenueParams `form:"annual_revenue"`
	// An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
	EstimatedWorkerCount *int64 `form:"estimated_worker_count"`
	// [The merchant category code for the account](https://stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
	MCC *string `form:"mcc"`
	// An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
	MonthlyEstimatedRevenue *AccountBusinessProfileMonthlyEstimatedRevenueParams `form:"monthly_estimated_revenue"`
	// 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. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.

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 Alma capability of the account, or whether the account can directly process Alma payments.
	AlmaPayments AccountCapabilityStatus `json:"alma_payments"`
	// The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments.
	AmazonPayPayments AccountCapabilityStatus `json:"amazon_pay_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 Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments.
	CashAppPayments AccountCapabilityStatus `json:"cashapp_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 GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges.
	GBBankTransferPayments AccountCapabilityStatus `json:"gb_bank_transfer_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 india_international_payments capability of the account, or whether the account can process international charges (non INR) in India.
	IndiaInternationalPayments AccountCapabilityStatus `json:"india_international_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 Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges.
	JPBankTransferPayments AccountCapabilityStatus `json:"jp_bank_transfer_payments"`
	// The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments.
	KakaoPayPayments AccountCapabilityStatus `json:"kakao_pay_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 KrCard capability of the account, or whether the account can directly process KrCard payments.
	KrCardPayments AccountCapabilityStatus `json:"kr_card_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 MobilePay capability of the account, or whether the account can directly process MobilePay charges.
	MobilepayPayments AccountCapabilityStatus `json:"mobilepay_payments"`
	// The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges.
	MultibancoPayments AccountCapabilityStatus `json:"multibanco_payments"`
	// The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges.
	MXBankTransferPayments AccountCapabilityStatus `json:"mx_bank_transfer_payments"`
	// The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments.
	NaverPayPayments AccountCapabilityStatus `json:"naver_pay_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 pay_by_bank payments capability of the account, or whether the account can directly process pay_by_bank charges.
	PayByBankPayments AccountCapabilityStatus `json:"pay_by_bank_payments"`
	// The status of the Payco capability of the account, or whether the account can directly process Payco payments.
	PaycoPayments AccountCapabilityStatus `json:"payco_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 RevolutPay capability of the account, or whether the account can directly process RevolutPay payments.
	RevolutPayPayments AccountCapabilityStatus `json:"revolut_pay_payments"`
	// The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments.
	SamsungPayPayments AccountCapabilityStatus `json:"samsung_pay_payments"`
	// The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges.
	SEPABankTransferPayments AccountCapabilityStatus `json:"sepa_bank_transfer_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 Swish capability of the account, or whether the account can directly process Swish payments.
	SwishPayments AccountCapabilityStatus `json:"swish_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 TWINT capability of the account, or whether the account can directly process TWINT charges.
	TWINTPayments AccountCapabilityStatus `json:"twint_payments"`
	// 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"`
	// The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges.
	USBankTransferPayments AccountCapabilityStatus `json:"us_bank_transfer_payments"`
	// The status of the Zip capability of the account, or whether the account can directly process Zip charges.
	ZipPayments AccountCapabilityStatus `json:"zip_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 AccountCapabilitiesAlmaPaymentsParams

type AccountCapabilitiesAlmaPaymentsParams 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 alma_payments capability.

type AccountCapabilitiesAmazonPayPaymentsParams

type AccountCapabilitiesAmazonPayPaymentsParams 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 amazon_pay_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 AccountCapabilitiesCashAppPaymentsParams

type AccountCapabilitiesCashAppPaymentsParams 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 cashapp_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 AccountCapabilitiesGBBankTransferPaymentsParams

type AccountCapabilitiesGBBankTransferPaymentsParams 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 gb_bank_transfer_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 AccountCapabilitiesIndiaInternationalPaymentsParams

type AccountCapabilitiesIndiaInternationalPaymentsParams 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 india_international_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 AccountCapabilitiesJPBankTransferPaymentsParams

type AccountCapabilitiesJPBankTransferPaymentsParams 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 jp_bank_transfer_payments capability.

type AccountCapabilitiesKakaoPayPaymentsParams

type AccountCapabilitiesKakaoPayPaymentsParams 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 kakao_pay_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 AccountCapabilitiesKrCardPaymentsParams

type AccountCapabilitiesKrCardPaymentsParams 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 kr_card_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 AccountCapabilitiesMXBankTransferPaymentsParams

type AccountCapabilitiesMXBankTransferPaymentsParams 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 mx_bank_transfer_payments capability.

type AccountCapabilitiesMobilepayPaymentsParams

type AccountCapabilitiesMobilepayPaymentsParams 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 mobilepay_payments capability.

type AccountCapabilitiesMultibancoPaymentsParams

type AccountCapabilitiesMultibancoPaymentsParams 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 multibanco_payments capability.

type AccountCapabilitiesNaverPayPaymentsParams

type AccountCapabilitiesNaverPayPaymentsParams 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 naver_pay_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 alma_payments capability.
	AlmaPayments *AccountCapabilitiesAlmaPaymentsParams `form:"alma_payments"`
	// The amazon_pay_payments capability.
	AmazonPayPayments *AccountCapabilitiesAmazonPayPaymentsParams `form:"amazon_pay_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 cashapp_payments capability.
	CashAppPayments *AccountCapabilitiesCashAppPaymentsParams `form:"cashapp_payments"`
	// The eps_payments capability.
	EPSPayments *AccountCapabilitiesEPSPaymentsParams `form:"eps_payments"`
	// The fpx_payments capability.
	FPXPayments *AccountCapabilitiesFPXPaymentsParams `form:"fpx_payments"`
	// The gb_bank_transfer_payments capability.
	GBBankTransferPayments *AccountCapabilitiesGBBankTransferPaymentsParams `form:"gb_bank_transfer_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 india_international_payments capability.
	IndiaInternationalPayments *AccountCapabilitiesIndiaInternationalPaymentsParams `form:"india_international_payments"`
	// The jcb_payments capability.
	JCBPayments *AccountCapabilitiesJCBPaymentsParams `form:"jcb_payments"`
	// The jp_bank_transfer_payments capability.
	JPBankTransferPayments *AccountCapabilitiesJPBankTransferPaymentsParams `form:"jp_bank_transfer_payments"`
	// The kakao_pay_payments capability.
	KakaoPayPayments *AccountCapabilitiesKakaoPayPaymentsParams `form:"kakao_pay_payments"`
	// The klarna_payments capability.
	KlarnaPayments *AccountCapabilitiesKlarnaPaymentsParams `form:"klarna_payments"`
	// The konbini_payments capability.
	KonbiniPayments *AccountCapabilitiesKonbiniPaymentsParams `form:"konbini_payments"`
	// The kr_card_payments capability.
	KrCardPayments *AccountCapabilitiesKrCardPaymentsParams `form:"kr_card_payments"`
	// The legacy_payments capability.
	LegacyPayments *AccountCapabilitiesLegacyPaymentsParams `form:"legacy_payments"`
	// The link_payments capability.
	LinkPayments *AccountCapabilitiesLinkPaymentsParams `form:"link_payments"`
	// The mobilepay_payments capability.
	MobilepayPayments *AccountCapabilitiesMobilepayPaymentsParams `form:"mobilepay_payments"`
	// The multibanco_payments capability.
	MultibancoPayments *AccountCapabilitiesMultibancoPaymentsParams `form:"multibanco_payments"`
	// The mx_bank_transfer_payments capability.
	MXBankTransferPayments *AccountCapabilitiesMXBankTransferPaymentsParams `form:"mx_bank_transfer_payments"`
	// The naver_pay_payments capability.
	NaverPayPayments *AccountCapabilitiesNaverPayPaymentsParams `form:"naver_pay_payments"`
	// The oxxo_payments capability.
	OXXOPayments *AccountCapabilitiesOXXOPaymentsParams `form:"oxxo_payments"`
	// The p24_payments capability.
	P24Payments *AccountCapabilitiesP24PaymentsParams `form:"p24_payments"`
	// The pay_by_bank_payments capability.
	PayByBankPayments *AccountCapabilitiesPayByBankPaymentsParams `form:"pay_by_bank_payments"`
	// The payco_payments capability.
	PaycoPayments *AccountCapabilitiesPaycoPaymentsParams `form:"payco_payments"`
	// The paynow_payments capability.
	PayNowPayments *AccountCapabilitiesPayNowPaymentsParams `form:"paynow_payments"`
	// The promptpay_payments capability.
	PromptPayPayments *AccountCapabilitiesPromptPayPaymentsParams `form:"promptpay_payments"`
	// The revolut_pay_payments capability.
	RevolutPayPayments *AccountCapabilitiesRevolutPayPaymentsParams `form:"revolut_pay_payments"`
	// The samsung_pay_payments capability.
	SamsungPayPayments *AccountCapabilitiesSamsungPayPaymentsParams `form:"samsung_pay_payments"`
	// The sepa_bank_transfer_payments capability.
	SEPABankTransferPayments *AccountCapabilitiesSEPABankTransferPaymentsParams `form:"sepa_bank_transfer_payments"`
	// The sepa_debit_payments capability.
	SEPADebitPayments *AccountCapabilitiesSEPADebitPaymentsParams `form:"sepa_debit_payments"`
	// The sofort_payments capability.
	SofortPayments *AccountCapabilitiesSofortPaymentsParams `form:"sofort_payments"`
	// The swish_payments capability.
	SwishPayments *AccountCapabilitiesSwishPaymentsParams `form:"swish_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 twint_payments capability.
	TWINTPayments *AccountCapabilitiesTWINTPaymentsParams `form:"twint_payments"`
	// The us_bank_account_ach_payments capability.
	USBankAccountACHPayments *AccountCapabilitiesUSBankAccountACHPaymentsParams `form:"us_bank_account_ach_payments"`
	// The us_bank_transfer_payments capability.
	USBankTransferPayments *AccountCapabilitiesUSBankTransferPaymentsParams `form:"us_bank_transfer_payments"`
	// The zip_payments capability.
	ZipPayments *AccountCapabilitiesZipPaymentsParams `form:"zip_payments"`
}

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

Required when [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/create#create_account-controller-dashboard-type) is `none`, which includes Custom accounts.

type AccountCapabilitiesPayByBankPaymentsParams added in v81.3.0

type AccountCapabilitiesPayByBankPaymentsParams 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 pay_by_bank_payments capability.

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 AccountCapabilitiesPaycoPaymentsParams

type AccountCapabilitiesPaycoPaymentsParams 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 payco_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 AccountCapabilitiesRevolutPayPaymentsParams

type AccountCapabilitiesRevolutPayPaymentsParams 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 revolut_pay_payments capability.

type AccountCapabilitiesSEPABankTransferPaymentsParams

type AccountCapabilitiesSEPABankTransferPaymentsParams 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_bank_transfer_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 AccountCapabilitiesSamsungPayPaymentsParams

type AccountCapabilitiesSamsungPayPaymentsParams 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 samsung_pay_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 AccountCapabilitiesSwishPaymentsParams

type AccountCapabilitiesSwishPaymentsParams 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 swish_payments capability.

type AccountCapabilitiesTWINTPaymentsParams

type AccountCapabilitiesTWINTPaymentsParams 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 twint_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 AccountCapabilitiesUSBankTransferPaymentsParams

type AccountCapabilitiesUSBankTransferPaymentsParams 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_transfer_payments capability.

type AccountCapabilitiesZipPaymentsParams

type AccountCapabilitiesZipPaymentsParams 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 zip_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"`
	// This hash is used to attest that the director information provided to Stripe is both current and correct.
	DirectorshipDeclaration *AccountCompanyDirectorshipDeclaration `json:"directorship_declaration"`
	// 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 export license ID number of the company, also referred as Import Export Code (India only).
	ExportLicenseID string `json:"export_license_id"`
	// The purpose code to use for export transactions (India only).
	ExportPurposeCode string `json:"export_purpose_code"`
	// 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"`
	OwnershipExemptionReason AccountCompanyOwnershipExemptionReason `json:"ownership_exemption_reason"`
	// 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 AccountCompanyDirectorshipDeclaration added in v81.3.0

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

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

type AccountCompanyDirectorshipDeclarationParams added in v81.3.0

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

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

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 AccountCompanyOwnershipExemptionReason added in v81.3.0

type AccountCompanyOwnershipExemptionReason string
const (
	AccountCompanyOwnershipExemptionReasonQualifiedEntityExceedsOwnershipThreshold AccountCompanyOwnershipExemptionReason = "qualified_entity_exceeds_ownership_threshold"
	AccountCompanyOwnershipExemptionReasonQualifiesAsFinancialInstitution          AccountCompanyOwnershipExemptionReason = "qualifies_as_financial_institution"
)

List of values that AccountCompanyOwnershipExemptionReason can take

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"`
	// This hash is used to attest that the directors information provided to Stripe is both current and correct.
	DirectorshipDeclaration *AccountCompanyDirectorshipDeclarationParams `form:"directorship_declaration"`
	// 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/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/api/persons) for accounts with a `relationship.executive` requirement.
	ExecutivesProvided *bool `form:"executives_provided"`
	// The export license ID number of the company, also referred as Import Export Code (India only).
	ExportLicenseID *string `form:"export_license_id"`
	// The purpose code to use for export transactions (India only).
	ExportPurposeCode *string `form:"export_purpose_code"`
	// 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"`
	OwnershipExemptionReason           *string `form:"ownership_exemption_reason"`
	// 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/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/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
	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`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.

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"
	AccountCompanyStructureIncorporatedPartnership            AccountCompanyStructure = "incorporated_partnership"
	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"
	AccountCompanyStructureRegisteredCharity                  AccountCompanyStructure = "registered_charity"
	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"
	AccountCompanyStructureUnincorporatedPartnership          AccountCompanyStructure = "unincorporated_partnership"
)

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"
	AccountCompanyVerificationDocumentDetailsCodeDocumentExpired          AccountCompanyVerificationDocumentDetailsCode = "document_expired"
	AccountCompanyVerificationDocumentDetailsCodeDocumentFailedCopy       AccountCompanyVerificationDocumentDetailsCode = "document_failed_copy"
	AccountCompanyVerificationDocumentDetailsCodeDocumentFailedOther      AccountCompanyVerificationDocumentDetailsCode = "document_failed_other"
	AccountCompanyVerificationDocumentDetailsCodeDocumentFailedTestMode   AccountCompanyVerificationDocumentDetailsCode = "document_failed_test_mode"
	AccountCompanyVerificationDocumentDetailsCodeDocumentFailedGreyscale  AccountCompanyVerificationDocumentDetailsCode = "document_failed_greyscale"
	AccountCompanyVerificationDocumentDetailsCodeDocumentFraudulent       AccountCompanyVerificationDocumentDetailsCode = "document_fraudulent"
	AccountCompanyVerificationDocumentDetailsCodeDocumentInvalid          AccountCompanyVerificationDocumentDetailsCode = "document_invalid"
	AccountCompanyVerificationDocumentDetailsCodeDocumentIncomplete       AccountCompanyVerificationDocumentDetailsCode = "document_incomplete"
	AccountCompanyVerificationDocumentDetailsCodeDocumentManipulated      AccountCompanyVerificationDocumentDetailsCode = "document_manipulated"
	AccountCompanyVerificationDocumentDetailsCodeDocumentNotReadable      AccountCompanyVerificationDocumentDetailsCode = "document_not_readable"
	AccountCompanyVerificationDocumentDetailsCodeDocumentNotUploaded      AccountCompanyVerificationDocumentDetailsCode = "document_not_uploaded"
	AccountCompanyVerificationDocumentDetailsCodeDocumentTooLarge         AccountCompanyVerificationDocumentDetailsCode = "document_too_large"
	AccountCompanyVerificationDocumentDetailsCodeDocumentTypeNotSupported AccountCompanyVerificationDocumentDetailsCode = "document_type_not_supported"
)

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 {
	Fees *AccountControllerFees `json:"fees"`
	// `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"`
	Losses       *AccountControllerLosses `json:"losses"`
	// A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account.
	RequirementCollection AccountControllerRequirementCollection `json:"requirement_collection"`
	StripeDashboard       *AccountControllerStripeDashboard      `json:"stripe_dashboard"`
	// 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 AccountControllerFees

type AccountControllerFees struct {
	// A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
	Payer AccountControllerFeesPayer `json:"payer"`
}

type AccountControllerFeesParams

type AccountControllerFeesParams struct {
	// A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
	Payer *string `form:"payer"`
}

A hash of configuration for who pays Stripe fees for product usage on this account.

type AccountControllerFeesPayer

type AccountControllerFeesPayer string

A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).

const (
	AccountControllerFeesPayerAccount            AccountControllerFeesPayer = "account"
	AccountControllerFeesPayerApplication        AccountControllerFeesPayer = "application"
	AccountControllerFeesPayerApplicationCustom  AccountControllerFeesPayer = "application_custom"
	AccountControllerFeesPayerApplicationExpress AccountControllerFeesPayer = "application_express"
)

List of values that AccountControllerFeesPayer can take

type AccountControllerLosses

type AccountControllerLosses struct {
	// A value indicating who is liable when this account can't pay back negative balances from payments.
	Payments AccountControllerLossesPayments `json:"payments"`
}

type AccountControllerLossesParams

type AccountControllerLossesParams struct {
	// A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`.
	Payments *string `form:"payments"`
}

A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.

type AccountControllerLossesPayments

type AccountControllerLossesPayments string

A value indicating who is liable when this account can't pay back negative balances from payments.

const (
	AccountControllerLossesPaymentsApplication AccountControllerLossesPayments = "application"
	AccountControllerLossesPaymentsStripe      AccountControllerLossesPayments = "stripe"
)

List of values that AccountControllerLossesPayments can take

type AccountControllerParams

type AccountControllerParams struct {
	// A hash of configuration for who pays Stripe fees for product usage on this account.
	Fees *AccountControllerFeesParams `form:"fees"`
	// A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.
	Losses *AccountControllerLossesParams `form:"losses"`
	// A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`.
	RequirementCollection *string `form:"requirement_collection"`
	// A hash of configuration for Stripe-hosted dashboards.
	StripeDashboard *AccountControllerStripeDashboardParams `form:"stripe_dashboard"`
}

A hash of configuration describing the account controller's attributes.

type AccountControllerRequirementCollection

type AccountControllerRequirementCollection string

A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account.

const (
	AccountControllerRequirementCollectionApplication AccountControllerRequirementCollection = "application"
	AccountControllerRequirementCollectionStripe      AccountControllerRequirementCollection = "stripe"
)

List of values that AccountControllerRequirementCollection can take

type AccountControllerStripeDashboard

type AccountControllerStripeDashboard struct {
	// A value indicating the Stripe dashboard this account has access to independent of the Connect application.
	Type AccountControllerStripeDashboardType `json:"type"`
}

type AccountControllerStripeDashboardParams

type AccountControllerStripeDashboardParams struct {
	// Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`.
	Type *string `form:"type"`
}

A hash of configuration for Stripe-hosted dashboards.

type AccountControllerStripeDashboardType

type AccountControllerStripeDashboardType string

A value indicating the Stripe dashboard this account has access to independent of the Connect application.

const (
	AccountControllerStripeDashboardTypeExpress AccountControllerStripeDashboardType = "express"
	AccountControllerStripeDashboardTypeFull    AccountControllerStripeDashboardType = "full"
	AccountControllerStripeDashboardTypeNone    AccountControllerStripeDashboardType = "none"
)

List of values that AccountControllerStripeDashboardType can take

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 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 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"`
	// One or more documents that demonstrate proof of ultimate beneficial ownership.
	ProofOfUltimateBeneficialOwnership *AccountDocumentsProofOfUltimateBeneficialOwnershipParams `form:"proof_of_ultimate_beneficial_ownership"`
}

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 AccountDocumentsProofOfUltimateBeneficialOwnershipParams added in v81.3.0

type AccountDocumentsProofOfUltimateBeneficialOwnershipParams 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 ultimate beneficial ownership.

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) AddMetadata

func (p *AccountExternalAccountParams) AddMetadata(key string, value string)

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

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` becomes 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 an enum for consistency with `requirements.disabled_reason`.
	DisabledReason AccountFutureRequirementsDisabledReason `json:"disabled_reason"`
	// Fields that are `currently_due` and need to be collected again because validation or verification failed.
	Errors []*AccountFutureRequirementsError `json:"errors"`
	// Fields you must collect when all 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 might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending.
	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 AccountFutureRequirementsDisabledReason added in v81.1.0

type AccountFutureRequirementsDisabledReason string

This is typed as an enum for consistency with `requirements.disabled_reason`.

const (
	AccountFutureRequirementsDisabledReasonActionRequiredRequestedCapabilities AccountFutureRequirementsDisabledReason = "action_required.requested_capabilities"
	AccountFutureRequirementsDisabledReasonListed                              AccountFutureRequirementsDisabledReason = "listed"
	AccountFutureRequirementsDisabledReasonOther                               AccountFutureRequirementsDisabledReason = "other"
	AccountFutureRequirementsDisabledReasonPlatformPaused                      AccountFutureRequirementsDisabledReason = "platform_paused"
	AccountFutureRequirementsDisabledReasonRejectedFraud                       AccountFutureRequirementsDisabledReason = "rejected.fraud"
	AccountFutureRequirementsDisabledReasonRejectedIncompleteVerification      AccountFutureRequirementsDisabledReason = "rejected.incomplete_verification"
	AccountFutureRequirementsDisabledReasonRejectedListed                      AccountFutureRequirementsDisabledReason = "rejected.listed"
	AccountFutureRequirementsDisabledReasonRejectedOther                       AccountFutureRequirementsDisabledReason = "rejected.other"
	AccountFutureRequirementsDisabledReasonRejectedPlatformFraud               AccountFutureRequirementsDisabledReason = "rejected.platform_fraud"
	AccountFutureRequirementsDisabledReasonRejectedPlatformOther               AccountFutureRequirementsDisabledReason = "rejected.platform_other"
	AccountFutureRequirementsDisabledReasonRejectedPlatformTermsOfService      AccountFutureRequirementsDisabledReason = "rejected.platform_terms_of_service"
	AccountFutureRequirementsDisabledReasonRejectedTermsOfService              AccountFutureRequirementsDisabledReason = "rejected.terms_of_service"
	AccountFutureRequirementsDisabledReasonRequirementsPastDue                 AccountFutureRequirementsDisabledReason = "requirements.past_due"
	AccountFutureRequirementsDisabledReasonRequirementsPendingVerification     AccountFutureRequirementsDisabledReason = "requirements.pending_verification"
	AccountFutureRequirementsDisabledReasonUnderReview                         AccountFutureRequirementsDisabledReason = "under_review"
)

List of values that AccountFutureRequirementsDisabledReason can take

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 AccountGroups

type AccountGroups struct {
	// The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
	PaymentsPricing string `json:"payments_pricing"`
}

The groups associated with the account.

type AccountGroupsParams

type AccountGroupsParams struct {
	// The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details.
	PaymentsPricing *string `form:"payments_pricing"`
}

A hash of account group type to tokens. These are account groups this account should be added to.

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/custom/hosted-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 AccountLinkCollectionOptionsParams

type AccountLinkCollectionOptionsParams struct {
	// Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`.
	Fields *string `form:"fields"`
	// Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
	FutureRequirements *string `form:"future_requirements"`
}

Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.

type AccountLinkParams

type AccountLinkParams struct {
	Params `form:"*"`
	// The identifier of the account to create an account link for.
	Account *string `form:"account"`
	// The collect parameter is deprecated. Use `collection_options` instead.
	Collect *string `form:"collect"`
	// Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
	CollectionOptions *AccountLinkCollectionOptionsParams `form:"collection_options"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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.

func (*AccountLinkParams) AddExpand

func (p *AccountLinkParams) AddExpand(f string)

AddExpand appends a new field to expand.

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:"*"`
	// Only return connected accounts that were created during the given date interval.
	Created *int64 `form:"created"`
	// Only return connected accounts that were created during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

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.

func (*AccountListParams) AddExpand

func (p *AccountListParams) AddExpand(f string)

AddExpand appends a new field to expand.

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. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
	BusinessType *string `form:"business_type"`
	// Each key of the dictionary represents a capability, and each capability
	// maps to its settings (for example, whether it has been requested or not). Each
	// capability is inactive until you have provided its specific
	// requirements and Stripe has verified them. An account might have some
	// of its requested capabilities be active and some be inactive.
	//
	// Required when [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/create#create_account-controller-dashboard-type)
	// is `none`, which includes Custom accounts.
	Capabilities *AccountCapabilitiesParams `form:"capabilities"`
	// Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
	Company *AccountCompanyParams `form:"company"`
	// A hash of configuration describing the account controller's attributes.
	Controller *AccountControllerParams `form:"controller"`
	// 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://docs.stripe.com/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. If [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
	Email *string `form:"email"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// A card or bank account to attach to the account for receiving [payouts](https://stripe.com/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/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/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/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
	ExternalAccount *AccountExternalAccountParams `form:"external_account"`
	// A hash of account group type to tokens. These are account groups this account should be added to.
	Groups *AccountGroupsParams `form:"groups"`
	// Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
	Individual *PersonParams `form:"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. 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"`
	// 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/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.
	TOSAcceptance *AccountTOSAcceptanceParams `form:"tos_acceptance"`
	// The type of Stripe account to create. May be one of `custom`, `express` or `standard`.
	Type *string `form:"type"`
}

With [Connect](https://stripe.com/connect), you can delete accounts you manage.

Test-mode accounts can be deleted at any time.

Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero.

If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.

func (*AccountParams) AddExpand

func (p *AccountParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*AccountParams) AddMetadata

func (p *AccountParams) AddMetadata(key string, value string)

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

type AccountRejectParams

type AccountRejectParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`.
	Reason *string `form:"reason"`
}

With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.

Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.

func (*AccountRejectParams) AddExpand

func (p *AccountRejectParams) AddExpand(f string)

AddExpand appends a new field to expand.

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 enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
	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 you must collect when all 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 might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
	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 enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).

const (
	AccountRequirementsDisabledReasonActionRequiredRequestedCapabilities AccountRequirementsDisabledReason = "action_required.requested_capabilities"
	AccountRequirementsDisabledReasonListed                              AccountRequirementsDisabledReason = "listed"
	AccountRequirementsDisabledReasonOther                               AccountRequirementsDisabledReason = "other"
	AccountRequirementsDisabledReasonPlatformPaused                      AccountRequirementsDisabledReason = "platform_paused"
	AccountRequirementsDisabledReasonRejectedFraud                       AccountRequirementsDisabledReason = "rejected.fraud"
	AccountRequirementsDisabledReasonRejectedIncompleteVerification      AccountRequirementsDisabledReason = "rejected.incomplete_verification"
	AccountRequirementsDisabledReasonRejectedListed                      AccountRequirementsDisabledReason = "rejected.listed"
	AccountRequirementsDisabledReasonRejectedOther                       AccountRequirementsDisabledReason = "rejected.other"
	AccountRequirementsDisabledReasonRejectedPlatformFraud               AccountRequirementsDisabledReason = "rejected.platform_fraud"
	AccountRequirementsDisabledReasonRejectedPlatformOther               AccountRequirementsDisabledReason = "rejected.platform_other"
	AccountRequirementsDisabledReasonRejectedPlatformTermsOfService      AccountRequirementsDisabledReason = "rejected.platform_terms_of_service"
	AccountRequirementsDisabledReasonRejectedTermsOfService              AccountRequirementsDisabledReason = "rejected.terms_of_service"
	AccountRequirementsDisabledReasonRequirementsPastDue                 AccountRequirementsDisabledReason = "requirements.past_due"
	AccountRequirementsDisabledReasonRequirementsPendingVerification     AccountRequirementsDisabledReason = "requirements.pending_verification"
	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 AccountSession

type AccountSession struct {
	APIResource
	// The ID of the account the AccountSession was created for
	Account string `json:"account"`
	// The client secret of this AccountSession. Used on the client to set up secure access to the given `account`.
	//
	// The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.
	//
	// Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled.
	ClientSecret string                    `json:"client_secret"`
	Components   *AccountSessionComponents `json:"components"`
	// The timestamp at which this AccountSession will expire.
	ExpiresAt int64 `json:"expires_at"`
	// 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"`
}

An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.

We recommend that you create an AccountSession each time you need to display an embedded component to your user. Do not save AccountSessions to your database as they expire relatively quickly, and cannot be used more than once.

Related guide: [Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components)

type AccountSessionComponents

type AccountSessionComponents struct {
	AccountManagement            *AccountSessionComponentsAccountManagement            `json:"account_management"`
	AccountOnboarding            *AccountSessionComponentsAccountOnboarding            `json:"account_onboarding"`
	Balances                     *AccountSessionComponentsBalances                     `json:"balances"`
	Documents                    *AccountSessionComponentsDocuments                    `json:"documents"`
	FinancialAccount             *AccountSessionComponentsFinancialAccount             `json:"financial_account"`
	FinancialAccountTransactions *AccountSessionComponentsFinancialAccountTransactions `json:"financial_account_transactions"`
	IssuingCard                  *AccountSessionComponentsIssuingCard                  `json:"issuing_card"`
	IssuingCardsList             *AccountSessionComponentsIssuingCardsList             `json:"issuing_cards_list"`
	NotificationBanner           *AccountSessionComponentsNotificationBanner           `json:"notification_banner"`
	PaymentDetails               *AccountSessionComponentsPaymentDetails               `json:"payment_details"`
	Payments                     *AccountSessionComponentsPayments                     `json:"payments"`
	Payouts                      *AccountSessionComponentsPayouts                      `json:"payouts"`
	PayoutsList                  *AccountSessionComponentsPayoutsList                  `json:"payouts_list"`
	TaxRegistrations             *AccountSessionComponentsTaxRegistrations             `json:"tax_registrations"`
	TaxSettings                  *AccountSessionComponentsTaxSettings                  `json:"tax_settings"`
}

type AccountSessionComponentsAccountManagement

type AccountSessionComponentsAccountManagement struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                               `json:"enabled"`
	Features *AccountSessionComponentsAccountManagementFeatures `json:"features"`
}

type AccountSessionComponentsAccountManagementFeatures

type AccountSessionComponentsAccountManagementFeatures struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
	// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
	ExternalAccountCollection bool `json:"external_account_collection"`
}

type AccountSessionComponentsAccountManagementFeaturesParams

type AccountSessionComponentsAccountManagementFeaturesParams struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
	// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
	ExternalAccountCollection *bool `form:"external_account_collection"`
}

The list of features enabled in the embedded component.

type AccountSessionComponentsAccountManagementParams

type AccountSessionComponentsAccountManagementParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsAccountManagementFeaturesParams `form:"features"`
}

Configuration for the account management embedded component.

type AccountSessionComponentsAccountOnboarding

type AccountSessionComponentsAccountOnboarding struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                               `json:"enabled"`
	Features *AccountSessionComponentsAccountOnboardingFeatures `json:"features"`
}

type AccountSessionComponentsAccountOnboardingFeatures

type AccountSessionComponentsAccountOnboardingFeatures struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
	// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
	ExternalAccountCollection bool `json:"external_account_collection"`
}

type AccountSessionComponentsAccountOnboardingFeaturesParams

type AccountSessionComponentsAccountOnboardingFeaturesParams struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
	// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
	ExternalAccountCollection *bool `form:"external_account_collection"`
}

The list of features enabled in the embedded component.

type AccountSessionComponentsAccountOnboardingParams

type AccountSessionComponentsAccountOnboardingParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsAccountOnboardingFeaturesParams `form:"features"`
}

Configuration for the account onboarding embedded component.

type AccountSessionComponentsBalances

type AccountSessionComponentsBalances struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                      `json:"enabled"`
	Features *AccountSessionComponentsBalancesFeatures `json:"features"`
}

type AccountSessionComponentsBalancesFeatures

type AccountSessionComponentsBalancesFeatures struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
	// Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	EditPayoutSchedule bool `json:"edit_payout_schedule"`
	// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
	ExternalAccountCollection bool `json:"external_account_collection"`
	// Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	InstantPayouts bool `json:"instant_payouts"`
	// Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	StandardPayouts bool `json:"standard_payouts"`
}

type AccountSessionComponentsBalancesFeaturesParams

type AccountSessionComponentsBalancesFeaturesParams struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
	// Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	EditPayoutSchedule *bool `form:"edit_payout_schedule"`
	// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
	ExternalAccountCollection *bool `form:"external_account_collection"`
	// Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	InstantPayouts *bool `form:"instant_payouts"`
	// Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	StandardPayouts *bool `form:"standard_payouts"`
}

The list of features enabled in the embedded component.

type AccountSessionComponentsBalancesParams

type AccountSessionComponentsBalancesParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsBalancesFeaturesParams `form:"features"`
}

Configuration for the balances embedded component.

type AccountSessionComponentsDocuments

type AccountSessionComponentsDocuments struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                       `json:"enabled"`
	Features *AccountSessionComponentsDocumentsFeatures `json:"features"`
}

type AccountSessionComponentsDocumentsFeatures

type AccountSessionComponentsDocumentsFeatures struct{}

type AccountSessionComponentsDocumentsFeaturesParams

type AccountSessionComponentsDocumentsFeaturesParams struct{}

The list of features enabled in the embedded component.

type AccountSessionComponentsDocumentsParams

type AccountSessionComponentsDocumentsParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsDocumentsFeaturesParams `form:"features"`
}

Configuration for the documents embedded component.

type AccountSessionComponentsFinancialAccount added in v81.3.0

type AccountSessionComponentsFinancialAccount struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                              `json:"enabled"`
	Features *AccountSessionComponentsFinancialAccountFeatures `json:"features"`
}

type AccountSessionComponentsFinancialAccountFeatures added in v81.3.0

type AccountSessionComponentsFinancialAccountFeatures struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
	// Whether to allow external accounts to be linked for money transfer.
	ExternalAccountCollection bool `json:"external_account_collection"`
	// Whether to allow sending money.
	SendMoney bool `json:"send_money"`
	// Whether to allow transferring balance.
	TransferBalance bool `json:"transfer_balance"`
}

type AccountSessionComponentsFinancialAccountFeaturesParams added in v81.3.0

type AccountSessionComponentsFinancialAccountFeaturesParams struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
	// Whether to allow external accounts to be linked for money transfer.
	ExternalAccountCollection *bool `form:"external_account_collection"`
	// Whether to allow sending money.
	SendMoney *bool `form:"send_money"`
	// Whether to allow transferring balance.
	TransferBalance *bool `form:"transfer_balance"`
}

The list of features enabled in the embedded component.

type AccountSessionComponentsFinancialAccountParams added in v81.3.0

type AccountSessionComponentsFinancialAccountParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsFinancialAccountFeaturesParams `form:"features"`
}

Configuration for the financial account embedded component.

type AccountSessionComponentsFinancialAccountTransactions added in v81.3.0

type AccountSessionComponentsFinancialAccountTransactions struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                                          `json:"enabled"`
	Features *AccountSessionComponentsFinancialAccountTransactionsFeatures `json:"features"`
}

type AccountSessionComponentsFinancialAccountTransactionsFeatures added in v81.3.0

type AccountSessionComponentsFinancialAccountTransactionsFeatures struct {
	// Whether to allow card spend dispute management features.
	CardSpendDisputeManagement bool `json:"card_spend_dispute_management"`
}

type AccountSessionComponentsFinancialAccountTransactionsFeaturesParams added in v81.3.0

type AccountSessionComponentsFinancialAccountTransactionsFeaturesParams struct {
	// Whether to allow card spend dispute management features.
	CardSpendDisputeManagement *bool `form:"card_spend_dispute_management"`
}

The list of features enabled in the embedded component.

type AccountSessionComponentsFinancialAccountTransactionsParams added in v81.3.0

type AccountSessionComponentsFinancialAccountTransactionsParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsFinancialAccountTransactionsFeaturesParams `form:"features"`
}

Configuration for the financial account transactions embedded component.

type AccountSessionComponentsIssuingCard added in v81.3.0

type AccountSessionComponentsIssuingCard struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                         `json:"enabled"`
	Features *AccountSessionComponentsIssuingCardFeatures `json:"features"`
}

type AccountSessionComponentsIssuingCardFeatures added in v81.3.0

type AccountSessionComponentsIssuingCardFeatures struct {
	// Whether to allow cardholder management features.
	CardholderManagement bool `json:"cardholder_management"`
	// Whether to allow card management features.
	CardManagement bool `json:"card_management"`
	// Whether to allow card spend dispute management features.
	CardSpendDisputeManagement bool `json:"card_spend_dispute_management"`
	// Whether to allow spend control management features.
	SpendControlManagement bool `json:"spend_control_management"`
}

type AccountSessionComponentsIssuingCardFeaturesParams added in v81.3.0

type AccountSessionComponentsIssuingCardFeaturesParams struct {
	// Whether to allow cardholder management features.
	CardholderManagement *bool `form:"cardholder_management"`
	// Whether to allow card management features.
	CardManagement *bool `form:"card_management"`
	// Whether to allow card spend dispute management features.
	CardSpendDisputeManagement *bool `form:"card_spend_dispute_management"`
	// Whether to allow spend control management features.
	SpendControlManagement *bool `form:"spend_control_management"`
}

The list of features enabled in the embedded component.

type AccountSessionComponentsIssuingCardParams added in v81.3.0

type AccountSessionComponentsIssuingCardParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsIssuingCardFeaturesParams `form:"features"`
}

Configuration for the issuing card embedded component.

type AccountSessionComponentsIssuingCardsList added in v81.3.0

type AccountSessionComponentsIssuingCardsList struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                              `json:"enabled"`
	Features *AccountSessionComponentsIssuingCardsListFeatures `json:"features"`
}

type AccountSessionComponentsIssuingCardsListFeatures added in v81.3.0

type AccountSessionComponentsIssuingCardsListFeatures struct {
	// Whether to allow cardholder management features.
	CardholderManagement bool `json:"cardholder_management"`
	// Whether to allow card management features.
	CardManagement bool `json:"card_management"`
	// Whether to allow card spend dispute management features.
	CardSpendDisputeManagement bool `json:"card_spend_dispute_management"`
	// Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts.
	DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
	// Whether to allow spend control management features.
	SpendControlManagement bool `json:"spend_control_management"`
}

type AccountSessionComponentsIssuingCardsListFeaturesParams added in v81.3.0

type AccountSessionComponentsIssuingCardsListFeaturesParams struct {
	// Whether to allow cardholder management features.
	CardholderManagement *bool `form:"cardholder_management"`
	// Whether to allow card management features.
	CardManagement *bool `form:"card_management"`
	// Whether to allow card spend dispute management features.
	CardSpendDisputeManagement *bool `form:"card_spend_dispute_management"`
	// Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts.
	DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
	// Whether to allow spend control management features.
	SpendControlManagement *bool `form:"spend_control_management"`
}

The list of features enabled in the embedded component.

type AccountSessionComponentsIssuingCardsListParams added in v81.3.0

type AccountSessionComponentsIssuingCardsListParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsIssuingCardsListFeaturesParams `form:"features"`
}

Configuration for the issuing cards list embedded component.

type AccountSessionComponentsNotificationBanner

type AccountSessionComponentsNotificationBanner struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                                `json:"enabled"`
	Features *AccountSessionComponentsNotificationBannerFeatures `json:"features"`
}

type AccountSessionComponentsNotificationBannerFeatures

type AccountSessionComponentsNotificationBannerFeatures struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
	// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
	ExternalAccountCollection bool `json:"external_account_collection"`
}

type AccountSessionComponentsNotificationBannerFeaturesParams

type AccountSessionComponentsNotificationBannerFeaturesParams struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
	// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
	ExternalAccountCollection *bool `form:"external_account_collection"`
}

The list of features enabled in the embedded component.

type AccountSessionComponentsNotificationBannerParams

type AccountSessionComponentsNotificationBannerParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsNotificationBannerFeaturesParams `form:"features"`
}

Configuration for the notification banner embedded component.

type AccountSessionComponentsParams

type AccountSessionComponentsParams struct {
	// Configuration for the account management embedded component.
	AccountManagement *AccountSessionComponentsAccountManagementParams `form:"account_management"`
	// Configuration for the account onboarding embedded component.
	AccountOnboarding *AccountSessionComponentsAccountOnboardingParams `form:"account_onboarding"`
	// Configuration for the balances embedded component.
	Balances *AccountSessionComponentsBalancesParams `form:"balances"`
	// Configuration for the documents embedded component.
	Documents *AccountSessionComponentsDocumentsParams `form:"documents"`
	// Configuration for the financial account embedded component.
	FinancialAccount *AccountSessionComponentsFinancialAccountParams `form:"financial_account"`
	// Configuration for the financial account transactions embedded component.
	FinancialAccountTransactions *AccountSessionComponentsFinancialAccountTransactionsParams `form:"financial_account_transactions"`
	// Configuration for the issuing card embedded component.
	IssuingCard *AccountSessionComponentsIssuingCardParams `form:"issuing_card"`
	// Configuration for the issuing cards list embedded component.
	IssuingCardsList *AccountSessionComponentsIssuingCardsListParams `form:"issuing_cards_list"`
	// Configuration for the notification banner embedded component.
	NotificationBanner *AccountSessionComponentsNotificationBannerParams `form:"notification_banner"`
	// Configuration for the payment details embedded component.
	PaymentDetails *AccountSessionComponentsPaymentDetailsParams `form:"payment_details"`
	// Configuration for the payments embedded component.
	Payments *AccountSessionComponentsPaymentsParams `form:"payments"`
	// Configuration for the payouts embedded component.
	Payouts *AccountSessionComponentsPayoutsParams `form:"payouts"`
	// Configuration for the payouts list embedded component.
	PayoutsList *AccountSessionComponentsPayoutsListParams `form:"payouts_list"`
	// Configuration for the tax registrations embedded component.
	TaxRegistrations *AccountSessionComponentsTaxRegistrationsParams `form:"tax_registrations"`
	// Configuration for the tax settings embedded component.
	TaxSettings *AccountSessionComponentsTaxSettingsParams `form:"tax_settings"`
}

Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).

type AccountSessionComponentsPaymentDetails

type AccountSessionComponentsPaymentDetails struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                            `json:"enabled"`
	Features *AccountSessionComponentsPaymentDetailsFeatures `json:"features"`
}

type AccountSessionComponentsPaymentDetailsFeatures

type AccountSessionComponentsPaymentDetailsFeatures struct {
	// Whether to allow capturing and cancelling payment intents. This is `true` by default.
	CapturePayments bool `json:"capture_payments"`
	// Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
	DestinationOnBehalfOfChargeManagement bool `json:"destination_on_behalf_of_charge_management"`
	// Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
	DisputeManagement bool `json:"dispute_management"`
	// Whether to allow sending refunds. This is `true` by default.
	RefundManagement bool `json:"refund_management"`
}

type AccountSessionComponentsPaymentDetailsFeaturesParams

type AccountSessionComponentsPaymentDetailsFeaturesParams struct {
	// Whether to allow capturing and cancelling payment intents. This is `true` by default.
	CapturePayments *bool `form:"capture_payments"`
	// Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
	DestinationOnBehalfOfChargeManagement *bool `form:"destination_on_behalf_of_charge_management"`
	// Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
	DisputeManagement *bool `form:"dispute_management"`
	// Whether to allow sending refunds. This is `true` by default.
	RefundManagement *bool `form:"refund_management"`
}

The list of features enabled in the embedded component.

type AccountSessionComponentsPaymentDetailsParams

type AccountSessionComponentsPaymentDetailsParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsPaymentDetailsFeaturesParams `form:"features"`
}

Configuration for the payment details embedded component.

type AccountSessionComponentsPayments

type AccountSessionComponentsPayments struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                      `json:"enabled"`
	Features *AccountSessionComponentsPaymentsFeatures `json:"features"`
}

type AccountSessionComponentsPaymentsFeatures

type AccountSessionComponentsPaymentsFeatures struct {
	// Whether to allow capturing and cancelling payment intents. This is `true` by default.
	CapturePayments bool `json:"capture_payments"`
	// Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
	DestinationOnBehalfOfChargeManagement bool `json:"destination_on_behalf_of_charge_management"`
	// Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
	DisputeManagement bool `json:"dispute_management"`
	// Whether to allow sending refunds. This is `true` by default.
	RefundManagement bool `json:"refund_management"`
}

type AccountSessionComponentsPaymentsFeaturesParams

type AccountSessionComponentsPaymentsFeaturesParams struct {
	// Whether to allow capturing and cancelling payment intents. This is `true` by default.
	CapturePayments *bool `form:"capture_payments"`
	// Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
	DestinationOnBehalfOfChargeManagement *bool `form:"destination_on_behalf_of_charge_management"`
	// Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
	DisputeManagement *bool `form:"dispute_management"`
	// Whether to allow sending refunds. This is `true` by default.
	RefundManagement *bool `form:"refund_management"`
}

The list of features enabled in the embedded component.

type AccountSessionComponentsPaymentsParams

type AccountSessionComponentsPaymentsParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsPaymentsFeaturesParams `form:"features"`
}

Configuration for the payments embedded component.

type AccountSessionComponentsPayouts

type AccountSessionComponentsPayouts struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                     `json:"enabled"`
	Features *AccountSessionComponentsPayoutsFeatures `json:"features"`
}

type AccountSessionComponentsPayoutsFeatures

type AccountSessionComponentsPayoutsFeatures struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"`
	// Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	EditPayoutSchedule bool `json:"edit_payout_schedule"`
	// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
	ExternalAccountCollection bool `json:"external_account_collection"`
	// Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	InstantPayouts bool `json:"instant_payouts"`
	// Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	StandardPayouts bool `json:"standard_payouts"`
}

type AccountSessionComponentsPayoutsFeaturesParams

type AccountSessionComponentsPayoutsFeaturesParams struct {
	// Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
	DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"`
	// Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	EditPayoutSchedule *bool `form:"edit_payout_schedule"`
	// Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
	ExternalAccountCollection *bool `form:"external_account_collection"`
	// Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	InstantPayouts *bool `form:"instant_payouts"`
	// Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
	StandardPayouts *bool `form:"standard_payouts"`
}

The list of features enabled in the embedded component.

type AccountSessionComponentsPayoutsList

type AccountSessionComponentsPayoutsList struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                         `json:"enabled"`
	Features *AccountSessionComponentsPayoutsListFeatures `json:"features"`
}

type AccountSessionComponentsPayoutsListFeatures

type AccountSessionComponentsPayoutsListFeatures struct{}

type AccountSessionComponentsPayoutsListFeaturesParams

type AccountSessionComponentsPayoutsListFeaturesParams struct{}

The list of features enabled in the embedded component.

type AccountSessionComponentsPayoutsListParams

type AccountSessionComponentsPayoutsListParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsPayoutsListFeaturesParams `form:"features"`
}

Configuration for the payouts list embedded component.

type AccountSessionComponentsPayoutsParams

type AccountSessionComponentsPayoutsParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsPayoutsFeaturesParams `form:"features"`
}

Configuration for the payouts embedded component.

type AccountSessionComponentsTaxRegistrations

type AccountSessionComponentsTaxRegistrations struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                              `json:"enabled"`
	Features *AccountSessionComponentsTaxRegistrationsFeatures `json:"features"`
}

type AccountSessionComponentsTaxRegistrationsFeatures

type AccountSessionComponentsTaxRegistrationsFeatures struct{}

type AccountSessionComponentsTaxRegistrationsFeaturesParams

type AccountSessionComponentsTaxRegistrationsFeaturesParams struct{}

The list of features enabled in the embedded component.

type AccountSessionComponentsTaxRegistrationsParams

type AccountSessionComponentsTaxRegistrationsParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsTaxRegistrationsFeaturesParams `form:"features"`
}

Configuration for the tax registrations embedded component.

type AccountSessionComponentsTaxSettings

type AccountSessionComponentsTaxSettings struct {
	// Whether the embedded component is enabled.
	Enabled  bool                                         `json:"enabled"`
	Features *AccountSessionComponentsTaxSettingsFeatures `json:"features"`
}

type AccountSessionComponentsTaxSettingsFeatures

type AccountSessionComponentsTaxSettingsFeatures struct{}

type AccountSessionComponentsTaxSettingsFeaturesParams

type AccountSessionComponentsTaxSettingsFeaturesParams struct{}

The list of features enabled in the embedded component.

type AccountSessionComponentsTaxSettingsParams

type AccountSessionComponentsTaxSettingsParams struct {
	// Whether the embedded component is enabled.
	Enabled *bool `form:"enabled"`
	// The list of features enabled in the embedded component.
	Features *AccountSessionComponentsTaxSettingsFeaturesParams `form:"features"`
}

Configuration for the tax settings embedded component.

type AccountSessionParams

type AccountSessionParams struct {
	Params `form:"*"`
	// The identifier of the account to create an Account Session for.
	Account *string `form:"account"`
	// Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
	Components *AccountSessionComponentsParams `form:"components"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.

func (*AccountSessionParams) AddExpand

func (p *AccountSessionParams) AddExpand(f string)

AddExpand appends a new field to expand.

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"`
	Invoices          *AccountSettingsInvoices          `json:"invoices"`
	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 name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
	DisplayName string `json:"display_name"`
	// The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners.
	ServiceUserNumber string `json:"service_user_number"`
}

type AccountSettingsBACSDebitPaymentsParams

type AccountSettingsBACSDebitPaymentsParams struct {
	// The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free.
	DisplayName *string `form:"display_name"`
}

Settings specific to Bacs Direct Debit payments.

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/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/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 AccountSettingsInvoices

type AccountSettingsInvoices struct {
	// The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.
	DefaultAccountTaxIDs []*TaxID `json:"default_account_tax_ids"`
}

type AccountSettingsInvoicesParams

type AccountSettingsInvoicesParams struct {
	// The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized.
	DefaultAccountTaxIDs []*string `form:"default_account_tax_ids"`
}

Settings specific to the account's use of Invoices.

type AccountSettingsParams

type AccountSettingsParams struct {
	// Settings specific to Bacs Direct Debit payments.
	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 specific to the account's use of Invoices.
	Invoices *AccountSettingsInvoicesParams `form:"invoices"`
	// 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 `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
	StatementDescriptorKana string `json:"statement_descriptor_kana"`
	// The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
	StatementDescriptorKanji string `json:"statement_descriptor_kanji"`
	// The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
	StatementDescriptorPrefixKana string `json:"statement_descriptor_prefix_kana"`
	// The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
	StatementDescriptorPrefixKanji string `json:"statement_descriptor_prefix_kanji"`
}

type AccountSettingsPaymentsParams

type AccountSettingsPaymentsParams struct {
	// The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors).
	StatementDescriptor *string `form:"statement_descriptor"`
	// The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
	StatementDescriptorKana *string `form:"statement_descriptor_kana"`
	// The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors).
	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 [Understanding Connect account balances](https://stripe.com/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes 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/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/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 remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://stripe.com/connect/manage-payout-schedule).
	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/connect/bank-transfers#payout-information) documentation.

func (*AccountSettingsPayoutsScheduleParams) AppendTo

func (p *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/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty.

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`, `custom`, or `none`.

const (
	AccountTypeCustom   AccountType = "custom"
	AccountTypeExpress  AccountType = "express"
	AccountTypeNone     AccountType = "none"
	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"`
	// Breakdown of balance by destination.
	NetAvailable []*BalanceInstantAvailableNetAvailable `json:"net_available"`
	SourceTypes  map[BalanceSourceType]int64            `json:"source_types"`
}

Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type 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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

List apple pay domains.

func (*ApplePayDomainListParams) AddExpand

func (p *ApplePayDomainListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type ApplePayDomainParams

type ApplePayDomainParams struct {
	Params     `form:"*"`
	DomainName *string `form:"domain_name"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Delete an apple pay domain.

func (*ApplePayDomainParams) AddExpand

func (p *ApplePayDomainParams) AddExpand(f string)

AddExpand appends a new field to expand.

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 cents (or local equivalent).
	Amount int64 `json:"amount"`
	// Amount in cents (or local equivalent) 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"`
	// Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.
	FeeSource *ApplicationFeeFeeSource `json:"fee_source"`
	// 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 ApplicationFeeFeeSource

type ApplicationFeeFeeSource struct {
	// Charge ID that created this application fee.
	Charge string `json:"charge"`
	// Payout ID that created this application fee.
	Payout string `json:"payout"`
	// Type of object that created the application fee, either `charge` or `payout`.
	Type ApplicationFeeFeeSourceType `json:"type"`
}

Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.

type ApplicationFeeFeeSourceType

type ApplicationFeeFeeSourceType string

Type of object that created the application fee, either `charge` or `payout`.

const (
	ApplicationFeeFeeSourceTypeCharge ApplicationFeeFeeSourceType = "charge"
	ApplicationFeeFeeSourceTypePayout ApplicationFeeFeeSourceType = "payout"
)

List of values that ApplicationFeeFeeSourceType can take

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"`
	// Only return applications fees that were created during the given date interval.
	Created *int64 `form:"created"`
	// Only return applications fees that were created during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

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.

func (*ApplicationFeeListParams) AddExpand

func (p *ApplicationFeeListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type ApplicationFeeParams

type ApplicationFeeParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

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

func (*ApplicationFeeParams) AddExpand

func (p *ApplicationFeeParams) AddExpand(f string)

AddExpand appends a new field to expand.

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:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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.

func (*AppsSecretDeleteWhereParams) AddExpand

func (p *AppsSecretDeleteWhereParams) AddExpand(f string)

AddExpand appends a new field to expand.

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:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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.

func (*AppsSecretFindParams) AddExpand

func (p *AppsSecretFindParams) AddExpand(f string)

AddExpand appends a new field to expand.

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 which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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.

func (*AppsSecretListParams) AddExpand

func (p *AppsSecretListParams) AddExpand(f string)

AddExpand appends a new field to expand.

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:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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.

func (*AppsSecretParams) AddExpand

func (p *AppsSecretParams) AddExpand(f string)

AddExpand appends a new field to expand.

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) RawRequest

func (s *BackendImplementation) RawRequest(method, path, key, content string, params *RawParams) (*APIResponse, error)

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

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.

func NewBackendsWithConfig

func NewBackendsWithConfig(config *BackendConfig) *Backends

NewBackendsWithConfig creates a new set of backends with the given config for all backends. Useful for setting up client with a custom logger and http client.

type Balance

type Balance struct {
	APIResource
	// Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property.
	Available []*Amount `json:"available"`
	// Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property.
	ConnectReserved []*Amount `json:"connect_reserved"`
	// Funds that you can pay 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 aren't available in the balance yet. You can find the pending balance for each currency and each payment type 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 BalanceInstantAvailableNetAvailable

type BalanceInstantAvailableNetAvailable struct {
	// Net balance amount, subtracting fees from platform-set pricing.
	Amount int64 `json:"amount"`
	// ID of the external account for this net balance (not expandable).
	Destination string                                          `json:"destination"`
	SourceTypes *BalanceInstantAvailableNetAvailableSourceTypes `json:"source_types"`
}

Breakdown of balance by destination.

type BalanceInstantAvailableNetAvailableSourceTypes

type BalanceInstantAvailableNetAvailableSourceTypes struct {
	// Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
	BankAccount int64 `json:"bank_account"`
	// Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
	Card int64 `json:"card"`
	// Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
	FPX int64 `json:"fpx"`
}

type BalanceIssuing

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

type BalanceParams

type BalanceParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

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).

func (*BalanceParams) AddExpand

func (p *BalanceParams) AddExpand(f string)

AddExpand appends a new field to expand.

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 this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party.
	Amount int64 `json:"amount"`
	// The date that the transaction's net funds 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"`
	// If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`.
	ExchangeRate float64 `json:"exchange_rate"`
	// Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
	Fee int64 `json:"fee"`
	// Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
	FeeDetails []*BalanceTransactionFeeDetail `json:"fee_details"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee`
	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 about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.
	ReportingCategory BalanceTransactionReportingCategory `json:"reporting_category"`
	// This transaction relates to the Stripe object.
	Source *BalanceTransactionSource `json:"source"`
	// The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.
	Status BalanceTransactionStatus `json:"status"`
	// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `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 about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
	Type BalanceTransactionType `json:"type"`
}

Balance transactions represent funds moving through your Stripe account. Stripe creates them for every type of transaction that enters or leaves 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`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`.
	Type string `json:"type"`
}

Detailed breakdown of fees (in cents (or local equivalent)) 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:"*"`
	// 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 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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `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.

func (*BalanceTransactionListParams) AddExpand

func (p *BalanceTransactionListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BalanceTransactionParams

type BalanceTransactionParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Retrieves the balance transaction with the given ID.

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

func (*BalanceTransactionParams) AddExpand

func (p *BalanceTransactionParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BalanceTransactionReportingCategory

type BalanceTransactionReportingCategory string

Learn more about how [reporting categories](https://stripe.com/docs/reports/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:"-"`
	CustomerCashBalanceTransaction *CustomerCashBalanceTransaction `json:"-"`
	Dispute                        *Dispute                        `json:"-"`
	FeeRefund                      *FeeRefund                      `json:"-"`
	IssuingAuthorization           *IssuingAuthorization           `json:"-"`
	IssuingDispute                 *IssuingDispute                 `json:"-"`
	IssuingTransaction             *IssuingTransaction             `json:"-"`
	Payout                         *Payout                         `json:"-"`
	Refund                         *Refund                         `json:"-"`
	ReserveTransaction             *ReserveTransaction             `json:"-"`
	TaxDeductedAtSource            *TaxDeductedAtSource            `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"
	BalanceTransactionSourceTypeCustomerCashBalanceTransaction BalanceTransactionSourceType = "customer_cash_balance_transaction"
	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"
	BalanceTransactionSourceTypeReserveTransaction             BalanceTransactionSourceType = "reserve_transaction"
	BalanceTransactionSourceTypeTaxDeductedAtSource            BalanceTransactionSourceType = "tax_deducted_at_source"
	BalanceTransactionSourceTypeTopup                          BalanceTransactionSourceType = "topup"
	BalanceTransactionSourceTypeTransfer                       BalanceTransactionSourceType = "transfer"
	BalanceTransactionSourceTypeTransferReversal               BalanceTransactionSourceType = "transfer_reversal"
)

List of values that BalanceTransactionSourceType can take

type BalanceTransactionStatus

type BalanceTransactionStatus string

The transaction's net funds status in the Stripe balance, which are 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`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `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 about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, 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"
	BalanceTransactionTypeClimateOrderPurchase         BalanceTransactionType = "climate_order_purchase"
	BalanceTransactionTypeClimateOrderRefund           BalanceTransactionType = "climate_order_refund"
	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"
	BalanceTransactionTypeObligationOutbound           BalanceTransactionType = "obligation_outbound"
	BalanceTransactionTypeObligationReversalInbound    BalanceTransactionType = "obligation_reversal_inbound"
	BalanceTransactionTypePayment                      BalanceTransactionType = "payment"
	BalanceTransactionTypePaymentFailureRefund         BalanceTransactionType = "payment_failure_refund"
	BalanceTransactionTypePaymentNetworkReserveHold    BalanceTransactionType = "payment_network_reserve_hold"
	BalanceTransactionTypePaymentNetworkReserveRelease BalanceTransactionType = "payment_network_reserve_release"
	BalanceTransactionTypePaymentRefund                BalanceTransactionType = "payment_refund"
	BalanceTransactionTypePaymentReversal              BalanceTransactionType = "payment_reversal"
	BalanceTransactionTypePaymentUnreconciled          BalanceTransactionType = "payment_unreconciled"
	BalanceTransactionTypePayout                       BalanceTransactionType = "payout"
	BalanceTransactionTypePayoutCancel                 BalanceTransactionType = "payout_cancel"
	BalanceTransactionTypePayoutFailure                BalanceTransactionType = "payout_failure"
	BalanceTransactionTypePayoutMinimumBalanceHold     BalanceTransactionType = "payout_minimum_balance_hold"
	BalanceTransactionTypePayoutMinimumBalanceRelease  BalanceTransactionType = "payout_minimum_balance_release"
	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"`
	// Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
	FutureRequirements *BankAccountFutureRequirements `json:"future_requirements"`
	// 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"`
	// Information about the requirements for the bank account, including what information needs to be collected.
	Requirements *BankAccountRequirements `json:"requirements"`
	// 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 payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.
	//
	// For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
	Status BankAccountStatus `json:"status"`
}

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

On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer destinations on `Account` objects for connected 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/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 BankAccountDocumentsBankAccountOwnershipVerificationParams

type BankAccountDocumentsBankAccountOwnershipVerificationParams 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 bank account that displays the last 4 digits of the account number, either a statement or a check.

type BankAccountDocumentsParams

type BankAccountDocumentsParams 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 bank account that displays the last 4 digits of the account number, either a statement or a check.
	BankAccountOwnershipVerification *BankAccountDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"`
}

Documents that may be submitted to satisfy various informational requests.

type BankAccountFutureRequirements

type BankAccountFutureRequirements struct {
	// Fields that need to be collected to keep the external 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"`
	// Fields that are `currently_due` and need to be collected again because validation or verification failed.
	Errors []*BankAccountFutureRequirementsError `json:"errors"`
	// Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account.
	PastDue []string `json:"past_due"`
	// Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
	PendingVerification []string `json:"pending_verification"`
}

Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.

type BankAccountFutureRequirementsError

type BankAccountFutureRequirementsError struct {
	// The code for the type of error.
	Code BankAccountFutureRequirementsErrorCode `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 BankAccountFutureRequirementsErrorCode

type BankAccountFutureRequirementsErrorCode string

The code for the type of error.

const (
	BankAccountFutureRequirementsErrorCodeInvalidAddressCityStatePostalCode                      BankAccountFutureRequirementsErrorCode = "invalid_address_city_state_postal_code"
	BankAccountFutureRequirementsErrorCodeInvalidAddressHighwayContractBox                       BankAccountFutureRequirementsErrorCode = "invalid_address_highway_contract_box"
	BankAccountFutureRequirementsErrorCodeInvalidAddressPrivateMailbox                           BankAccountFutureRequirementsErrorCode = "invalid_address_private_mailbox"
	BankAccountFutureRequirementsErrorCodeInvalidBusinessProfileName                             BankAccountFutureRequirementsErrorCode = "invalid_business_profile_name"
	BankAccountFutureRequirementsErrorCodeInvalidBusinessProfileNameDenylisted                   BankAccountFutureRequirementsErrorCode = "invalid_business_profile_name_denylisted"
	BankAccountFutureRequirementsErrorCodeInvalidCompanyNameDenylisted                           BankAccountFutureRequirementsErrorCode = "invalid_company_name_denylisted"
	BankAccountFutureRequirementsErrorCodeInvalidDOBAgeOverMaximum                               BankAccountFutureRequirementsErrorCode = "invalid_dob_age_over_maximum"
	BankAccountFutureRequirementsErrorCodeInvalidDOBAgeUnder18                                   BankAccountFutureRequirementsErrorCode = "invalid_dob_age_under_18"
	BankAccountFutureRequirementsErrorCodeInvalidDOBAgeUnderMinimum                              BankAccountFutureRequirementsErrorCode = "invalid_dob_age_under_minimum"
	BankAccountFutureRequirementsErrorCodeInvalidProductDescriptionLength                        BankAccountFutureRequirementsErrorCode = "invalid_product_description_length"
	BankAccountFutureRequirementsErrorCodeInvalidProductDescriptionURLMatch                      BankAccountFutureRequirementsErrorCode = "invalid_product_description_url_match"
	BankAccountFutureRequirementsErrorCodeInvalidRepresentativeCountry                           BankAccountFutureRequirementsErrorCode = "invalid_representative_country"
	BankAccountFutureRequirementsErrorCodeInvalidStatementDescriptorBusinessMismatch             BankAccountFutureRequirementsErrorCode = "invalid_statement_descriptor_business_mismatch"
	BankAccountFutureRequirementsErrorCodeInvalidStatementDescriptorDenylisted                   BankAccountFutureRequirementsErrorCode = "invalid_statement_descriptor_denylisted"
	BankAccountFutureRequirementsErrorCodeInvalidStatementDescriptorLength                       BankAccountFutureRequirementsErrorCode = "invalid_statement_descriptor_length"
	BankAccountFutureRequirementsErrorCodeInvalidStatementDescriptorPrefixDenylisted             BankAccountFutureRequirementsErrorCode = "invalid_statement_descriptor_prefix_denylisted"
	BankAccountFutureRequirementsErrorCodeInvalidStatementDescriptorPrefixMismatch               BankAccountFutureRequirementsErrorCode = "invalid_statement_descriptor_prefix_mismatch"
	BankAccountFutureRequirementsErrorCodeInvalidStreetAddress                                   BankAccountFutureRequirementsErrorCode = "invalid_street_address"
	BankAccountFutureRequirementsErrorCodeInvalidTaxID                                           BankAccountFutureRequirementsErrorCode = "invalid_tax_id"
	BankAccountFutureRequirementsErrorCodeInvalidTaxIDFormat                                     BankAccountFutureRequirementsErrorCode = "invalid_tax_id_format"
	BankAccountFutureRequirementsErrorCodeInvalidTOSAcceptance                                   BankAccountFutureRequirementsErrorCode = "invalid_tos_acceptance"
	BankAccountFutureRequirementsErrorCodeInvalidURLDenylisted                                   BankAccountFutureRequirementsErrorCode = "invalid_url_denylisted"
	BankAccountFutureRequirementsErrorCodeInvalidURLFormat                                       BankAccountFutureRequirementsErrorCode = "invalid_url_format"
	BankAccountFutureRequirementsErrorCodeInvalidURLLength                                       BankAccountFutureRequirementsErrorCode = "invalid_url_length"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebPresenceDetected                          BankAccountFutureRequirementsErrorCode = "invalid_url_web_presence_detected"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteBusinessInformationMismatch           BankAccountFutureRequirementsErrorCode = "invalid_url_website_business_information_mismatch"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteEmpty                                 BankAccountFutureRequirementsErrorCode = "invalid_url_website_empty"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteInaccessible                          BankAccountFutureRequirementsErrorCode = "invalid_url_website_inaccessible"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteInaccessibleGeoblocked                BankAccountFutureRequirementsErrorCode = "invalid_url_website_inaccessible_geoblocked"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteInaccessiblePasswordProtected         BankAccountFutureRequirementsErrorCode = "invalid_url_website_inaccessible_password_protected"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncomplete                            BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteCancellationPolicy          BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_cancellation_policy"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteCustomerServiceDetails      BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_customer_service_details"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteLegalRestrictions           BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_legal_restrictions"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteRefundPolicy                BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_refund_policy"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteReturnPolicy                BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_return_policy"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteTermsAndConditions          BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_terms_and_conditions"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteIncompleteUnderConstruction           BankAccountFutureRequirementsErrorCode = "invalid_url_website_incomplete_under_construction"
	BankAccountFutureRequirementsErrorCodeInvalidURLWebsiteOther                                 BankAccountFutureRequirementsErrorCode = "invalid_url_website_other"
	BankAccountFutureRequirementsErrorCodeInvalidValueOther                                      BankAccountFutureRequirementsErrorCode = "invalid_value_other"
	BankAccountFutureRequirementsErrorCodeVerificationDirectorsMismatch                          BankAccountFutureRequirementsErrorCode = "verification_directors_mismatch"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentAddressMismatch                    BankAccountFutureRequirementsErrorCode = "verification_document_address_mismatch"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentAddressMissing                     BankAccountFutureRequirementsErrorCode = "verification_document_address_missing"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentCorrupt                            BankAccountFutureRequirementsErrorCode = "verification_document_corrupt"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentCountryNotSupported                BankAccountFutureRequirementsErrorCode = "verification_document_country_not_supported"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentDirectorsMismatch                  BankAccountFutureRequirementsErrorCode = "verification_document_directors_mismatch"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentDOBMismatch                        BankAccountFutureRequirementsErrorCode = "verification_document_dob_mismatch"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentDuplicateType                      BankAccountFutureRequirementsErrorCode = "verification_document_duplicate_type"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentExpired                            BankAccountFutureRequirementsErrorCode = "verification_document_expired"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedCopy                         BankAccountFutureRequirementsErrorCode = "verification_document_failed_copy"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedGreyscale                    BankAccountFutureRequirementsErrorCode = "verification_document_failed_greyscale"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedOther                        BankAccountFutureRequirementsErrorCode = "verification_document_failed_other"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentFailedTestMode                     BankAccountFutureRequirementsErrorCode = "verification_document_failed_test_mode"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentFraudulent                         BankAccountFutureRequirementsErrorCode = "verification_document_fraudulent"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentIDNumberMismatch                   BankAccountFutureRequirementsErrorCode = "verification_document_id_number_mismatch"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentIDNumberMissing                    BankAccountFutureRequirementsErrorCode = "verification_document_id_number_missing"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentIncomplete                         BankAccountFutureRequirementsErrorCode = "verification_document_incomplete"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentInvalid                            BankAccountFutureRequirementsErrorCode = "verification_document_invalid"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentIssueOrExpiryDateMissing           BankAccountFutureRequirementsErrorCode = "verification_document_issue_or_expiry_date_missing"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentManipulated                        BankAccountFutureRequirementsErrorCode = "verification_document_manipulated"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentMissingBack                        BankAccountFutureRequirementsErrorCode = "verification_document_missing_back"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentMissingFront                       BankAccountFutureRequirementsErrorCode = "verification_document_missing_front"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentNameMismatch                       BankAccountFutureRequirementsErrorCode = "verification_document_name_mismatch"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentNameMissing                        BankAccountFutureRequirementsErrorCode = "verification_document_name_missing"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentNationalityMismatch                BankAccountFutureRequirementsErrorCode = "verification_document_nationality_mismatch"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentNotReadable                        BankAccountFutureRequirementsErrorCode = "verification_document_not_readable"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentNotSigned                          BankAccountFutureRequirementsErrorCode = "verification_document_not_signed"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentNotUploaded                        BankAccountFutureRequirementsErrorCode = "verification_document_not_uploaded"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentPhotoMismatch                      BankAccountFutureRequirementsErrorCode = "verification_document_photo_mismatch"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentTooLarge                           BankAccountFutureRequirementsErrorCode = "verification_document_too_large"
	BankAccountFutureRequirementsErrorCodeVerificationDocumentTypeNotSupported                   BankAccountFutureRequirementsErrorCode = "verification_document_type_not_supported"
	BankAccountFutureRequirementsErrorCodeVerificationExtraneousDirectors                        BankAccountFutureRequirementsErrorCode = "verification_extraneous_directors"
	BankAccountFutureRequirementsErrorCodeVerificationFailedAddressMatch                         BankAccountFutureRequirementsErrorCode = "verification_failed_address_match"
	BankAccountFutureRequirementsErrorCodeVerificationFailedBusinessIecNumber                    BankAccountFutureRequirementsErrorCode = "verification_failed_business_iec_number"
	BankAccountFutureRequirementsErrorCodeVerificationFailedDocumentMatch                        BankAccountFutureRequirementsErrorCode = "verification_failed_document_match"
	BankAccountFutureRequirementsErrorCodeVerificationFailedIDNumberMatch                        BankAccountFutureRequirementsErrorCode = "verification_failed_id_number_match"
	BankAccountFutureRequirementsErrorCodeVerificationFailedKeyedIdentity                        BankAccountFutureRequirementsErrorCode = "verification_failed_keyed_identity"
	BankAccountFutureRequirementsErrorCodeVerificationFailedKeyedMatch                           BankAccountFutureRequirementsErrorCode = "verification_failed_keyed_match"
	BankAccountFutureRequirementsErrorCodeVerificationFailedNameMatch                            BankAccountFutureRequirementsErrorCode = "verification_failed_name_match"
	BankAccountFutureRequirementsErrorCodeVerificationFailedOther                                BankAccountFutureRequirementsErrorCode = "verification_failed_other"
	BankAccountFutureRequirementsErrorCodeVerificationFailedRepresentativeAuthority              BankAccountFutureRequirementsErrorCode = "verification_failed_representative_authority"
	BankAccountFutureRequirementsErrorCodeVerificationFailedResidentialAddress                   BankAccountFutureRequirementsErrorCode = "verification_failed_residential_address"
	BankAccountFutureRequirementsErrorCodeVerificationFailedTaxIDMatch                           BankAccountFutureRequirementsErrorCode = "verification_failed_tax_id_match"
	BankAccountFutureRequirementsErrorCodeVerificationFailedTaxIDNotIssued                       BankAccountFutureRequirementsErrorCode = "verification_failed_tax_id_not_issued"
	BankAccountFutureRequirementsErrorCodeVerificationMissingDirectors                           BankAccountFutureRequirementsErrorCode = "verification_missing_directors"
	BankAccountFutureRequirementsErrorCodeVerificationMissingExecutives                          BankAccountFutureRequirementsErrorCode = "verification_missing_executives"
	BankAccountFutureRequirementsErrorCodeVerificationMissingOwners                              BankAccountFutureRequirementsErrorCode = "verification_missing_owners"
	BankAccountFutureRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountFutureRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations"
	BankAccountFutureRequirementsErrorCodeVerificationRequiresAdditionalProofOfRegistration      BankAccountFutureRequirementsErrorCode = "verification_requires_additional_proof_of_registration"
	BankAccountFutureRequirementsErrorCodeVerificationSupportability                             BankAccountFutureRequirementsErrorCode = "verification_supportability"
)

List of values that BankAccountFutureRequirementsErrorCode 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 customer under which the bank accounts are
	// nested. Either Account or Customer should be populated.
	Customer *string `form:"-"` // Included in URL
	// 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
	// Filter according to a particular object type. Valid values are "bank_account" or "card".
	Object *string `form:"object"`
}

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"`
	// Documents that may be submitted to satisfy various informational requests.
	Documents *BankAccountDocumentsParams `form:"documents"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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"`
	// 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"`
	// Cardholder name.
	Name *string `form:"name"`
	// The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and
	// returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash.
	// You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment
	// Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were
	// created by a Setup Intent with `attach_to_self=true`.
	// This is used for TokenParams.BankAccountParams only and will be removed in the next major version.
	// **DO NOT USE THIS FOR OTHER METHODS.**
	PaymentMethod *string `form:"payment_method"`
	// 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:"*"`
}

Delete a specified external account for a given account.

func (*BankAccountParams) AddExpand

func (p *BankAccountParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*BankAccountParams) AddMetadata

func (p *BankAccountParams) AddMetadata(key string, value string)

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

func (*BankAccountParams) AppendToAsSourceOrExternalAccount

func (p *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 BankAccountRequirements

type BankAccountRequirements struct {
	// Fields that need to be collected to keep the external 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"`
	// Fields that are `currently_due` and need to be collected again because validation or verification failed.
	Errors []*BankAccountRequirementsError `json:"errors"`
	// Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account.
	PastDue []string `json:"past_due"`
	// Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
	PendingVerification []string `json:"pending_verification"`
}

Information about the requirements for the bank account, including what information needs to be collected.

type BankAccountRequirementsError

type BankAccountRequirementsError struct {
	// The code for the type of error.
	Code BankAccountRequirementsErrorCode `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 BankAccountRequirementsErrorCode

type BankAccountRequirementsErrorCode string

The code for the type of error.

const (
	BankAccountRequirementsErrorCodeInvalidAddressCityStatePostalCode                      BankAccountRequirementsErrorCode = "invalid_address_city_state_postal_code"
	BankAccountRequirementsErrorCodeInvalidAddressHighwayContractBox                       BankAccountRequirementsErrorCode = "invalid_address_highway_contract_box"
	BankAccountRequirementsErrorCodeInvalidAddressPrivateMailbox                           BankAccountRequirementsErrorCode = "invalid_address_private_mailbox"
	BankAccountRequirementsErrorCodeInvalidBusinessProfileName                             BankAccountRequirementsErrorCode = "invalid_business_profile_name"
	BankAccountRequirementsErrorCodeInvalidBusinessProfileNameDenylisted                   BankAccountRequirementsErrorCode = "invalid_business_profile_name_denylisted"
	BankAccountRequirementsErrorCodeInvalidCompanyNameDenylisted                           BankAccountRequirementsErrorCode = "invalid_company_name_denylisted"
	BankAccountRequirementsErrorCodeInvalidDOBAgeOverMaximum                               BankAccountRequirementsErrorCode = "invalid_dob_age_over_maximum"
	BankAccountRequirementsErrorCodeInvalidDOBAgeUnder18                                   BankAccountRequirementsErrorCode = "invalid_dob_age_under_18"
	BankAccountRequirementsErrorCodeInvalidDOBAgeUnderMinimum                              BankAccountRequirementsErrorCode = "invalid_dob_age_under_minimum"
	BankAccountRequirementsErrorCodeInvalidProductDescriptionLength                        BankAccountRequirementsErrorCode = "invalid_product_description_length"
	BankAccountRequirementsErrorCodeInvalidProductDescriptionURLMatch                      BankAccountRequirementsErrorCode = "invalid_product_description_url_match"
	BankAccountRequirementsErrorCodeInvalidRepresentativeCountry                           BankAccountRequirementsErrorCode = "invalid_representative_country"
	BankAccountRequirementsErrorCodeInvalidStatementDescriptorBusinessMismatch             BankAccountRequirementsErrorCode = "invalid_statement_descriptor_business_mismatch"
	BankAccountRequirementsErrorCodeInvalidStatementDescriptorDenylisted                   BankAccountRequirementsErrorCode = "invalid_statement_descriptor_denylisted"
	BankAccountRequirementsErrorCodeInvalidStatementDescriptorLength                       BankAccountRequirementsErrorCode = "invalid_statement_descriptor_length"
	BankAccountRequirementsErrorCodeInvalidStatementDescriptorPrefixDenylisted             BankAccountRequirementsErrorCode = "invalid_statement_descriptor_prefix_denylisted"
	BankAccountRequirementsErrorCodeInvalidStatementDescriptorPrefixMismatch               BankAccountRequirementsErrorCode = "invalid_statement_descriptor_prefix_mismatch"
	BankAccountRequirementsErrorCodeInvalidStreetAddress                                   BankAccountRequirementsErrorCode = "invalid_street_address"
	BankAccountRequirementsErrorCodeInvalidTaxID                                           BankAccountRequirementsErrorCode = "invalid_tax_id"
	BankAccountRequirementsErrorCodeInvalidTaxIDFormat                                     BankAccountRequirementsErrorCode = "invalid_tax_id_format"
	BankAccountRequirementsErrorCodeInvalidTOSAcceptance                                   BankAccountRequirementsErrorCode = "invalid_tos_acceptance"
	BankAccountRequirementsErrorCodeInvalidURLDenylisted                                   BankAccountRequirementsErrorCode = "invalid_url_denylisted"
	BankAccountRequirementsErrorCodeInvalidURLFormat                                       BankAccountRequirementsErrorCode = "invalid_url_format"
	BankAccountRequirementsErrorCodeInvalidURLLength                                       BankAccountRequirementsErrorCode = "invalid_url_length"
	BankAccountRequirementsErrorCodeInvalidURLWebPresenceDetected                          BankAccountRequirementsErrorCode = "invalid_url_web_presence_detected"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteBusinessInformationMismatch           BankAccountRequirementsErrorCode = "invalid_url_website_business_information_mismatch"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteEmpty                                 BankAccountRequirementsErrorCode = "invalid_url_website_empty"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteInaccessible                          BankAccountRequirementsErrorCode = "invalid_url_website_inaccessible"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteInaccessibleGeoblocked                BankAccountRequirementsErrorCode = "invalid_url_website_inaccessible_geoblocked"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteInaccessiblePasswordProtected         BankAccountRequirementsErrorCode = "invalid_url_website_inaccessible_password_protected"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteIncomplete                            BankAccountRequirementsErrorCode = "invalid_url_website_incomplete"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteCancellationPolicy          BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_cancellation_policy"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteCustomerServiceDetails      BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_customer_service_details"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteLegalRestrictions           BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_legal_restrictions"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteRefundPolicy                BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_refund_policy"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteReturnPolicy                BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_return_policy"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteTermsAndConditions          BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_terms_and_conditions"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteIncompleteUnderConstruction           BankAccountRequirementsErrorCode = "invalid_url_website_incomplete_under_construction"
	BankAccountRequirementsErrorCodeInvalidURLWebsiteOther                                 BankAccountRequirementsErrorCode = "invalid_url_website_other"
	BankAccountRequirementsErrorCodeInvalidValueOther                                      BankAccountRequirementsErrorCode = "invalid_value_other"
	BankAccountRequirementsErrorCodeVerificationDirectorsMismatch                          BankAccountRequirementsErrorCode = "verification_directors_mismatch"
	BankAccountRequirementsErrorCodeVerificationDocumentAddressMismatch                    BankAccountRequirementsErrorCode = "verification_document_address_mismatch"
	BankAccountRequirementsErrorCodeVerificationDocumentAddressMissing                     BankAccountRequirementsErrorCode = "verification_document_address_missing"
	BankAccountRequirementsErrorCodeVerificationDocumentCorrupt                            BankAccountRequirementsErrorCode = "verification_document_corrupt"
	BankAccountRequirementsErrorCodeVerificationDocumentCountryNotSupported                BankAccountRequirementsErrorCode = "verification_document_country_not_supported"
	BankAccountRequirementsErrorCodeVerificationDocumentDirectorsMismatch                  BankAccountRequirementsErrorCode = "verification_document_directors_mismatch"
	BankAccountRequirementsErrorCodeVerificationDocumentDOBMismatch                        BankAccountRequirementsErrorCode = "verification_document_dob_mismatch"
	BankAccountRequirementsErrorCodeVerificationDocumentDuplicateType                      BankAccountRequirementsErrorCode = "verification_document_duplicate_type"
	BankAccountRequirementsErrorCodeVerificationDocumentExpired                            BankAccountRequirementsErrorCode = "verification_document_expired"
	BankAccountRequirementsErrorCodeVerificationDocumentFailedCopy                         BankAccountRequirementsErrorCode = "verification_document_failed_copy"
	BankAccountRequirementsErrorCodeVerificationDocumentFailedGreyscale                    BankAccountRequirementsErrorCode = "verification_document_failed_greyscale"
	BankAccountRequirementsErrorCodeVerificationDocumentFailedOther                        BankAccountRequirementsErrorCode = "verification_document_failed_other"
	BankAccountRequirementsErrorCodeVerificationDocumentFailedTestMode                     BankAccountRequirementsErrorCode = "verification_document_failed_test_mode"
	BankAccountRequirementsErrorCodeVerificationDocumentFraudulent                         BankAccountRequirementsErrorCode = "verification_document_fraudulent"
	BankAccountRequirementsErrorCodeVerificationDocumentIDNumberMismatch                   BankAccountRequirementsErrorCode = "verification_document_id_number_mismatch"
	BankAccountRequirementsErrorCodeVerificationDocumentIDNumberMissing                    BankAccountRequirementsErrorCode = "verification_document_id_number_missing"
	BankAccountRequirementsErrorCodeVerificationDocumentIncomplete                         BankAccountRequirementsErrorCode = "verification_document_incomplete"
	BankAccountRequirementsErrorCodeVerificationDocumentInvalid                            BankAccountRequirementsErrorCode = "verification_document_invalid"
	BankAccountRequirementsErrorCodeVerificationDocumentIssueOrExpiryDateMissing           BankAccountRequirementsErrorCode = "verification_document_issue_or_expiry_date_missing"
	BankAccountRequirementsErrorCodeVerificationDocumentManipulated                        BankAccountRequirementsErrorCode = "verification_document_manipulated"
	BankAccountRequirementsErrorCodeVerificationDocumentMissingBack                        BankAccountRequirementsErrorCode = "verification_document_missing_back"
	BankAccountRequirementsErrorCodeVerificationDocumentMissingFront                       BankAccountRequirementsErrorCode = "verification_document_missing_front"
	BankAccountRequirementsErrorCodeVerificationDocumentNameMismatch                       BankAccountRequirementsErrorCode = "verification_document_name_mismatch"
	BankAccountRequirementsErrorCodeVerificationDocumentNameMissing                        BankAccountRequirementsErrorCode = "verification_document_name_missing"
	BankAccountRequirementsErrorCodeVerificationDocumentNationalityMismatch                BankAccountRequirementsErrorCode = "verification_document_nationality_mismatch"
	BankAccountRequirementsErrorCodeVerificationDocumentNotReadable                        BankAccountRequirementsErrorCode = "verification_document_not_readable"
	BankAccountRequirementsErrorCodeVerificationDocumentNotSigned                          BankAccountRequirementsErrorCode = "verification_document_not_signed"
	BankAccountRequirementsErrorCodeVerificationDocumentNotUploaded                        BankAccountRequirementsErrorCode = "verification_document_not_uploaded"
	BankAccountRequirementsErrorCodeVerificationDocumentPhotoMismatch                      BankAccountRequirementsErrorCode = "verification_document_photo_mismatch"
	BankAccountRequirementsErrorCodeVerificationDocumentTooLarge                           BankAccountRequirementsErrorCode = "verification_document_too_large"
	BankAccountRequirementsErrorCodeVerificationDocumentTypeNotSupported                   BankAccountRequirementsErrorCode = "verification_document_type_not_supported"
	BankAccountRequirementsErrorCodeVerificationExtraneousDirectors                        BankAccountRequirementsErrorCode = "verification_extraneous_directors"
	BankAccountRequirementsErrorCodeVerificationFailedAddressMatch                         BankAccountRequirementsErrorCode = "verification_failed_address_match"
	BankAccountRequirementsErrorCodeVerificationFailedBusinessIecNumber                    BankAccountRequirementsErrorCode = "verification_failed_business_iec_number"
	BankAccountRequirementsErrorCodeVerificationFailedDocumentMatch                        BankAccountRequirementsErrorCode = "verification_failed_document_match"
	BankAccountRequirementsErrorCodeVerificationFailedIDNumberMatch                        BankAccountRequirementsErrorCode = "verification_failed_id_number_match"
	BankAccountRequirementsErrorCodeVerificationFailedKeyedIdentity                        BankAccountRequirementsErrorCode = "verification_failed_keyed_identity"
	BankAccountRequirementsErrorCodeVerificationFailedKeyedMatch                           BankAccountRequirementsErrorCode = "verification_failed_keyed_match"
	BankAccountRequirementsErrorCodeVerificationFailedNameMatch                            BankAccountRequirementsErrorCode = "verification_failed_name_match"
	BankAccountRequirementsErrorCodeVerificationFailedOther                                BankAccountRequirementsErrorCode = "verification_failed_other"
	BankAccountRequirementsErrorCodeVerificationFailedRepresentativeAuthority              BankAccountRequirementsErrorCode = "verification_failed_representative_authority"
	BankAccountRequirementsErrorCodeVerificationFailedResidentialAddress                   BankAccountRequirementsErrorCode = "verification_failed_residential_address"
	BankAccountRequirementsErrorCodeVerificationFailedTaxIDMatch                           BankAccountRequirementsErrorCode = "verification_failed_tax_id_match"
	BankAccountRequirementsErrorCodeVerificationFailedTaxIDNotIssued                       BankAccountRequirementsErrorCode = "verification_failed_tax_id_not_issued"
	BankAccountRequirementsErrorCodeVerificationMissingDirectors                           BankAccountRequirementsErrorCode = "verification_missing_directors"
	BankAccountRequirementsErrorCodeVerificationMissingExecutives                          BankAccountRequirementsErrorCode = "verification_missing_executives"
	BankAccountRequirementsErrorCodeVerificationMissingOwners                              BankAccountRequirementsErrorCode = "verification_missing_owners"
	BankAccountRequirementsErrorCodeVerificationRequiresAdditionalMemorandumOfAssociations BankAccountRequirementsErrorCode = "verification_requires_additional_memorandum_of_associations"
	BankAccountRequirementsErrorCodeVerificationRequiresAdditionalProofOfRegistration      BankAccountRequirementsErrorCode = "verification_requires_additional_proof_of_registration"
	BankAccountRequirementsErrorCodeVerificationSupportability                             BankAccountRequirementsErrorCode = "verification_supportability"
)

List of values that BankAccountRequirementsErrorCode can take

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 payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.

For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.

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 BillingAlert

type BillingAlert struct {
	APIResource
	// Defines the type of the alert.
	AlertType BillingAlertAlertType `json:"alert_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 alert. This can be active, inactive or archived.
	Status BillingAlertStatus `json:"status"`
	// Title of the alert.
	Title string `json:"title"`
	// Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter).
	UsageThreshold *BillingAlertUsageThreshold `json:"usage_threshold"`
}

A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.

type BillingAlertActivateParams

type BillingAlertActivateParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Reactivates this alert, allowing it to trigger again.

func (*BillingAlertActivateParams) AddExpand

func (p *BillingAlertActivateParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingAlertAlertType

type BillingAlertAlertType string

Defines the type of the alert.

const (
	BillingAlertAlertTypeUsageThreshold BillingAlertAlertType = "usage_threshold"
)

List of values that BillingAlertAlertType can take

type BillingAlertArchiveParams

type BillingAlertArchiveParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Archives this alert, removing it from the list view and APIs. This is non-reversible.

func (*BillingAlertArchiveParams) AddExpand

func (p *BillingAlertArchiveParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingAlertDeactivateParams

type BillingAlertDeactivateParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Deactivates this alert, preventing it from triggering.

func (*BillingAlertDeactivateParams) AddExpand

func (p *BillingAlertDeactivateParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingAlertList

type BillingAlertList struct {
	APIResource
	ListMeta
	Data []*BillingAlert `json:"data"`
}

BillingAlertList is a list of Alerts as retrieved from a list endpoint.

type BillingAlertListParams

type BillingAlertListParams struct {
	ListParams `form:"*"`
	// Filter results to only include this type of alert.
	AlertType *string `form:"alert_type"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// Filter results to only include alerts with the given meter.
	Meter *string `form:"meter"`
}

Lists billing active and inactive alerts

func (*BillingAlertListParams) AddExpand

func (p *BillingAlertListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingAlertParams

type BillingAlertParams struct {
	Params `form:"*"`
	// The type of alert to create.
	AlertType *string `form:"alert_type"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// The title of the alert.
	Title *string `form:"title"`
	// The configuration of the usage threshold.
	UsageThreshold *BillingAlertUsageThresholdParams `form:"usage_threshold"`
}

Creates a billing alert

func (*BillingAlertParams) AddExpand

func (p *BillingAlertParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingAlertStatus

type BillingAlertStatus string

Status of the alert. This can be active, inactive or archived.

const (
	BillingAlertStatusActive   BillingAlertStatus = "active"
	BillingAlertStatusArchived BillingAlertStatus = "archived"
	BillingAlertStatusInactive BillingAlertStatus = "inactive"
)

List of values that BillingAlertStatus can take

type BillingAlertTriggered

type BillingAlertTriggered struct {
	// A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.
	Alert *BillingAlert `json:"alert"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// ID of customer for which the alert triggered
	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"`
	// The value triggering the alert
	Value int64 `json:"value"`
}

type BillingAlertUsageThreshold

type BillingAlertUsageThreshold struct {
	// The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
	Filters []*BillingAlertUsageThresholdFilter `json:"filters"`
	// The value at which this alert will trigger.
	GTE int64 `json:"gte"`
	// The [Billing Meter](https://stripe.com/api/billing/meter) ID whose usage is monitored.
	Meter *BillingMeter `json:"meter"`
	// Defines how the alert will behave.
	Recurrence BillingAlertUsageThresholdRecurrence `json:"recurrence"`
}

Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter).

type BillingAlertUsageThresholdFilter

type BillingAlertUsageThresholdFilter struct {
	// Limit the scope of the alert to this customer ID
	Customer *Customer                            `json:"customer"`
	Type     BillingAlertUsageThresholdFilterType `json:"type"`
}

The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.

type BillingAlertUsageThresholdFilterParams

type BillingAlertUsageThresholdFilterParams struct {
	// Limit the scope to this usage alert only to this customer.
	Customer *string `form:"customer"`
	// What type of filter is being applied to this usage alert.
	Type *string `form:"type"`
}

The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.

type BillingAlertUsageThresholdFilterType

type BillingAlertUsageThresholdFilterType string
const (
	BillingAlertUsageThresholdFilterTypeCustomer BillingAlertUsageThresholdFilterType = "customer"
)

List of values that BillingAlertUsageThresholdFilterType can take

type BillingAlertUsageThresholdParams

type BillingAlertUsageThresholdParams struct {
	// The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.
	Filters []*BillingAlertUsageThresholdFilterParams `form:"filters"`
	// Defines at which value the alert will fire.
	GTE *int64 `form:"gte"`
	// The [Billing Meter](https://stripe.com/api/billing/meter) ID whose usage is monitored.
	Meter *string `form:"meter"`
	// Whether the alert should only fire only once, or once per billing cycle.
	Recurrence *string `form:"recurrence"`
}

The configuration of the usage threshold.

type BillingAlertUsageThresholdRecurrence

type BillingAlertUsageThresholdRecurrence string

Defines how the alert will behave.

const (
	BillingAlertUsageThresholdRecurrenceOneTime BillingAlertUsageThresholdRecurrence = "one_time"
)

List of values that BillingAlertUsageThresholdRecurrence can take

type BillingCreditBalanceSummary

type BillingCreditBalanceSummary struct {
	APIResource
	// The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry.
	Balances []*BillingCreditBalanceSummaryBalance `json:"balances"`
	// The customer the balance is for.
	Customer *Customer `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"`
}

Indicates the billing credit balance for billing credits granted to a customer.

type BillingCreditBalanceSummaryBalance

type BillingCreditBalanceSummaryBalance struct {
	AvailableBalance *BillingCreditBalanceSummaryBalanceAvailableBalance `json:"available_balance"`
	LedgerBalance    *BillingCreditBalanceSummaryBalanceLedgerBalance    `json:"ledger_balance"`
}

The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry.

type BillingCreditBalanceSummaryBalanceAvailableBalance

type BillingCreditBalanceSummaryBalanceAvailableBalance struct {
	// The monetary amount.
	Monetary *BillingCreditBalanceSummaryBalanceAvailableBalanceMonetary `json:"monetary"`
	// The type of this amount. We currently only support `monetary` billing credits.
	Type BillingCreditBalanceSummaryBalanceAvailableBalanceType `json:"type"`
}

type BillingCreditBalanceSummaryBalanceAvailableBalanceMonetary

type BillingCreditBalanceSummaryBalanceAvailableBalanceMonetary 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"`
	// A positive integer representing the amount.
	Value int64 `json:"value"`
}

The monetary amount.

type BillingCreditBalanceSummaryBalanceAvailableBalanceType

type BillingCreditBalanceSummaryBalanceAvailableBalanceType string

The type of this amount. We currently only support `monetary` billing credits.

const (
	BillingCreditBalanceSummaryBalanceAvailableBalanceTypeMonetary BillingCreditBalanceSummaryBalanceAvailableBalanceType = "monetary"
)

List of values that BillingCreditBalanceSummaryBalanceAvailableBalanceType can take

type BillingCreditBalanceSummaryBalanceLedgerBalance

type BillingCreditBalanceSummaryBalanceLedgerBalance struct {
	// The monetary amount.
	Monetary *BillingCreditBalanceSummaryBalanceLedgerBalanceMonetary `json:"monetary"`
	// The type of this amount. We currently only support `monetary` billing credits.
	Type BillingCreditBalanceSummaryBalanceLedgerBalanceType `json:"type"`
}

type BillingCreditBalanceSummaryBalanceLedgerBalanceMonetary

type BillingCreditBalanceSummaryBalanceLedgerBalanceMonetary 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"`
	// A positive integer representing the amount.
	Value int64 `json:"value"`
}

The monetary amount.

type BillingCreditBalanceSummaryBalanceLedgerBalanceType

type BillingCreditBalanceSummaryBalanceLedgerBalanceType string

The type of this amount. We currently only support `monetary` billing credits.

const (
	BillingCreditBalanceSummaryBalanceLedgerBalanceTypeMonetary BillingCreditBalanceSummaryBalanceLedgerBalanceType = "monetary"
)

List of values that BillingCreditBalanceSummaryBalanceLedgerBalanceType can take

type BillingCreditBalanceSummaryFilterApplicabilityScopeParams

type BillingCreditBalanceSummaryFilterApplicabilityScopeParams struct {
	// A list of prices that the credit grant can apply to. We currently only support the `metered` prices.
	Prices []*BillingCreditBalanceSummaryFilterApplicabilityScopePriceParams `form:"prices"`
	// The price type that credit grants can apply to. We currently only support the `metered` price type.
	PriceType *string `form:"price_type"`
}

The billing credit applicability scope for which to fetch credit balance summary.

type BillingCreditBalanceSummaryFilterApplicabilityScopePriceParams added in v81.4.0

type BillingCreditBalanceSummaryFilterApplicabilityScopePriceParams struct {
	// The price ID this credit grant should apply to.
	ID *string `form:"id"`
}

A list of prices that the credit grant can apply to. We currently only support the `metered` prices.

type BillingCreditBalanceSummaryFilterParams

type BillingCreditBalanceSummaryFilterParams struct {
	// The billing credit applicability scope for which to fetch credit balance summary.
	ApplicabilityScope *BillingCreditBalanceSummaryFilterApplicabilityScopeParams `form:"applicability_scope"`
	// The credit grant for which to fetch credit balance summary.
	CreditGrant *string `form:"credit_grant"`
	// Specify the type of this filter.
	Type *string `form:"type"`
}

The filter criteria for the credit balance summary.

type BillingCreditBalanceSummaryParams

type BillingCreditBalanceSummaryParams struct {
	Params `form:"*"`
	// The customer for which to fetch credit balance summary.
	Customer *string `form:"customer"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// The filter criteria for the credit balance summary.
	Filter *BillingCreditBalanceSummaryFilterParams `form:"filter"`
}

Retrieves the credit balance summary for a customer.

func (*BillingCreditBalanceSummaryParams) AddExpand

func (p *BillingCreditBalanceSummaryParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingCreditBalanceTransaction

type BillingCreditBalanceTransaction struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Credit details for this credit balance transaction. Only present if type is `credit`.
	Credit *BillingCreditBalanceTransactionCredit `json:"credit"`
	// The credit grant associated with this credit balance transaction.
	CreditGrant *BillingCreditGrant `json:"credit_grant"`
	// Debit details for this credit balance transaction. Only present if type is `debit`.
	Debit *BillingCreditBalanceTransactionDebit `json:"debit"`
	// The effective time of this credit balance transaction.
	EffectiveAt int64 `json:"effective_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"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// ID of the test clock this credit balance transaction belongs to.
	TestClock *TestHelpersTestClock `json:"test_clock"`
	// The type of credit balance transaction (credit or debit).
	Type BillingCreditBalanceTransactionType `json:"type"`
}

A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant.

func (*BillingCreditBalanceTransaction) UnmarshalJSON

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

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

type BillingCreditBalanceTransactionCredit

type BillingCreditBalanceTransactionCredit struct {
	Amount *BillingCreditBalanceTransactionCreditAmount `json:"amount"`
	// Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`.
	CreditsApplicationInvoiceVoided *BillingCreditBalanceTransactionCreditCreditsApplicationInvoiceVoided `json:"credits_application_invoice_voided"`
	// The type of credit transaction.
	Type BillingCreditBalanceTransactionCreditType `json:"type"`
}

Credit details for this credit balance transaction. Only present if type is `credit`.

type BillingCreditBalanceTransactionCreditAmount

type BillingCreditBalanceTransactionCreditAmount struct {
	// The monetary amount.
	Monetary *BillingCreditBalanceTransactionCreditAmountMonetary `json:"monetary"`
	// The type of this amount. We currently only support `monetary` billing credits.
	Type BillingCreditBalanceTransactionCreditAmountType `json:"type"`
}

type BillingCreditBalanceTransactionCreditAmountMonetary

type BillingCreditBalanceTransactionCreditAmountMonetary 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"`
	// A positive integer representing the amount.
	Value int64 `json:"value"`
}

The monetary amount.

type BillingCreditBalanceTransactionCreditAmountType

type BillingCreditBalanceTransactionCreditAmountType string

The type of this amount. We currently only support `monetary` billing credits.

const (
	BillingCreditBalanceTransactionCreditAmountTypeMonetary BillingCreditBalanceTransactionCreditAmountType = "monetary"
)

List of values that BillingCreditBalanceTransactionCreditAmountType can take

type BillingCreditBalanceTransactionCreditCreditsApplicationInvoiceVoided added in v81.2.0

type BillingCreditBalanceTransactionCreditCreditsApplicationInvoiceVoided struct {
	// The invoice to which the reinstated billing credits were originally applied.
	Invoice *Invoice `json:"invoice"`
	// The invoice line item to which the reinstated billing credits were originally applied.
	InvoiceLineItem string `json:"invoice_line_item"`
}

Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`.

type BillingCreditBalanceTransactionCreditType

type BillingCreditBalanceTransactionCreditType string

The type of credit transaction.

const (
	BillingCreditBalanceTransactionCreditTypeCreditsApplicationInvoiceVoided BillingCreditBalanceTransactionCreditType = "credits_application_invoice_voided"
	BillingCreditBalanceTransactionCreditTypeCreditsGranted                  BillingCreditBalanceTransactionCreditType = "credits_granted"
)

List of values that BillingCreditBalanceTransactionCreditType can take

type BillingCreditBalanceTransactionDebit

type BillingCreditBalanceTransactionDebit struct {
	Amount *BillingCreditBalanceTransactionDebitAmount `json:"amount"`
	// Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`.
	CreditsApplied *BillingCreditBalanceTransactionDebitCreditsApplied `json:"credits_applied"`
	// The type of debit transaction.
	Type BillingCreditBalanceTransactionDebitType `json:"type"`
}

Debit details for this credit balance transaction. Only present if type is `debit`.

type BillingCreditBalanceTransactionDebitAmount

type BillingCreditBalanceTransactionDebitAmount struct {
	// The monetary amount.
	Monetary *BillingCreditBalanceTransactionDebitAmountMonetary `json:"monetary"`
	// The type of this amount. We currently only support `monetary` billing credits.
	Type BillingCreditBalanceTransactionDebitAmountType `json:"type"`
}

type BillingCreditBalanceTransactionDebitAmountMonetary

type BillingCreditBalanceTransactionDebitAmountMonetary 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"`
	// A positive integer representing the amount.
	Value int64 `json:"value"`
}

The monetary amount.

type BillingCreditBalanceTransactionDebitAmountType

type BillingCreditBalanceTransactionDebitAmountType string

The type of this amount. We currently only support `monetary` billing credits.

const (
	BillingCreditBalanceTransactionDebitAmountTypeMonetary BillingCreditBalanceTransactionDebitAmountType = "monetary"
)

List of values that BillingCreditBalanceTransactionDebitAmountType can take

type BillingCreditBalanceTransactionDebitCreditsApplied

type BillingCreditBalanceTransactionDebitCreditsApplied struct {
	// The invoice to which the billing credits were applied.
	Invoice *Invoice `json:"invoice"`
	// The invoice line item to which the billing credits were applied.
	InvoiceLineItem string `json:"invoice_line_item"`
}

Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`.

type BillingCreditBalanceTransactionDebitType

type BillingCreditBalanceTransactionDebitType string

The type of debit transaction.

const (
	BillingCreditBalanceTransactionDebitTypeCreditsApplied BillingCreditBalanceTransactionDebitType = "credits_applied"
	BillingCreditBalanceTransactionDebitTypeCreditsExpired BillingCreditBalanceTransactionDebitType = "credits_expired"
	BillingCreditBalanceTransactionDebitTypeCreditsVoided  BillingCreditBalanceTransactionDebitType = "credits_voided"
)

List of values that BillingCreditBalanceTransactionDebitType can take

type BillingCreditBalanceTransactionList

type BillingCreditBalanceTransactionList struct {
	APIResource
	ListMeta
	Data []*BillingCreditBalanceTransaction `json:"data"`
}

BillingCreditBalanceTransactionList is a list of CreditBalanceTransactions as retrieved from a list endpoint.

type BillingCreditBalanceTransactionListParams

type BillingCreditBalanceTransactionListParams struct {
	ListParams `form:"*"`
	// The credit grant for which to fetch credit balance transactions.
	CreditGrant *string `form:"credit_grant"`
	// The customer for which to fetch credit balance transactions.
	Customer *string `form:"customer"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Retrieve a list of credit balance transactions.

func (*BillingCreditBalanceTransactionListParams) AddExpand

AddExpand appends a new field to expand.

type BillingCreditBalanceTransactionParams

type BillingCreditBalanceTransactionParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Retrieves a credit balance transaction.

func (*BillingCreditBalanceTransactionParams) AddExpand

AddExpand appends a new field to expand.

type BillingCreditBalanceTransactionType

type BillingCreditBalanceTransactionType string

The type of credit balance transaction (credit or debit).

const (
	BillingCreditBalanceTransactionTypeCredit BillingCreditBalanceTransactionType = "credit"
	BillingCreditBalanceTransactionTypeDebit  BillingCreditBalanceTransactionType = "debit"
)

List of values that BillingCreditBalanceTransactionType can take

type BillingCreditGrant

type BillingCreditGrant struct {
	APIResource
	Amount              *BillingCreditGrantAmount              `json:"amount"`
	ApplicabilityConfig *BillingCreditGrantApplicabilityConfig `json:"applicability_config"`
	// The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
	Category BillingCreditGrantCategory `json:"category"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// ID of the customer receiving the billing credits.
	Customer *Customer `json:"customer"`
	// The time when the billing credits become effective-when they're eligible for use.
	EffectiveAt int64 `json:"effective_at"`
	// The time when the billing credits expire. If not present, the billing credits don't expire.
	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"`
	// 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 descriptive name shown in dashboard.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The priority for applying this credit grant. The highest priority is 0 and the lowest is 100.
	Priority int64 `json:"priority"`
	// ID of the test clock this credit grant belongs to.
	TestClock *TestHelpersTestClock `json:"test_clock"`
	// Time at which the object was last updated. Measured in seconds since the Unix epoch.
	Updated int64 `json:"updated"`
	// The time when this credit grant was voided. If not present, the credit grant hasn't been voided.
	VoidedAt int64 `json:"voided_at"`
}

A credit grant is an API resource that documents the allocation of some billing credits to a customer.

Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)

func (*BillingCreditGrant) UnmarshalJSON

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

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

type BillingCreditGrantAmount

type BillingCreditGrantAmount struct {
	// The monetary amount.
	Monetary *BillingCreditGrantAmountMonetary `json:"monetary"`
	// The type of this amount. We currently only support `monetary` billing credits.
	Type BillingCreditGrantAmountType `json:"type"`
}

type BillingCreditGrantAmountMonetary

type BillingCreditGrantAmountMonetary 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"`
	// A positive integer representing the amount.
	Value int64 `json:"value"`
}

The monetary amount.

type BillingCreditGrantAmountMonetaryParams

type BillingCreditGrantAmountMonetaryParams struct {
	// Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter.
	Currency *string `form:"currency"`
	// A positive integer representing the amount of the credit grant.
	Value *int64 `form:"value"`
}

The monetary amount.

type BillingCreditGrantAmountParams

type BillingCreditGrantAmountParams struct {
	// The monetary amount.
	Monetary *BillingCreditGrantAmountMonetaryParams `form:"monetary"`
	// Specify the type of this amount. We currently only support `monetary` billing credits.
	Type *string `form:"type"`
}

Amount of this credit grant.

type BillingCreditGrantAmountType

type BillingCreditGrantAmountType string

The type of this amount. We currently only support `monetary` billing credits.

const (
	BillingCreditGrantAmountTypeMonetary BillingCreditGrantAmountType = "monetary"
)

List of values that BillingCreditGrantAmountType can take

type BillingCreditGrantApplicabilityConfig

type BillingCreditGrantApplicabilityConfig struct {
	Scope *BillingCreditGrantApplicabilityConfigScope `json:"scope"`
}

type BillingCreditGrantApplicabilityConfigParams

type BillingCreditGrantApplicabilityConfigParams struct {
	// Specify the scope of this applicability config.
	Scope *BillingCreditGrantApplicabilityConfigScopeParams `form:"scope"`
}

Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.

type BillingCreditGrantApplicabilityConfigScope

type BillingCreditGrantApplicabilityConfigScope struct {
	// The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
	Prices []*BillingCreditGrantApplicabilityConfigScopePrice `json:"prices"`
	// The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
	PriceType BillingCreditGrantApplicabilityConfigScopePriceType `json:"price_type"`
}

type BillingCreditGrantApplicabilityConfigScopeParams

type BillingCreditGrantApplicabilityConfigScopeParams struct {
	// A list of prices that the credit grant can apply to. We currently only support the `metered` prices.
	Prices []*BillingCreditGrantApplicabilityConfigScopePriceParams `form:"prices"`
	// The price type that credit grants can apply to. We currently only support the `metered` price type.
	PriceType *string `form:"price_type"`
}

Specify the scope of this applicability config.

type BillingCreditGrantApplicabilityConfigScopePrice added in v81.4.0

type BillingCreditGrantApplicabilityConfigScopePrice struct {
	// Unique identifier for the object.
	ID string `json:"id"`
}

The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.

type BillingCreditGrantApplicabilityConfigScopePriceParams added in v81.4.0

type BillingCreditGrantApplicabilityConfigScopePriceParams struct {
	// The price ID this credit grant should apply to.
	ID *string `form:"id"`
}

A list of prices that the credit grant can apply to. We currently only support the `metered` prices.

type BillingCreditGrantApplicabilityConfigScopePriceType

type BillingCreditGrantApplicabilityConfigScopePriceType string

The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.

const (
	BillingCreditGrantApplicabilityConfigScopePriceTypeMetered BillingCreditGrantApplicabilityConfigScopePriceType = "metered"
)

List of values that BillingCreditGrantApplicabilityConfigScopePriceType can take

type BillingCreditGrantCategory

type BillingCreditGrantCategory string

The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.

const (
	BillingCreditGrantCategoryPaid        BillingCreditGrantCategory = "paid"
	BillingCreditGrantCategoryPromotional BillingCreditGrantCategory = "promotional"
)

List of values that BillingCreditGrantCategory can take

type BillingCreditGrantExpireParams

type BillingCreditGrantExpireParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Expires a credit grant.

func (*BillingCreditGrantExpireParams) AddExpand

func (p *BillingCreditGrantExpireParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingCreditGrantList

type BillingCreditGrantList struct {
	APIResource
	ListMeta
	Data []*BillingCreditGrant `json:"data"`
}

BillingCreditGrantList is a list of CreditGrants as retrieved from a list endpoint.

type BillingCreditGrantListParams

type BillingCreditGrantListParams struct {
	ListParams `form:"*"`
	// Only return credit grants for this customer.
	Customer *string `form:"customer"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Retrieve a list of credit grants.

func (*BillingCreditGrantListParams) AddExpand

func (p *BillingCreditGrantListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingCreditGrantParams

type BillingCreditGrantParams struct {
	Params `form:"*"`
	// Amount of this credit grant.
	Amount *BillingCreditGrantAmountParams `form:"amount"`
	// Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
	ApplicabilityConfig *BillingCreditGrantApplicabilityConfigParams `form:"applicability_config"`
	// The category of this credit grant.
	Category *string `form:"category"`
	// ID of the customer to receive the billing credits.
	Customer *string `form:"customer"`
	// The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified.
	EffectiveAt *int64 `form:"effective_at"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
	ExpiresAt *int64 `form:"expires_at"`
	// Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
	Metadata map[string]string `form:"metadata"`
	// A descriptive name shown in the Dashboard.
	Name *string `form:"name"`
	// The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.
	Priority *int64 `form:"priority"`
}

Creates a credit grant.

func (*BillingCreditGrantParams) AddExpand

func (p *BillingCreditGrantParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*BillingCreditGrantParams) AddMetadata

func (p *BillingCreditGrantParams) AddMetadata(key string, value string)

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

type BillingCreditGrantVoidGrantParams

type BillingCreditGrantVoidGrantParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Voids a credit grant.

func (*BillingCreditGrantVoidGrantParams) AddExpand

func (p *BillingCreditGrantVoidGrantParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingMeter

type BillingMeter struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created            int64                           `json:"created"`
	CustomerMapping    *BillingMeterCustomerMapping    `json:"customer_mapping"`
	DefaultAggregation *BillingMeterDefaultAggregation `json:"default_aggregation"`
	// The meter's name.
	DisplayName string `json:"display_name"`
	// The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
	EventName string `json:"event_name"`
	// The time window to pre-aggregate meter events for, if any.
	EventTimeWindow BillingMeterEventTimeWindow `json:"event_time_window"`
	// 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 meter's status.
	Status            BillingMeterStatus             `json:"status"`
	StatusTransitions *BillingMeterStatusTransitions `json:"status_transitions"`
	// Time at which the object was last updated. Measured in seconds since the Unix epoch.
	Updated       int64                      `json:"updated"`
	ValueSettings *BillingMeterValueSettings `json:"value_settings"`
}

Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill.

Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based)

func (*BillingMeter) UnmarshalJSON

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

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

type BillingMeterCustomerMapping

type BillingMeterCustomerMapping struct {
	// The key in the meter event payload to use for mapping the event to a customer.
	EventPayloadKey string `json:"event_payload_key"`
	// The method for mapping a meter event to a customer.
	Type BillingMeterCustomerMappingType `json:"type"`
}

type BillingMeterCustomerMappingParams

type BillingMeterCustomerMappingParams struct {
	// The key in the meter event payload to use for mapping the event to a customer.
	EventPayloadKey *string `form:"event_payload_key"`
	// The method for mapping a meter event to a customer. Must be `by_id`.
	Type *string `form:"type"`
}

Fields that specify how to map a meter event to a customer.

type BillingMeterCustomerMappingType

type BillingMeterCustomerMappingType string

The method for mapping a meter event to a customer.

const (
	BillingMeterCustomerMappingTypeByID BillingMeterCustomerMappingType = "by_id"
)

List of values that BillingMeterCustomerMappingType can take

type BillingMeterDeactivateParams

type BillingMeterDeactivateParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.

func (*BillingMeterDeactivateParams) AddExpand

func (p *BillingMeterDeactivateParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingMeterDefaultAggregation

type BillingMeterDefaultAggregation struct {
	// Specifies how events are aggregated.
	Formula BillingMeterDefaultAggregationFormula `json:"formula"`
}

type BillingMeterDefaultAggregationFormula

type BillingMeterDefaultAggregationFormula string

Specifies how events are aggregated.

const (
	BillingMeterDefaultAggregationFormulaCount BillingMeterDefaultAggregationFormula = "count"
	BillingMeterDefaultAggregationFormulaSum   BillingMeterDefaultAggregationFormula = "sum"
)

List of values that BillingMeterDefaultAggregationFormula can take

type BillingMeterDefaultAggregationParams

type BillingMeterDefaultAggregationParams struct {
	// Specifies how events are aggregated. Allowed values are `count` to count the number of events and `sum` to sum each event's value.
	Formula *string `form:"formula"`
}

The default settings to aggregate a meter's events with.

type BillingMeterEvent

type BillingMeterEvent struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The name of the meter event. Corresponds with the `event_name` field on a meter.
	EventName string `json:"event_name"`
	// A unique identifier for the event.
	Identifier string `json:"identifier"`
	// 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 payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
	Payload map[string]string `json:"payload"`
	// The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.
	Timestamp int64 `json:"timestamp"`
}

Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event's payload and how to aggregate those events.

type BillingMeterEventAdjustment

type BillingMeterEventAdjustment struct {
	APIResource
	// Specifies which event to cancel.
	Cancel *BillingMeterEventAdjustmentCancel `json:"cancel"`
	// The name of the meter event. Corresponds with the `event_name` field on a meter.
	EventName string `json:"event_name"`
	// 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 meter event adjustment's status.
	Status BillingMeterEventAdjustmentStatus `json:"status"`
	// Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
	Type BillingMeterEventAdjustmentType `json:"type"`
}

A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer.

type BillingMeterEventAdjustmentCancel

type BillingMeterEventAdjustmentCancel struct {
	// Unique identifier for the event.
	Identifier string `json:"identifier"`
}

Specifies which event to cancel.

type BillingMeterEventAdjustmentCancelParams

type BillingMeterEventAdjustmentCancelParams struct {
	// Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
	Identifier *string `form:"identifier"`
}

Specifies which event to cancel.

type BillingMeterEventAdjustmentParams

type BillingMeterEventAdjustmentParams struct {
	Params `form:"*"`
	// Specifies which event to cancel.
	Cancel *BillingMeterEventAdjustmentCancelParams `form:"cancel"`
	// The name of the meter event. Corresponds with the `event_name` field on a meter.
	EventName *string `form:"event_name"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
	Type *string `form:"type"`
}

Creates a billing meter event adjustment.

func (*BillingMeterEventAdjustmentParams) AddExpand

func (p *BillingMeterEventAdjustmentParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingMeterEventAdjustmentStatus

type BillingMeterEventAdjustmentStatus string

The meter event adjustment's status.

const (
	BillingMeterEventAdjustmentStatusComplete BillingMeterEventAdjustmentStatus = "complete"
	BillingMeterEventAdjustmentStatusPending  BillingMeterEventAdjustmentStatus = "pending"
)

List of values that BillingMeterEventAdjustmentStatus can take

type BillingMeterEventAdjustmentType

type BillingMeterEventAdjustmentType string

Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.

const (
	BillingMeterEventAdjustmentTypeCancel BillingMeterEventAdjustmentType = "cancel"
)

List of values that BillingMeterEventAdjustmentType can take

type BillingMeterEventParams

type BillingMeterEventParams struct {
	Params `form:"*"`
	// The name of the meter event. Corresponds with the `event_name` field on a meter.
	EventName *string `form:"event_name"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.
	Identifier *string `form:"identifier"`
	// The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
	Payload map[string]string `form:"payload"`
	// The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
	Timestamp *int64 `form:"timestamp"`
}

Creates a billing meter event.

func (*BillingMeterEventParams) AddExpand

func (p *BillingMeterEventParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingMeterEventSummary

type BillingMeterEventSummary struct {
	// Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`.
	AggregatedValue float64 `json:"aggregated_value"`
	// End timestamp for this event summary (exclusive). Must be aligned with minute boundaries.
	EndTime int64 `json:"end_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 meter associated with this event summary.
	Meter string `json:"meter"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries.
	StartTime int64 `json:"start_time"`
}

A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much usage was accrued by a customer for that period.

Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage.

type BillingMeterEventSummaryList

type BillingMeterEventSummaryList struct {
	APIResource
	ListMeta
	Data []*BillingMeterEventSummary `json:"data"`
}

BillingMeterEventSummaryList is a list of MeterEventSummaries as retrieved from a list endpoint.

type BillingMeterEventSummaryListParams

type BillingMeterEventSummaryListParams struct {
	ListParams `form:"*"`
	ID         *string `form:"-"` // Included in URL
	// The customer for which to fetch event summaries.
	Customer *string `form:"customer"`
	// The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.
	EndTime *int64 `form:"end_time"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries.
	StartTime *int64 `form:"start_time"`
	// Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC).
	ValueGroupingWindow *string `form:"value_grouping_window"`
}

Retrieve a list of billing meter event summaries.

func (*BillingMeterEventSummaryListParams) AddExpand

AddExpand appends a new field to expand.

type BillingMeterEventTimeWindow

type BillingMeterEventTimeWindow string

The time window to pre-aggregate meter events for, if any.

const (
	BillingMeterEventTimeWindowDay  BillingMeterEventTimeWindow = "day"
	BillingMeterEventTimeWindowHour BillingMeterEventTimeWindow = "hour"
)

List of values that BillingMeterEventTimeWindow can take

type BillingMeterList

type BillingMeterList struct {
	APIResource
	ListMeta
	Data []*BillingMeter `json:"data"`
}

BillingMeterList is a list of Meters as retrieved from a list endpoint.

type BillingMeterListParams

type BillingMeterListParams struct {
	ListParams `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// Filter results to only include meters with the given status.
	Status *string `form:"status"`
}

Retrieve a list of billing meters.

func (*BillingMeterListParams) AddExpand

func (p *BillingMeterListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingMeterParams

type BillingMeterParams struct {
	Params `form:"*"`
	// Fields that specify how to map a meter event to a customer.
	CustomerMapping *BillingMeterCustomerMappingParams `form:"customer_mapping"`
	// The default settings to aggregate a meter's events with.
	DefaultAggregation *BillingMeterDefaultAggregationParams `form:"default_aggregation"`
	// The meter's name. Not visible to the customer.
	DisplayName *string `form:"display_name"`
	// The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
	EventName *string `form:"event_name"`
	// The time window to pre-aggregate meter events for, if any.
	EventTimeWindow *string `form:"event_time_window"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// Fields that specify how to calculate a meter event's value.
	ValueSettings *BillingMeterValueSettingsParams `form:"value_settings"`
}

Creates a billing meter.

func (*BillingMeterParams) AddExpand

func (p *BillingMeterParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingMeterReactivateParams

type BillingMeterReactivateParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.

func (*BillingMeterReactivateParams) AddExpand

func (p *BillingMeterReactivateParams) AddExpand(f string)

AddExpand appends a new field to expand.

type BillingMeterStatus

type BillingMeterStatus string

The meter's status.

const (
	BillingMeterStatusActive   BillingMeterStatus = "active"
	BillingMeterStatusInactive BillingMeterStatus = "inactive"
)

List of values that BillingMeterStatus can take

type BillingMeterStatusTransitions

type BillingMeterStatusTransitions struct {
	// The time the meter was deactivated, if any. Measured in seconds since Unix epoch.
	DeactivatedAt int64 `json:"deactivated_at"`
}

type BillingMeterValueSettings

type BillingMeterValueSettings struct {
	// The key in the meter event payload to use as the value for this meter.
	EventPayloadKey string `json:"event_payload_key"`
}

type BillingMeterValueSettingsParams

type BillingMeterValueSettingsParams struct {
	// The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used".
	EventPayloadKey *string `form:"event_payload_key"`
}

Fields that specify how to calculate a meter event's value.

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"`
	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"
	BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdateName     BillingPortalConfigurationFeaturesCustomerUpdateAllowedUpdate = "name"
	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 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`. Passing `always_invoice` will result in an error. 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 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 up to 10 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`. Defaults to a value of `none` if you don't set it during creation.
	ProrationBehavior   BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior    `json:"proration_behavior"`
	ScheduleAtPeriodEnd *BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEnd `json:"schedule_at_period_end"`
}

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 up to 10 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"`
	// Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
	ScheduleAtPeriodEnd *BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndParams `form:"schedule_at_period_end"`
}

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 up to 10 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 up to 10 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`. Defaults to a value of `none` if you don't set it during creation.

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

List of values that BillingPortalConfigurationFeaturesSubscriptionUpdateProrationBehavior can take

type BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEnd

type BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEnd struct {
	// List of conditions. When any condition is true, an update will be scheduled at the end of the current period.
	Conditions []*BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition `json:"conditions"`
}

type BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition

type BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition struct {
	// The type of condition.
	Type BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionType `json:"type"`
}

List of conditions. When any condition is true, an update will be scheduled at the end of the current period.

type BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionParams

type BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionParams struct {
	// The type of condition.
	Type *string `form:"type"`
}

List of conditions. When any condition is true, the update will be scheduled at the end of the current period.

type BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionType

type BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionType string

The type of condition.

const (
	BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionTypeDecreasingItemAmount BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionType = "decreasing_item_amount"
	BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionTypeShorteningInterval   BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionType = "shortening_interval"
)

List of values that BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionType can take

type BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndParams

type BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndParams struct {
	// List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
	Conditions []*BillingPortalConfigurationFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionParams `form:"conditions"`
}

Setting to control when an update should be scheduled at the end of the period instead of applying immediately.

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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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.

func (*BillingPortalConfigurationListParams) AddExpand

AddExpand appends a new field to expand.

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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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"`
	// 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"`
}

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

func (*BillingPortalConfigurationParams) AddExpand

func (p *BillingPortalConfigurationParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*BillingPortalConfigurationParams) AddMetadata

func (p *BillingPortalConfigurationParams) AddMetadata(key string, value string)

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

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"`
	// Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
	Flow *BillingPortalSessionFlow `json:"flow"`
	// 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/separate-charges-and-transfers#settlement-merchant). 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.

Related guide: [Customer management](https://stripe.com/customer-management)

type BillingPortalSessionFlow

type BillingPortalSessionFlow struct {
	AfterCompletion *BillingPortalSessionFlowAfterCompletion `json:"after_completion"`
	// Configuration when `flow.type=subscription_cancel`.
	SubscriptionCancel *BillingPortalSessionFlowSubscriptionCancel `json:"subscription_cancel"`
	// Configuration when `flow.type=subscription_update`.
	SubscriptionUpdate *BillingPortalSessionFlowSubscriptionUpdate `json:"subscription_update"`
	// Configuration when `flow.type=subscription_update_confirm`.
	SubscriptionUpdateConfirm *BillingPortalSessionFlowSubscriptionUpdateConfirm `json:"subscription_update_confirm"`
	// Type of flow that the customer will go through.
	Type BillingPortalSessionFlowType `json:"type"`
}

Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.

type BillingPortalSessionFlowAfterCompletion

type BillingPortalSessionFlowAfterCompletion struct {
	// Configuration when `after_completion.type=hosted_confirmation`.
	HostedConfirmation *BillingPortalSessionFlowAfterCompletionHostedConfirmation `json:"hosted_confirmation"`
	// Configuration when `after_completion.type=redirect`.
	Redirect *BillingPortalSessionFlowAfterCompletionRedirect `json:"redirect"`
	// The specified type of behavior after the flow is completed.
	Type BillingPortalSessionFlowAfterCompletionType `json:"type"`
}

type BillingPortalSessionFlowAfterCompletionHostedConfirmation

type BillingPortalSessionFlowAfterCompletionHostedConfirmation struct {
	// A custom message to display to the customer after the flow is completed.
	CustomMessage string `json:"custom_message"`
}

Configuration when `after_completion.type=hosted_confirmation`.

type BillingPortalSessionFlowAfterCompletionRedirect

type BillingPortalSessionFlowAfterCompletionRedirect struct {
	// The URL the customer will be redirected to after the flow is completed.
	ReturnURL string `json:"return_url"`
}

Configuration when `after_completion.type=redirect`.

type BillingPortalSessionFlowAfterCompletionType

type BillingPortalSessionFlowAfterCompletionType string

The specified type of behavior after the flow is completed.

const (
	BillingPortalSessionFlowAfterCompletionTypeHostedConfirmation BillingPortalSessionFlowAfterCompletionType = "hosted_confirmation"
	BillingPortalSessionFlowAfterCompletionTypePortalHomepage     BillingPortalSessionFlowAfterCompletionType = "portal_homepage"
	BillingPortalSessionFlowAfterCompletionTypeRedirect           BillingPortalSessionFlowAfterCompletionType = "redirect"
)

List of values that BillingPortalSessionFlowAfterCompletionType can take

type BillingPortalSessionFlowDataAfterCompletionHostedConfirmationParams

type BillingPortalSessionFlowDataAfterCompletionHostedConfirmationParams struct {
	// A custom message to display to the customer after the flow is completed.
	CustomMessage *string `form:"custom_message"`
}

Configuration when `after_completion.type=hosted_confirmation`.

type BillingPortalSessionFlowDataAfterCompletionParams

type BillingPortalSessionFlowDataAfterCompletionParams struct {
	// Configuration when `after_completion.type=hosted_confirmation`.
	HostedConfirmation *BillingPortalSessionFlowDataAfterCompletionHostedConfirmationParams `form:"hosted_confirmation"`
	// Configuration when `after_completion.type=redirect`.
	Redirect *BillingPortalSessionFlowDataAfterCompletionRedirectParams `form:"redirect"`
	// The specified behavior after the flow is completed.
	Type *string `form:"type"`
}

Behavior after the flow is completed.

type BillingPortalSessionFlowDataAfterCompletionRedirectParams

type BillingPortalSessionFlowDataAfterCompletionRedirectParams struct {
	// The URL the customer will be redirected to after the flow is completed.
	ReturnURL *string `form:"return_url"`
}

Configuration when `after_completion.type=redirect`.

type BillingPortalSessionFlowDataParams

type BillingPortalSessionFlowDataParams struct {
	// Behavior after the flow is completed.
	AfterCompletion *BillingPortalSessionFlowDataAfterCompletionParams `form:"after_completion"`
	// Configuration when `flow_data.type=subscription_cancel`.
	SubscriptionCancel *BillingPortalSessionFlowDataSubscriptionCancelParams `form:"subscription_cancel"`
	// Configuration when `flow_data.type=subscription_update`.
	SubscriptionUpdate *BillingPortalSessionFlowDataSubscriptionUpdateParams `form:"subscription_update"`
	// Configuration when `flow_data.type=subscription_update_confirm`.
	SubscriptionUpdateConfirm *BillingPortalSessionFlowDataSubscriptionUpdateConfirmParams `form:"subscription_update_confirm"`
	// Type of flow that the customer will go through.
	Type *string `form:"type"`
}

Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.

type BillingPortalSessionFlowDataSubscriptionCancelParams

type BillingPortalSessionFlowDataSubscriptionCancelParams struct {
	// Specify a retention strategy to be used in the cancellation flow.
	Retention *BillingPortalSessionFlowDataSubscriptionCancelRetentionParams `form:"retention"`
	// The ID of the subscription to be canceled.
	Subscription *string `form:"subscription"`
}

Configuration when `flow_data.type=subscription_cancel`.

type BillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOfferParams

type BillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOfferParams struct {
	// The ID of the coupon to be offered.
	Coupon *string `form:"coupon"`
}

Configuration when `retention.type=coupon_offer`.

type BillingPortalSessionFlowDataSubscriptionCancelRetentionParams

type BillingPortalSessionFlowDataSubscriptionCancelRetentionParams struct {
	// Configuration when `retention.type=coupon_offer`.
	CouponOffer *BillingPortalSessionFlowDataSubscriptionCancelRetentionCouponOfferParams `form:"coupon_offer"`
	// Type of retention strategy to use with the customer.
	Type *string `form:"type"`
}

Specify a retention strategy to be used in the cancellation flow.

type BillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscountParams

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

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

type BillingPortalSessionFlowDataSubscriptionUpdateConfirmItemParams

type BillingPortalSessionFlowDataSubscriptionUpdateConfirmItemParams struct {
	// The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
	ID *string `form:"id"`
	// The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
	Price *string `form:"price"`
	// [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
	Quantity *int64 `form:"quantity"`
}

The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.

type BillingPortalSessionFlowDataSubscriptionUpdateConfirmParams

type BillingPortalSessionFlowDataSubscriptionUpdateConfirmParams struct {
	// The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
	Discounts []*BillingPortalSessionFlowDataSubscriptionUpdateConfirmDiscountParams `form:"discounts"`
	// The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
	Items []*BillingPortalSessionFlowDataSubscriptionUpdateConfirmItemParams `form:"items"`
	// The ID of the subscription to be updated.
	Subscription *string `form:"subscription"`
}

Configuration when `flow_data.type=subscription_update_confirm`.

type BillingPortalSessionFlowDataSubscriptionUpdateParams

type BillingPortalSessionFlowDataSubscriptionUpdateParams struct {
	// The ID of the subscription to be updated.
	Subscription *string `form:"subscription"`
}

Configuration when `flow_data.type=subscription_update`.

type BillingPortalSessionFlowSubscriptionCancel

type BillingPortalSessionFlowSubscriptionCancel struct {
	// Specify a retention strategy to be used in the cancellation flow.
	Retention *BillingPortalSessionFlowSubscriptionCancelRetention `json:"retention"`
	// The ID of the subscription to be canceled.
	Subscription string `json:"subscription"`
}

Configuration when `flow.type=subscription_cancel`.

type BillingPortalSessionFlowSubscriptionCancelRetention

type BillingPortalSessionFlowSubscriptionCancelRetention struct {
	// Configuration when `retention.type=coupon_offer`.
	CouponOffer *BillingPortalSessionFlowSubscriptionCancelRetentionCouponOffer `json:"coupon_offer"`
	// Type of retention strategy that will be used.
	Type BillingPortalSessionFlowSubscriptionCancelRetentionType `json:"type"`
}

Specify a retention strategy to be used in the cancellation flow.

type BillingPortalSessionFlowSubscriptionCancelRetentionCouponOffer

type BillingPortalSessionFlowSubscriptionCancelRetentionCouponOffer struct {
	// The ID of the coupon to be offered.
	Coupon string `json:"coupon"`
}

Configuration when `retention.type=coupon_offer`.

type BillingPortalSessionFlowSubscriptionCancelRetentionType

type BillingPortalSessionFlowSubscriptionCancelRetentionType string

Type of retention strategy that will be used.

const (
	BillingPortalSessionFlowSubscriptionCancelRetentionTypeCouponOffer BillingPortalSessionFlowSubscriptionCancelRetentionType = "coupon_offer"
)

List of values that BillingPortalSessionFlowSubscriptionCancelRetentionType can take

type BillingPortalSessionFlowSubscriptionUpdate

type BillingPortalSessionFlowSubscriptionUpdate struct {
	// The ID of the subscription to be updated.
	Subscription string `json:"subscription"`
}

Configuration when `flow.type=subscription_update`.

type BillingPortalSessionFlowSubscriptionUpdateConfirm

type BillingPortalSessionFlowSubscriptionUpdateConfirm struct {
	// The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
	Discounts []*BillingPortalSessionFlowSubscriptionUpdateConfirmDiscount `json:"discounts"`
	// The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
	Items []*BillingPortalSessionFlowSubscriptionUpdateConfirmItem `json:"items"`
	// The ID of the subscription to be updated.
	Subscription string `json:"subscription"`
}

Configuration when `flow.type=subscription_update_confirm`.

type BillingPortalSessionFlowSubscriptionUpdateConfirmDiscount

type BillingPortalSessionFlowSubscriptionUpdateConfirmDiscount struct {
	// The ID of the coupon to apply to this subscription update.
	Coupon string `json:"coupon"`
	// The ID of a promotion code to apply to this subscription update.
	PromotionCode string `json:"promotion_code"`
}

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

type BillingPortalSessionFlowSubscriptionUpdateConfirmItem

type BillingPortalSessionFlowSubscriptionUpdateConfirmItem struct {
	// The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
	ID string `json:"id"`
	// The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
	Price string `json:"price"`
	// [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
	Quantity int64 `json:"quantity"`
}

The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.

type BillingPortalSessionFlowType

type BillingPortalSessionFlowType string

Type of flow that the customer will go through.

const (
	BillingPortalSessionFlowTypePaymentMethodUpdate       BillingPortalSessionFlowType = "payment_method_update"
	BillingPortalSessionFlowTypeSubscriptionCancel        BillingPortalSessionFlowType = "subscription_cancel"
	BillingPortalSessionFlowTypeSubscriptionUpdate        BillingPortalSessionFlowType = "subscription_update"
	BillingPortalSessionFlowTypeSubscriptionUpdateConfirm BillingPortalSessionFlowType = "subscription_update_confirm"
)

List of values that BillingPortalSessionFlowType can take

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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
	FlowData *BillingPortalSessionFlowDataParams `form:"flow_data"`
	// 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/separate-charges-and-transfers#settlement-merchant). 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.

func (*BillingPortalSessionParams) AddExpand

func (p *BillingPortalSessionParams) AddExpand(f string)

AddExpand appends a new field to expand.

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.
	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

Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).

const (
	CapabilityDisabledReasonOther                       CapabilityDisabledReason = "other"
	CapabilityDisabledReasonPausedInactivity            CapabilityDisabledReason = "paused.inactivity"
	CapabilityDisabledReasonPendingOnboarding           CapabilityDisabledReason = "pending.onboarding"
	CapabilityDisabledReasonPendingReview               CapabilityDisabledReason = "pending.review"
	CapabilityDisabledReasonPlatformDisabled            CapabilityDisabledReason = "platform_disabled"
	CapabilityDisabledReasonPlatformPaused              CapabilityDisabledReason = "platform_paused"
	CapabilityDisabledReasonRejectedInactivity          CapabilityDisabledReason = "rejected.inactivity"
	CapabilityDisabledReasonRejectedOther               CapabilityDisabledReason = "rejected.other"
	CapabilityDisabledReasonRejectedUnsupportedBusiness CapabilityDisabledReason = "rejected.unsupported_business"
	CapabilityDisabledReasonRequirementsFieldsNeeded    CapabilityDisabledReason = "requirements.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` becomes 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 an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account.
	DisabledReason CapabilityFutureRequirementsDisabledReason `json:"disabled_reason"`
	// Fields that are `currently_due` and need to be collected again because validation or verification failed.
	Errors []*CapabilityFutureRequirementsError `json:"errors"`
	// Fields you must collect when all 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 might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending.
	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 CapabilityFutureRequirementsDisabledReason

type CapabilityFutureRequirementsDisabledReason string

This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account.

const (
	CapabilityFutureRequirementsDisabledReasonOther                       CapabilityFutureRequirementsDisabledReason = "other"
	CapabilityFutureRequirementsDisabledReasonPausedInactivity            CapabilityFutureRequirementsDisabledReason = "paused.inactivity"
	CapabilityFutureRequirementsDisabledReasonPendingOnboarding           CapabilityFutureRequirementsDisabledReason = "pending.onboarding"
	CapabilityFutureRequirementsDisabledReasonPendingReview               CapabilityFutureRequirementsDisabledReason = "pending.review"
	CapabilityFutureRequirementsDisabledReasonPlatformDisabled            CapabilityFutureRequirementsDisabledReason = "platform_disabled"
	CapabilityFutureRequirementsDisabledReasonPlatformPaused              CapabilityFutureRequirementsDisabledReason = "platform_paused"
	CapabilityFutureRequirementsDisabledReasonRejectedInactivity          CapabilityFutureRequirementsDisabledReason = "rejected.inactivity"
	CapabilityFutureRequirementsDisabledReasonRejectedOther               CapabilityFutureRequirementsDisabledReason = "rejected.other"
	CapabilityFutureRequirementsDisabledReasonRejectedUnsupportedBusiness CapabilityFutureRequirementsDisabledReason = "rejected.unsupported_business"
	CapabilityFutureRequirementsDisabledReasonRequirementsFieldsNeeded    CapabilityFutureRequirementsDisabledReason = "requirements.fields_needed"
)

List of values that CapabilityFutureRequirementsDisabledReason can take

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
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

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

func (*CapabilityListParams) AddExpand

func (p *CapabilityListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type CapabilityParams

type CapabilityParams struct {
	Params  `form:"*"`
	Account *string `form:"-"` // Included in URL
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays.
	//
	// If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error.
	Requested *bool `form:"requested"`
}

Retrieves information about the specified Account Capability.

func (*CapabilityParams) AddExpand

func (p *CapabilityParams) AddExpand(f string)

AddExpand appends a new field to expand.

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"`
	// Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
	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 you must collect when all 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 might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
	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.

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. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
	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"`
	// This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
	AllowRedisplay CardAllowRedisplay `json:"allow_redisplay"`
	// 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`, `Eftpos Australia`, `Girocard`, `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://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
	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. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
	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.
	//
	// *As of May 1, 2021, card fingerprint in India for Connect changed 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"`
	Networks *CardNetworks `json:"networks"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Status of a card based on the card issuer.
	RegulatedStatus CardRegulatedStatus `json:"regulated_status"`
	// For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) 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 CardAllowRedisplay added in v81.2.0

type CardAllowRedisplay string

This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.

const (
	CardAllowRedisplayAlways      CardAllowRedisplay = "always"
	CardAllowRedisplayLimited     CardAllowRedisplay = "limited"
	CardAllowRedisplayUnspecified CardAllowRedisplay = "unspecified"
)

List of values that CardAllowRedisplay 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`, `Eftpos Australia`, `Girocard`, `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:"*"`
	Customer   *string `form:"-"` // Included in URL
	Account    *string `form:"-"` // Included in URL
	Object     *string `form:"object"`
}

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 CardNetworks

type CardNetworks struct {
	// The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
	Preferred string `json:"preferred"`
}

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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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"`
	// 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"`
	// 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:"*"`
}

Delete a specified source for a given customer.

func (*CardParams) AddExpand

func (p *CardParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*CardParams) AddMetadata

func (p *CardParams) AddMetadata(key string, value string)

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

func (*CardParams) AppendToAsCardSourceOrExternalAccount

func (p *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 CardRegulatedStatus added in v81.2.0

type CardRegulatedStatus string

Status of a card based on the card issuer.

const (
	CardRegulatedStatusRegulated   CardRegulatedStatus = "regulated"
	CardRegulatedStatusUnregulated CardRegulatedStatus = "unregulated"
)

List of values that CardRegulatedStatus can take

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:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// A hash of settings for this cash balance.
	Settings *CashBalanceSettingsParams `form:"settings"`
	Customer *string                    `form:"-"` // Included in URL
}

Retrieves a customer's cash balance.

func (*CashBalanceParams) AddExpand

func (p *CashBalanceParams) AddExpand(f string)

AddExpand appends a new field to expand.

type CashBalanceSettings

type CashBalanceSettings struct {
	// The configuration for how funds that land in the customer cash balance are reconciled.
	ReconciliationMode CashBalanceSettingsReconciliationMode `json:"reconciliation_mode"`
	// A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance
	UsingMerchantDefault bool `json:"using_merchant_default"`
}

type CashBalanceSettingsParams

type CashBalanceSettingsParams struct {
	// Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. 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 cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
	AmountCaptured int64 `json:"amount_captured"`
	// Amount in cents (or local equivalent) 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#collect-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#collect-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. This value only exists for card payments.
	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"`
	// 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/error-codes) 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/separate-charges-and-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://docs.stripe.com/connect/destination-charges) for details.
	SourceTransfer *Transfer `json:"source_transfer"`
	// For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
	//
	// For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
	StatementDescriptor string `json:"statement_descriptor"`
	// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement 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/separate-charges-and-transfers#transfer-options) for details.
	TransferGroup string `json:"transfer_group"`
}

The `Charge` object represents a single attempt to move money into your Stripe account. PaymentIntent confirmation is the most common way to create Charges, but transferring money to a different Stripe account through Connect also creates Charges. Some legacy payment flows create Charges directly, which is not recommended for new integrations.

Example (Get)
package main

import (
	"log"

	stripe "github.com/stripe/stripe-go/v81"
	"github.com/stripe/stripe-go/v81/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)
}
Example (New)
package main

import (
	"log"

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

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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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 a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
	//
	// For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
	StatementDescriptor *string `form:"statement_descriptor"`
	// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement 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/separate-charges-and-transfers#transfer-options) for details.
	TransferGroup *string `form:"transfer_group"`
}

Capture the payment of an existing, uncaptured charge that was created 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)), after which they are marked as refunded and capture attempts will fail.

Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).

func (*ChargeCaptureParams) AddExpand

func (p *ChargeCaptureParams) AddExpand(f string)

AddExpand appends a new field to expand.

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:"*"`
	// Only return charges that were created during the given date interval.
	Created *int64 `form:"created"`
	// Only return charges that were created during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return charges for the customer specified by this customer ID.
	Customer *string `form:"customer"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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, limited to 100.
	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.

func (*ChargeListParams) AddExpand

func (p *ChargeListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type ChargeOutcome

type ChargeOutcome struct {
	// An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines).
	AdviceCode ChargeOutcomeAdviceCode `json:"advice_code"`
	// For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error.
	NetworkAdviceCode string `json:"network_advice_code"`
	// For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
	NetworkDeclineCode string `json:"network_decline_code"`
	// 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 ChargeOutcomeAdviceCode added in v81.3.0

type ChargeOutcomeAdviceCode string

An enumerated value providing a more detailed explanation on [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines).

const (
	ChargeOutcomeAdviceCodeConfirmCardData ChargeOutcomeAdviceCode = "confirm_card_data"
	ChargeOutcomeAdviceCodeDoNotTryAgain   ChargeOutcomeAdviceCode = "do_not_try_again"
	ChargeOutcomeAdviceCodeTryAgainLater   ChargeOutcomeAdviceCode = "try_again_later"
)

List of values that ChargeOutcomeAdviceCode can take

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#collect-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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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"`
	// 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. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant).
	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"`
	// The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
	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 a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
	//
	// For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
	StatementDescriptor *string `form:"statement_descriptor"`
	// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement 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/separate-charges-and-transfers#transfer-options) for details.
	TransferGroup *string `form:"transfer_group"`
}

This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents) to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge object used to request payment.

func (*ChargeParams) AddExpand

func (p *ChargeParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*ChargeParams) AddMetadata

func (p *ChargeParams) AddMetadata(key string, value string)

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

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"`
	Alma               *ChargePaymentMethodDetailsAlma               `json:"alma"`
	AmazonPay          *ChargePaymentMethodDetailsAmazonPay          `json:"amazon_pay"`
	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"`
	CashApp            *ChargePaymentMethodDetailsCashApp            `json:"cashapp"`
	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"`
	KakaoPay           *ChargePaymentMethodDetailsKakaoPay           `json:"kakao_pay"`
	Klarna             *ChargePaymentMethodDetailsKlarna             `json:"klarna"`
	Konbini            *ChargePaymentMethodDetailsKonbini            `json:"konbini"`
	KrCard             *ChargePaymentMethodDetailsKrCard             `json:"kr_card"`
	Link               *ChargePaymentMethodDetailsLink               `json:"link"`
	Mobilepay          *ChargePaymentMethodDetailsMobilepay          `json:"mobilepay"`
	Multibanco         *ChargePaymentMethodDetailsMultibanco         `json:"multibanco"`
	NaverPay           *ChargePaymentMethodDetailsNaverPay           `json:"naver_pay"`
	OXXO               *ChargePaymentMethodDetailsOXXO               `json:"oxxo"`
	P24                *ChargePaymentMethodDetailsP24                `json:"p24"`
	PayByBank          *ChargePaymentMethodDetailsPayByBank          `json:"pay_by_bank"`
	Payco              *ChargePaymentMethodDetailsPayco              `json:"payco"`
	PayNow             *ChargePaymentMethodDetailsPayNow             `json:"paynow"`
	Paypal             *ChargePaymentMethodDetailsPaypal             `json:"paypal"`
	Pix                *ChargePaymentMethodDetailsPix                `json:"pix"`
	PromptPay          *ChargePaymentMethodDetailsPromptPay          `json:"promptpay"`
	RevolutPay         *ChargePaymentMethodDetailsRevolutPay         `json:"revolut_pay"`
	SamsungPay         *ChargePaymentMethodDetailsSamsungPay         `json:"samsung_pay"`
	SEPACreditTransfer *ChargePaymentMethodDetailsSEPACreditTransfer `json:"sepa_credit_transfer"`
	SEPADebit          *ChargePaymentMethodDetailsSEPADebit          `json:"sepa_debit"`
	Sofort             *ChargePaymentMethodDetailsSofort             `json:"sofort"`
	StripeAccount      *ChargePaymentMethodDetailsStripeAccount      `json:"stripe_account"`
	Swish              *ChargePaymentMethodDetailsSwish              `json:"swish"`
	TWINT              *ChargePaymentMethodDetailsTWINT              `json:"twint"`
	// The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types.
	// 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"`
	Zip           *ChargePaymentMethodDetailsZip           `json:"zip"`
}

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 {
	// The Affirm transaction ID associated with this payment.
	TransactionID string `json:"transaction_id"`
}

type ChargePaymentMethodDetailsAfterpayClearpay

type ChargePaymentMethodDetailsAfterpayClearpay struct {
	// The Afterpay order ID associated with this payment intent.
	OrderID string `json:"order_id"`
	// 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 ChargePaymentMethodDetailsAlma

type ChargePaymentMethodDetailsAlma struct{}

type ChargePaymentMethodDetailsAmazonPay

type ChargePaymentMethodDetailsAmazonPay struct {
	Funding *ChargePaymentMethodDetailsAmazonPayFunding `json:"funding"`
}

type ChargePaymentMethodDetailsAmazonPayFunding added in v81.2.0

type ChargePaymentMethodDetailsAmazonPayFunding struct {
	Card *ChargePaymentMethodDetailsAmazonPayFundingCard `json:"card"`
	// funding type of the underlying payment method.
	Type ChargePaymentMethodDetailsAmazonPayFundingType `json:"type"`
}

type ChargePaymentMethodDetailsAmazonPayFundingCard added in v81.2.0

type ChargePaymentMethodDetailsAmazonPayFundingCard struct {
	// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Brand string `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"`
	// 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"`
	// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
	Funding string `json:"funding"`
	// The last four digits of the card.
	Last4 string `json:"last4"`
}

type ChargePaymentMethodDetailsAmazonPayFundingType added in v81.2.0

type ChargePaymentMethodDetailsAmazonPayFundingType string

funding type of the underlying payment method.

const (
	ChargePaymentMethodDetailsAmazonPayFundingTypeCard ChargePaymentMethodDetailsAmazonPayFundingType = "card"
)

List of values that ChargePaymentMethodDetailsAmazonPayFundingType can take

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 {
	// A unique and immutable identifier assigned by BLIK to every buyer.
	BuyerID string `json:"buyer_id"`
}

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 {
	// The authorized amount.
	AmountAuthorized int64 `json:"amount_authorized"`
	// Authorization code on the charge.
	AuthorizationCode string `json:"authorization_code"`
	// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Brand PaymentMethodCardBrand `json:"brand"`
	// When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.
	CaptureBefore int64 `json:"capture_before"`
	// 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"`
	ExtendedAuthorization *ChargePaymentMethodDetailsCardExtendedAuthorization `json:"extended_authorization"`
	// 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.
	//
	// *As of May 1, 2021, card fingerprint in India for Connect changed 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"`
	IncrementalAuthorization *ChargePaymentMethodDetailsCardIncrementalAuthorization `json:"incremental_authorization"`
	// 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"`
	Multicapture *ChargePaymentMethodDetailsCardMulticapture `json:"multicapture"`
	// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Network ChargePaymentMethodDetailsCardNetwork `json:"network"`
	// If this card has network token credentials, this contains the details of the network token credentials.
	NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"`
	// This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
	NetworkTransactionID string                                     `json:"network_transaction_id"`
	Overcapture          *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"`
	// Status of a card based on the card issuer.
	RegulatedStatus ChargePaymentMethodDetailsCardRegulatedStatus `json:"regulated_status"`
	// 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 ChargePaymentMethodDetailsCardExtendedAuthorization

type ChargePaymentMethodDetailsCardExtendedAuthorization struct {
	// Indicates whether or not the capture window is extended beyond the standard authorization.
	Status ChargePaymentMethodDetailsCardExtendedAuthorizationStatus `json:"status"`
}

type ChargePaymentMethodDetailsCardExtendedAuthorizationStatus

type ChargePaymentMethodDetailsCardExtendedAuthorizationStatus string

Indicates whether or not the capture window is extended beyond the standard authorization.

const (
	ChargePaymentMethodDetailsCardExtendedAuthorizationStatusDisabled ChargePaymentMethodDetailsCardExtendedAuthorizationStatus = "disabled"
	ChargePaymentMethodDetailsCardExtendedAuthorizationStatusEnabled  ChargePaymentMethodDetailsCardExtendedAuthorizationStatus = "enabled"
)

List of values that ChargePaymentMethodDetailsCardExtendedAuthorizationStatus can take

type ChargePaymentMethodDetailsCardIncrementalAuthorization

type ChargePaymentMethodDetailsCardIncrementalAuthorization struct {
	// Indicates whether or not the incremental authorization feature is supported.
	Status ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus `json:"status"`
}

type ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus

type ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus string

Indicates whether or not the incremental authorization feature is supported.

const (
	ChargePaymentMethodDetailsCardIncrementalAuthorizationStatusAvailable   ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus = "available"
	ChargePaymentMethodDetailsCardIncrementalAuthorizationStatusUnavailable ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus = "unavailable"
)

List of values that ChargePaymentMethodDetailsCardIncrementalAuthorizationStatus 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 ChargePaymentMethodDetailsCardMulticapture

type ChargePaymentMethodDetailsCardMulticapture struct {
	// Indicates whether or not multiple captures are supported.
	Status ChargePaymentMethodDetailsCardMulticaptureStatus `json:"status"`
}

type ChargePaymentMethodDetailsCardMulticaptureStatus

type ChargePaymentMethodDetailsCardMulticaptureStatus string

Indicates whether or not multiple captures are supported.

const (
	ChargePaymentMethodDetailsCardMulticaptureStatusAvailable   ChargePaymentMethodDetailsCardMulticaptureStatus = "available"
	ChargePaymentMethodDetailsCardMulticaptureStatusUnavailable ChargePaymentMethodDetailsCardMulticaptureStatus = "unavailable"
)

List of values that ChargePaymentMethodDetailsCardMulticaptureStatus can take

type ChargePaymentMethodDetailsCardNetwork

type ChargePaymentMethodDetailsCardNetwork string

Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `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 ChargePaymentMethodDetailsCardNetworkToken

type ChargePaymentMethodDetailsCardNetworkToken struct {
	// Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
	Used bool `json:"used"`
}

If this card has network token credentials, this contains the details of the network token credentials.

type ChargePaymentMethodDetailsCardOvercapture

type ChargePaymentMethodDetailsCardOvercapture struct {
	// The maximum amount that can be captured.
	MaximumAmountCapturable int64 `json:"maximum_amount_capturable"`
	// Indicates whether or not the authorized amount can be over-captured.
	Status ChargePaymentMethodDetailsCardOvercaptureStatus `json:"status"`
}

type ChargePaymentMethodDetailsCardOvercaptureStatus

type ChargePaymentMethodDetailsCardOvercaptureStatus string

Indicates whether or not the authorized amount can be over-captured.

const (
	ChargePaymentMethodDetailsCardOvercaptureStatusAvailable   ChargePaymentMethodDetailsCardOvercaptureStatus = "available"
	ChargePaymentMethodDetailsCardOvercaptureStatusUnavailable ChargePaymentMethodDetailsCardOvercaptureStatus = "unavailable"
)

List of values that ChargePaymentMethodDetailsCardOvercaptureStatus can take

type ChargePaymentMethodDetailsCardPresent

type ChargePaymentMethodDetailsCardPresent struct {
	// The authorized amount
	AmountAuthorized int64 `json:"amount_authorized"`
	// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Brand PaymentMethodCardBrand `json:"brand"`
	// The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
	BrandProduct string `json:"brand_product"`
	// 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.
	//
	// *As of May 1, 2021, card fingerprint in India for Connect changed 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`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Network ChargePaymentMethodDetailsCardPresentNetwork `json:"network"`
	// This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
	NetworkTransactionID string `json:"network_transaction_id"`
	// Details about payments collected offline.
	Offline *ChargePaymentMethodDetailsCardPresentOffline `json:"offline"`
	// Defines whether the authorized amount can be over-captured or not
	OvercaptureSupported bool `json:"overcapture_supported"`
	// 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 *ChargePaymentMethodDetailsCardPresentReceipt `json:"receipt"`
	Wallet  *ChargePaymentMethodDetailsCardPresentWallet  `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 ChargePaymentMethodDetailsCardPresentNetwork

type ChargePaymentMethodDetailsCardPresentNetwork string

Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `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 ChargePaymentMethodDetailsCardPresentOffline

type ChargePaymentMethodDetailsCardPresentOffline struct {
	// Time at which the payment was collected while offline
	StoredAt int64 `json:"stored_at"`
	// The method used to process this payment method offline. Only deferred is allowed.
	Type ChargePaymentMethodDetailsCardPresentOfflineType `json:"type"`
}

Details about payments collected offline.

type ChargePaymentMethodDetailsCardPresentOfflineType

type ChargePaymentMethodDetailsCardPresentOfflineType string

The method used to process this payment method offline. Only deferred is allowed.

const (
	ChargePaymentMethodDetailsCardPresentOfflineTypeDeferred ChargePaymentMethodDetailsCardPresentOfflineType = "deferred"
)

List of values that ChargePaymentMethodDetailsCardPresentOfflineType 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"`
	// Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
	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 ChargePaymentMethodDetailsCardPresentWallet

type ChargePaymentMethodDetailsCardPresentWallet struct {
	// The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
	Type ChargePaymentMethodDetailsCardPresentWalletType `json:"type"`
}

type ChargePaymentMethodDetailsCardPresentWalletType

type ChargePaymentMethodDetailsCardPresentWalletType string

The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.

const (
	ChargePaymentMethodDetailsCardPresentWalletTypeApplePay   ChargePaymentMethodDetailsCardPresentWalletType = "apple_pay"
	ChargePaymentMethodDetailsCardPresentWalletTypeGooglePay  ChargePaymentMethodDetailsCardPresentWalletType = "google_pay"
	ChargePaymentMethodDetailsCardPresentWalletTypeSamsungPay ChargePaymentMethodDetailsCardPresentWalletType = "samsung_pay"
	ChargePaymentMethodDetailsCardPresentWalletTypeUnknown    ChargePaymentMethodDetailsCardPresentWalletType = "unknown"
)

List of values that ChargePaymentMethodDetailsCardPresentWalletType can take

type ChargePaymentMethodDetailsCardRegulatedStatus added in v81.2.0

type ChargePaymentMethodDetailsCardRegulatedStatus string

Status of a card based on the card issuer.

const (
	ChargePaymentMethodDetailsCardRegulatedStatusRegulated   ChargePaymentMethodDetailsCardRegulatedStatus = "regulated"
	ChargePaymentMethodDetailsCardRegulatedStatusUnregulated ChargePaymentMethodDetailsCardRegulatedStatus = "unregulated"
)

List of values that ChargePaymentMethodDetailsCardRegulatedStatus can take

type ChargePaymentMethodDetailsCardThreeDSecure

type ChargePaymentMethodDetailsCardThreeDSecure struct {
	// For authenticated transactions: how the customer was authenticated by
	// the issuing bank.
	AuthenticationFlow ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow `json:"authentication_flow"`
	// The Electronic Commerce Indicator (ECI). A protocol-level field
	// indicating what degree of authentication was performed.
	ElectronicCommerceIndicator ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator `json:"electronic_commerce_indicator"`
	// The exemption requested via 3DS and accepted by the issuer at authentication time.
	ExemptionIndicator ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator `json:"exemption_indicator"`
	// Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
	// the outcome of Stripe's internal risk assessment.
	ExemptionIndicatorApplied bool `json:"exemption_indicator_applied"`
	// 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 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
	// (dsTransId) for this payment.
	TransactionID string `json:"transaction_id"`
	// 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 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator

type ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator string

The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of authentication was performed.

const (
	ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator01 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "01"
	ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator02 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "02"
	ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator05 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "05"
	ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator06 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "06"
	ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator07 ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator = "07"
)

List of values that ChargePaymentMethodDetailsCardThreeDSecureElectronicCommerceIndicator can take

type ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator

type ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator string

The exemption requested via 3DS and accepted by the issuer at authentication time.

const (
	ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicatorLowRisk ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator = "low_risk"
	ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicatorNone    ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator = "none"
)

List of values that ChargePaymentMethodDetailsCardThreeDSecureExemptionIndicator 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"`
	Link         *ChargePaymentMethodDetailsCardWalletLink       `json:"link"`
	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`, `visa_checkout`, or `link`. 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 ChargePaymentMethodDetailsCardWalletLink 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 ChargePaymentMethodDetailsCashApp

type ChargePaymentMethodDetailsCashApp struct {
	// A unique and immutable identifier assigned by Cash App to every buyer.
	BuyerID string `json:"buyer_id"`
	// A public identifier for buyers using Cash App.
	Cashtag string `json:"cashtag"`
}

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`, `pb_enterprise`, or `bank_of_china`.
	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`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
	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.
	//
	// *As of May 1, 2021, card fingerprint in India for Connect changed 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`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Network string `json:"network"`
	// This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
	NetworkTransactionID string `json:"network_transaction_id"`
	// 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"`
	// Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
	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 ChargePaymentMethodDetailsKakaoPay

type ChargePaymentMethodDetailsKakaoPay struct {
	// A unique identifier for the buyer as determined by the local payment processor.
	BuyerID string `json:"buyer_id"`
}

type ChargePaymentMethodDetailsKlarna

type ChargePaymentMethodDetailsKlarna struct {
	// The payer details for this transaction.
	PayerDetails *ChargePaymentMethodDetailsKlarnaPayerDetails `json:"payer_details"`
	// 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`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `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 ChargePaymentMethodDetailsKlarnaPayerDetails

type ChargePaymentMethodDetailsKlarnaPayerDetails struct {
	// The payer's address
	Address *ChargePaymentMethodDetailsKlarnaPayerDetailsAddress `json:"address"`
}

The payer details for this transaction.

type ChargePaymentMethodDetailsKlarnaPayerDetailsAddress

type ChargePaymentMethodDetailsKlarnaPayerDetailsAddress struct {
	// The payer address country
	Country string `json:"country"`
}

The payer's address

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 ChargePaymentMethodDetailsKrCard

type ChargePaymentMethodDetailsKrCard struct {
	// The local credit or debit card brand.
	Brand ChargePaymentMethodDetailsKrCardBrand `json:"brand"`
	// A unique identifier for the buyer as determined by the local payment processor.
	BuyerID string `json:"buyer_id"`
	// The last four digits of the card. This may not be present for American Express cards.
	Last4 string `json:"last4"`
}

type ChargePaymentMethodDetailsKrCardBrand

type ChargePaymentMethodDetailsKrCardBrand string

The local credit or debit card brand.

const (
	ChargePaymentMethodDetailsKrCardBrandBc          ChargePaymentMethodDetailsKrCardBrand = "bc"
	ChargePaymentMethodDetailsKrCardBrandCiti        ChargePaymentMethodDetailsKrCardBrand = "citi"
	ChargePaymentMethodDetailsKrCardBrandHana        ChargePaymentMethodDetailsKrCardBrand = "hana"
	ChargePaymentMethodDetailsKrCardBrandHyundai     ChargePaymentMethodDetailsKrCardBrand = "hyundai"
	ChargePaymentMethodDetailsKrCardBrandJeju        ChargePaymentMethodDetailsKrCardBrand = "jeju"
	ChargePaymentMethodDetailsKrCardBrandJeonbuk     ChargePaymentMethodDetailsKrCardBrand = "jeonbuk"
	ChargePaymentMethodDetailsKrCardBrandKakaobank   ChargePaymentMethodDetailsKrCardBrand = "kakaobank"
	ChargePaymentMethodDetailsKrCardBrandKbank       ChargePaymentMethodDetailsKrCardBrand = "kbank"
	ChargePaymentMethodDetailsKrCardBrandKdbbank     ChargePaymentMethodDetailsKrCardBrand = "kdbbank"
	ChargePaymentMethodDetailsKrCardBrandKookmin     ChargePaymentMethodDetailsKrCardBrand = "kookmin"
	ChargePaymentMethodDetailsKrCardBrandKwangju     ChargePaymentMethodDetailsKrCardBrand = "kwangju"
	ChargePaymentMethodDetailsKrCardBrandLotte       ChargePaymentMethodDetailsKrCardBrand = "lotte"
	ChargePaymentMethodDetailsKrCardBrandMg          ChargePaymentMethodDetailsKrCardBrand = "mg"
	ChargePaymentMethodDetailsKrCardBrandNh          ChargePaymentMethodDetailsKrCardBrand = "nh"
	ChargePaymentMethodDetailsKrCardBrandPost        ChargePaymentMethodDetailsKrCardBrand = "post"
	ChargePaymentMethodDetailsKrCardBrandSamsung     ChargePaymentMethodDetailsKrCardBrand = "samsung"
	ChargePaymentMethodDetailsKrCardBrandSavingsbank ChargePaymentMethodDetailsKrCardBrand = "savingsbank"
	ChargePaymentMethodDetailsKrCardBrandShinhan     ChargePaymentMethodDetailsKrCardBrand = "shinhan"
	ChargePaymentMethodDetailsKrCardBrandShinhyup    ChargePaymentMethodDetailsKrCardBrand = "shinhyup"
	ChargePaymentMethodDetailsKrCardBrandSuhyup      ChargePaymentMethodDetailsKrCardBrand = "suhyup"
	ChargePaymentMethodDetailsKrCardBrandTossbank    ChargePaymentMethodDetailsKrCardBrand = "tossbank"
	ChargePaymentMethodDetailsKrCardBrandWoori       ChargePaymentMethodDetailsKrCardBrand = "woori"
)

List of values that ChargePaymentMethodDetailsKrCardBrand can take

type ChargePaymentMethodDetailsLink struct {
	// Two-letter ISO code representing the funding source country beneath the Link payment.
	// You could use this attribute to get a sense of international fees.
	Country string `json:"country"`
}

type ChargePaymentMethodDetailsMobilepay

type ChargePaymentMethodDetailsMobilepay struct {
	// Internal card details
	Card *ChargePaymentMethodDetailsMobilepayCard `json:"card"`
}

type ChargePaymentMethodDetailsMobilepayCard

type ChargePaymentMethodDetailsMobilepayCard struct {
	// Brand of the card used in the transaction
	Brand string `json:"brand"`
	// Two-letter ISO code representing the country of the card
	Country string `json:"country"`
	// Two digit number representing the card's expiration month
	ExpMonth int64 `json:"exp_month"`
	// Two digit number representing the card's expiration year
	ExpYear int64 `json:"exp_year"`
	// The last 4 digits of the card
	Last4 string `json:"last4"`
}

Internal card details

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 ChargePaymentMethodDetailsNaverPay

type ChargePaymentMethodDetailsNaverPay struct {
	// A unique identifier for the buyer as determined by the local payment processor.
	BuyerID string `json:"buyer_id"`
}

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`, `velobank`, `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 ChargePaymentMethodDetailsPayByBank added in v81.3.0

type ChargePaymentMethodDetailsPayByBank struct{}

type ChargePaymentMethodDetailsPayNow

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

type ChargePaymentMethodDetailsPayco

type ChargePaymentMethodDetailsPayco struct {
	// A unique identifier for the buyer as determined by the local payment processor.
	BuyerID string `json:"buyer_id"`
}

type ChargePaymentMethodDetailsPaypal

type ChargePaymentMethodDetailsPaypal struct {
	// Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	Country string `json:"country"`
	// Owner's email. Values are provided by PayPal directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	PayerEmail string `json:"payer_email"`
	// PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
	PayerID string `json:"payer_id"`
	// Owner's full name. Values provided by PayPal directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	PayerName string `json:"payer_name"`
	// The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction.
	SellerProtection *ChargePaymentMethodDetailsPaypalSellerProtection `json:"seller_protection"`
	// A unique ID generated by PayPal for this transaction.
	TransactionID string `json:"transaction_id"`
}

type ChargePaymentMethodDetailsPaypalSellerProtection

type ChargePaymentMethodDetailsPaypalSellerProtection struct {
	// An array of conditions that are covered for the transaction, if applicable.
	DisputeCategories []ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory `json:"dispute_categories"`
	// Indicates whether the transaction is eligible for PayPal's seller protection.
	Status ChargePaymentMethodDetailsPaypalSellerProtectionStatus `json:"status"`
}

The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction.

type ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory

type ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory string

An array of conditions that are covered for the transaction, if applicable.

const (
	ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategoryFraudulent         ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory = "fraudulent"
	ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategoryProductNotReceived ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory = "product_not_received"
)

List of values that ChargePaymentMethodDetailsPaypalSellerProtectionDisputeCategory can take

type ChargePaymentMethodDetailsPaypalSellerProtectionStatus

type ChargePaymentMethodDetailsPaypalSellerProtectionStatus string

Indicates whether the transaction is eligible for PayPal's seller protection.

const (
	ChargePaymentMethodDetailsPaypalSellerProtectionStatusEligible          ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "eligible"
	ChargePaymentMethodDetailsPaypalSellerProtectionStatusNotEligible       ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "not_eligible"
	ChargePaymentMethodDetailsPaypalSellerProtectionStatusPartiallyEligible ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "partially_eligible"
)

List of values that ChargePaymentMethodDetailsPaypalSellerProtectionStatus can take

type ChargePaymentMethodDetailsPix

type ChargePaymentMethodDetailsPix struct {
	// Unique transaction id generated by BCB
	BankTransactionID string `json:"bank_transaction_id"`
}

type ChargePaymentMethodDetailsPromptPay

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

type ChargePaymentMethodDetailsRevolutPay

type ChargePaymentMethodDetailsRevolutPay struct {
	Funding *ChargePaymentMethodDetailsRevolutPayFunding `json:"funding"`
}

type ChargePaymentMethodDetailsRevolutPayFunding added in v81.2.0

type ChargePaymentMethodDetailsRevolutPayFunding struct {
	Card *ChargePaymentMethodDetailsRevolutPayFundingCard `json:"card"`
	// funding type of the underlying payment method.
	Type ChargePaymentMethodDetailsRevolutPayFundingType `json:"type"`
}

type ChargePaymentMethodDetailsRevolutPayFundingCard added in v81.2.0

type ChargePaymentMethodDetailsRevolutPayFundingCard struct {
	// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Brand string `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"`
	// 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"`
	// Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
	Funding string `json:"funding"`
	// The last four digits of the card.
	Last4 string `json:"last4"`
}

type ChargePaymentMethodDetailsRevolutPayFundingType added in v81.2.0

type ChargePaymentMethodDetailsRevolutPayFundingType string

funding type of the underlying payment method.

const (
	ChargePaymentMethodDetailsRevolutPayFundingTypeCard ChargePaymentMethodDetailsRevolutPayFundingType = "card"
)

List of values that ChargePaymentMethodDetailsRevolutPayFundingType can take

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"`
	// Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve).
	Mandate string `json:"mandate"`
}

type ChargePaymentMethodDetailsSamsungPay

type ChargePaymentMethodDetailsSamsungPay struct {
	// A unique identifier for the buyer as determined by the local payment processor.
	BuyerID string `json:"buyer_id"`
}

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 ChargePaymentMethodDetailsSwish

type ChargePaymentMethodDetailsSwish struct {
	// Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer
	Fingerprint string `json:"fingerprint"`
	// Payer bank reference number for the payment
	PaymentReference string `json:"payment_reference"`
	// The last four digits of the Swish account phone number
	VerifiedPhoneLast4 string `json:"verified_phone_last4"`
}

type ChargePaymentMethodDetailsTWINT

type ChargePaymentMethodDetailsTWINT struct{}

type ChargePaymentMethodDetailsType

type ChargePaymentMethodDetailsType string

The type of transaction-specific details of the payment method used in the payment. See [PaymentMethod.type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type) for the full list of possible types. 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"
	ChargePaymentMethodDetailsTypeSwish             ChargePaymentMethodDetailsType = "swish"
	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"`
	// ID of the mandate used to make this payment.
	Mandate *Mandate `json:"mandate"`
	// Reference number to locate ACH payments with customer's bank.
	PaymentReference string `json:"payment_reference"`
	// 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 ChargePaymentMethodDetailsZip

type ChargePaymentMethodDetailsZip struct{}

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:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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.

func (*ChargeSearchParams) AddExpand

func (p *ChargeSearchParams) AddExpand(f string)

AddExpand appends a new field to expand.

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
	// Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
	AdaptivePricing *CheckoutSessionAdaptivePricing `json:"adaptive_pricing"`
	// 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. Defaults to `auto`.
	BillingAddressCollection CheckoutSessionBillingAddressCollection `json:"billing_address_collection"`
	// If set, Checkout displays a back button and customers will be directed to this URL 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"`
	// Client secret to be used when initializing Stripe.js embedded checkout.
	ClientSecret string `json:"client_secret"`
	// Information about the customer collected within the Checkout Session.
	CollectedInformation *CheckoutSessionCollectedInformation `json:"collected_information"`
	// 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"`
	// 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"`
	// Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions
	CurrencyConversion *CheckoutSessionCurrencyConversion `json:"currency_conversion"`
	// The ID of the customer for this Session.
	// For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` 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. Customer's address details are not 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"`
	// Collect additional information from your customer using custom fields. Up to 3 fields are supported.
	CustomFields []*CheckoutSessionCustomField `json:"custom_fields"`
	CustomText   *CheckoutSessionCustomText    `json:"custom_text"`
	// List of coupons and promotion codes attached to the Checkout Session.
	Discounts []*CheckoutSessionDiscount `json:"discounts"`
	// The timestamp at which the Checkout Session will expire.
	ExpiresAt int64 `json:"expires_at"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// ID of the invoice created by the Checkout Session, if it exists.
	Invoice *Invoice `json:"invoice"`
	// Details on the state of invoice creation for the Checkout Session.
	InvoiceCreation *CheckoutSessionInvoiceCreation `json:"invoice_creation"`
	// 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. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
	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. Defaults to `always`.
	PaymentMethodCollection CheckoutSessionPaymentMethodCollection `json:"payment_method_collection"`
	// Information about the payment method configuration used for this Checkout session if using dynamic payment methods.
	PaymentMethodConfigurationDetails *CheckoutSessionPaymentMethodConfigurationDetails `json:"payment_method_configuration_details"`
	// 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"`
	// This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
	RedirectOnCompletion CheckoutSessionRedirectOnCompletion `json:"redirect_on_completion"`
	// Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
	ReturnURL string `json:"return_url"`
	// Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
	SavedPaymentMethodOptions *CheckoutSessionSavedPaymentMethodOptions `json:"saved_payment_method_options"`
	// The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
	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. If blank or `auto`, `pay` is used.
	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 UI mode of the Session. Defaults to `hosted`.
	UIMode CheckoutSessionUIMode `json:"ui_mode"`
	// 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.`
	// This value is only present when the session is active.
	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 redirect to its URL to begin Checkout.

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

type CheckoutSessionAdaptivePricing added in v81.1.0

type CheckoutSessionAdaptivePricing struct {
	// Whether Adaptive Pricing is enabled.
	Enabled bool `json:"enabled"`
}

Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).

type CheckoutSessionAdaptivePricingParams added in v81.1.0

type CheckoutSessionAdaptivePricingParams struct {
	// Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing).
	Enabled *bool `form:"enabled"`
}

Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).

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 account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
	Liability *CheckoutSessionAutomaticTaxLiability `json:"liability"`
	// The status of the most recent automated tax calculation for this session.
	Status CheckoutSessionAutomaticTaxStatus `json:"status"`
}

type CheckoutSessionAutomaticTaxLiability

type CheckoutSessionAutomaticTaxLiability struct {
	// The connected account being referenced when `type` is `account`.
	Account *Account `json:"account"`
	// Type of the account referenced.
	Type CheckoutSessionAutomaticTaxLiabilityType `json:"type"`
}

The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.

type CheckoutSessionAutomaticTaxLiabilityParams

type CheckoutSessionAutomaticTaxLiabilityParams struct {
	// The connected account being referenced when `type` is `account`.
	Account *string `form:"account"`
	// Type of the account referenced in the request.
	Type *string `form:"type"`
}

The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.

type CheckoutSessionAutomaticTaxLiabilityType

type CheckoutSessionAutomaticTaxLiabilityType string

Type of the account referenced.

const (
	CheckoutSessionAutomaticTaxLiabilityTypeAccount CheckoutSessionAutomaticTaxLiabilityType = "account"
	CheckoutSessionAutomaticTaxLiabilityTypeSelf    CheckoutSessionAutomaticTaxLiabilityType = "self"
)

List of values that CheckoutSessionAutomaticTaxLiabilityType can take

type CheckoutSessionAutomaticTaxParams

type CheckoutSessionAutomaticTaxParams struct {
	// Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
	//
	// Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation.
	Enabled *bool `form:"enabled"`
	// The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
	Liability *CheckoutSessionAutomaticTaxLiabilityParams `form:"liability"`
}

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. Defaults to `auto`.

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

List of values that CheckoutSessionBillingAddressCollection can take

type CheckoutSessionCollectedInformation added in v81.4.0

type CheckoutSessionCollectedInformation struct {
	// Shipping information for this Checkout Session.
	ShippingDetails *ShippingDetails `json:"shipping_details"`
}

Information about the customer collected within the Checkout Session.

type CheckoutSessionCollectedInformationParams added in v81.4.0

type CheckoutSessionCollectedInformationParams struct {
	// The shipping details to apply to this Session.
	ShippingDetails *CheckoutSessionCollectedInformationShippingDetailsParams `form:"shipping_details"`
}

Information about the customer collected within the Checkout Session.

type CheckoutSessionCollectedInformationShippingDetailsParams added in v81.4.0

type CheckoutSessionCollectedInformationShippingDetailsParams struct {
	// The address of the customer
	Address *AddressParams `form:"address"`
	// The name of customer
	Name *string `form:"name"`
}

The shipping details to apply to this Session.

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"`
	// If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.
	TermsOfService CheckoutSessionConsentTermsOfService `json:"terms_of_service"`
}

Results of `consent_collection` for this session.

type CheckoutSessionConsentCollection

type CheckoutSessionConsentCollection struct {
	// If set to `hidden`, it will hide legal text related to the reuse of a payment method.
	PaymentMethodReuseAgreement *CheckoutSessionConsentCollectionPaymentMethodReuseAgreement `json:"payment_method_reuse_agreement"`
	// 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"`
	// If set to `required`, it requires customers to accept the terms of service before being able to pay.
	TermsOfService CheckoutSessionConsentCollectionTermsOfService `json:"terms_of_service"`
}

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

type CheckoutSessionConsentCollectionParams

type CheckoutSessionConsentCollectionParams struct {
	// Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.
	PaymentMethodReuseAgreement *CheckoutSessionConsentCollectionPaymentMethodReuseAgreementParams `form:"payment_method_reuse_agreement"`
	// 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"`
	// If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
	// There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
	TermsOfService *string `form:"terms_of_service"`
}

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

type CheckoutSessionConsentCollectionPaymentMethodReuseAgreement

type CheckoutSessionConsentCollectionPaymentMethodReuseAgreement struct {
	// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.
	//
	// When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
	Position CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition `json:"position"`
}

If set to `hidden`, it will hide legal text related to the reuse of a payment method.

type CheckoutSessionConsentCollectionPaymentMethodReuseAgreementParams

type CheckoutSessionConsentCollectionPaymentMethodReuseAgreementParams struct {
	// Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's
	// defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
	Position *string `form:"position"`
}

Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method.

type CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition

type CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition string

Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used.

When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.

const (
	CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionAuto   CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "auto"
	CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionHidden CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "hidden"
)

List of values that CheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition can take

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 CheckoutSessionConsentCollectionTermsOfService

type CheckoutSessionConsentCollectionTermsOfService string

If set to `required`, it requires customers to accept the terms of service before being able to pay.

const (
	CheckoutSessionConsentCollectionTermsOfServiceNone     CheckoutSessionConsentCollectionTermsOfService = "none"
	CheckoutSessionConsentCollectionTermsOfServiceRequired CheckoutSessionConsentCollectionTermsOfService = "required"
)

List of values that CheckoutSessionConsentCollectionTermsOfService 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 CheckoutSessionConsentTermsOfService

type CheckoutSessionConsentTermsOfService string

If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service.

const (
	CheckoutSessionConsentTermsOfServiceAccepted CheckoutSessionConsentTermsOfService = "accepted"
)

List of values that CheckoutSessionConsentTermsOfService can take

type CheckoutSessionCurrencyConversion

type CheckoutSessionCurrencyConversion struct {
	// Total of all items in source currency before discounts or taxes are applied.
	AmountSubtotal int64 `json:"amount_subtotal"`
	// Total of all items in source currency after discounts and taxes are applied.
	AmountTotal int64 `json:"amount_total"`
	// Exchange rate used to convert source currency amounts to customer currency amounts
	FxRate float64 `json:"fx_rate,string"`
	// Creation currency of the CheckoutSession before localization
	SourceCurrency Currency `json:"source_currency"`
}

Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions

type CheckoutSessionCustomField

type CheckoutSessionCustomField struct {
	Dropdown *CheckoutSessionCustomFieldDropdown `json:"dropdown"`
	// String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
	Key     string                             `json:"key"`
	Label   *CheckoutSessionCustomFieldLabel   `json:"label"`
	Numeric *CheckoutSessionCustomFieldNumeric `json:"numeric"`
	// Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
	Optional bool                            `json:"optional"`
	Text     *CheckoutSessionCustomFieldText `json:"text"`
	// The type of the field.
	Type CheckoutSessionCustomFieldType `json:"type"`
}

Collect additional information from your customer using custom fields. Up to 3 fields are supported.

type CheckoutSessionCustomFieldDropdown

type CheckoutSessionCustomFieldDropdown struct {
	// The value that will pre-fill on the payment page.
	DefaultValue string `json:"default_value"`
	// The options available for the customer to select. Up to 200 options allowed.
	Options []*CheckoutSessionCustomFieldDropdownOption `json:"options"`
	// The option selected by the customer. This will be the `value` for the option.
	Value string `json:"value"`
}

type CheckoutSessionCustomFieldDropdownOption

type CheckoutSessionCustomFieldDropdownOption struct {
	// The label for the option, displayed to the customer. Up to 100 characters.
	Label string `json:"label"`
	// The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.
	Value string `json:"value"`
}

The options available for the customer to select. Up to 200 options allowed.

type CheckoutSessionCustomFieldDropdownOptionParams

type CheckoutSessionCustomFieldDropdownOptionParams struct {
	// The label for the option, displayed to the customer. Up to 100 characters.
	Label *string `form:"label"`
	// The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters.
	Value *string `form:"value"`
}

The options available for the customer to select. Up to 200 options allowed.

type CheckoutSessionCustomFieldDropdownParams

type CheckoutSessionCustomFieldDropdownParams struct {
	// The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array.
	DefaultValue *string `form:"default_value"`
	// The options available for the customer to select. Up to 200 options allowed.
	Options []*CheckoutSessionCustomFieldDropdownOptionParams `form:"options"`
}

Configuration for `type=dropdown` fields.

type CheckoutSessionCustomFieldLabel

type CheckoutSessionCustomFieldLabel struct {
	// Custom text for the label, displayed to the customer. Up to 50 characters.
	Custom string `json:"custom"`
	// The type of the label.
	Type CheckoutSessionCustomFieldLabelType `json:"type"`
}

type CheckoutSessionCustomFieldLabelParams

type CheckoutSessionCustomFieldLabelParams struct {
	// Custom text for the label, displayed to the customer. Up to 50 characters.
	Custom *string `form:"custom"`
	// The type of the label.
	Type *string `form:"type"`
}

The label for the field, displayed to the customer.

type CheckoutSessionCustomFieldLabelType

type CheckoutSessionCustomFieldLabelType string

The type of the label.

const (
	CheckoutSessionCustomFieldLabelTypeCustom CheckoutSessionCustomFieldLabelType = "custom"
)

List of values that CheckoutSessionCustomFieldLabelType can take

type CheckoutSessionCustomFieldNumeric

type CheckoutSessionCustomFieldNumeric struct {
	// The value that will pre-fill the field on the payment page.
	DefaultValue string `json:"default_value"`
	// The maximum character length constraint for the customer's input.
	MaximumLength int64 `json:"maximum_length"`
	// The minimum character length requirement for the customer's input.
	MinimumLength int64 `json:"minimum_length"`
	// The value entered by the customer, containing only digits.
	Value string `json:"value"`
}

type CheckoutSessionCustomFieldNumericParams

type CheckoutSessionCustomFieldNumericParams struct {
	// The value that will pre-fill the field on the payment page.
	DefaultValue *string `form:"default_value"`
	// The maximum character length constraint for the customer's input.
	MaximumLength *int64 `form:"maximum_length"`
	// The minimum character length requirement for the customer's input.
	MinimumLength *int64 `form:"minimum_length"`
}

Configuration for `type=numeric` fields.

type CheckoutSessionCustomFieldParams

type CheckoutSessionCustomFieldParams struct {
	// Configuration for `type=dropdown` fields.
	Dropdown *CheckoutSessionCustomFieldDropdownParams `form:"dropdown"`
	// String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.
	Key *string `form:"key"`
	// The label for the field, displayed to the customer.
	Label *CheckoutSessionCustomFieldLabelParams `form:"label"`
	// Configuration for `type=numeric` fields.
	Numeric *CheckoutSessionCustomFieldNumericParams `form:"numeric"`
	// Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.
	Optional *bool `form:"optional"`
	// Configuration for `type=text` fields.
	Text *CheckoutSessionCustomFieldTextParams `form:"text"`
	// The type of the field.
	Type *string `form:"type"`
}

Collect additional information from your customer using custom fields. Up to 3 fields are supported.

type CheckoutSessionCustomFieldText

type CheckoutSessionCustomFieldText struct {
	// The value that will pre-fill the field on the payment page.
	DefaultValue string `json:"default_value"`
	// The maximum character length constraint for the customer's input.
	MaximumLength int64 `json:"maximum_length"`
	// The minimum character length requirement for the customer's input.
	MinimumLength int64 `json:"minimum_length"`
	// The value entered by the customer.
	Value string `json:"value"`
}

type CheckoutSessionCustomFieldTextParams

type CheckoutSessionCustomFieldTextParams struct {
	// The value that will pre-fill the field on the payment page.
	DefaultValue *string `form:"default_value"`
	// The maximum character length constraint for the customer's input.
	MaximumLength *int64 `form:"maximum_length"`
	// The minimum character length requirement for the customer's input.
	MinimumLength *int64 `form:"minimum_length"`
}

Configuration for `type=text` fields.

type CheckoutSessionCustomFieldType

type CheckoutSessionCustomFieldType string

The type of the field.

const (
	CheckoutSessionCustomFieldTypeDropdown CheckoutSessionCustomFieldType = "dropdown"
	CheckoutSessionCustomFieldTypeNumeric  CheckoutSessionCustomFieldType = "numeric"
	CheckoutSessionCustomFieldTypeText     CheckoutSessionCustomFieldType = "text"
)

List of values that CheckoutSessionCustomFieldType can take

type CheckoutSessionCustomText

type CheckoutSessionCustomText struct {
	// Custom text that should be displayed after the payment confirmation button.
	AfterSubmit *CheckoutSessionCustomTextAfterSubmit `json:"after_submit"`
	// Custom text that should be displayed alongside shipping address collection.
	ShippingAddress *CheckoutSessionCustomTextShippingAddress `json:"shipping_address"`
	// Custom text that should be displayed alongside the payment confirmation button.
	Submit *CheckoutSessionCustomTextSubmit `json:"submit"`
	// Custom text that should be displayed in place of the default terms of service agreement text.
	TermsOfServiceAcceptance *CheckoutSessionCustomTextTermsOfServiceAcceptance `json:"terms_of_service_acceptance"`
}

type CheckoutSessionCustomTextAfterSubmit

type CheckoutSessionCustomTextAfterSubmit struct {
	// Text may be up to 1200 characters in length.
	Message string `json:"message"`
}

Custom text that should be displayed after the payment confirmation button.

type CheckoutSessionCustomTextAfterSubmitParams

type CheckoutSessionCustomTextAfterSubmitParams struct {
	// Text may be up to 1200 characters in length.
	Message *string `form:"message"`
}

Custom text that should be displayed after the payment confirmation button.

type CheckoutSessionCustomTextParams

type CheckoutSessionCustomTextParams struct {
	// Custom text that should be displayed after the payment confirmation button.
	AfterSubmit *CheckoutSessionCustomTextAfterSubmitParams `form:"after_submit"`
	// Custom text that should be displayed alongside shipping address collection.
	ShippingAddress *CheckoutSessionCustomTextShippingAddressParams `form:"shipping_address"`
	// Custom text that should be displayed alongside the payment confirmation button.
	Submit *CheckoutSessionCustomTextSubmitParams `form:"submit"`
	// Custom text that should be displayed in place of the default terms of service agreement text.
	TermsOfServiceAcceptance *CheckoutSessionCustomTextTermsOfServiceAcceptanceParams `form:"terms_of_service_acceptance"`
}

Display additional text for your customers using custom text.

type CheckoutSessionCustomTextShippingAddress

type CheckoutSessionCustomTextShippingAddress struct {
	// Text may be up to 1200 characters in length.
	Message string `json:"message"`
}

Custom text that should be displayed alongside shipping address collection.

type CheckoutSessionCustomTextShippingAddressParams

type CheckoutSessionCustomTextShippingAddressParams struct {
	// Text may be up to 1200 characters in length.
	Message *string `form:"message"`
}

Custom text that should be displayed alongside shipping address collection.

type CheckoutSessionCustomTextSubmit

type CheckoutSessionCustomTextSubmit struct {
	// Text may be up to 1200 characters in length.
	Message string `json:"message"`
}

Custom text that should be displayed alongside the payment confirmation button.

type CheckoutSessionCustomTextSubmitParams

type CheckoutSessionCustomTextSubmitParams struct {
	// Text may be up to 1200 characters in length.
	Message *string `form:"message"`
}

Custom text that should be displayed alongside the payment confirmation button.

type CheckoutSessionCustomTextTermsOfServiceAcceptance

type CheckoutSessionCustomTextTermsOfServiceAcceptance struct {
	// Text may be up to 1200 characters in length.
	Message string `json:"message"`
}

Custom text that should be displayed in place of the default terms of service agreement text.

type CheckoutSessionCustomTextTermsOfServiceAcceptanceParams

type CheckoutSessionCustomTextTermsOfServiceAcceptanceParams struct {
	// Text may be up to 1200 characters in length.
	Message *string `form:"message"`
}

Custom text that should be displayed in place of the default terms of service agreement text.

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. Customer's address details are not 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 `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `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`, `jp_trn`, `li_uid`, `li_vat`, `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`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_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 `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `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`, `jp_trn`, `li_uid`, `li_vat`, `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`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`

const (
	CheckoutSessionCustomerDetailsTaxIDTypeADNRT    CheckoutSessionCustomerDetailsTaxIDType = "ad_nrt"
	CheckoutSessionCustomerDetailsTaxIDTypeAETRN    CheckoutSessionCustomerDetailsTaxIDType = "ae_trn"
	CheckoutSessionCustomerDetailsTaxIDTypeAlTin    CheckoutSessionCustomerDetailsTaxIDType = "al_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeAmTin    CheckoutSessionCustomerDetailsTaxIDType = "am_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeAoTin    CheckoutSessionCustomerDetailsTaxIDType = "ao_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeARCUIT   CheckoutSessionCustomerDetailsTaxIDType = "ar_cuit"
	CheckoutSessionCustomerDetailsTaxIDTypeAUABN    CheckoutSessionCustomerDetailsTaxIDType = "au_abn"
	CheckoutSessionCustomerDetailsTaxIDTypeAUARN    CheckoutSessionCustomerDetailsTaxIDType = "au_arn"
	CheckoutSessionCustomerDetailsTaxIDTypeBaTin    CheckoutSessionCustomerDetailsTaxIDType = "ba_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeBbTin    CheckoutSessionCustomerDetailsTaxIDType = "bb_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeBGUIC    CheckoutSessionCustomerDetailsTaxIDType = "bg_uic"
	CheckoutSessionCustomerDetailsTaxIDTypeBhVAT    CheckoutSessionCustomerDetailsTaxIDType = "bh_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeBOTIN    CheckoutSessionCustomerDetailsTaxIDType = "bo_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeBRCNPJ   CheckoutSessionCustomerDetailsTaxIDType = "br_cnpj"
	CheckoutSessionCustomerDetailsTaxIDTypeBRCPF    CheckoutSessionCustomerDetailsTaxIDType = "br_cpf"
	CheckoutSessionCustomerDetailsTaxIDTypeBsTin    CheckoutSessionCustomerDetailsTaxIDType = "bs_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeByTin    CheckoutSessionCustomerDetailsTaxIDType = "by_tin"
	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"
	CheckoutSessionCustomerDetailsTaxIDTypeCdNif    CheckoutSessionCustomerDetailsTaxIDType = "cd_nif"
	CheckoutSessionCustomerDetailsTaxIDTypeCHUID    CheckoutSessionCustomerDetailsTaxIDType = "ch_uid"
	CheckoutSessionCustomerDetailsTaxIDTypeCHVAT    CheckoutSessionCustomerDetailsTaxIDType = "ch_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeCLTIN    CheckoutSessionCustomerDetailsTaxIDType = "cl_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeCNTIN    CheckoutSessionCustomerDetailsTaxIDType = "cn_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeCONIT    CheckoutSessionCustomerDetailsTaxIDType = "co_nit"
	CheckoutSessionCustomerDetailsTaxIDTypeCRTIN    CheckoutSessionCustomerDetailsTaxIDType = "cr_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeDEStn    CheckoutSessionCustomerDetailsTaxIDType = "de_stn"
	CheckoutSessionCustomerDetailsTaxIDTypeDORCN    CheckoutSessionCustomerDetailsTaxIDType = "do_rcn"
	CheckoutSessionCustomerDetailsTaxIDTypeECRUC    CheckoutSessionCustomerDetailsTaxIDType = "ec_ruc"
	CheckoutSessionCustomerDetailsTaxIDTypeEGTIN    CheckoutSessionCustomerDetailsTaxIDType = "eg_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeESCIF    CheckoutSessionCustomerDetailsTaxIDType = "es_cif"
	CheckoutSessionCustomerDetailsTaxIDTypeEUOSSVAT CheckoutSessionCustomerDetailsTaxIDType = "eu_oss_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeEUVAT    CheckoutSessionCustomerDetailsTaxIDType = "eu_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeGBVAT    CheckoutSessionCustomerDetailsTaxIDType = "gb_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeGEVAT    CheckoutSessionCustomerDetailsTaxIDType = "ge_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeGnNif    CheckoutSessionCustomerDetailsTaxIDType = "gn_nif"
	CheckoutSessionCustomerDetailsTaxIDTypeHKBR     CheckoutSessionCustomerDetailsTaxIDType = "hk_br"
	CheckoutSessionCustomerDetailsTaxIDTypeHROIB    CheckoutSessionCustomerDetailsTaxIDType = "hr_oib"
	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"
	CheckoutSessionCustomerDetailsTaxIDTypeJPTRN    CheckoutSessionCustomerDetailsTaxIDType = "jp_trn"
	CheckoutSessionCustomerDetailsTaxIDTypeKEPIN    CheckoutSessionCustomerDetailsTaxIDType = "ke_pin"
	CheckoutSessionCustomerDetailsTaxIDTypeKhTin    CheckoutSessionCustomerDetailsTaxIDType = "kh_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeKRBRN    CheckoutSessionCustomerDetailsTaxIDType = "kr_brn"
	CheckoutSessionCustomerDetailsTaxIDTypeKzBin    CheckoutSessionCustomerDetailsTaxIDType = "kz_bin"
	CheckoutSessionCustomerDetailsTaxIDTypeLIUID    CheckoutSessionCustomerDetailsTaxIDType = "li_uid"
	CheckoutSessionCustomerDetailsTaxIDTypeLiVAT    CheckoutSessionCustomerDetailsTaxIDType = "li_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeMaVAT    CheckoutSessionCustomerDetailsTaxIDType = "ma_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeMdVAT    CheckoutSessionCustomerDetailsTaxIDType = "md_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeMePib    CheckoutSessionCustomerDetailsTaxIDType = "me_pib"
	CheckoutSessionCustomerDetailsTaxIDTypeMkVAT    CheckoutSessionCustomerDetailsTaxIDType = "mk_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeMrNif    CheckoutSessionCustomerDetailsTaxIDType = "mr_nif"
	CheckoutSessionCustomerDetailsTaxIDTypeMXRFC    CheckoutSessionCustomerDetailsTaxIDType = "mx_rfc"
	CheckoutSessionCustomerDetailsTaxIDTypeMYFRP    CheckoutSessionCustomerDetailsTaxIDType = "my_frp"
	CheckoutSessionCustomerDetailsTaxIDTypeMYITN    CheckoutSessionCustomerDetailsTaxIDType = "my_itn"
	CheckoutSessionCustomerDetailsTaxIDTypeMYSST    CheckoutSessionCustomerDetailsTaxIDType = "my_sst"
	CheckoutSessionCustomerDetailsTaxIDTypeNgTin    CheckoutSessionCustomerDetailsTaxIDType = "ng_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeNOVAT    CheckoutSessionCustomerDetailsTaxIDType = "no_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeNOVOEC   CheckoutSessionCustomerDetailsTaxIDType = "no_voec"
	CheckoutSessionCustomerDetailsTaxIDTypeNpPan    CheckoutSessionCustomerDetailsTaxIDType = "np_pan"
	CheckoutSessionCustomerDetailsTaxIDTypeNZGST    CheckoutSessionCustomerDetailsTaxIDType = "nz_gst"
	CheckoutSessionCustomerDetailsTaxIDTypeOmVAT    CheckoutSessionCustomerDetailsTaxIDType = "om_vat"
	CheckoutSessionCustomerDetailsTaxIDTypePERUC    CheckoutSessionCustomerDetailsTaxIDType = "pe_ruc"
	CheckoutSessionCustomerDetailsTaxIDTypePHTIN    CheckoutSessionCustomerDetailsTaxIDType = "ph_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeROTIN    CheckoutSessionCustomerDetailsTaxIDType = "ro_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeRSPIB    CheckoutSessionCustomerDetailsTaxIDType = "rs_pib"
	CheckoutSessionCustomerDetailsTaxIDTypeRUINN    CheckoutSessionCustomerDetailsTaxIDType = "ru_inn"
	CheckoutSessionCustomerDetailsTaxIDTypeRUKPP    CheckoutSessionCustomerDetailsTaxIDType = "ru_kpp"
	CheckoutSessionCustomerDetailsTaxIDTypeSAVAT    CheckoutSessionCustomerDetailsTaxIDType = "sa_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeSGGST    CheckoutSessionCustomerDetailsTaxIDType = "sg_gst"
	CheckoutSessionCustomerDetailsTaxIDTypeSGUEN    CheckoutSessionCustomerDetailsTaxIDType = "sg_uen"
	CheckoutSessionCustomerDetailsTaxIDTypeSITIN    CheckoutSessionCustomerDetailsTaxIDType = "si_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeSnNinea  CheckoutSessionCustomerDetailsTaxIDType = "sn_ninea"
	CheckoutSessionCustomerDetailsTaxIDTypeSrFin    CheckoutSessionCustomerDetailsTaxIDType = "sr_fin"
	CheckoutSessionCustomerDetailsTaxIDTypeSVNIT    CheckoutSessionCustomerDetailsTaxIDType = "sv_nit"
	CheckoutSessionCustomerDetailsTaxIDTypeTHVAT    CheckoutSessionCustomerDetailsTaxIDType = "th_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeTjTin    CheckoutSessionCustomerDetailsTaxIDType = "tj_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeTRTIN    CheckoutSessionCustomerDetailsTaxIDType = "tr_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeTWVAT    CheckoutSessionCustomerDetailsTaxIDType = "tw_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeTzVAT    CheckoutSessionCustomerDetailsTaxIDType = "tz_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeUAVAT    CheckoutSessionCustomerDetailsTaxIDType = "ua_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeUgTin    CheckoutSessionCustomerDetailsTaxIDType = "ug_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeUnknown  CheckoutSessionCustomerDetailsTaxIDType = "unknown"
	CheckoutSessionCustomerDetailsTaxIDTypeUSEIN    CheckoutSessionCustomerDetailsTaxIDType = "us_ein"
	CheckoutSessionCustomerDetailsTaxIDTypeUYRUC    CheckoutSessionCustomerDetailsTaxIDType = "uy_ruc"
	CheckoutSessionCustomerDetailsTaxIDTypeUzTin    CheckoutSessionCustomerDetailsTaxIDType = "uz_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeUzVAT    CheckoutSessionCustomerDetailsTaxIDType = "uz_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeVERIF    CheckoutSessionCustomerDetailsTaxIDType = "ve_rif"
	CheckoutSessionCustomerDetailsTaxIDTypeVNTIN    CheckoutSessionCustomerDetailsTaxIDType = "vn_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeZAVAT    CheckoutSessionCustomerDetailsTaxIDType = "za_vat"
	CheckoutSessionCustomerDetailsTaxIDTypeZmTin    CheckoutSessionCustomerDetailsTaxIDType = "zm_tin"
	CheckoutSessionCustomerDetailsTaxIDTypeZwTin    CheckoutSessionCustomerDetailsTaxIDType = "zw_tin"
)

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 CheckoutSessionDiscount added in v81.3.0

type CheckoutSessionDiscount struct {
	// Coupon attached to the Checkout Session.
	Coupon *Coupon `json:"coupon"`
	// Promotion code attached to the Checkout Session.
	PromotionCode *PromotionCode `json:"promotion_code"`
}

List of coupons and promotion codes attached to the Checkout Session.

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:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

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.

func (*CheckoutSessionExpireParams) AddExpand

func (p *CheckoutSessionExpireParams) AddExpand(f string)

AddExpand appends a new field to expand.

type CheckoutSessionInvoiceCreation

type CheckoutSessionInvoiceCreation struct {
	// Indicates whether invoice creation is enabled for the Checkout Session.
	Enabled     bool                                       `json:"enabled"`
	InvoiceData *CheckoutSessionInvoiceCreationInvoiceData `json:"invoice_data"`
}

Details on the state of invoice creation for the Checkout Session.

type CheckoutSessionInvoiceCreationInvoiceData

type CheckoutSessionInvoiceCreationInvoiceData struct {
	// The account tax IDs associated with the invoice.
	AccountTaxIDs []*TaxID `json:"account_tax_ids"`
	// Custom fields displayed on the invoice.
	CustomFields []*CheckoutSessionInvoiceCreationInvoiceDataCustomField `json:"custom_fields"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description string `json:"description"`
	// Footer displayed on the invoice.
	Footer string `json:"footer"`
	// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
	Issuer *CheckoutSessionInvoiceCreationInvoiceDataIssuer `json:"issuer"`
	// 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"`
	// Options for invoice PDF rendering.
	RenderingOptions *CheckoutSessionInvoiceCreationInvoiceDataRenderingOptions `json:"rendering_options"`
}

type CheckoutSessionInvoiceCreationInvoiceDataCustomField

type CheckoutSessionInvoiceCreationInvoiceDataCustomField 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 CheckoutSessionInvoiceCreationInvoiceDataCustomFieldParams

type CheckoutSessionInvoiceCreationInvoiceDataCustomFieldParams struct {
	// The name of the custom field. This may be up to 40 characters.
	Name *string `form:"name"`
	// The value of the custom field. This may be up to 140 characters.
	Value *string `form:"value"`
}

Default custom fields to be displayed on invoices for this customer.

type CheckoutSessionInvoiceCreationInvoiceDataIssuer

type CheckoutSessionInvoiceCreationInvoiceDataIssuer struct {
	// The connected account being referenced when `type` is `account`.
	Account *Account `json:"account"`
	// Type of the account referenced.
	Type CheckoutSessionInvoiceCreationInvoiceDataIssuerType `json:"type"`
}

The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.

type CheckoutSessionInvoiceCreationInvoiceDataIssuerParams

type CheckoutSessionInvoiceCreationInvoiceDataIssuerParams struct {
	// The connected account being referenced when `type` is `account`.
	Account *string `form:"account"`
	// Type of the account referenced in the request.
	Type *string `form:"type"`
}

The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.

type CheckoutSessionInvoiceCreationInvoiceDataIssuerType

type CheckoutSessionInvoiceCreationInvoiceDataIssuerType string

Type of the account referenced.

const (
	CheckoutSessionInvoiceCreationInvoiceDataIssuerTypeAccount CheckoutSessionInvoiceCreationInvoiceDataIssuerType = "account"
	CheckoutSessionInvoiceCreationInvoiceDataIssuerTypeSelf    CheckoutSessionInvoiceCreationInvoiceDataIssuerType = "self"
)

List of values that CheckoutSessionInvoiceCreationInvoiceDataIssuerType can take

type CheckoutSessionInvoiceCreationInvoiceDataParams

type CheckoutSessionInvoiceCreationInvoiceDataParams struct {
	// The account tax IDs associated with the invoice.
	AccountTaxIDs []*string `form:"account_tax_ids"`
	// Default custom fields to be displayed on invoices for this customer.
	CustomFields []*CheckoutSessionInvoiceCreationInvoiceDataCustomFieldParams `form:"custom_fields"`
	// An arbitrary string attached to the object. Often useful for displaying to users.
	Description *string `form:"description"`
	// Default footer to be displayed on invoices for this customer.
	Footer *string `form:"footer"`
	// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
	Issuer *CheckoutSessionInvoiceCreationInvoiceDataIssuerParams `form:"issuer"`
	// 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"`
	// Default options for invoice PDF rendering for this customer.
	RenderingOptions *CheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsParams `form:"rendering_options"`
}

Parameters passed when creating invoices for payment-mode Checkout Sessions.

func (*CheckoutSessionInvoiceCreationInvoiceDataParams) AddMetadata

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

type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptions

type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptions 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 CheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsParams

type CheckoutSessionInvoiceCreationInvoiceDataRenderingOptionsParams 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 CheckoutSessionInvoiceCreationParams

type CheckoutSessionInvoiceCreationParams struct {
	// Set to `true` to enable invoice creation.
	Enabled *bool `form:"enabled"`
	// Parameters passed when creating invoices for payment-mode Checkout Sessions.
	InvoiceData *CheckoutSessionInvoiceCreationInvoiceDataParams `form:"invoice_data"`
}

Generate a post-purchase Invoice for one-time payments.

type CheckoutSessionLineItemAdjustableQuantityParams

type CheckoutSessionLineItemAdjustableQuantityParams 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 for the Checkout Session. By default this value is 99. You can specify a value up to 999999.
	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"`
	// 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"`
	// 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"`
	// Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. 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.

func (*CheckoutSessionLineItemPriceDataProductDataParams) AddMetadata

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

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 three years interval allowed (3 years, 36 months, or 156 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
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

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.

func (*CheckoutSessionListLineItemsParams) AddExpand

AddExpand appends a new field to expand.

type CheckoutSessionListParams

type CheckoutSessionListParams struct {
	ListParams `form:"*"`
	// Only return Checkout Sessions that were created during the given date interval.
	Created *int64 `form:"created"`
	// Only return Checkout Sessions that were created during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// 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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// Only return the Checkout Session for the PaymentIntent specified.
	PaymentIntent *string `form:"payment_intent"`
	// Only return the Checkout Sessions for the Payment Link specified.
	PaymentLink *string `form:"payment_link"`
	// Only return the Checkout Sessions matching the given status.
	Status *string `form:"status"`
	// Only return the Checkout Session for the subscription specified.
	Subscription *string `form:"subscription"`
}

Returns a list of Checkout Sessions.

func (*CheckoutSessionListParams) AddExpand

func (p *CheckoutSessionListParams) AddExpand(f string)

AddExpand appends a new field to expand.

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:"*"`
	// Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
	AdaptivePricing *CheckoutSessionAdaptivePricingParams `form:"adaptive_pricing"`
	// 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. Defaults to `auto`.
	BillingAddressCollection *string `form:"billing_address_collection"`
	// If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded`.
	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"`
	// Information about the customer collected within the Checkout Session.
	CollectedInformation *CheckoutSessionCollectedInformationParams `form:"collected_information"`
	// 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). Required in `setup` mode when `payment_method_types` is not set.
	Currency *string `form:"currency"`
	// ID of an existing Customer, if one exists. In `payment` mode, the customer's most recently saved 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, otherwise the most recently saved 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 `subscription` mode or with `customer_creation` set as `always` in `payment` 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 are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers)
	// 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"`
	// Collect additional information from your customer using custom fields. Up to 3 fields are supported.
	CustomFields []*CheckoutSessionCustomFieldParams `form:"custom_fields"`
	// Display additional text for your customers using custom text.
	CustomText *CheckoutSessionCustomTextParams `form:"custom_text"`
	// The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
	Discounts []*CheckoutSessionDiscountParams `form:"discounts"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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"`
	// Generate a post-purchase Invoice for one-time payments.
	InvoiceCreation *CheckoutSessionInvoiceCreationParams `form:"invoice_creation"`
	// 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"`
	// 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 mode of the Checkout Session. 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. Defaults to `always`.
	//
	// 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 ID of the payment method configuration to use with this Checkout session.
	PaymentMethodConfiguration *string `form:"payment_method_configuration"`
	// This parameter allows you to set some attributes on the payment method created during a Checkout session.
	PaymentMethodData *CheckoutSessionPaymentMethodDataParams `form:"payment_method_data"`
	// 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.
	//
	// You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
	// See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details.
	//
	// 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"`
	// This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
	RedirectOnCompletion *string `form:"redirect_on_completion"`
	// The URL to redirect your customer back to after they authenticate or cancel their payment on the
	// payment method's app or site. This parameter is required if ui_mode is `embedded`
	// and redirect-based payment methods are enabled on the session.
	ReturnURL *string `form:"return_url"`
	// Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
	SavedPaymentMethodOptions *CheckoutSessionSavedPaymentMethodOptionsParams `form:"saved_payment_method_options"`
	// 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. Up to a maximum of 5.
	ShippingOptions []*CheckoutSessionShippingOptionParams `form:"shipping_options"`
	// 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. If blank or `auto`, `pay` is used.
	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.
	// This parameter is not allowed if ui_mode is `embedded`. 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 during checkout.
	TaxIDCollection *CheckoutSessionTaxIDCollectionParams `form:"tax_id_collection"`
	// The UI mode of the Session. Defaults to `hosted`.
	UIMode *string `form:"ui_mode"`
}

Creates a Session object.

func (*CheckoutSessionParams) AddExpand

func (p *CheckoutSessionParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*CheckoutSessionParams) AddMetadata

func (p *CheckoutSessionParams) AddMetadata(key string, value string)

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

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"`
	// Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
	//
	// Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.
	StatementDescriptor *string `form:"statement_descriptor"`
	// Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
	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/connect/separate-charges-and-transfers) for details.
	TransferGroup *string `form:"transfer_group"`
}

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

func (*CheckoutSessionPaymentIntentDataParams) AddMetadata

func (p *CheckoutSessionPaymentIntentDataParams) AddMetadata(key string, value string)

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

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. Defaults to `always`.

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

List of values that CheckoutSessionPaymentMethodCollection can take

type CheckoutSessionPaymentMethodConfigurationDetails

type CheckoutSessionPaymentMethodConfigurationDetails struct {
	// ID of the payment method configuration used.
	ID string `json:"id"`
	// ID of the parent payment method configuration used.
	Parent string `json:"parent"`
}

Information about the payment method configuration used for this Checkout session if using dynamic payment methods.

type CheckoutSessionPaymentMethodDataParams

type CheckoutSessionPaymentMethodDataParams struct {
	// Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout.
	AllowRedisplay *string `form:"allow_redisplay"`
}

This parameter allows you to set some attributes on the payment method created during a Checkout session.

type CheckoutSessionPaymentMethodOptions

type CheckoutSessionPaymentMethodOptions struct {
	ACSSDebit        *CheckoutSessionPaymentMethodOptionsACSSDebit        `json:"acss_debit"`
	Affirm           *CheckoutSessionPaymentMethodOptionsAffirm           `json:"affirm"`
	AfterpayClearpay *CheckoutSessionPaymentMethodOptionsAfterpayClearpay `json:"afterpay_clearpay"`
	Alipay           *CheckoutSessionPaymentMethodOptionsAlipay           `json:"alipay"`
	AmazonPay        *CheckoutSessionPaymentMethodOptionsAmazonPay        `json:"amazon_pay"`
	AUBECSDebit      *CheckoutSessionPaymentMethodOptionsAUBECSDebit      `json:"au_becs_debit"`
	BACSDebit        *CheckoutSessionPaymentMethodOptionsBACSDebit        `json:"bacs_debit"`
	Bancontact       *CheckoutSessionPaymentMethodOptionsBancontact       `json:"bancontact"`
	Boleto           *CheckoutSessionPaymentMethodOptionsBoleto           `json:"boleto"`
	Card             *CheckoutSessionPaymentMethodOptionsCard             `json:"card"`
	CashApp          *CheckoutSessionPaymentMethodOptionsCashApp          `json:"cashapp"`
	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"`
	KakaoPay         *CheckoutSessionPaymentMethodOptionsKakaoPay         `json:"kakao_pay"`
	Klarna           *CheckoutSessionPaymentMethodOptionsKlarna           `json:"klarna"`
	Konbini          *CheckoutSessionPaymentMethodOptionsKonbini          `json:"konbini"`
	KrCard           *CheckoutSessionPaymentMethodOptionsKrCard           `json:"kr_card"`
	Link             *CheckoutSessionPaymentMethodOptionsLink             `json:"link"`
	Mobilepay        *CheckoutSessionPaymentMethodOptionsMobilepay        `json:"mobilepay"`
	Multibanco       *CheckoutSessionPaymentMethodOptionsMultibanco       `json:"multibanco"`
	NaverPay         *CheckoutSessionPaymentMethodOptionsNaverPay         `json:"naver_pay"`
	OXXO             *CheckoutSessionPaymentMethodOptionsOXXO             `json:"oxxo"`
	P24              *CheckoutSessionPaymentMethodOptionsP24              `json:"p24"`
	Payco            *CheckoutSessionPaymentMethodOptionsPayco            `json:"payco"`
	PayNow           *CheckoutSessionPaymentMethodOptionsPayNow           `json:"paynow"`
	Paypal           *CheckoutSessionPaymentMethodOptionsPaypal           `json:"paypal"`
	Pix              *CheckoutSessionPaymentMethodOptionsPix              `json:"pix"`
	RevolutPay       *CheckoutSessionPaymentMethodOptionsRevolutPay       `json:"revolut_pay"`
	SamsungPay       *CheckoutSessionPaymentMethodOptionsSamsungPay       `json:"samsung_pay"`
	SEPADebit        *CheckoutSessionPaymentMethodOptionsSEPADebit        `json:"sepa_debit"`
	Sofort           *CheckoutSessionPaymentMethodOptionsSofort           `json:"sofort"`
	Swish            *CheckoutSessionPaymentMethodOptionsSwish            `json:"swish"`
	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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsACSSDebitSetupFutureUsage `json:"setup_future_usage"`
	// Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
	TargetDate string `json:"target_date"`
	// 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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
	TargetDate *string `form:"target_date"`
	// 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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage `json:"setup_future_usage"`
	// Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
	TargetDate string `json:"target_date"`
}

type CheckoutSessionPaymentMethodOptionsAUBECSDebitParams

type CheckoutSessionPaymentMethodOptionsAUBECSDebitParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
	TargetDate *string `form:"target_date"`
}

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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsAmazonPay

type CheckoutSessionPaymentMethodOptionsAmazonPay struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsAmazonPayParams

type CheckoutSessionPaymentMethodOptionsAmazonPayParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the AmazonPay payment method options.

type CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage

type CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage string

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

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage = "off_session"
)

List of values that CheckoutSessionPaymentMethodOptionsAmazonPaySetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsBACSDebit

type CheckoutSessionPaymentMethodOptionsBACSDebit struct {
	MandateOptions *CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptions `json:"mandate_options"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsBACSDebitSetupFutureUsage `json:"setup_future_usage"`
	// Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
	TargetDate string `json:"target_date"`
}

type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptions added in v81.1.0

type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptions struct {
	// Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
	ReferencePrefix string `json:"reference_prefix"`
}

type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptionsParams added in v81.1.0

type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptionsParams struct {
	// Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
	ReferencePrefix *string `form:"reference_prefix"`
}

Additional fields for Mandate creation

type CheckoutSessionPaymentMethodOptionsBACSDebitParams

type CheckoutSessionPaymentMethodOptionsBACSDebitParams struct {
	// Additional fields for Mandate creation
	MandateOptions *CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptionsParams `form:"mandate_options"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
	TargetDate *string `form:"target_date"`
}

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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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"`
	// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.
	RequestExtendedAuthorization CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorization `json:"request_extended_authorization"`
	// Request ability to [increment the authorization](https://stripe.com/payments/incremental-authorization) for this CheckoutSession.
	RequestIncrementalAuthorization CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorization `json:"request_incremental_authorization"`
	// Request ability to make [multiple captures](https://stripe.com/payments/multicapture) for this CheckoutSession.
	RequestMulticapture CheckoutSessionPaymentMethodOptionsCardRequestMulticapture `json:"request_multicapture"`
	// Request ability to [overcapture](https://stripe.com/payments/overcapture) for this CheckoutSession.
	RequestOvercapture CheckoutSessionPaymentMethodOptionsCardRequestOvercapture `json:"request_overcapture"`
	// 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. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
	RequestThreeDSecure CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"`
	Restrictions        *CheckoutSessionPaymentMethodOptionsCardRestrictions       `json:"restrictions"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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 Checkout Session.
	// Setting to false will prevent any installment plan from applying to a payment.
	Enabled *bool `form:"enabled"`
}

Installment options for card payments

type CheckoutSessionPaymentMethodOptionsCardParams

type CheckoutSessionPaymentMethodOptionsCardParams struct {
	// Installment options for card payments
	Installments *CheckoutSessionPaymentMethodOptionsCardInstallmentsParams `form:"installments"`
	// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.
	RequestExtendedAuthorization *string `form:"request_extended_authorization"`
	// Request ability to [increment the authorization](https://stripe.com/payments/incremental-authorization) for this CheckoutSession.
	RequestIncrementalAuthorization *string `form:"request_incremental_authorization"`
	// Request ability to make [multiple captures](https://stripe.com/payments/multicapture) for this CheckoutSession.
	RequestMulticapture *string `form:"request_multicapture"`
	// Request ability to [overcapture](https://stripe.com/payments/overcapture) for this CheckoutSession.
	RequestOvercapture *string `form:"request_overcapture"`
	// 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. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
	RequestThreeDSecure *string `form:"request_three_d_secure"`
	// Restrictions to apply to the card payment method. For example, you can block specific card brands.
	Restrictions *CheckoutSessionPaymentMethodOptionsCardRestrictionsParams `form:"restrictions"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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 CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorization added in v81.1.0

type CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorization string

Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.

const (
	CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorizationIfAvailable CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorization = "if_available"
	CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorizationNever       CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorization = "never"
)

List of values that CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorization can take

type CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorization added in v81.1.0

type CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorization string

Request ability to [increment the authorization](https://stripe.com/payments/incremental-authorization) for this CheckoutSession.

const (
	CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorizationIfAvailable CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorization = "if_available"
	CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorizationNever       CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorization = "never"
)

List of values that CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorization can take

type CheckoutSessionPaymentMethodOptionsCardRequestMulticapture added in v81.1.0

type CheckoutSessionPaymentMethodOptionsCardRequestMulticapture string

Request ability to make [multiple captures](https://stripe.com/payments/multicapture) for this CheckoutSession.

const (
	CheckoutSessionPaymentMethodOptionsCardRequestMulticaptureIfAvailable CheckoutSessionPaymentMethodOptionsCardRequestMulticapture = "if_available"
	CheckoutSessionPaymentMethodOptionsCardRequestMulticaptureNever       CheckoutSessionPaymentMethodOptionsCardRequestMulticapture = "never"
)

List of values that CheckoutSessionPaymentMethodOptionsCardRequestMulticapture can take

type CheckoutSessionPaymentMethodOptionsCardRequestOvercapture added in v81.1.0

type CheckoutSessionPaymentMethodOptionsCardRequestOvercapture string

Request ability to [overcapture](https://stripe.com/payments/overcapture) for this CheckoutSession.

const (
	CheckoutSessionPaymentMethodOptionsCardRequestOvercaptureIfAvailable CheckoutSessionPaymentMethodOptionsCardRequestOvercapture = "if_available"
	CheckoutSessionPaymentMethodOptionsCardRequestOvercaptureNever       CheckoutSessionPaymentMethodOptionsCardRequestOvercapture = "never"
)

List of values that CheckoutSessionPaymentMethodOptionsCardRequestOvercapture can take

type CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure

type CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure 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. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.

const (
	CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecureAny       CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure = "any"
	CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecureAutomatic CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure = "automatic"
	CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecureChallenge CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure = "challenge"
)

List of values that CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure can take

type CheckoutSessionPaymentMethodOptionsCardRestrictions added in v81.4.0

type CheckoutSessionPaymentMethodOptionsCardRestrictions struct {
	// Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
	BrandsBlocked []CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlocked `json:"brands_blocked"`
}

type CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlocked added in v81.4.0

type CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlocked string

Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.

const (
	CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlockedAmericanExpress       CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlocked = "american_express"
	CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlockedDiscoverGlobalNetwork CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlocked = "discover_global_network"
	CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlockedMastercard            CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlocked = "mastercard"
	CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlockedVisa                  CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlocked = "visa"
)

List of values that CheckoutSessionPaymentMethodOptionsCardRestrictionsBrandsBlocked can take

type CheckoutSessionPaymentMethodOptionsCardRestrictionsParams added in v81.4.0

type CheckoutSessionPaymentMethodOptionsCardRestrictionsParams struct {
	// Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
	BrandsBlocked []*string `form:"brands_blocked"`
}

Restrictions to apply to the card payment method. For example, you can block specific card brands.

type CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage string

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

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "off_session"
	CheckoutSessionPaymentMethodOptionsCardSetupFutureUsageOnSession  CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage = "on_session"
)

List of values that CheckoutSessionPaymentMethodOptionsCardSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsCashApp

type CheckoutSessionPaymentMethodOptionsCashApp struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsCashAppParams

type CheckoutSessionPaymentMethodOptionsCashAppParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Cashapp Pay payment method options.

type CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage string

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

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsCashAppSetupFutureUsage 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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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`, `mx_bank_transfer`, or `us_bank_transfer`.
	Type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType `json:"type"`
}

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer

type CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransfer struct {
	// The desired country code of the bank account information. Permitted values include: `BE`, `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: `BE`, `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.
	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 (
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeABA      CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "aba"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeIBAN     CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "iban"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSEPA     CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sepa"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSortCode CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "sort_code"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSpei     CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "spei"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressTypeSwift    CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferRequestedAddressType = "swift"
	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`, `mx_bank_transfer`, or `us_bank_transfer`.

const (
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeEUBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "eu_bank_transfer"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeGBBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "gb_bank_transfer"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeJPBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "jp_bank_transfer"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeMXBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "mx_bank_transfer"
	CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferTypeUSBankTransfer CheckoutSessionPaymentMethodOptionsCustomerBalanceBankTransferType = "us_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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsIDEALSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsKakaoPay

type CheckoutSessionPaymentMethodOptionsKakaoPay struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod CheckoutSessionPaymentMethodOptionsKakaoPayCaptureMethod `json:"capture_method"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsKakaoPayCaptureMethod

type CheckoutSessionPaymentMethodOptionsKakaoPayCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	CheckoutSessionPaymentMethodOptionsKakaoPayCaptureMethodManual CheckoutSessionPaymentMethodOptionsKakaoPayCaptureMethod = "manual"
)

List of values that CheckoutSessionPaymentMethodOptionsKakaoPayCaptureMethod can take

type CheckoutSessionPaymentMethodOptionsKakaoPayParams

type CheckoutSessionPaymentMethodOptionsKakaoPayParams 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 with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Kakao Pay payment method options.

type CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsage

type CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsage string

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

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsage = "off_session"
)

List of values that CheckoutSessionPaymentMethodOptionsKakaoPaySetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsKlarna

type CheckoutSessionPaymentMethodOptionsKlarna struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsKonbiniSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsKrCard

type CheckoutSessionPaymentMethodOptionsKrCard struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod CheckoutSessionPaymentMethodOptionsKrCardCaptureMethod `json:"capture_method"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsKrCardCaptureMethod

type CheckoutSessionPaymentMethodOptionsKrCardCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	CheckoutSessionPaymentMethodOptionsKrCardCaptureMethodManual CheckoutSessionPaymentMethodOptionsKrCardCaptureMethod = "manual"
)

List of values that CheckoutSessionPaymentMethodOptionsKrCardCaptureMethod can take

type CheckoutSessionPaymentMethodOptionsKrCardParams

type CheckoutSessionPaymentMethodOptionsKrCardParams 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 with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Korean card payment method options.

type CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsage string

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

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsage = "off_session"
)

List of values that CheckoutSessionPaymentMethodOptionsKrCardSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsLink struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsLinkParams

type CheckoutSessionPaymentMethodOptionsLinkParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Link payment method options.

type CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage string

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

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage = "off_session"
)

List of values that CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsMobilepay

type CheckoutSessionPaymentMethodOptionsMobilepay struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsMobilepayParams

type CheckoutSessionPaymentMethodOptionsMobilepayParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Mobilepay payment method options.

type CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage

type CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage string

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

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsMultibanco

type CheckoutSessionPaymentMethodOptionsMultibanco struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsMultibancoParams

type CheckoutSessionPaymentMethodOptionsMultibancoParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Multibanco payment method options.

type CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage string

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

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsNaverPay

type CheckoutSessionPaymentMethodOptionsNaverPay struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod CheckoutSessionPaymentMethodOptionsNaverPayCaptureMethod `json:"capture_method"`
}

type CheckoutSessionPaymentMethodOptionsNaverPayCaptureMethod

type CheckoutSessionPaymentMethodOptionsNaverPayCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	CheckoutSessionPaymentMethodOptionsNaverPayCaptureMethodManual CheckoutSessionPaymentMethodOptionsNaverPayCaptureMethod = "manual"
)

List of values that CheckoutSessionPaymentMethodOptionsNaverPayCaptureMethod can take

type CheckoutSessionPaymentMethodOptionsNaverPayParams

type CheckoutSessionPaymentMethodOptionsNaverPayParams 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 with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the Naver Pay payment method options.

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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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 AmazonPay payment method options.
	AmazonPay *CheckoutSessionPaymentMethodOptionsAmazonPayParams `form:"amazon_pay"`
	// 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 Cashapp Pay payment method options.
	CashApp *CheckoutSessionPaymentMethodOptionsCashAppParams `form:"cashapp"`
	// 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 Kakao Pay payment method options.
	KakaoPay *CheckoutSessionPaymentMethodOptionsKakaoPayParams `form:"kakao_pay"`
	// 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 Korean card payment method options.
	KrCard *CheckoutSessionPaymentMethodOptionsKrCardParams `form:"kr_card"`
	// contains details about the Link payment method options.
	Link *CheckoutSessionPaymentMethodOptionsLinkParams `form:"link"`
	// contains details about the Mobilepay payment method options.
	Mobilepay *CheckoutSessionPaymentMethodOptionsMobilepayParams `form:"mobilepay"`
	// contains details about the Multibanco payment method options.
	Multibanco *CheckoutSessionPaymentMethodOptionsMultibancoParams `form:"multibanco"`
	// contains details about the Naver Pay payment method options.
	NaverPay *CheckoutSessionPaymentMethodOptionsNaverPayParams `form:"naver_pay"`
	// 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 Pay By Bank payment method options.
	PayByBank *CheckoutSessionPaymentMethodOptionsPayByBankParams `form:"pay_by_bank"`
	// contains details about the PAYCO payment method options.
	Payco *CheckoutSessionPaymentMethodOptionsPaycoParams `form:"payco"`
	// contains details about the PayNow payment method options.
	PayNow *CheckoutSessionPaymentMethodOptionsPayNowParams `form:"paynow"`
	// contains details about the PayPal payment method options.
	Paypal *CheckoutSessionPaymentMethodOptionsPaypalParams `form:"paypal"`
	// contains details about the Pix payment method options.
	Pix *CheckoutSessionPaymentMethodOptionsPixParams `form:"pix"`
	// contains details about the RevolutPay payment method options.
	RevolutPay *CheckoutSessionPaymentMethodOptionsRevolutPayParams `form:"revolut_pay"`
	// contains details about the Samsung Pay payment method options.
	SamsungPay *CheckoutSessionPaymentMethodOptionsSamsungPayParams `form:"samsung_pay"`
	// 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 Swish payment method options.
	Swish *CheckoutSessionPaymentMethodOptionsSwishParams `form:"swish"`
	// 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 CheckoutSessionPaymentMethodOptionsPayByBankParams added in v81.3.0

type CheckoutSessionPaymentMethodOptionsPayByBankParams struct{}

contains details about the Pay By Bank payment method options.

type CheckoutSessionPaymentMethodOptionsPayNow

type CheckoutSessionPaymentMethodOptionsPayNow struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsPayNowSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsPayco

type CheckoutSessionPaymentMethodOptionsPayco struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod CheckoutSessionPaymentMethodOptionsPaycoCaptureMethod `json:"capture_method"`
}

type CheckoutSessionPaymentMethodOptionsPaycoCaptureMethod

type CheckoutSessionPaymentMethodOptionsPaycoCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	CheckoutSessionPaymentMethodOptionsPaycoCaptureMethodManual CheckoutSessionPaymentMethodOptionsPaycoCaptureMethod = "manual"
)

List of values that CheckoutSessionPaymentMethodOptionsPaycoCaptureMethod can take

type CheckoutSessionPaymentMethodOptionsPaycoParams

type CheckoutSessionPaymentMethodOptionsPaycoParams struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod *string `form:"capture_method"`
}

contains details about the PAYCO payment method options.

type CheckoutSessionPaymentMethodOptionsPaypal

type CheckoutSessionPaymentMethodOptionsPaypal struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod `json:"capture_method"`
	// Preferred locale of the PayPal checkout page that the customer is redirected to.
	PreferredLocale string `json:"preferred_locale"`
	// A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
	Reference string `json:"reference"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod

type CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	CheckoutSessionPaymentMethodOptionsPaypalCaptureMethodManual CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod = "manual"
)

List of values that CheckoutSessionPaymentMethodOptionsPaypalCaptureMethod can take

type CheckoutSessionPaymentMethodOptionsPaypalParams

type CheckoutSessionPaymentMethodOptionsPaypalParams struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod *string `form:"capture_method"`
	// [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to.
	PreferredLocale *string `form:"preferred_locale"`
	// A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
	Reference *string `form:"reference"`
	// The risk correlation ID for an on-session payment using a saved PayPal payment method.
	RiskCorrelationID *string `form:"risk_correlation_id"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	//
	// If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the PayPal payment method options.

type CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage

type CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage string

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

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage = "off_session"
)

List of values that CheckoutSessionPaymentMethodOptionsPaypalSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsPix

type CheckoutSessionPaymentMethodOptionsPix struct {
	// The number of seconds after which Pix payment will expire.
	ExpiresAfterSeconds int64 `json:"expires_after_seconds"`
}

type CheckoutSessionPaymentMethodOptionsPixParams

type CheckoutSessionPaymentMethodOptionsPixParams struct {
	// The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
	ExpiresAfterSeconds *int64 `form:"expires_after_seconds"`
}

contains details about the Pix payment method options.

type CheckoutSessionPaymentMethodOptionsRevolutPay

type CheckoutSessionPaymentMethodOptionsRevolutPay struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage `json:"setup_future_usage"`
}

type CheckoutSessionPaymentMethodOptionsRevolutPayParams

type CheckoutSessionPaymentMethodOptionsRevolutPayParams struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
}

contains details about the RevolutPay payment method options.

type CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage

type CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage string

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

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage = "off_session"
)

List of values that CheckoutSessionPaymentMethodOptionsRevolutPaySetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsSEPADebit

type CheckoutSessionPaymentMethodOptionsSEPADebit struct {
	MandateOptions *CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptions `json:"mandate_options"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage `json:"setup_future_usage"`
	// Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
	TargetDate string `json:"target_date"`
}

type CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptions added in v81.1.0

type CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptions struct {
	// Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
	ReferencePrefix string `json:"reference_prefix"`
}

type CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptionsParams added in v81.1.0

type CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptionsParams struct {
	// Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
	ReferencePrefix *string `form:"reference_prefix"`
}

Additional fields for Mandate creation

type CheckoutSessionPaymentMethodOptionsSEPADebitParams

type CheckoutSessionPaymentMethodOptionsSEPADebitParams struct {
	// Additional fields for Mandate creation
	MandateOptions *CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptionsParams `form:"mandate_options"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
	TargetDate *string `form:"target_date"`
}

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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageNone       CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "none"
	CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "off_session"
	CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsageOnSession  CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage = "on_session"
)

List of values that CheckoutSessionPaymentMethodOptionsSEPADebitSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsSamsungPay

type CheckoutSessionPaymentMethodOptionsSamsungPay struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethod `json:"capture_method"`
}

type CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethod

type CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethod string

Controls when the funds will be captured from the customer's account.

const (
	CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethodManual CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethod = "manual"
)

List of values that CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethod can take

type CheckoutSessionPaymentMethodOptionsSamsungPayParams

type CheckoutSessionPaymentMethodOptionsSamsungPayParams struct {
	// Controls when the funds will be captured from the customer's account.
	CaptureMethod *string `form:"capture_method"`
}

contains details about the Samsung Pay payment method options.

type CheckoutSessionPaymentMethodOptionsSofort

type CheckoutSessionPaymentMethodOptionsSofort struct {
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).

const (
	CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage = "none"
)

List of values that CheckoutSessionPaymentMethodOptionsSofortSetupFutureUsage can take

type CheckoutSessionPaymentMethodOptionsSwish

type CheckoutSessionPaymentMethodOptionsSwish struct {
	// The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
	Reference string `json:"reference"`
}

type CheckoutSessionPaymentMethodOptionsSwishParams

type CheckoutSessionPaymentMethodOptionsSwishParams struct {
	// The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent.
	Reference *string `form:"reference"`
}

contains details about the Swish payment method options.

type CheckoutSessionPaymentMethodOptionsUSBankAccount

type CheckoutSessionPaymentMethodOptionsUSBankAccount struct {
	FinancialConnections *CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections `json:"financial_connections"`
	// Indicates that you intend to make future payments with this PaymentIntent's payment method.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage CheckoutSessionPaymentMethodOptionsUSBankAccountSetupFutureUsage `json:"setup_future_usage"`
	// Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
	TargetDate string `json:"target_date"`
	// Bank account verification method.
	VerificationMethod CheckoutSessionPaymentMethodOptionsUSBankAccountVerificationMethod `json:"verification_method"`
}

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnections struct {
	Filters *CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsFilters `json:"filters"`
	// The list of permissions to request. The `payment_method` permission must be included.
	Permissions []CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"`
	// Data features requested to be retrieved upon account creation.
	Prefetch []CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch `json:"prefetch"`
	// 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 CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsFilters

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsFilters struct {
	// The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
	AccountSubcategories []CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategory `json:"account_subcategories"`
}

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategory

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategory string

The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.

const (
	CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategoryChecking CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategory = "checking"
	CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategorySavings  CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategory = "savings"
)

List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersAccountSubcategory can take

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"`
	// List of data features that you would like to retrieve upon account creation.
	Prefetch []*string `form:"prefetch"`
}

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 CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch

type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch string

Data features requested to be retrieved upon account creation.

const (
	CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances     CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances"
	CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchOwnership    CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "ownership"
	CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchTransactions CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "transactions"
)

List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch 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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
	SetupFutureUsage *string `form:"setup_future_usage"`
	// Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
	TargetDate *string `form:"target_date"`
	// 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.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
	//
	// If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
	//
	// When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/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.
	//
	// Can only be set in `payment` and `subscription` mode.
	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 CheckoutSessionRedirectOnCompletion

type CheckoutSessionRedirectOnCompletion string

This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.

const (
	CheckoutSessionRedirectOnCompletionAlways     CheckoutSessionRedirectOnCompletion = "always"
	CheckoutSessionRedirectOnCompletionIfRequired CheckoutSessionRedirectOnCompletion = "if_required"
	CheckoutSessionRedirectOnCompletionNever      CheckoutSessionRedirectOnCompletion = "never"
)

List of values that CheckoutSessionRedirectOnCompletion can take

type CheckoutSessionSavedPaymentMethodOptions

type CheckoutSessionSavedPaymentMethodOptions struct {
	// Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout.
	AllowRedisplayFilters []CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter `json:"allow_redisplay_filters"`
	// Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.
	PaymentMethodRemove CheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove `json:"payment_method_remove"`
	// Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
	PaymentMethodSave CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave `json:"payment_method_save"`
}

Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.

type CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter

type CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter string

Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout.

const (
	CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilterAlways      CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter = "always"
	CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilterLimited     CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter = "limited"
	CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilterUnspecified CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter = "unspecified"
)

List of values that CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter can take

type CheckoutSessionSavedPaymentMethodOptionsParams

type CheckoutSessionSavedPaymentMethodOptionsParams struct {
	// Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout.
	AllowRedisplayFilters []*string `form:"allow_redisplay_filters"`
	// Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
	PaymentMethodSave *string `form:"payment_method_save"`
}

Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.

type CheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove

type CheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove string

Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.

const (
	CheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemoveDisabled CheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove = "disabled"
	CheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemoveEnabled  CheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove = "enabled"
)

List of values that CheckoutSessionSavedPaymentMethodOptionsPaymentMethodRemove can take

type CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave

type CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave string

Enable customers to choose if they wish to save their payment method for future use. Disabled by default.

const (
	CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSaveDisabled CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave = "disabled"
	CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSaveEnabled  CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave = "enabled"
)

List of values that CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave can take

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.

func (*CheckoutSessionSetupIntentDataParams) AddMetadata

func (p *CheckoutSessionSetupIntentDataParams) AddMetadata(key string, value string)

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

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, 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.
	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/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
	//
	// Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
	Rate *TaxRate `json:"rate"`
	// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
	TaxabilityReason CheckoutSessionShippingCostTaxTaxabilityReason `json:"taxability_reason"`
	// The amount on which tax is calculated, in cents (or local equivalent).
	TaxableAmount int64 `json:"taxable_amount"`
}

The taxes applied to the shipping rate.

type CheckoutSessionShippingCostTaxTaxabilityReason

type CheckoutSessionShippingCostTaxTaxabilityReason string

The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.

const (
	CheckoutSessionShippingCostTaxTaxabilityReasonCustomerExempt       CheckoutSessionShippingCostTaxTaxabilityReason = "customer_exempt"
	CheckoutSessionShippingCostTaxTaxabilityReasonNotCollecting        CheckoutSessionShippingCostTaxTaxabilityReason = "not_collecting"
	CheckoutSessionShippingCostTaxTaxabilityReasonNotSubjectToTax      CheckoutSessionShippingCostTaxTaxabilityReason = "not_subject_to_tax"
	CheckoutSessionShippingCostTaxTaxabilityReasonNotSupported         CheckoutSessionShippingCostTaxTaxabilityReason = "not_supported"
	CheckoutSessionShippingCostTaxTaxabilityReasonPortionProductExempt CheckoutSessionShippingCostTaxTaxabilityReason = "portion_product_exempt"
	CheckoutSessionShippingCostTaxTaxabilityReasonPortionReducedRated  CheckoutSessionShippingCostTaxTaxabilityReason = "portion_reduced_rated"
	CheckoutSessionShippingCostTaxTaxabilityReasonPortionStandardRated CheckoutSessionShippingCostTaxTaxabilityReason = "portion_standard_rated"
	CheckoutSessionShippingCostTaxTaxabilityReasonProductExempt        CheckoutSessionShippingCostTaxTaxabilityReason = "product_exempt"
	CheckoutSessionShippingCostTaxTaxabilityReasonProductExemptHoliday CheckoutSessionShippingCostTaxTaxabilityReason = "product_exempt_holiday"
	CheckoutSessionShippingCostTaxTaxabilityReasonProportionallyRated  CheckoutSessionShippingCostTaxTaxabilityReason = "proportionally_rated"
	CheckoutSessionShippingCostTaxTaxabilityReasonReducedRated         CheckoutSessionShippingCostTaxTaxabilityReason = "reduced_rated"
	CheckoutSessionShippingCostTaxTaxabilityReasonReverseCharge        CheckoutSessionShippingCostTaxTaxabilityReason = "reverse_charge"
	CheckoutSessionShippingCostTaxTaxabilityReasonStandardRated        CheckoutSessionShippingCostTaxTaxabilityReason = "standard_rated"
	CheckoutSessionShippingCostTaxTaxabilityReasonTaxableBasisReduced  CheckoutSessionShippingCostTaxTaxabilityReason = "taxable_basis_reduced"
	CheckoutSessionShippingCostTaxTaxabilityReasonZeroRated            CheckoutSessionShippingCostTaxTaxabilityReason = "zero_rated"
)

List of values that CheckoutSessionShippingCostTaxTaxabilityReason can take

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. Up to a maximum of 5.

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.
	Type *string `form:"type"`
}

Parameters to be passed to Shipping Rate creation for this shipping option.

func (*CheckoutSessionShippingOptionShippingRateDataParams) AddMetadata

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

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. If blank or `auto`, `pay` is used.

const (
	CheckoutSessionSubmitTypeAuto      CheckoutSessionSubmitType = "auto"
	CheckoutSessionSubmitTypeBook      CheckoutSessionSubmitType = "book"
	CheckoutSessionSubmitTypeDonate    CheckoutSessionSubmitType = "donate"
	CheckoutSessionSubmitTypePay       CheckoutSessionSubmitType = "pay"
	CheckoutSessionSubmitTypeSubscribe CheckoutSessionSubmitType = "subscribe"
)

List of values that CheckoutSessionSubmitType can take

type CheckoutSessionSubscriptionDataInvoiceSettingsIssuerParams

type CheckoutSessionSubscriptionDataInvoiceSettingsIssuerParams struct {
	// The connected account being referenced when `type` is `account`.
	Account *string `form:"account"`
	// Type of the account referenced in the request.
	Type *string `form:"type"`
}

The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.

type CheckoutSessionSubscriptionDataInvoiceSettingsParams

type CheckoutSessionSubscriptionDataInvoiceSettingsParams struct {
	// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
	Issuer *CheckoutSessionSubscriptionDataInvoiceSettingsIssuerParams `form:"issuer"`
}

All invoices will be billed using the specified settings.

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 total 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"`
	// A future timestamp to anchor the subscription's billing cycle for new subscriptions.
	BillingCycleAnchor *int64 `form:"billing_cycle_anchor"`
	// 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 the [customer portal](https://stripe.com/docs/customer-management).
	Description *string `form:"description"`
	// All invoices will be billed using the specified settings.
	InvoiceSettings *CheckoutSessionSubscriptionDataInvoiceSettingsParams `form:"invoice_settings"`
	// 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 account on behalf of which to charge, for each of the subscription's invoices.
	OnBehalfOf *string `form:"on_behalf_of"`
	// Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
	ProrationBehavior *string `form:"proration_behavior"`
	// 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"`
	// 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"`
	// Settings related to subscription trials.
	TrialSettings *CheckoutSessionSubscriptionDataTrialSettingsParams `form:"trial_settings"`
}

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

func (*CheckoutSessionSubscriptionDataParams) AddMetadata

func (p *CheckoutSessionSubscriptionDataParams) AddMetadata(key string, value string)

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

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 total 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 CheckoutSessionSubscriptionDataTrialSettingsEndBehaviorParams

type CheckoutSessionSubscriptionDataTrialSettingsEndBehaviorParams struct {
	// Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
	MissingPaymentMethod *string `form:"missing_payment_method"`
}

Defines how the subscription should behave when the user's free trial ends.

type CheckoutSessionSubscriptionDataTrialSettingsParams

type CheckoutSessionSubscriptionDataTrialSettingsParams struct {
	// Defines how the subscription should behave when the user's free trial ends.
	EndBehavior *CheckoutSessionSubscriptionDataTrialSettingsEndBehaviorParams `form:"end_behavior"`
}

Settings related to subscription trials.

type CheckoutSessionTaxIDCollection

type CheckoutSessionTaxIDCollection struct {
	// Indicates whether tax ID collection is enabled for the session
	Enabled bool `json:"enabled"`
	// Indicates whether a tax ID is required on the payment page
	Required CheckoutSessionTaxIDCollectionRequired `json:"required"`
}

type CheckoutSessionTaxIDCollectionParams

type CheckoutSessionTaxIDCollectionParams struct {
	// Enable tax ID collection during checkout. Defaults to `false`.
	Enabled *bool `form:"enabled"`
	// Describes whether a tax ID is required during checkout. Defaults to `never`.
	Required *string `form:"required"`
}

Controls tax ID collection during checkout.

type CheckoutSessionTaxIDCollectionRequired

type CheckoutSessionTaxIDCollectionRequired string

Indicates whether a tax ID is required on the payment page

const (
	CheckoutSessionTaxIDCollectionRequiredIfSupported CheckoutSessionTaxIDCollectionRequired = "if_supported"
	CheckoutSessionTaxIDCollectionRequiredNever       CheckoutSessionTaxIDCollectionRequired = "never"
)

List of values that CheckoutSessionTaxIDCollectionRequired can take

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/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
	//
	// Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
	Rate *TaxRate `json:"rate"`
	// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
	TaxabilityReason CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason `json:"taxability_reason"`
	// The amount on which tax is calculated, in cents (or local equivalent).
	TaxableAmount int64 `json:"taxable_amount"`
}

The aggregated tax amounts by rate.

type CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason

type CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason string

The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.

const (
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonCustomerExempt       CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "customer_exempt"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotCollecting        CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_collecting"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotSubjectToTax      CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_subject_to_tax"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonNotSupported         CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "not_supported"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionProductExempt CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_product_exempt"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionReducedRated  CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_reduced_rated"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonPortionStandardRated CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "portion_standard_rated"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProductExempt        CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProductExemptHoliday CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "product_exempt_holiday"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonProportionallyRated  CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "proportionally_rated"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonReducedRated         CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "reduced_rated"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonReverseCharge        CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "reverse_charge"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonStandardRated        CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "standard_rated"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonTaxableBasisReduced  CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "taxable_basis_reduced"
	CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonZeroRated            CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason = "zero_rated"
)

List of values that CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason can take

type CheckoutSessionUIMode

type CheckoutSessionUIMode string

The UI mode of the Session. Defaults to `hosted`.

const (
	CheckoutSessionUIModeEmbedded CheckoutSessionUIMode = "embedded"
	CheckoutSessionUIModeHosted   CheckoutSessionUIMode = "hosted"
)

List of values that CheckoutSessionUIMode can take

type ClimateOrder

type ClimateOrder struct {
	APIResource
	// Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit.
	AmountFees int64 `json:"amount_fees"`
	// Total amount of the carbon removal in the currency's smallest unit.
	AmountSubtotal int64 `json:"amount_subtotal"`
	// Total amount of the order including fees in the currency's smallest unit.
	AmountTotal int64                    `json:"amount_total"`
	Beneficiary *ClimateOrderBeneficiary `json:"beneficiary"`
	// Time at which the order was canceled. Measured in seconds since the Unix epoch.
	CanceledAt int64 `json:"canceled_at"`
	// Reason for the cancellation of this order.
	CancellationReason ClimateOrderCancellationReason `json:"cancellation_reason"`
	// For delivered orders, a URL to a delivery certificate for the order.
	Certificate string `json:"certificate"`
	// Time at which the order was confirmed. Measured in seconds since the Unix epoch.
	ConfirmedAt int64 `json:"confirmed_at"`
	// 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, representing the currency for this order.
	Currency Currency `json:"currency"`
	// Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch.
	DelayedAt int64 `json:"delayed_at"`
	// Time at which the order was delivered. Measured in seconds since the Unix epoch.
	DeliveredAt int64 `json:"delivered_at"`
	// Details about the delivery of carbon removal for this order.
	DeliveryDetails []*ClimateOrderDeliveryDetail `json:"delivery_details"`
	// The year this order is expected to be delivered.
	ExpectedDeliveryYear int64 `json:"expected_delivery_year"`
	// 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"`
	// Quantity of carbon removal that is included in this order.
	MetricTons float64 `json:"metric_tons,string"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// Unique ID for the Climate `Product` this order is purchasing.
	Product *ClimateProduct `json:"product"`
	// Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch.
	ProductSubstitutedAt int64 `json:"product_substituted_at"`
	// The current status of this order.
	Status ClimateOrderStatus `json:"status"`
}

Orders represent your intent to purchase a particular Climate product. When you create an order, the payment is deducted from your merchant balance.

type ClimateOrderBeneficiary

type ClimateOrderBeneficiary struct {
	// Publicly displayable name for the end beneficiary of carbon removal.
	PublicName string `json:"public_name"`
}

type ClimateOrderBeneficiaryParams

type ClimateOrderBeneficiaryParams struct {
	// Publicly displayable name for the end beneficiary of carbon removal.
	PublicName *string `form:"public_name"`
}

Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.

type ClimateOrderCancelParams

type ClimateOrderCancelParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total.

func (*ClimateOrderCancelParams) AddExpand

func (p *ClimateOrderCancelParams) AddExpand(f string)

AddExpand appends a new field to expand.

type ClimateOrderCancellationReason

type ClimateOrderCancellationReason string

Reason for the cancellation of this order.

const (
	ClimateOrderCancellationReasonExpired            ClimateOrderCancellationReason = "expired"
	ClimateOrderCancellationReasonProductUnavailable ClimateOrderCancellationReason = "product_unavailable"
	ClimateOrderCancellationReasonRequested          ClimateOrderCancellationReason = "requested"
)

List of values that ClimateOrderCancellationReason can take

type ClimateOrderDeliveryDetail

type ClimateOrderDeliveryDetail struct {
	// Time at which the delivery occurred. Measured in seconds since the Unix epoch.
	DeliveredAt int64 `json:"delivered_at"`
	// Specific location of this delivery.
	Location *ClimateOrderDeliveryDetailLocation `json:"location"`
	// Quantity of carbon removal supplied by this delivery.
	MetricTons string `json:"metric_tons"`
	// Once retired, a URL to the registry entry for the tons from this delivery.
	RegistryURL string `json:"registry_url"`
	// A supplier of carbon removal.
	Supplier *ClimateSupplier `json:"supplier"`
}

Details about the delivery of carbon removal for this order.

type ClimateOrderDeliveryDetailLocation

type ClimateOrderDeliveryDetailLocation struct {
	// The city where the supplier is located.
	City string `json:"city"`
	// Two-letter ISO code representing the country where the supplier is located.
	Country string `json:"country"`
	// The geographic latitude where the supplier is located.
	Latitude float64 `json:"latitude"`
	// The geographic longitude where the supplier is located.
	Longitude float64 `json:"longitude"`
	// The state/county/province/region where the supplier is located.
	Region string `json:"region"`
}

Specific location of this delivery.

type ClimateOrderList

type ClimateOrderList struct {
	APIResource
	ListMeta
	Data []*ClimateOrder `json:"data"`
}

ClimateOrderList is a list of Orders as retrieved from a list endpoint.

type ClimateOrderListParams

type ClimateOrderListParams struct {
	ListParams `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Lists all Climate order objects. The orders are returned sorted by creation date, with the most recently created orders appearing first.

func (*ClimateOrderListParams) AddExpand

func (p *ClimateOrderListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type ClimateOrderParams

type ClimateOrderParams struct {
	Params `form:"*"`
	// Requested amount of carbon removal units. Either this or `metric_tons` must be specified.
	Amount *int64 `form:"amount"`
	// Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
	Beneficiary *ClimateOrderBeneficiaryParams `form:"beneficiary"`
	// Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used.
	Currency *string `form:"currency"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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"`
	// Requested number of tons for the order. Either this or `amount` must be specified.
	MetricTons *float64 `form:"metric_tons,high_precision"`
	// Unique identifier of the Climate product.
	Product *string `form:"product"`
}

Creates a Climate order object for a given Climate product. The order will be processed immediately after creation and payment will be deducted your Stripe balance.

func (*ClimateOrderParams) AddExpand

func (p *ClimateOrderParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*ClimateOrderParams) AddMetadata

func (p *ClimateOrderParams) AddMetadata(key string, value string)

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

type ClimateOrderStatus

type ClimateOrderStatus string

The current status of this order.

const (
	ClimateOrderStatusAwaitingFunds ClimateOrderStatus = "awaiting_funds"
	ClimateOrderStatusCanceled      ClimateOrderStatus = "canceled"
	ClimateOrderStatusConfirmed     ClimateOrderStatus = "confirmed"
	ClimateOrderStatusDelivered     ClimateOrderStatus = "delivered"
	ClimateOrderStatusOpen          ClimateOrderStatus = "open"
)

List of values that ClimateOrderStatus can take

type ClimateProduct

type ClimateProduct struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Current prices for a metric ton of carbon removal in a currency's smallest unit.
	CurrentPricesPerMetricTon map[string]*ClimateProductCurrentPricesPerMetricTon `json:"current_prices_per_metric_ton"`
	// The year in which the carbon removal is expected to be delivered.
	DeliveryYear int64 `json:"delivery_year"`
	// Unique identifier for the object. For convenience, Climate product IDs are human-readable strings
	// that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory)
	// for a list of available carbon removal products.
	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 quantity of metric tons available for reservation.
	MetricTonsAvailable float64 `json:"metric_tons_available,string"`
	// The Climate product's name.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The carbon removal suppliers that fulfill orders for this Climate product.
	Suppliers []*ClimateSupplier `json:"suppliers"`
}

A Climate product represents a type of carbon removal unit available for reservation. You can retrieve it to see the current price and availability.

func (*ClimateProduct) UnmarshalJSON

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

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

type ClimateProductCurrentPricesPerMetricTon

type ClimateProductCurrentPricesPerMetricTon struct {
	// Fees for one metric ton of carbon removal in the currency's smallest unit.
	AmountFees int64 `json:"amount_fees"`
	// Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit.
	AmountSubtotal int64 `json:"amount_subtotal"`
	// Total for one metric ton of carbon removal (including fees) in the currency's smallest unit.
	AmountTotal int64 `json:"amount_total"`
}

Current prices for a metric ton of carbon removal in a currency's smallest unit.

type ClimateProductList

type ClimateProductList struct {
	APIResource
	ListMeta
	Data []*ClimateProduct `json:"data"`
}

ClimateProductList is a list of Products as retrieved from a list endpoint.

type ClimateProductListParams

type ClimateProductListParams struct {
	ListParams `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Lists all available Climate product objects.

func (*ClimateProductListParams) AddExpand

func (p *ClimateProductListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type ClimateProductParams

type ClimateProductParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Retrieves the details of a Climate product with the given ID.

func (*ClimateProductParams) AddExpand

func (p *ClimateProductParams) AddExpand(f string)

AddExpand appends a new field to expand.

type ClimateSupplier

type ClimateSupplier struct {
	APIResource
	// Unique identifier for the object.
	ID string `json:"id"`
	// Link to a webpage to learn more about the supplier.
	InfoURL string `json:"info_url"`
	// 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 locations in which this supplier operates.
	Locations []*ClimateSupplierLocation `json:"locations"`
	// Name of this carbon removal supplier.
	Name string `json:"name"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// The scientific pathway used for carbon removal.
	RemovalPathway ClimateSupplierRemovalPathway `json:"removal_pathway"`
}

A supplier of carbon removal.

type ClimateSupplierList

type ClimateSupplierList struct {
	APIResource
	ListMeta
	Data []*ClimateSupplier `json:"data"`
}

ClimateSupplierList is a list of Suppliers as retrieved from a list endpoint.

type ClimateSupplierListParams

type ClimateSupplierListParams struct {
	ListParams `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Lists all available Climate supplier objects.

func (*ClimateSupplierListParams) AddExpand

func (p *ClimateSupplierListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type ClimateSupplierLocation

type ClimateSupplierLocation struct {
	// The city where the supplier is located.
	City string `json:"city"`
	// Two-letter ISO code representing the country where the supplier is located.
	Country string `json:"country"`
	// The geographic latitude where the supplier is located.
	Latitude float64 `json:"latitude"`
	// The geographic longitude where the supplier is located.
	Longitude float64 `json:"longitude"`
	// The state/county/province/region where the supplier is located.
	Region string `json:"region"`
}

The locations in which this supplier operates.

type ClimateSupplierParams

type ClimateSupplierParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Retrieves a Climate supplier object.

func (*ClimateSupplierParams) AddExpand

func (p *ClimateSupplierParams) AddExpand(f string)

AddExpand appends a new field to expand.

type ClimateSupplierRemovalPathway

type ClimateSupplierRemovalPathway string

The scientific pathway used for carbon removal.

const (
	ClimateSupplierRemovalPathwayBiomassCarbonRemovalAndStorage ClimateSupplierRemovalPathway = "biomass_carbon_removal_and_storage"
	ClimateSupplierRemovalPathwayDirectAirCapture               ClimateSupplierRemovalPathway = "direct_air_capture"
	ClimateSupplierRemovalPathwayEnhancedWeathering             ClimateSupplierRemovalPathway = "enhanced_weathering"
)

List of values that ClimateSupplierRemovalPathway can take

type ConfirmationToken

type ConfirmationToken struct {
	APIResource
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.
	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"`
	// Data used for generating a Mandate.
	MandateData *ConfirmationTokenMandateData `json:"mandate_data"`
	// String representing the object's type. Objects of the same type share the same value.
	Object string `json:"object"`
	// ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
	PaymentIntent string `json:"payment_intent"`
	// Payment-method-specific configuration for this ConfirmationToken.
	PaymentMethodOptions *ConfirmationTokenPaymentMethodOptions `json:"payment_method_options"`
	// Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.
	PaymentMethodPreview *ConfirmationTokenPaymentMethodPreview `json:"payment_method_preview"`
	// Return URL used to confirm the Intent.
	ReturnURL string `json:"return_url"`
	// Indicates that you intend to make future payments with this ConfirmationToken's payment method.
	//
	// The presence of this property 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.
	SetupFutureUsage ConfirmationTokenSetupFutureUsage `json:"setup_future_usage"`
	// ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used.
	SetupIntent string `json:"setup_intent"`
	// Shipping information collected on this ConfirmationToken.
	Shipping *ConfirmationTokenShipping `json:"shipping"`
	// Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken.
	UseStripeSDK bool `json:"use_stripe_sdk"`
}

ConfirmationTokens help transport client side data collected by Stripe JS over to your server for confirming a PaymentIntent or SetupIntent. If the confirmation is successful, values present on the ConfirmationToken are written onto the Intent.

To learn more about how to use ConfirmationToken, visit the related guides: - [Finalize payments on the server](https://stripe.com/docs/payments/finalize-payments-on-the-server) - [Build two-step confirmation](https://stripe.com/docs/payments/build-a-two-step-confirmation).

type ConfirmationTokenMandateData

type ConfirmationTokenMandateData struct {
	// This hash contains details about the customer acceptance of the Mandate.
	CustomerAcceptance *ConfirmationTokenMandateDataCustomerAcceptance `json:"customer_acceptance"`
}

Data used for generating a Mandate.

type ConfirmationTokenMandateDataCustomerAcceptance

type ConfirmationTokenMandateDataCustomerAcceptance struct {
	// If this is a Mandate accepted online, this hash contains details about the online acceptance.
	Online *ConfirmationTokenMandateDataCustomerAcceptanceOnline `json:"online"`
	// The type of customer acceptance information included with the Mandate.
	Type string `json:"type"`
}

This hash contains details about the customer acceptance of the Mandate.

type ConfirmationTokenMandateDataCustomerAcceptanceOnline

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

If this is a Mandate accepted online, this hash contains details about the online acceptance.

type ConfirmationTokenParams

type ConfirmationTokenParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Retrieves an existing ConfirmationToken object

func (*ConfirmationTokenParams) AddExpand

func (p *ConfirmationTokenParams) AddExpand(f string)

AddExpand appends a new field to expand.

type ConfirmationTokenPaymentMethodOptions

type ConfirmationTokenPaymentMethodOptions struct {
	// This hash contains the card payment method options.
	Card *ConfirmationTokenPaymentMethodOptionsCard `json:"card"`
}

Payment-method-specific configuration for this ConfirmationToken.

type ConfirmationTokenPaymentMethodOptionsCard

type ConfirmationTokenPaymentMethodOptionsCard struct {
	// The `cvc_update` Token collected from the Payment Element.
	CVCToken string `json:"cvc_token"`
}

This hash contains the card payment method options.

type ConfirmationTokenPaymentMethodPreview

type ConfirmationTokenPaymentMethodPreview struct {
	ACSSDebit        *ConfirmationTokenPaymentMethodPreviewACSSDebit        `json:"acss_debit"`
	Affirm           *ConfirmationTokenPaymentMethodPreviewAffirm           `json:"affirm"`
	AfterpayClearpay *ConfirmationTokenPaymentMethodPreviewAfterpayClearpay `json:"afterpay_clearpay"`
	Alipay           *ConfirmationTokenPaymentMethodPreviewAlipay           `json:"alipay"`
	// This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
	AllowRedisplay ConfirmationTokenPaymentMethodPreviewAllowRedisplay  `json:"allow_redisplay"`
	Alma           *ConfirmationTokenPaymentMethodPreviewAlma           `json:"alma"`
	AmazonPay      *ConfirmationTokenPaymentMethodPreviewAmazonPay      `json:"amazon_pay"`
	AUBECSDebit    *ConfirmationTokenPaymentMethodPreviewAUBECSDebit    `json:"au_becs_debit"`
	BACSDebit      *ConfirmationTokenPaymentMethodPreviewBACSDebit      `json:"bacs_debit"`
	Bancontact     *ConfirmationTokenPaymentMethodPreviewBancontact     `json:"bancontact"`
	BillingDetails *ConfirmationTokenPaymentMethodPreviewBillingDetails `json:"billing_details"`
	BLIK           *ConfirmationTokenPaymentMethodPreviewBLIK           `json:"blik"`
	Boleto         *ConfirmationTokenPaymentMethodPreviewBoleto         `json:"boleto"`
	Card           *ConfirmationTokenPaymentMethodPreviewCard           `json:"card"`
	CardPresent    *ConfirmationTokenPaymentMethodPreviewCardPresent    `json:"card_present"`
	CashApp        *ConfirmationTokenPaymentMethodPreviewCashApp        `json:"cashapp"`
	// 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 *ConfirmationTokenPaymentMethodPreviewCustomerBalance `json:"customer_balance"`
	EPS             *ConfirmationTokenPaymentMethodPreviewEPS             `json:"eps"`
	FPX             *ConfirmationTokenPaymentMethodPreviewFPX             `json:"fpx"`
	Giropay         *ConfirmationTokenPaymentMethodPreviewGiropay         `json:"giropay"`
	Grabpay         *ConfirmationTokenPaymentMethodPreviewGrabpay         `json:"grabpay"`
	IDEAL           *ConfirmationTokenPaymentMethodPreviewIDEAL           `json:"ideal"`
	InteracPresent  *ConfirmationTokenPaymentMethodPreviewInteracPresent  `json:"interac_present"`
	KakaoPay        *ConfirmationTokenPaymentMethodPreviewKakaoPay        `json:"kakao_pay"`
	Klarna          *ConfirmationTokenPaymentMethodPreviewKlarna          `json:"klarna"`
	Konbini         *ConfirmationTokenPaymentMethodPreviewKonbini         `json:"konbini"`
	KrCard          *ConfirmationTokenPaymentMethodPreviewKrCard          `json:"kr_card"`
	Link            *ConfirmationTokenPaymentMethodPreviewLink            `json:"link"`
	Mobilepay       *ConfirmationTokenPaymentMethodPreviewMobilepay       `json:"mobilepay"`
	Multibanco      *ConfirmationTokenPaymentMethodPreviewMultibanco      `json:"multibanco"`
	NaverPay        *ConfirmationTokenPaymentMethodPreviewNaverPay        `json:"naver_pay"`
	OXXO            *ConfirmationTokenPaymentMethodPreviewOXXO            `json:"oxxo"`
	P24             *ConfirmationTokenPaymentMethodPreviewP24             `json:"p24"`
	PayByBank       *ConfirmationTokenPaymentMethodPreviewPayByBank       `json:"pay_by_bank"`
	Payco           *ConfirmationTokenPaymentMethodPreviewPayco           `json:"payco"`
	PayNow          *ConfirmationTokenPaymentMethodPreviewPayNow          `json:"paynow"`
	Paypal          *ConfirmationTokenPaymentMethodPreviewPaypal          `json:"paypal"`
	Pix             *ConfirmationTokenPaymentMethodPreviewPix             `json:"pix"`
	PromptPay       *ConfirmationTokenPaymentMethodPreviewPromptPay       `json:"promptpay"`
	RevolutPay      *ConfirmationTokenPaymentMethodPreviewRevolutPay      `json:"revolut_pay"`
	SamsungPay      *ConfirmationTokenPaymentMethodPreviewSamsungPay      `json:"samsung_pay"`
	SEPADebit       *ConfirmationTokenPaymentMethodPreviewSEPADebit       `json:"sepa_debit"`
	Sofort          *ConfirmationTokenPaymentMethodPreviewSofort          `json:"sofort"`
	Swish           *ConfirmationTokenPaymentMethodPreviewSwish           `json:"swish"`
	TWINT           *ConfirmationTokenPaymentMethodPreviewTWINT           `json:"twint"`
	// 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          ConfirmationTokenPaymentMethodPreviewType           `json:"type"`
	USBankAccount *ConfirmationTokenPaymentMethodPreviewUSBankAccount `json:"us_bank_account"`
	WeChatPay     *ConfirmationTokenPaymentMethodPreviewWeChatPay     `json:"wechat_pay"`
	Zip           *ConfirmationTokenPaymentMethodPreviewZip           `json:"zip"`
}

Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken.

type ConfirmationTokenPaymentMethodPreviewACSSDebit

type ConfirmationTokenPaymentMethodPreviewACSSDebit 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 ConfirmationTokenPaymentMethodPreviewAUBECSDebit

type ConfirmationTokenPaymentMethodPreviewAUBECSDebit 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 ConfirmationTokenPaymentMethodPreviewAffirm

type ConfirmationTokenPaymentMethodPreviewAffirm struct{}

type ConfirmationTokenPaymentMethodPreviewAfterpayClearpay

type ConfirmationTokenPaymentMethodPreviewAfterpayClearpay struct{}

type ConfirmationTokenPaymentMethodPreviewAlipay

type ConfirmationTokenPaymentMethodPreviewAlipay struct{}

type ConfirmationTokenPaymentMethodPreviewAllowRedisplay

type ConfirmationTokenPaymentMethodPreviewAllowRedisplay string

This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.

const (
	ConfirmationTokenPaymentMethodPreviewAllowRedisplayAlways      ConfirmationTokenPaymentMethodPreviewAllowRedisplay = "always"
	ConfirmationTokenPaymentMethodPreviewAllowRedisplayLimited     ConfirmationTokenPaymentMethodPreviewAllowRedisplay = "limited"
	ConfirmationTokenPaymentMethodPreviewAllowRedisplayUnspecified ConfirmationTokenPaymentMethodPreviewAllowRedisplay = "unspecified"
)

List of values that ConfirmationTokenPaymentMethodPreviewAllowRedisplay can take

type ConfirmationTokenPaymentMethodPreviewAlma

type ConfirmationTokenPaymentMethodPreviewAlma struct{}

type ConfirmationTokenPaymentMethodPreviewAmazonPay

type ConfirmationTokenPaymentMethodPreviewAmazonPay struct{}

type ConfirmationTokenPaymentMethodPreviewBACSDebit

type ConfirmationTokenPaymentMethodPreviewBACSDebit 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 ConfirmationTokenPaymentMethodPreviewBLIK

type ConfirmationTokenPaymentMethodPreviewBLIK struct{}

type ConfirmationTokenPaymentMethodPreviewBancontact

type ConfirmationTokenPaymentMethodPreviewBancontact struct{}

type ConfirmationTokenPaymentMethodPreviewBillingDetails

type ConfirmationTokenPaymentMethodPreviewBillingDetails 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 ConfirmationTokenPaymentMethodPreviewBoleto

type ConfirmationTokenPaymentMethodPreviewBoleto struct {
	// Uniquely identifies the customer tax id (CNPJ or CPF)
	TaxID string `json:"tax_id"`
}

type ConfirmationTokenPaymentMethodPreviewCard

type ConfirmationTokenPaymentMethodPreviewCard struct {
	// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Brand string `json:"brand"`
	// Checks on Card address and CVC if provided.
	Checks *ConfirmationTokenPaymentMethodPreviewCardChecks `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"`
	// 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"`
	// The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future.
	DisplayBrand string `json:"display_brand"`
	// 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.
	//
	// *As of May 1, 2021, card fingerprint in India for Connect changed 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"`
	// Details of the original PaymentMethod that created this object.
	GeneratedFrom *ConfirmationTokenPaymentMethodPreviewCardGeneratedFrom `json:"generated_from"`
	// 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"`
	// 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 *ConfirmationTokenPaymentMethodPreviewCardNetworks `json:"networks"`
	// Status of a card based on the card issuer.
	RegulatedStatus ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus `json:"regulated_status"`
	// Contains details on how this Card may be used for 3D Secure authentication.
	ThreeDSecureUsage *ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage `json:"three_d_secure_usage"`
	// If this Card is part of a card wallet, this contains the details of the card wallet.
	Wallet *ConfirmationTokenPaymentMethodPreviewCardWallet `json:"wallet"`
}

type ConfirmationTokenPaymentMethodPreviewCardChecks

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

Checks on Card address and CVC if provided.

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFrom

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFrom struct {
	// The charge that created this object.
	Charge string `json:"charge"`
	// Transaction-specific details of the payment method used in the payment.
	PaymentMethodDetails *ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetails `json:"payment_method_details"`
	// The ID of the SetupAttempt that generated this PaymentMethod, if any.
	SetupAttempt *SetupAttempt `json:"setup_attempt"`
}

Details of the original PaymentMethod that created this object.

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetails

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetails struct {
	CardPresent *ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresent `json:"card_present"`
	// The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`.
	Type string `json:"type"`
}

Transaction-specific details of the payment method used in the payment.

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresent

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresent struct {
	// The authorized amount
	AmountAuthorized int64 `json:"amount_authorized"`
	// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Brand string `json:"brand"`
	// The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
	BrandProduct string `json:"brand_product"`
	// 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"`
	// 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"`
	// 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.
	//
	// *As of May 1, 2021, card fingerprint in India for Connect changed 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"`
	// Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
	IIN string `json:"iin"`
	// 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 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"`
	// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Network string `json:"network"`
	// This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
	NetworkTransactionID string `json:"network_transaction_id"`
	// Details about payments collected offline.
	Offline *ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOffline `json:"offline"`
	// Defines whether the authorized amount can be over-captured or not
	OvercaptureSupported bool `json:"overcapture_supported"`
	// 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 ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethod `json:"read_method"`
	// A collection of fields required to be displayed on receipts. Only required for EMV transactions.
	Receipt *ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceipt `json:"receipt"`
	Wallet  *ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWallet  `json:"wallet"`
}

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOffline

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOffline struct {
	// Time at which the payment was collected while offline
	StoredAt int64 `json:"stored_at"`
	// The method used to process this payment method offline. Only deferred is allowed.
	Type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOfflineType `json:"type"`
}

Details about payments collected offline.

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOfflineType

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOfflineType string

The method used to process this payment method offline. Only deferred is allowed.

const (
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOfflineTypeDeferred ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOfflineType = "deferred"
)

List of values that ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentOfflineType can take

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethod

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethod string

How card details were read in this transaction.

const (
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethodContactEmv               ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethod = "contact_emv"
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethodContactlessEmv           ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethod = "contactless_emv"
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethodContactlessMagstripeMode ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethod = "contactless_magstripe_mode"
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethodMagneticStripeFallback   ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethod = "magnetic_stripe_fallback"
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethodMagneticStripeTrack2     ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethod = "magnetic_stripe_track2"
)

List of values that ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReadMethod can take

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceipt

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceipt struct {
	// The type of account being debited or credited
	AccountType ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountType `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"`
	// Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
	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 ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountType

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountType string

The type of account being debited or credited

const (
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountTypeChecking ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountType = "checking"
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountTypeCredit   ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountType = "credit"
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountTypePrepaid  ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountType = "prepaid"
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountTypeUnknown  ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountType = "unknown"
)

List of values that ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentReceiptAccountType can take

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWallet

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWallet struct {
	// The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
	Type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletType `json:"type"`
}

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletType

type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletType string

The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.

const (
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletTypeApplePay   ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletType = "apple_pay"
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletTypeGooglePay  ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletType = "google_pay"
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletTypeSamsungPay ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletType = "samsung_pay"
	ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletTypeUnknown    ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletType = "unknown"
)

List of values that ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresentWalletType can take

type ConfirmationTokenPaymentMethodPreviewCardNetworks

type ConfirmationTokenPaymentMethodPreviewCardNetworks struct {
	// All networks available for selection via [payment_method_options.card.network](https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
	Available []string `json:"available"`
	// The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
	Preferred string `json:"preferred"`
}

Contains information about card networks that can be used to process the payment.

type ConfirmationTokenPaymentMethodPreviewCardPresent

type ConfirmationTokenPaymentMethodPreviewCardPresent struct {
	// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Brand string `json:"brand"`
	// The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
	BrandProduct string `json:"brand_product"`
	// 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"`
	// 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"`
	// 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.
	//
	// *As of May 1, 2021, card fingerprint in India for Connect changed 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"`
	// 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"`
	// 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 *ConfirmationTokenPaymentMethodPreviewCardPresentNetworks `json:"networks"`
	// Details about payment methods collected offline.
	Offline *ConfirmationTokenPaymentMethodPreviewCardPresentOffline `json:"offline"`
	// 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 ConfirmationTokenPaymentMethodPreviewCardPresentReadMethod `json:"read_method"`
	Wallet     *ConfirmationTokenPaymentMethodPreviewCardPresentWallet    `json:"wallet"`
}

type ConfirmationTokenPaymentMethodPreviewCardPresentNetworks

type ConfirmationTokenPaymentMethodPreviewCardPresentNetworks struct {
	// All networks available for selection via [payment_method_options.card.network](https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
	Available []string `json:"available"`
	// The preferred network for the card.
	Preferred string `json:"preferred"`
}

Contains information about card networks that can be used to process the payment.

type ConfirmationTokenPaymentMethodPreviewCardPresentOffline

type ConfirmationTokenPaymentMethodPreviewCardPresentOffline struct {
	// Time at which the payment was collected while offline
	StoredAt int64 `json:"stored_at"`
	// The method used to process this payment method offline. Only deferred is allowed.
	Type ConfirmationTokenPaymentMethodPreviewCardPresentOfflineType `json:"type"`
}

Details about payment methods collected offline.

type ConfirmationTokenPaymentMethodPreviewCardPresentOfflineType

type ConfirmationTokenPaymentMethodPreviewCardPresentOfflineType string

The method used to process this payment method offline. Only deferred is allowed.

const (
	ConfirmationTokenPaymentMethodPreviewCardPresentOfflineTypeDeferred ConfirmationTokenPaymentMethodPreviewCardPresentOfflineType = "deferred"
)

List of values that ConfirmationTokenPaymentMethodPreviewCardPresentOfflineType can take

type ConfirmationTokenPaymentMethodPreviewCardPresentReadMethod

type ConfirmationTokenPaymentMethodPreviewCardPresentReadMethod string

How card details were read in this transaction.

const (
	ConfirmationTokenPaymentMethodPreviewCardPresentReadMethodContactEmv               ConfirmationTokenPaymentMethodPreviewCardPresentReadMethod = "contact_emv"
	ConfirmationTokenPaymentMethodPreviewCardPresentReadMethodContactlessEmv           ConfirmationTokenPaymentMethodPreviewCardPresentReadMethod = "contactless_emv"
	ConfirmationTokenPaymentMethodPreviewCardPresentReadMethodContactlessMagstripeMode ConfirmationTokenPaymentMethodPreviewCardPresentReadMethod = "contactless_magstripe_mode"
	ConfirmationTokenPaymentMethodPreviewCardPresentReadMethodMagneticStripeFallback   ConfirmationTokenPaymentMethodPreviewCardPresentReadMethod = "magnetic_stripe_fallback"
	ConfirmationTokenPaymentMethodPreviewCardPresentReadMethodMagneticStripeTrack2     ConfirmationTokenPaymentMethodPreviewCardPresentReadMethod = "magnetic_stripe_track2"
)

List of values that ConfirmationTokenPaymentMethodPreviewCardPresentReadMethod can take

type ConfirmationTokenPaymentMethodPreviewCardPresentWallet

type ConfirmationTokenPaymentMethodPreviewCardPresentWallet struct {
	// The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
	Type ConfirmationTokenPaymentMethodPreviewCardPresentWalletType `json:"type"`
}

type ConfirmationTokenPaymentMethodPreviewCardPresentWalletType

type ConfirmationTokenPaymentMethodPreviewCardPresentWalletType string

The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.

const (
	ConfirmationTokenPaymentMethodPreviewCardPresentWalletTypeApplePay   ConfirmationTokenPaymentMethodPreviewCardPresentWalletType = "apple_pay"
	ConfirmationTokenPaymentMethodPreviewCardPresentWalletTypeGooglePay  ConfirmationTokenPaymentMethodPreviewCardPresentWalletType = "google_pay"
	ConfirmationTokenPaymentMethodPreviewCardPresentWalletTypeSamsungPay ConfirmationTokenPaymentMethodPreviewCardPresentWalletType = "samsung_pay"
	ConfirmationTokenPaymentMethodPreviewCardPresentWalletTypeUnknown    ConfirmationTokenPaymentMethodPreviewCardPresentWalletType = "unknown"
)

List of values that ConfirmationTokenPaymentMethodPreviewCardPresentWalletType can take

type ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus added in v81.2.0

type ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus string

Status of a card based on the card issuer.

const (
	ConfirmationTokenPaymentMethodPreviewCardRegulatedStatusRegulated   ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus = "regulated"
	ConfirmationTokenPaymentMethodPreviewCardRegulatedStatusUnregulated ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus = "unregulated"
)

List of values that ConfirmationTokenPaymentMethodPreviewCardRegulatedStatus can take

type ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage

type ConfirmationTokenPaymentMethodPreviewCardThreeDSecureUsage struct {
	// Whether 3D Secure is supported on this card.
	Supported bool `json:"supported"`
}

Contains details on how this Card may be used for 3D Secure authentication.

type ConfirmationTokenPaymentMethodPreviewCardWallet

type ConfirmationTokenPaymentMethodPreviewCardWallet struct {
	AmexExpressCheckout *ConfirmationTokenPaymentMethodPreviewCardWalletAmexExpressCheckout `json:"amex_express_checkout"`
	ApplePay            *ConfirmationTokenPaymentMethodPreviewCardWalletApplePay            `json:"apple_pay"`
	// (For tokenized numbers only.) The last four digits of the device account number.
	DynamicLast4 string                                                     `json:"dynamic_last4"`
	GooglePay    *ConfirmationTokenPaymentMethodPreviewCardWalletGooglePay  `json:"google_pay"`
	Link         *ConfirmationTokenPaymentMethodPreviewCardWalletLink       `json:"link"`
	Masterpass   *ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass `json:"masterpass"`
	SamsungPay   *ConfirmationTokenPaymentMethodPreviewCardWalletSamsungPay `json:"samsung_pay"`
	// The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. 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         ConfirmationTokenPaymentMethodPreviewCardWalletType          `json:"type"`
	VisaCheckout *ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout `json:"visa_checkout"`
}

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

type ConfirmationTokenPaymentMethodPreviewCardWalletAmexExpressCheckout

type ConfirmationTokenPaymentMethodPreviewCardWalletAmexExpressCheckout struct{}

type ConfirmationTokenPaymentMethodPreviewCardWalletApplePay

type ConfirmationTokenPaymentMethodPreviewCardWalletApplePay struct{}

type ConfirmationTokenPaymentMethodPreviewCardWalletGooglePay

type ConfirmationTokenPaymentMethodPreviewCardWalletGooglePay struct{}
type ConfirmationTokenPaymentMethodPreviewCardWalletLink struct{}

type ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass

type ConfirmationTokenPaymentMethodPreviewCardWalletMasterpass 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 ConfirmationTokenPaymentMethodPreviewCardWalletSamsungPay

type ConfirmationTokenPaymentMethodPreviewCardWalletSamsungPay struct{}

type ConfirmationTokenPaymentMethodPreviewCardWalletType

type ConfirmationTokenPaymentMethodPreviewCardWalletType string

The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. 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 (
	ConfirmationTokenPaymentMethodPreviewCardWalletTypeAmexExpressCheckout ConfirmationTokenPaymentMethodPreviewCardWalletType = "amex_express_checkout"
	ConfirmationTokenPaymentMethodPreviewCardWalletTypeApplePay            ConfirmationTokenPaymentMethodPreviewCardWalletType = "apple_pay"
	ConfirmationTokenPaymentMethodPreviewCardWalletTypeGooglePay           ConfirmationTokenPaymentMethodPreviewCardWalletType = "google_pay"
	ConfirmationTokenPaymentMethodPreviewCardWalletTypeLink                ConfirmationTokenPaymentMethodPreviewCardWalletType = "link"
	ConfirmationTokenPaymentMethodPreviewCardWalletTypeMasterpass          ConfirmationTokenPaymentMethodPreviewCardWalletType = "masterpass"
	ConfirmationTokenPaymentMethodPreviewCardWalletTypeSamsungPay          ConfirmationTokenPaymentMethodPreviewCardWalletType = "samsung_pay"
	ConfirmationTokenPaymentMethodPreviewCardWalletTypeVisaCheckout        ConfirmationTokenPaymentMethodPreviewCardWalletType = "visa_checkout"
)

List of values that ConfirmationTokenPaymentMethodPreviewCardWalletType can take

type ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout

type ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout 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 ConfirmationTokenPaymentMethodPreviewCashApp

type ConfirmationTokenPaymentMethodPreviewCashApp struct {
	// A unique and immutable identifier assigned by Cash App to every buyer.
	BuyerID string `json:"buyer_id"`
	// A public identifier for buyers using Cash App.
	Cashtag string `json:"cashtag"`
}

type ConfirmationTokenPaymentMethodPreviewCustomerBalance

type ConfirmationTokenPaymentMethodPreviewCustomerBalance struct{}

type ConfirmationTokenPaymentMethodPreviewEPS

type ConfirmationTokenPaymentMethodPreviewEPS 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 ConfirmationTokenPaymentMethodPreviewEPSBank `json:"bank"`
}

type ConfirmationTokenPaymentMethodPreviewEPSBank

type ConfirmationTokenPaymentMethodPreviewEPSBank string

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`.

const (
	ConfirmationTokenPaymentMethodPreviewEPSBankArzteUndApothekerBank                ConfirmationTokenPaymentMethodPreviewEPSBank = "arzte_und_apotheker_bank"
	ConfirmationTokenPaymentMethodPreviewEPSBankAustrianAnadiBankAg                  ConfirmationTokenPaymentMethodPreviewEPSBank = "austrian_anadi_bank_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankBankAustria                          ConfirmationTokenPaymentMethodPreviewEPSBank = "bank_austria"
	ConfirmationTokenPaymentMethodPreviewEPSBankBankhausCarlSpangler                 ConfirmationTokenPaymentMethodPreviewEPSBank = "bankhaus_carl_spangler"
	ConfirmationTokenPaymentMethodPreviewEPSBankBankhausSchelhammerUndSchatteraAg    ConfirmationTokenPaymentMethodPreviewEPSBank = "bankhaus_schelhammer_und_schattera_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankBawagPskAg                           ConfirmationTokenPaymentMethodPreviewEPSBank = "bawag_psk_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankBksBankAg                            ConfirmationTokenPaymentMethodPreviewEPSBank = "bks_bank_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankBrullKallmusBankAg                   ConfirmationTokenPaymentMethodPreviewEPSBank = "brull_kallmus_bank_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankBtvVierLanderBank                    ConfirmationTokenPaymentMethodPreviewEPSBank = "btv_vier_lander_bank"
	ConfirmationTokenPaymentMethodPreviewEPSBankCapitalBankGraweGruppeAg             ConfirmationTokenPaymentMethodPreviewEPSBank = "capital_bank_grawe_gruppe_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankDeutscheBankAg                       ConfirmationTokenPaymentMethodPreviewEPSBank = "deutsche_bank_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankDolomitenbank                        ConfirmationTokenPaymentMethodPreviewEPSBank = "dolomitenbank"
	ConfirmationTokenPaymentMethodPreviewEPSBankEasybankAg                           ConfirmationTokenPaymentMethodPreviewEPSBank = "easybank_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankErsteBankUndSparkassen               ConfirmationTokenPaymentMethodPreviewEPSBank = "erste_bank_und_sparkassen"
	ConfirmationTokenPaymentMethodPreviewEPSBankHypoAlpeadriabankInternationalAg     ConfirmationTokenPaymentMethodPreviewEPSBank = "hypo_alpeadriabank_international_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankHypoBankBurgenlandAktiengesellschaft ConfirmationTokenPaymentMethodPreviewEPSBank = "hypo_bank_burgenland_aktiengesellschaft"
	ConfirmationTokenPaymentMethodPreviewEPSBankHypoNoeLbFurNiederosterreichUWien    ConfirmationTokenPaymentMethodPreviewEPSBank = "hypo_noe_lb_fur_niederosterreich_u_wien"
	ConfirmationTokenPaymentMethodPreviewEPSBankHypoOberosterreichSalzburgSteiermark ConfirmationTokenPaymentMethodPreviewEPSBank = "hypo_oberosterreich_salzburg_steiermark"
	ConfirmationTokenPaymentMethodPreviewEPSBankHypoTirolBankAg                      ConfirmationTokenPaymentMethodPreviewEPSBank = "hypo_tirol_bank_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankHypoVorarlbergBankAg                 ConfirmationTokenPaymentMethodPreviewEPSBank = "hypo_vorarlberg_bank_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankMarchfelderBank                      ConfirmationTokenPaymentMethodPreviewEPSBank = "marchfelder_bank"
	ConfirmationTokenPaymentMethodPreviewEPSBankOberbankAg                           ConfirmationTokenPaymentMethodPreviewEPSBank = "oberbank_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankRaiffeisenBankengruppeOsterreich     ConfirmationTokenPaymentMethodPreviewEPSBank = "raiffeisen_bankengruppe_osterreich"
	ConfirmationTokenPaymentMethodPreviewEPSBankSchoellerbankAg                      ConfirmationTokenPaymentMethodPreviewEPSBank = "schoellerbank_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankSpardaBankWien                       ConfirmationTokenPaymentMethodPreviewEPSBank = "sparda_bank_wien"
	ConfirmationTokenPaymentMethodPreviewEPSBankVolksbankGruppe                      ConfirmationTokenPaymentMethodPreviewEPSBank = "volksbank_gruppe"
	ConfirmationTokenPaymentMethodPreviewEPSBankVolkskreditbankAg                    ConfirmationTokenPaymentMethodPreviewEPSBank = "volkskreditbank_ag"
	ConfirmationTokenPaymentMethodPreviewEPSBankVrBankBraunau                        ConfirmationTokenPaymentMethodPreviewEPSBank = "vr_bank_braunau"
)

List of values that ConfirmationTokenPaymentMethodPreviewEPSBank can take

type ConfirmationTokenPaymentMethodPreviewFPX

type ConfirmationTokenPaymentMethodPreviewFPX struct {
	// Account holder type, if provided. Can be one of `individual` or `company`.
	AccountHolderType ConfirmationTokenPaymentMethodPreviewFPXAccountHolderType `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`, `pb_enterprise`, or `bank_of_china`.
	Bank ConfirmationTokenPaymentMethodPreviewFPXBank `json:"bank"`
}

type ConfirmationTokenPaymentMethodPreviewFPXAccountHolderType

type ConfirmationTokenPaymentMethodPreviewFPXAccountHolderType string

Account holder type, if provided. Can be one of `individual` or `company`.

const (
	ConfirmationTokenPaymentMethodPreviewFPXAccountHolderTypeCompany    ConfirmationTokenPaymentMethodPreviewFPXAccountHolderType = "company"
	ConfirmationTokenPaymentMethodPreviewFPXAccountHolderTypeIndividual ConfirmationTokenPaymentMethodPreviewFPXAccountHolderType = "individual"
)

List of values that ConfirmationTokenPaymentMethodPreviewFPXAccountHolderType can take

type ConfirmationTokenPaymentMethodPreviewFPXBank

type ConfirmationTokenPaymentMethodPreviewFPXBank string

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`, `pb_enterprise`, or `bank_of_china`.

const (
	ConfirmationTokenPaymentMethodPreviewFPXBankAffinBank         ConfirmationTokenPaymentMethodPreviewFPXBank = "affin_bank"
	ConfirmationTokenPaymentMethodPreviewFPXBankAgrobank          ConfirmationTokenPaymentMethodPreviewFPXBank = "agrobank"
	ConfirmationTokenPaymentMethodPreviewFPXBankAllianceBank      ConfirmationTokenPaymentMethodPreviewFPXBank = "alliance_bank"
	ConfirmationTokenPaymentMethodPreviewFPXBankAmbank            ConfirmationTokenPaymentMethodPreviewFPXBank = "ambank"
	ConfirmationTokenPaymentMethodPreviewFPXBankBankIslam         ConfirmationTokenPaymentMethodPreviewFPXBank = "bank_islam"
	ConfirmationTokenPaymentMethodPreviewFPXBankBankMuamalat      ConfirmationTokenPaymentMethodPreviewFPXBank = "bank_muamalat"
	ConfirmationTokenPaymentMethodPreviewFPXBankBankOfChina       ConfirmationTokenPaymentMethodPreviewFPXBank = "bank_of_china"
	ConfirmationTokenPaymentMethodPreviewFPXBankBankRakyat        ConfirmationTokenPaymentMethodPreviewFPXBank = "bank_rakyat"
	ConfirmationTokenPaymentMethodPreviewFPXBankBsn               ConfirmationTokenPaymentMethodPreviewFPXBank = "bsn"
	ConfirmationTokenPaymentMethodPreviewFPXBankCimb              ConfirmationTokenPaymentMethodPreviewFPXBank = "cimb"
	ConfirmationTokenPaymentMethodPreviewFPXBankDeutscheBank      ConfirmationTokenPaymentMethodPreviewFPXBank = "deutsche_bank"
	ConfirmationTokenPaymentMethodPreviewFPXBankHongLeongBank     ConfirmationTokenPaymentMethodPreviewFPXBank = "hong_leong_bank"
	ConfirmationTokenPaymentMethodPreviewFPXBankHsbc              ConfirmationTokenPaymentMethodPreviewFPXBank = "hsbc"
	ConfirmationTokenPaymentMethodPreviewFPXBankKfh               ConfirmationTokenPaymentMethodPreviewFPXBank = "kfh"
	ConfirmationTokenPaymentMethodPreviewFPXBankMaybank2e         ConfirmationTokenPaymentMethodPreviewFPXBank = "maybank2e"
	ConfirmationTokenPaymentMethodPreviewFPXBankMaybank2u         ConfirmationTokenPaymentMethodPreviewFPXBank = "maybank2u"
	ConfirmationTokenPaymentMethodPreviewFPXBankOcbc              ConfirmationTokenPaymentMethodPreviewFPXBank = "ocbc"
	ConfirmationTokenPaymentMethodPreviewFPXBankPbEnterprise      ConfirmationTokenPaymentMethodPreviewFPXBank = "pb_enterprise"
	ConfirmationTokenPaymentMethodPreviewFPXBankPublicBank        ConfirmationTokenPaymentMethodPreviewFPXBank = "public_bank"
	ConfirmationTokenPaymentMethodPreviewFPXBankRhb               ConfirmationTokenPaymentMethodPreviewFPXBank = "rhb"
	ConfirmationTokenPaymentMethodPreviewFPXBankStandardChartered ConfirmationTokenPaymentMethodPreviewFPXBank = "standard_chartered"
	ConfirmationTokenPaymentMethodPreviewFPXBankUob               ConfirmationTokenPaymentMethodPreviewFPXBank = "uob"
)

List of values that ConfirmationTokenPaymentMethodPreviewFPXBank can take

type ConfirmationTokenPaymentMethodPreviewGiropay

type ConfirmationTokenPaymentMethodPreviewGiropay struct{}

type ConfirmationTokenPaymentMethodPreviewGrabpay

type ConfirmationTokenPaymentMethodPreviewGrabpay struct{}

type ConfirmationTokenPaymentMethodPreviewIDEAL

type ConfirmationTokenPaymentMethodPreviewIDEAL struct {
	// The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
	Bank ConfirmationTokenPaymentMethodPreviewIDEALBank `json:"bank"`
	// The Bank Identifier Code of the customer's bank, if the bank was provided.
	BIC ConfirmationTokenPaymentMethodPreviewIDEALBIC `json:"bic"`
}

type ConfirmationTokenPaymentMethodPreviewIDEALBIC

type ConfirmationTokenPaymentMethodPreviewIDEALBIC string

The Bank Identifier Code of the customer's bank, if the bank was provided.

const (
	ConfirmationTokenPaymentMethodPreviewIDEALBICABNANL2A ConfirmationTokenPaymentMethodPreviewIDEALBIC = "ABNANL2A"
	ConfirmationTokenPaymentMethodPreviewIDEALBICASNBNL21 ConfirmationTokenPaymentMethodPreviewIDEALBIC = "ASNBNL21"
	ConfirmationTokenPaymentMethodPreviewIDEALBICBITSNL2A ConfirmationTokenPaymentMethodPreviewIDEALBIC = "BITSNL2A"
	ConfirmationTokenPaymentMethodPreviewIDEALBICBUNQNL2A ConfirmationTokenPaymentMethodPreviewIDEALBIC = "BUNQNL2A"
	ConfirmationTokenPaymentMethodPreviewIDEALBICFVLBNL22 ConfirmationTokenPaymentMethodPreviewIDEALBIC = "FVLBNL22"
	ConfirmationTokenPaymentMethodPreviewIDEALBICHANDNL2A ConfirmationTokenPaymentMethodPreviewIDEALBIC = "HANDNL2A"
	ConfirmationTokenPaymentMethodPreviewIDEALBICINGBNL2A ConfirmationTokenPaymentMethodPreviewIDEALBIC = "INGBNL2A"
	ConfirmationTokenPaymentMethodPreviewIDEALBICKNABNL2H ConfirmationTokenPaymentMethodPreviewIDEALBIC = "KNABNL2H"
	ConfirmationTokenPaymentMethodPreviewIDEALBICMOYONL21 ConfirmationTokenPaymentMethodPreviewIDEALBIC = "MOYONL21"
	ConfirmationTokenPaymentMethodPreviewIDEALBICNNBANL2G ConfirmationTokenPaymentMethodPreviewIDEALBIC = "NNBANL2G"
	ConfirmationTokenPaymentMethodPreviewIDEALBICNTSBDEB1 ConfirmationTokenPaymentMethodPreviewIDEALBIC = "NTSBDEB1"
	ConfirmationTokenPaymentMethodPreviewIDEALBICRABONL2U ConfirmationTokenPaymentMethodPreviewIDEALBIC = "RABONL2U"
	ConfirmationTokenPaymentMethodPreviewIDEALBICRBRBNL21 ConfirmationTokenPaymentMethodPreviewIDEALBIC = "RBRBNL21"
	ConfirmationTokenPaymentMethodPreviewIDEALBICREVOIE23 ConfirmationTokenPaymentMethodPreviewIDEALBIC = "REVOIE23"
	ConfirmationTokenPaymentMethodPreviewIDEALBICREVOLT21 ConfirmationTokenPaymentMethodPreviewIDEALBIC = "REVOLT21"
	ConfirmationTokenPaymentMethodPreviewIDEALBICSNSBNL2A ConfirmationTokenPaymentMethodPreviewIDEALBIC = "SNSBNL2A"
	ConfirmationTokenPaymentMethodPreviewIDEALBICTRIONL2U ConfirmationTokenPaymentMethodPreviewIDEALBIC = "TRIONL2U"
)

List of values that ConfirmationTokenPaymentMethodPreviewIDEALBIC can take

type ConfirmationTokenPaymentMethodPreviewIDEALBank

type ConfirmationTokenPaymentMethodPreviewIDEALBank string

The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.

const (
	ConfirmationTokenPaymentMethodPreviewIDEALBankAbnAmro       ConfirmationTokenPaymentMethodPreviewIDEALBank = "abn_amro"
	ConfirmationTokenPaymentMethodPreviewIDEALBankAsnBank       ConfirmationTokenPaymentMethodPreviewIDEALBank = "asn_bank"
	ConfirmationTokenPaymentMethodPreviewIDEALBankBunq          ConfirmationTokenPaymentMethodPreviewIDEALBank = "bunq"
	ConfirmationTokenPaymentMethodPreviewIDEALBankHandelsbanken ConfirmationTokenPaymentMethodPreviewIDEALBank = "handelsbanken"
	ConfirmationTokenPaymentMethodPreviewIDEALBankIng           ConfirmationTokenPaymentMethodPreviewIDEALBank = "ing"
	ConfirmationTokenPaymentMethodPreviewIDEALBankKnab          ConfirmationTokenPaymentMethodPreviewIDEALBank = "knab"
	ConfirmationTokenPaymentMethodPreviewIDEALBankMoneyou       ConfirmationTokenPaymentMethodPreviewIDEALBank = "moneyou"
	ConfirmationTokenPaymentMethodPreviewIDEALBankN26           ConfirmationTokenPaymentMethodPreviewIDEALBank = "n26"
	ConfirmationTokenPaymentMethodPreviewIDEALBankNn            ConfirmationTokenPaymentMethodPreviewIDEALBank = "nn"
	ConfirmationTokenPaymentMethodPreviewIDEALBankRabobank      ConfirmationTokenPaymentMethodPreviewIDEALBank = "rabobank"
	ConfirmationTokenPaymentMethodPreviewIDEALBankRegiobank     ConfirmationTokenPaymentMethodPreviewIDEALBank = "regiobank"
	ConfirmationTokenPaymentMethodPreviewIDEALBankRevolut       ConfirmationTokenPaymentMethodPreviewIDEALBank = "revolut"
	ConfirmationTokenPaymentMethodPreviewIDEALBankSnsBank       ConfirmationTokenPaymentMethodPreviewIDEALBank = "sns_bank"
	ConfirmationTokenPaymentMethodPreviewIDEALBankTriodosBank   ConfirmationTokenPaymentMethodPreviewIDEALBank = "triodos_bank"
	ConfirmationTokenPaymentMethodPreviewIDEALBankVanLanschot   ConfirmationTokenPaymentMethodPreviewIDEALBank = "van_lanschot"
	ConfirmationTokenPaymentMethodPreviewIDEALBankYoursafe      ConfirmationTokenPaymentMethodPreviewIDEALBank = "yoursafe"
)

List of values that ConfirmationTokenPaymentMethodPreviewIDEALBank can take

type ConfirmationTokenPaymentMethodPreviewInteracPresent

type ConfirmationTokenPaymentMethodPreviewInteracPresent 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"`
	// 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"`
	// 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.
	//
	// *As of May 1, 2021, card fingerprint in India for Connect changed 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"`
	// 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"`
	// 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 *ConfirmationTokenPaymentMethodPreviewInteracPresentNetworks `json:"networks"`
	// 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 ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethod `json:"read_method"`
}

type ConfirmationTokenPaymentMethodPreviewInteracPresentNetworks

type ConfirmationTokenPaymentMethodPreviewInteracPresentNetworks struct {
	// All networks available for selection via [payment_method_options.card.network](https://stripe.com/api/payment_intents/confirm#confirm_payment_intent-payment_method_options-card-network).
	Available []string `json:"available"`
	// The preferred network for the card.
	Preferred string `json:"preferred"`
}

Contains information about card networks that can be used to process the payment.

type ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethod

type ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethod string

How card details were read in this transaction.

const (
	ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethodContactEmv               ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethod = "contact_emv"
	ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethodContactlessEmv           ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethod = "contactless_emv"
	ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethodContactlessMagstripeMode ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethod = "contactless_magstripe_mode"
	ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethodMagneticStripeFallback   ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethod = "magnetic_stripe_fallback"
	ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethodMagneticStripeTrack2     ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethod = "magnetic_stripe_track2"
)

List of values that ConfirmationTokenPaymentMethodPreviewInteracPresentReadMethod can take

type ConfirmationTokenPaymentMethodPreviewKakaoPay

type ConfirmationTokenPaymentMethodPreviewKakaoPay struct{}

type ConfirmationTokenPaymentMethodPreviewKlarna

type ConfirmationTokenPaymentMethodPreviewKlarna struct {
	// The customer's date of birth, if provided.
	DOB *ConfirmationTokenPaymentMethodPreviewKlarnaDOB `json:"dob"`
}

type ConfirmationTokenPaymentMethodPreviewKlarnaDOB

type ConfirmationTokenPaymentMethodPreviewKlarnaDOB 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 ConfirmationTokenPaymentMethodPreviewKonbini

type ConfirmationTokenPaymentMethodPreviewKonbini struct{}

type ConfirmationTokenPaymentMethodPreviewKrCard

type ConfirmationTokenPaymentMethodPreviewKrCard struct {
	// The local credit or debit card brand.
	Brand ConfirmationTokenPaymentMethodPreviewKrCardBrand `json:"brand"`
	// The last four digits of the card. This may not be present for American Express cards.
	Last4 string `json:"last4"`
}

type ConfirmationTokenPaymentMethodPreviewKrCardBrand

type ConfirmationTokenPaymentMethodPreviewKrCardBrand string

The local credit or debit card brand.

const (
	ConfirmationTokenPaymentMethodPreviewKrCardBrandBc          ConfirmationTokenPaymentMethodPreviewKrCardBrand = "bc"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandCiti        ConfirmationTokenPaymentMethodPreviewKrCardBrand = "citi"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandHana        ConfirmationTokenPaymentMethodPreviewKrCardBrand = "hana"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandHyundai     ConfirmationTokenPaymentMethodPreviewKrCardBrand = "hyundai"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandJeju        ConfirmationTokenPaymentMethodPreviewKrCardBrand = "jeju"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandJeonbuk     ConfirmationTokenPaymentMethodPreviewKrCardBrand = "jeonbuk"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandKakaobank   ConfirmationTokenPaymentMethodPreviewKrCardBrand = "kakaobank"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandKbank       ConfirmationTokenPaymentMethodPreviewKrCardBrand = "kbank"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandKdbbank     ConfirmationTokenPaymentMethodPreviewKrCardBrand = "kdbbank"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandKookmin     ConfirmationTokenPaymentMethodPreviewKrCardBrand = "kookmin"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandKwangju     ConfirmationTokenPaymentMethodPreviewKrCardBrand = "kwangju"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandLotte       ConfirmationTokenPaymentMethodPreviewKrCardBrand = "lotte"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandMg          ConfirmationTokenPaymentMethodPreviewKrCardBrand = "mg"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandNh          ConfirmationTokenPaymentMethodPreviewKrCardBrand = "nh"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandPost        ConfirmationTokenPaymentMethodPreviewKrCardBrand = "post"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandSamsung     ConfirmationTokenPaymentMethodPreviewKrCardBrand = "samsung"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandSavingsbank ConfirmationTokenPaymentMethodPreviewKrCardBrand = "savingsbank"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandShinhan     ConfirmationTokenPaymentMethodPreviewKrCardBrand = "shinhan"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandShinhyup    ConfirmationTokenPaymentMethodPreviewKrCardBrand = "shinhyup"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandSuhyup      ConfirmationTokenPaymentMethodPreviewKrCardBrand = "suhyup"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandTossbank    ConfirmationTokenPaymentMethodPreviewKrCardBrand = "tossbank"
	ConfirmationTokenPaymentMethodPreviewKrCardBrandWoori       ConfirmationTokenPaymentMethodPreviewKrCardBrand = "woori"
)

List of values that ConfirmationTokenPaymentMethodPreviewKrCardBrand can take

type ConfirmationTokenPaymentMethodPreviewLink struct {
	// Account owner's email address.
	Email string `json:"email"`
	// [Deprecated] This is a legacy parameter that no longer has any function.
	// Deprecated:
	PersistentToken string `json:"persistent_token"`
}

type ConfirmationTokenPaymentMethodPreviewMobilepay

type ConfirmationTokenPaymentMethodPreviewMobilepay struct{}

type ConfirmationTokenPaymentMethodPreviewMultibanco

type ConfirmationTokenPaymentMethodPreviewMultibanco struct{}

type ConfirmationTokenPaymentMethodPreviewNaverPay

type ConfirmationTokenPaymentMethodPreviewNaverPay struct {
	// Whether to fund this transaction with Naver Pay points or a card.
	Funding ConfirmationTokenPaymentMethodPreviewNaverPayFunding `json:"funding"`
}

type ConfirmationTokenPaymentMethodPreviewNaverPayFunding

type ConfirmationTokenPaymentMethodPreviewNaverPayFunding string

Whether to fund this transaction with Naver Pay points or a card.

const (
	ConfirmationTokenPaymentMethodPreviewNaverPayFundingCard   ConfirmationTokenPaymentMethodPreviewNaverPayFunding = "card"
	ConfirmationTokenPaymentMethodPreviewNaverPayFundingPoints ConfirmationTokenPaymentMethodPreviewNaverPayFunding = "points"
)

List of values that ConfirmationTokenPaymentMethodPreviewNaverPayFunding can take

type ConfirmationTokenPaymentMethodPreviewOXXO

type ConfirmationTokenPaymentMethodPreviewOXXO struct{}

type ConfirmationTokenPaymentMethodPreviewP24

type ConfirmationTokenPaymentMethodPreviewP24 struct {
	// The customer's bank, if provided.
	Bank ConfirmationTokenPaymentMethodPreviewP24Bank `json:"bank"`
}

type ConfirmationTokenPaymentMethodPreviewP24Bank

type ConfirmationTokenPaymentMethodPreviewP24Bank string

The customer's bank, if provided.

const (
	ConfirmationTokenPaymentMethodPreviewP24BankAliorBank            ConfirmationTokenPaymentMethodPreviewP24Bank = "alior_bank"
	ConfirmationTokenPaymentMethodPreviewP24BankBankMillennium       ConfirmationTokenPaymentMethodPreviewP24Bank = "bank_millennium"
	ConfirmationTokenPaymentMethodPreviewP24BankBankNowyBfgSa        ConfirmationTokenPaymentMethodPreviewP24Bank = "bank_nowy_bfg_sa"
	ConfirmationTokenPaymentMethodPreviewP24BankBankPekaoSa          ConfirmationTokenPaymentMethodPreviewP24Bank = "bank_pekao_sa"
	ConfirmationTokenPaymentMethodPreviewP24BankBankiSpbdzielcze     ConfirmationTokenPaymentMethodPreviewP24Bank = "banki_spbdzielcze"
	ConfirmationTokenPaymentMethodPreviewP24BankBLIK                 ConfirmationTokenPaymentMethodPreviewP24Bank = "blik"
	ConfirmationTokenPaymentMethodPreviewP24BankBnpParibas           ConfirmationTokenPaymentMethodPreviewP24Bank = "bnp_paribas"
	ConfirmationTokenPaymentMethodPreviewP24BankBoz                  ConfirmationTokenPaymentMethodPreviewP24Bank = "boz"
	ConfirmationTokenPaymentMethodPreviewP24BankCitiHandlowy         ConfirmationTokenPaymentMethodPreviewP24Bank = "citi_handlowy"
	ConfirmationTokenPaymentMethodPreviewP24BankCreditAgricole       ConfirmationTokenPaymentMethodPreviewP24Bank = "credit_agricole"
	ConfirmationTokenPaymentMethodPreviewP24BankEnvelobank           ConfirmationTokenPaymentMethodPreviewP24Bank = "envelobank"
	ConfirmationTokenPaymentMethodPreviewP24BankEtransferPocztowy24  ConfirmationTokenPaymentMethodPreviewP24Bank = "etransfer_pocztowy24"
	ConfirmationTokenPaymentMethodPreviewP24BankGetinBank            ConfirmationTokenPaymentMethodPreviewP24Bank = "getin_bank"
	ConfirmationTokenPaymentMethodPreviewP24BankIdeabank             ConfirmationTokenPaymentMethodPreviewP24Bank = "ideabank"
	ConfirmationTokenPaymentMethodPreviewP24BankIng                  ConfirmationTokenPaymentMethodPreviewP24Bank = "ing"
	ConfirmationTokenPaymentMethodPreviewP24BankInteligo             ConfirmationTokenPaymentMethodPreviewP24Bank = "inteligo"
	ConfirmationTokenPaymentMethodPreviewP24BankMbankMtransfer       ConfirmationTokenPaymentMethodPreviewP24Bank = "mbank_mtransfer"
	ConfirmationTokenPaymentMethodPreviewP24BankNestPrzelew          ConfirmationTokenPaymentMethodPreviewP24Bank = "nest_przelew"
	ConfirmationTokenPaymentMethodPreviewP24BankNoblePay             ConfirmationTokenPaymentMethodPreviewP24Bank = "noble_pay"
	ConfirmationTokenPaymentMethodPreviewP24BankPbacZIpko            ConfirmationTokenPaymentMethodPreviewP24Bank = "pbac_z_ipko"
	ConfirmationTokenPaymentMethodPreviewP24BankPlusBank             ConfirmationTokenPaymentMethodPreviewP24Bank = "plus_bank"
	ConfirmationTokenPaymentMethodPreviewP24BankSantanderPrzelew24   ConfirmationTokenPaymentMethodPreviewP24Bank = "santander_przelew24"
	ConfirmationTokenPaymentMethodPreviewP24BankTmobileUsbugiBankowe ConfirmationTokenPaymentMethodPreviewP24Bank = "tmobile_usbugi_bankowe"
	ConfirmationTokenPaymentMethodPreviewP24BankToyotaBank           ConfirmationTokenPaymentMethodPreviewP24Bank = "toyota_bank"
	ConfirmationTokenPaymentMethodPreviewP24BankVelobank             ConfirmationTokenPaymentMethodPreviewP24Bank = "velobank"
	ConfirmationTokenPaymentMethodPreviewP24BankVolkswagenBank       ConfirmationTokenPaymentMethodPreviewP24Bank = "volkswagen_bank"
)

List of values that ConfirmationTokenPaymentMethodPreviewP24Bank can take

type ConfirmationTokenPaymentMethodPreviewPayByBank added in v81.3.0

type ConfirmationTokenPaymentMethodPreviewPayByBank struct{}

type ConfirmationTokenPaymentMethodPreviewPayNow

type ConfirmationTokenPaymentMethodPreviewPayNow struct{}

type ConfirmationTokenPaymentMethodPreviewPayco

type ConfirmationTokenPaymentMethodPreviewPayco struct{}

type ConfirmationTokenPaymentMethodPreviewPaypal

type ConfirmationTokenPaymentMethodPreviewPaypal struct {
	// Two-letter ISO code representing the buyer's country. Values are provided by PayPal directly (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	Country string `json:"country"`
	// Owner's email. Values are provided by PayPal directly
	// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
	PayerEmail string `json:"payer_email"`
	// PayPal account PayerID. This identifier uniquely identifies the PayPal customer.
	PayerID string `json:"payer_id"`
}

type ConfirmationTokenPaymentMethodPreviewPix

type ConfirmationTokenPaymentMethodPreviewPix struct{}

type ConfirmationTokenPaymentMethodPreviewPromptPay

type ConfirmationTokenPaymentMethodPreviewPromptPay struct{}

type ConfirmationTokenPaymentMethodPreviewRevolutPay

type ConfirmationTokenPaymentMethodPreviewRevolutPay struct{}

type ConfirmationTokenPaymentMethodPreviewSEPADebit

type ConfirmationTokenPaymentMethodPreviewSEPADebit 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 *ConfirmationTokenPaymentMethodPreviewSEPADebitGeneratedFrom `json:"generated_from"`
	// Last four characters of the IBAN.
	Last4 string `json:"last4"`
}

type ConfirmationTokenPaymentMethodPreviewSEPADebitGeneratedFrom

type ConfirmationTokenPaymentMethodPreviewSEPADebitGeneratedFrom 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 ConfirmationTokenPaymentMethodPreviewSamsungPay

type ConfirmationTokenPaymentMethodPreviewSamsungPay struct{}

type ConfirmationTokenPaymentMethodPreviewSofort

type ConfirmationTokenPaymentMethodPreviewSofort struct {
	// Two-letter ISO code representing the country the bank account is located in.
	Country string `json:"country"`
}

type ConfirmationTokenPaymentMethodPreviewSwish

type ConfirmationTokenPaymentMethodPreviewSwish struct{}

type ConfirmationTokenPaymentMethodPreviewTWINT

type ConfirmationTokenPaymentMethodPreviewTWINT struct{}

type ConfirmationTokenPaymentMethodPreviewType

type ConfirmationTokenPaymentMethodPreviewType 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 (
	ConfirmationTokenPaymentMethodPreviewTypeACSSDebit        ConfirmationTokenPaymentMethodPreviewType = "acss_debit"
	ConfirmationTokenPaymentMethodPreviewTypeAffirm           ConfirmationTokenPaymentMethodPreviewType = "affirm"
	ConfirmationTokenPaymentMethodPreviewTypeAfterpayClearpay ConfirmationTokenPaymentMethodPreviewType = "afterpay_clearpay"
	ConfirmationTokenPaymentMethodPreviewTypeAlipay           ConfirmationTokenPaymentMethodPreviewType = "alipay"
	ConfirmationTokenPaymentMethodPreviewTypeAlma             ConfirmationTokenPaymentMethodPreviewType = "alma"
	ConfirmationTokenPaymentMethodPreviewTypeAmazonPay        ConfirmationTokenPaymentMethodPreviewType = "amazon_pay"
	ConfirmationTokenPaymentMethodPreviewTypeAUBECSDebit      ConfirmationTokenPaymentMethodPreviewType = "au_becs_debit"
	ConfirmationTokenPaymentMethodPreviewTypeBACSDebit        ConfirmationTokenPaymentMethodPreviewType = "bacs_debit"
	ConfirmationTokenPaymentMethodPreviewTypeBancontact       ConfirmationTokenPaymentMethodPreviewType = "bancontact"
	ConfirmationTokenPaymentMethodPreviewTypeBLIK             ConfirmationTokenPaymentMethodPreviewType = "blik"
	ConfirmationTokenPaymentMethodPreviewTypeBoleto           ConfirmationTokenPaymentMethodPreviewType = "boleto"
	ConfirmationTokenPaymentMethodPreviewTypeCard             ConfirmationTokenPaymentMethodPreviewType = "card"
	ConfirmationTokenPaymentMethodPreviewTypeCardPresent      ConfirmationTokenPaymentMethodPreviewType = "card_present"
	ConfirmationTokenPaymentMethodPreviewTypeCashApp          ConfirmationTokenPaymentMethodPreviewType = "cashapp"
	ConfirmationTokenPaymentMethodPreviewTypeCustomerBalance  ConfirmationTokenPaymentMethodPreviewType = "customer_balance"
	ConfirmationTokenPaymentMethodPreviewTypeEPS              ConfirmationTokenPaymentMethodPreviewType = "eps"
	ConfirmationTokenPaymentMethodPreviewTypeFPX              ConfirmationTokenPaymentMethodPreviewType = "fpx"
	ConfirmationTokenPaymentMethodPreviewTypeGiropay          ConfirmationTokenPaymentMethodPreviewType = "giropay"
	ConfirmationTokenPaymentMethodPreviewTypeGrabpay          ConfirmationTokenPaymentMethodPreviewType = "grabpay"
	ConfirmationTokenPaymentMethodPreviewTypeIDEAL            ConfirmationTokenPaymentMethodPreviewType = "ideal"
	ConfirmationTokenPaymentMethodPreviewTypeInteracPresent   ConfirmationTokenPaymentMethodPreviewType = "interac_present"
	ConfirmationTokenPaymentMethodPreviewTypeKakaoPay         ConfirmationTokenPaymentMethodPreviewType = "kakao_pay"
	ConfirmationTokenPaymentMethodPreviewTypeKlarna           ConfirmationTokenPaymentMethodPreviewType = "klarna"
	ConfirmationTokenPaymentMethodPreviewTypeKonbini          ConfirmationTokenPaymentMethodPreviewType = "konbini"
	ConfirmationTokenPaymentMethodPreviewTypeKrCard           ConfirmationTokenPaymentMethodPreviewType = "kr_card"
	ConfirmationTokenPaymentMethodPreviewTypeLink             ConfirmationTokenPaymentMethodPreviewType = "link"
	ConfirmationTokenPaymentMethodPreviewTypeMobilepay        ConfirmationTokenPaymentMethodPreviewType = "mobilepay"
	ConfirmationTokenPaymentMethodPreviewTypeMultibanco       ConfirmationTokenPaymentMethodPreviewType = "multibanco"
	ConfirmationTokenPaymentMethodPreviewTypeNaverPay         ConfirmationTokenPaymentMethodPreviewType = "naver_pay"
	ConfirmationTokenPaymentMethodPreviewTypeOXXO             ConfirmationTokenPaymentMethodPreviewType = "oxxo"
	ConfirmationTokenPaymentMethodPreviewTypeP24              ConfirmationTokenPaymentMethodPreviewType = "p24"
	ConfirmationTokenPaymentMethodPreviewTypePayByBank        ConfirmationTokenPaymentMethodPreviewType = "pay_by_bank"
	ConfirmationTokenPaymentMethodPreviewTypePayco            ConfirmationTokenPaymentMethodPreviewType = "payco"
	ConfirmationTokenPaymentMethodPreviewTypePayNow           ConfirmationTokenPaymentMethodPreviewType = "paynow"
	ConfirmationTokenPaymentMethodPreviewTypePaypal           ConfirmationTokenPaymentMethodPreviewType = "paypal"
	ConfirmationTokenPaymentMethodPreviewTypePix              ConfirmationTokenPaymentMethodPreviewType = "pix"
	ConfirmationTokenPaymentMethodPreviewTypePromptPay        ConfirmationTokenPaymentMethodPreviewType = "promptpay"
	ConfirmationTokenPaymentMethodPreviewTypeRevolutPay       ConfirmationTokenPaymentMethodPreviewType = "revolut_pay"
	ConfirmationTokenPaymentMethodPreviewTypeSamsungPay       ConfirmationTokenPaymentMethodPreviewType = "samsung_pay"
	ConfirmationTokenPaymentMethodPreviewTypeSEPADebit        ConfirmationTokenPaymentMethodPreviewType = "sepa_debit"
	ConfirmationTokenPaymentMethodPreviewTypeSofort           ConfirmationTokenPaymentMethodPreviewType = "sofort"
	ConfirmationTokenPaymentMethodPreviewTypeSwish            ConfirmationTokenPaymentMethodPreviewType = "swish"
	ConfirmationTokenPaymentMethodPreviewTypeTWINT            ConfirmationTokenPaymentMethodPreviewType = "twint"
	ConfirmationTokenPaymentMethodPreviewTypeUSBankAccount    ConfirmationTokenPaymentMethodPreviewType = "us_bank_account"
	ConfirmationTokenPaymentMethodPreviewTypeWeChatPay        ConfirmationTokenPaymentMethodPreviewType = "wechat_pay"
	ConfirmationTokenPaymentMethodPreviewTypeZip              ConfirmationTokenPaymentMethodPreviewType = "zip"
)

List of values that ConfirmationTokenPaymentMethodPreviewType can take

type ConfirmationTokenPaymentMethodPreviewUSBankAccount

type ConfirmationTokenPaymentMethodPreviewUSBankAccount struct {
	// Account holder type: individual or company.
	AccountHolderType ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountHolderType `json:"account_holder_type"`
	// Account type: checkings or savings. Defaults to checking if omitted.
	AccountType ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountType `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 *ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworks `json:"networks"`
	// Routing number of the bank account.
	RoutingNumber string `json:"routing_number"`
	// Contains information about the future reusability of this PaymentMethod.
	StatusDetails *ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetails `json:"status_details"`
}

type ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountHolderType

type ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountHolderType string

Account holder type: individual or company.

const (
	ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountHolderTypeCompany    ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountHolderType = "company"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountHolderTypeIndividual ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountHolderType = "individual"
)

List of values that ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountHolderType can take

type ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountType

type ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountType string

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

const (
	ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountTypeChecking ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountType = "checking"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountTypeSavings  ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountType = "savings"
)

List of values that ConfirmationTokenPaymentMethodPreviewUSBankAccountAccountType can take

type ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworks

type ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworks struct {
	// The preferred network.
	Preferred string `json:"preferred"`
	// All supported networks.
	Supported []ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworksSupported `json:"supported"`
}

Contains information about US bank account networks that can be used.

type ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworksSupported

type ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworksSupported string

All supported networks.

const (
	ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworksSupportedACH            ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworksSupported = "ach"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworksSupportedUSDomesticWire ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworksSupported = "us_domestic_wire"
)

List of values that ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworksSupported can take

type ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetails

type ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetails struct {
	Blocked *ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlocked `json:"blocked"`
}

Contains information about the future reusability of this PaymentMethod.

type ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlocked

type ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlocked struct {
	// The ACH network code that resulted in this block.
	NetworkCode ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode `json:"network_code"`
	// The reason why this PaymentMethod's fingerprint has been blocked
	Reason ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReason `json:"reason"`
}

type ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode

type ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode string

The ACH network code that resulted in this block.

const (
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR02 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R02"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR03 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R03"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR04 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R04"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR05 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R05"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR07 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R07"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR08 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R08"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR10 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R10"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR11 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R11"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR16 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R16"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR20 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R20"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR29 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R29"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCodeR31 ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode = "R31"
)

List of values that ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedNetworkCode can take

type ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReason

type ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReason string

The reason why this PaymentMethod's fingerprint has been blocked

const (
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReasonBankAccountClosed         ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReason = "bank_account_closed"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReasonBankAccountFrozen         ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReason = "bank_account_frozen"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReasonBankAccountInvalidDetails ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReason = "bank_account_invalid_details"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReasonBankAccountRestricted     ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReason = "bank_account_restricted"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReasonBankAccountUnusable       ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReason = "bank_account_unusable"
	ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReasonDebitNotAuthorized        ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReason = "debit_not_authorized"
)

List of values that ConfirmationTokenPaymentMethodPreviewUSBankAccountStatusDetailsBlockedReason can take

type ConfirmationTokenPaymentMethodPreviewWeChatPay

type ConfirmationTokenPaymentMethodPreviewWeChatPay struct{}

type ConfirmationTokenPaymentMethodPreviewZip

type ConfirmationTokenPaymentMethodPreviewZip struct{}

type ConfirmationTokenSetupFutureUsage

type ConfirmationTokenSetupFutureUsage string

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

The presence of this property 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.

const (
	ConfirmationTokenSetupFutureUsageOffSession ConfirmationTokenSetupFutureUsage = "off_session"
	ConfirmationTokenSetupFutureUsageOnSession  ConfirmationTokenSetupFutureUsage = "on_session"
)

List of values that ConfirmationTokenSetupFutureUsage can take

type ConfirmationTokenShipping

type ConfirmationTokenShipping struct {
	Address *Address `json:"address"`
	// Recipient name.
	Name string `json:"name"`
	// Recipient phone (including extension).
	Phone string `json:"phone"`
}

Shipping information collected on this ConfirmationToken.

type ConnectCollectionTransfer

type ConnectCollectionTransfer struct {
	// Amount transferred, in cents (or local equivalent).
	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:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Lists all Country Spec objects available in the API.

func (*CountrySpecListParams) AddExpand

func (p *CountrySpecListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type CountrySpecParams

type CountrySpecParams struct {
	Params `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Returns a Country Spec for a given Country code.

func (*CountrySpecParams) AddExpand

func (p *CountrySpecParams) AddExpand(f string)

AddExpand appends a new field to expand.

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 $ (or local equivalent)100 invoice $ (or local equivalent)50 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 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).

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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Returns a list of your coupons.

func (*CouponListParams) AddExpand

func (p *CouponListParams) AddExpand(f string)

AddExpand appends a new field to expand.

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. 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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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"`
	// 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"`
	// 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 delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API.

func (*CouponParams) AddExpand

func (p *CouponParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*CouponParams) AddMetadata

func (p *CouponParams) AddMetadata(key string, value string)

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

type CreditNote

type CreditNote struct {
	APIResource
	// The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
	Amount int64 `json:"amount"`
	// This is the sum of all the shipping amounts.
	AmountShipping int64 `json:"amount_shipping"`
	// 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 cents (or local equivalent) 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"`
	// The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
	EffectiveAt int64 `json:"effective_at"`
	// 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"`
	// The pretax credit amounts (ex: discount, credit grants, etc) for all line items.
	PretaxCreditAmounts []*CreditNotePretaxCreditAmount `json:"pretax_credit_amounts"`
	// 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"`
	// The details of the cost of shipping, including the ShippingRate applied to the invoice.
	ShippingCost *CreditNoteShippingCost `json:"shipping_cost"`
	// 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 cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
	Subtotal int64 `json:"subtotal"`
	// The integer amount in cents (or local equivalent) 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 cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
	Total int64 `json:"total"`
	// The integer amount in cents (or local equivalent) 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 cents (or local equivalent), 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 cents (or local equivalent) representing the total amount of discount that was credited.

type CreditNoteLineItem

type CreditNoteLineItem struct {
	// The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
	Amount int64 `json:"amount"`
	// The integer amount in cents (or local equivalent) 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 cents (or local equivalent) 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 pretax credit amounts (ex: discount, credit grants, etc) for this line item.
	PretaxCreditAmounts []*CreditNoteLineItemPretaxCreditAmount `json:"pretax_credit_amounts"`
	// 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 cents (or local equivalent) 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 The credit note line item object

type CreditNoteLineItemDiscountAmount

type CreditNoteLineItemDiscountAmount struct {
	// The amount, in cents (or local equivalent), 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 cents (or local equivalent) 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 CreditNoteLineItemPretaxCreditAmount

type CreditNoteLineItemPretaxCreditAmount struct {
	// The amount, in cents (or local equivalent), of the pretax credit amount.
	Amount int64 `json:"amount"`
	// The credit balance transaction that was applied to get this pretax credit amount.
	CreditBalanceTransaction *BillingCreditBalanceTransaction `json:"credit_balance_transaction"`
	// The discount that was applied to get this pretax credit amount.
	Discount *Discount `json:"discount"`
	// Type of the pretax credit amount referenced.
	Type CreditNoteLineItemPretaxCreditAmountType `json:"type"`
}

The pretax credit amounts (ex: discount, credit grants, etc) for this line item.

type CreditNoteLineItemPretaxCreditAmountType

type CreditNoteLineItemPretaxCreditAmountType string

Type of the pretax credit amount referenced.

const (
	CreditNoteLineItemPretaxCreditAmountTypeCreditBalanceTransaction CreditNoteLineItemPretaxCreditAmountType = "credit_balance_transaction"
	CreditNoteLineItemPretaxCreditAmountTypeDiscount                 CreditNoteLineItemPretaxCreditAmountType = "discount"
)

List of values that CreditNoteLineItemPretaxCreditAmountType can take

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`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
	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"`
	// A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
	TaxAmounts []*CreditNoteLineTaxAmountParams `form:"tax_amounts"`
	// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
	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 CreditNoteLineTaxAmountParams

type CreditNoteLineTaxAmountParams struct {
	// The amount, in cents (or local equivalent), of the tax.
	Amount *int64 `form:"amount"`
	// The amount on which tax is calculated, in cents (or local equivalent).
	TaxableAmount *int64 `form:"taxable_amount"`
	// The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
	TaxRate *string `form:"tax_rate"`
}

A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.

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
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

func (*CreditNoteListLinesParams) AddExpand

func (p *CreditNoteListLinesParams) AddExpand(f string)

AddExpand appends a new field to expand.

type CreditNoteListParams

type CreditNoteListParams struct {
	ListParams `form:"*"`
	// Only return credit notes that were created during the given date interval.
	Created *int64 `form:"created"`
	// Only return credit notes that were created during the given date interval.
	CreatedRange *RangeQueryParams `form:"created"`
	// Only return credit notes for the customer specified by this customer ID.
	Customer *string `form:"customer"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// Only return credit notes for the invoice specified by this invoice ID.
	Invoice *string `form:"invoice"`
}

Returns a list of credit notes.

func (*CreditNoteListParams) AddExpand

func (p *CreditNoteListParams) AddExpand(f string)

AddExpand appends a new field to expand.

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"`
	// The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
	EffectiveAt *int64 `form:"effective_at"`
	// Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
	EmailType *string `form:"email_type"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// ID of the invoice.
	Invoice *string `form:"invoice"`
	// Line items that make up the credit note.
	Lines []*CreditNoteLineParams `form:"lines"`
	// The credit note's memo appears on the credit note PDF.
	Memo *string `form:"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. 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 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 shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
	ShippingCost *CreditNoteShippingCostParams `form:"shipping_cost"`
}

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.

func (*CreditNoteParams) AddExpand

func (p *CreditNoteParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*CreditNoteParams) AddMetadata

func (p *CreditNoteParams) AddMetadata(key string, value string)

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

type CreditNotePretaxCreditAmount

type CreditNotePretaxCreditAmount struct {
	// The amount, in cents (or local equivalent), of the pretax credit amount.
	Amount int64 `json:"amount"`
	// The credit balance transaction that was applied to get this pretax credit amount.
	CreditBalanceTransaction *BillingCreditBalanceTransaction `json:"credit_balance_transaction"`
	// The discount that was applied to get this pretax credit amount.
	Discount *Discount `json:"discount"`
	// Type of the pretax credit amount referenced.
	Type CreditNotePretaxCreditAmountType `json:"type"`
}

The pretax credit amounts (ex: discount, credit grants, etc) for all line items.

type CreditNotePretaxCreditAmountType

type CreditNotePretaxCreditAmountType string

Type of the pretax credit amount referenced.

const (
	CreditNotePretaxCreditAmountTypeCreditBalanceTransaction CreditNotePretaxCreditAmountType = "credit_balance_transaction"
	CreditNotePretaxCreditAmountTypeDiscount                 CreditNotePretaxCreditAmountType = "discount"
)

List of values that CreditNotePretaxCreditAmountType can take

type CreditNotePreviewLineParams

type CreditNotePreviewLineParams struct {
	// The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
	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"`
	// A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
	TaxAmounts []*CreditNotePreviewLineTaxAmountParams `form:"tax_amounts"`
	// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
	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 CreditNotePreviewLineTaxAmountParams

type CreditNotePreviewLineTaxAmountParams struct {
	// The amount, in cents (or local equivalent), of the tax.
	Amount *int64 `form:"amount"`
	// The amount on which tax is calculated, in cents (or local equivalent).
	TaxableAmount *int64 `form:"taxable_amount"`
	// The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
	TaxRate *string `form:"tax_rate"`
}

A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.

type CreditNotePreviewLinesLineParams

type CreditNotePreviewLinesLineParams struct {
	// The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
	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"`
	// A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
	TaxAmounts []*CreditNotePreviewLinesLineTaxAmountParams `form:"tax_amounts"`
	// The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
	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 CreditNotePreviewLinesLineTaxAmountParams

type CreditNotePreviewLinesLineTaxAmountParams struct {
	// The amount, in cents (or local equivalent), of the tax.
	Amount *int64 `form:"amount"`
	// The amount on which tax is calculated, in cents (or local equivalent).
	TaxableAmount *int64 `form:"taxable_amount"`
	// The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
	TaxRate *string `form:"tax_rate"`
}

A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.

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"`
	// The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
	EffectiveAt *int64 `form:"effective_at"`
	// Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
	EmailType *string `form:"email_type"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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"`
	// 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 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 shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
	ShippingCost *CreditNotePreviewLinesShippingCostParams `form:"shipping_cost"`
}

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.

func (*CreditNotePreviewLinesParams) AddExpand

func (p *CreditNotePreviewLinesParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*CreditNotePreviewLinesParams) AddMetadata

func (p *CreditNotePreviewLinesParams) AddMetadata(key string, value string)

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

type CreditNotePreviewLinesShippingCostParams

type CreditNotePreviewLinesShippingCostParams struct {
	// The ID of the shipping rate to use for this order.
	ShippingRate *string `form:"shipping_rate"`
}

When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.

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"`
	// The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
	EffectiveAt *int64 `form:"effective_at"`
	// Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
	EmailType *string `form:"email_type"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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"`
	// 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 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 shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
	ShippingCost *CreditNotePreviewShippingCostParams `form:"shipping_cost"`
}

Get a preview of a credit note without creating it.

func (*CreditNotePreviewParams) AddExpand

func (p *CreditNotePreviewParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*CreditNotePreviewParams) AddMetadata

func (p *CreditNotePreviewParams) AddMetadata(key string, value string)

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

type CreditNotePreviewShippingCostParams

type CreditNotePreviewShippingCostParams struct {
	// The ID of the shipping rate to use for this order.
	ShippingRate *string `form:"shipping_rate"`
}

When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.

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 CreditNoteShippingCost

type CreditNoteShippingCost struct {
	// Total shipping cost before any 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 taxes are applied.
	AmountTotal int64 `json:"amount_total"`
	// The ID of the ShippingRate for this invoice.
	ShippingRate *ShippingRate `json:"shipping_rate"`
	// The taxes applied to the shipping rate.
	Taxes []*CreditNoteShippingCostTax `json:"taxes"`
}

The details of the cost of shipping, including the ShippingRate applied to the invoice.

type CreditNoteShippingCostParams

type CreditNoteShippingCostParams struct {
	// The ID of the shipping rate to use for this order.
	ShippingRate *string `form:"shipping_rate"`
}

When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.

type CreditNoteShippingCostTax

type CreditNoteShippingCostTax struct {
	// Amount of tax applied for this rate.
	Amount int64 `json:"amount"`
	// Tax rates can be applied to [invoices](https://stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://stripe.com/payments/checkout/use-manual-tax-rates) to collect tax.
	//
	// Related guide: [Tax rates](https://stripe.com/billing/taxes/tax-rates)
	Rate *TaxRate `json:"rate"`
	// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
	TaxabilityReason CreditNoteShippingCostTaxTaxabilityReason `json:"taxability_reason"`
	// The amount on which tax is calculated, in cents (or local equivalent).
	TaxableAmount int64 `json:"taxable_amount"`
}

The taxes applied to the shipping rate.

type CreditNoteShippingCostTaxTaxabilityReason

type CreditNoteShippingCostTaxTaxabilityReason string

The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.

const (
	CreditNoteShippingCostTaxTaxabilityReasonCustomerExempt       CreditNoteShippingCostTaxTaxabilityReason = "customer_exempt"
	CreditNoteShippingCostTaxTaxabilityReasonNotCollecting        CreditNoteShippingCostTaxTaxabilityReason = "not_collecting"
	CreditNoteShippingCostTaxTaxabilityReasonNotSubjectToTax      CreditNoteShippingCostTaxTaxabilityReason = "not_subject_to_tax"
	CreditNoteShippingCostTaxTaxabilityReasonNotSupported         CreditNoteShippingCostTaxTaxabilityReason = "not_supported"
	CreditNoteShippingCostTaxTaxabilityReasonPortionProductExempt CreditNoteShippingCostTaxTaxabilityReason = "portion_product_exempt"
	CreditNoteShippingCostTaxTaxabilityReasonPortionReducedRated  CreditNoteShippingCostTaxTaxabilityReason = "portion_reduced_rated"
	CreditNoteShippingCostTaxTaxabilityReasonPortionStandardRated CreditNoteShippingCostTaxTaxabilityReason = "portion_standard_rated"
	CreditNoteShippingCostTaxTaxabilityReasonProductExempt        CreditNoteShippingCostTaxTaxabilityReason = "product_exempt"
	CreditNoteShippingCostTaxTaxabilityReasonProductExemptHoliday CreditNoteShippingCostTaxTaxabilityReason = "product_exempt_holiday"
	CreditNoteShippingCostTaxTaxabilityReasonProportionallyRated  CreditNoteShippingCostTaxTaxabilityReason = "proportionally_rated"
	CreditNoteShippingCostTaxTaxabilityReasonReducedRated         CreditNoteShippingCostTaxTaxabilityReason = "reduced_rated"
	CreditNoteShippingCostTaxTaxabilityReasonReverseCharge        CreditNoteShippingCostTaxTaxabilityReason = "reverse_charge"
	CreditNoteShippingCostTaxTaxabilityReasonStandardRated        CreditNoteShippingCostTaxTaxabilityReason = "standard_rated"
	CreditNoteShippingCostTaxTaxabilityReasonTaxableBasisReduced  CreditNoteShippingCostTaxTaxabilityReason = "taxable_basis_reduced"
	CreditNoteShippingCostTaxTaxabilityReasonZeroRated            CreditNoteShippingCostTaxTaxabilityReason = "zero_rated"
)

List of values that CreditNoteShippingCostTaxTaxabilityReason 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 cents (or local equivalent), of the tax.
	Amount int64 `json:"amount"`
	// Whether this tax amount is inclusive or exclusive.
	Inclusive bool `json:"inclusive"`
	// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
	TaxabilityReason CreditNoteTaxAmountTaxabilityReason `json:"taxability_reason"`
	// The amount on which tax is calculated, in cents (or local equivalent).
	TaxableAmount int64 `json:"taxable_amount"`
	// 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 CreditNoteTaxAmountTaxabilityReason

type CreditNoteTaxAmountTaxabilityReason string

The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.

const (
	CreditNoteTaxAmountTaxabilityReasonCustomerExempt       CreditNoteTaxAmountTaxabilityReason = "customer_exempt"
	CreditNoteTaxAmountTaxabilityReasonNotCollecting        CreditNoteTaxAmountTaxabilityReason = "not_collecting"
	CreditNoteTaxAmountTaxabilityReasonNotSubjectToTax      CreditNoteTaxAmountTaxabilityReason = "not_subject_to_tax"
	CreditNoteTaxAmountTaxabilityReasonNotSupported         CreditNoteTaxAmountTaxabilityReason = "not_supported"
	CreditNoteTaxAmountTaxabilityReasonPortionProductExempt CreditNoteTaxAmountTaxabilityReason = "portion_product_exempt"
	CreditNoteTaxAmountTaxabilityReasonPortionReducedRated  CreditNoteTaxAmountTaxabilityReason = "portion_reduced_rated"
	CreditNoteTaxAmountTaxabilityReasonPortionStandardRated CreditNoteTaxAmountTaxabilityReason = "portion_standard_rated"
	CreditNoteTaxAmountTaxabilityReasonProductExempt        CreditNoteTaxAmountTaxabilityReason = "product_exempt"
	CreditNoteTaxAmountTaxabilityReasonProductExemptHoliday CreditNoteTaxAmountTaxabilityReason = "product_exempt_holiday"
	CreditNoteTaxAmountTaxabilityReasonProportionallyRated  CreditNoteTaxAmountTaxabilityReason = "proportionally_rated"
	CreditNoteTaxAmountTaxabilityReasonReducedRated         CreditNoteTaxAmountTaxabilityReason = "reduced_rated"
	CreditNoteTaxAmountTaxabilityReasonReverseCharge        CreditNoteTaxAmountTaxabilityReason = "reverse_charge"
	CreditNoteTaxAmountTaxabilityReasonStandardRated        CreditNoteTaxAmountTaxabilityReason = "standard_rated"
	CreditNoteTaxAmountTaxabilityReasonTaxableBasisReduced  CreditNoteTaxAmountTaxabilityReason = "taxable_basis_reduced"
	CreditNoteTaxAmountTaxabilityReasonZeroRated            CreditNoteTaxAmountTaxabilityReason = "zero_rated"
)

List of values that CreditNoteTaxAmountTaxabilityReason can take

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:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).

func (*CreditNoteVoidCreditNoteParams) AddExpand

func (p *CreditNoteVoidCreditNoteParams) AddExpand(f string)

AddExpand appends a new field to expand.

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"`
	// The current balance, if any, that's 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's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize.
	Balance int64 `json:"balance"`
	// The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these 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 use payment methods created through 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"`
	// Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`.
	//
	// If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`.
	//
	// If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field 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, that's 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's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes.
	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 (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses.
	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, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**.
	TaxExempt CustomerTaxExempt `json:"tax_exempt"`
	// The customer's tax IDs.
	TaxIDs *TaxIDList `json:"tax_ids"`
	// ID of the test clock that this customer belongs to.
	TestClock *TestHelpersTestClock `json:"test_clock"`
}

This object represents a customer of your business. Use it to [create recurring charges](https://stripe.com/docs/invoicing/customer), [save payment](https://stripe.com/docs/payments/save-during-payment) and contact information, and track payments that belong to the same customer.

Example (Delete)
package main

import (
	"log"

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

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_overpaid`, `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)

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
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Returns a list of transactions that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance).

func (*CustomerBalanceTransactionListParams) AddExpand

AddExpand appends a new field to expand.

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). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. 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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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"`
}

Creates an immutable transaction that updates the customer's credit [balance](https://stripe.com/docs/billing/customer/balance).

func (*CustomerBalanceTransactionParams) AddExpand

func (p *CustomerBalanceTransactionParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*CustomerBalanceTransactionParams) AddMetadata

func (p *CustomerBalanceTransactionParams) AddMetadata(key string, value string)

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

type CustomerBalanceTransactionType

type CustomerBalanceTransactionType string

Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `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"
	CustomerBalanceTransactionTypeInvoiceOverpaid       CustomerBalanceTransactionType = "invoice_overpaid"
	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`, `manual`, or `merchant_default`. 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
	AdjustedForOverdraft *CustomerCashBalanceTransactionAdjustedForOverdraft `json:"adjusted_for_overdraft"`
	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"`
	TransferredToBalance *CustomerCashBalanceTransactionTransferredToBalance `json:"transferred_to_balance"`
	// The type of the cash balance transaction. 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.

func (*CustomerCashBalanceTransaction) UnmarshalJSON

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

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

type CustomerCashBalanceTransactionAdjustedForOverdraft

type CustomerCashBalanceTransactionAdjustedForOverdraft struct {
	// The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.
	BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
	// The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.
	LinkedTransaction *CustomerCashBalanceTransaction `json:"linked_transaction"`
}

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"`
	GBBankTransfer *CustomerCashBalanceTransactionFundedBankTransferGBBankTransfer `json:"gb_bank_transfer"`
	JPBankTransfer *CustomerCashBalanceTransactionFundedBankTransferJPBankTransfer `json:"jp_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`, `mx_bank_transfer`, or `us_bank_transfer`.
	Type           CustomerCashBalanceTransactionFundedBankTransferType            `json:"type"`
	USBankTransfer *CustomerCashBalanceTransactionFundedBankTransferUSBankTransfer `json:"us_bank_transfer"`
}

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 CustomerCashBalanceTransactionFundedBankTransferGBBankTransfer

type CustomerCashBalanceTransactionFundedBankTransferGBBankTransfer struct {
	// The last 4 digits of the account number of the sender of the funding.
	AccountNumberLast4 string `json:"account_number_last4"`
	// The full name of the sender, as supplied by the sending bank.
	SenderName string `json:"sender_name"`
	// The sort code of the bank of the sender of the funding
	SortCode string `json:"sort_code"`
}

type CustomerCashBalanceTransactionFundedBankTransferJPBankTransfer

type CustomerCashBalanceTransactionFundedBankTransferJPBankTransfer struct {
	// The name of the bank of the sender of the funding.
	SenderBank string `json:"sender_bank"`
	// The name of the bank branch of the sender of the funding.
	SenderBranch string `json:"sender_branch"`
	// 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`, `mx_bank_transfer`, or `us_bank_transfer`.

const (
	CustomerCashBalanceTransactionFundedBankTransferTypeEUBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "eu_bank_transfer"
	CustomerCashBalanceTransactionFundedBankTransferTypeGBBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "gb_bank_transfer"
	CustomerCashBalanceTransactionFundedBankTransferTypeJPBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "jp_bank_transfer"
	CustomerCashBalanceTransactionFundedBankTransferTypeMXBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "mx_bank_transfer"
	CustomerCashBalanceTransactionFundedBankTransferTypeUSBankTransfer CustomerCashBalanceTransactionFundedBankTransferType = "us_bank_transfer"
)

List of values that CustomerCashBalanceTransactionFundedBankTransferType can take

type CustomerCashBalanceTransactionFundedBankTransferUSBankTransfer

type CustomerCashBalanceTransactionFundedBankTransferUSBankTransfer struct {
	// The banking network used for this funding.
	Network CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork `json:"network"`
	// The full name of the sender, as supplied by the sending bank.
	SenderName string `json:"sender_name"`
}

type CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork

type CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork string

The banking network used for this funding.

const (
	CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetworkACH            CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork = "ach"
	CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetworkDomesticWireUS CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork = "domestic_wire_us"
	CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetworkSwift          CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork = "swift"
)

List of values that CustomerCashBalanceTransactionFundedBankTransferUSBankTransferNetwork 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
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Returns a list of transactions that modified the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).

func (*CustomerCashBalanceTransactionListParams) AddExpand

AddExpand appends a new field to expand.

type CustomerCashBalanceTransactionParams

type CustomerCashBalanceTransactionParams struct {
	Params   `form:"*"`
	Customer *string `form:"-"` // Included in URL
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).

func (*CustomerCashBalanceTransactionParams) AddExpand

AddExpand appends a new field to expand.

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 CustomerCashBalanceTransactionTransferredToBalance

type CustomerCashBalanceTransactionTransferredToBalance struct {
	// The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance.
	BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
}

type CustomerCashBalanceTransactionType

type CustomerCashBalanceTransactionType string

The type of the cash balance transaction. 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 (
	CustomerCashBalanceTransactionTypeAdjustedForOverdraft CustomerCashBalanceTransactionType = "adjusted_for_overdraft"
	CustomerCashBalanceTransactionTypeAppliedToPayment     CustomerCashBalanceTransactionType = "applied_to_payment"
	CustomerCashBalanceTransactionTypeFunded               CustomerCashBalanceTransactionType = "funded"
	CustomerCashBalanceTransactionTypeFundingReversed      CustomerCashBalanceTransactionType = "funding_reversed"
	CustomerCashBalanceTransactionTypeRefundedFromPayment  CustomerCashBalanceTransactionType = "refunded_from_payment"
	CustomerCashBalanceTransactionTypeReturnCanceled       CustomerCashBalanceTransactionType = "return_canceled"
	CustomerCashBalanceTransactionTypeReturnInitiated      CustomerCashBalanceTransactionType = "return_initiated"
	CustomerCashBalanceTransactionTypeTransferredToBalance CustomerCashBalanceTransactionType = "transferred_to_balance"
	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: `BE`, `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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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.

func (*CustomerCreateFundingInstructionsParams) AddExpand

AddExpand appends a new field to expand.

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 40 characters.
	Name *string `form:"name"`
	// The value of the custom field. This may be up to 140 characters.
	Value *string `form:"value"`
}

The list of up to 4 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 {
	// The list of up to 4 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"`
	// ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice.
	Template string `json:"template"`
}

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"`
	// ID of the invoice rendering template to use for future invoices.
	Template *string `form:"template"`
}

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:"*"`
	// Only return customers that were created during the given date interval.
	Created *int64 `form:"created"`
	// Only return customers that were created during the given date interval.
	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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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.

func (*CustomerListParams) AddExpand

func (p *CustomerListParams) AddExpand(f string)

AddExpand appends a new field to expand.

type CustomerListPaymentMethodsParams

type CustomerListPaymentMethodsParams struct {
	ListParams `form:"*"`
	Customer   *string `form:"-"` // Included in URL
	// This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
	AllowRedisplay *string `form:"allow_redisplay"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
	Type *string `form:"type"`
}

Returns a list of PaymentMethods for a given Customer

func (*CustomerListPaymentMethodsParams) AddExpand

func (p *CustomerListPaymentMethodsParams) AddExpand(f string)

AddExpand appends a new field to expand.

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"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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"`
	// 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 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 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"`
}

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

func (*CustomerParams) AddExpand

func (p *CustomerParams) AddExpand(f string)

AddExpand appends a new field to expand.

func (*CustomerParams) AddMetadata

func (p *CustomerParams) AddMetadata(key string, value string)

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

type CustomerRetrievePaymentMethodParams

type CustomerRetrievePaymentMethodParams struct {
	Params   `form:"*"`
	Customer *string `form:"-"` // Included in URL
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Retrieves a PaymentMethod object for a given Customer.

func (*CustomerRetrievePaymentMethodParams) AddExpand

AddExpand appends a new field to expand.

type CustomerSearchParams

type CustomerSearchParams struct {
	SearchParams `form:"*"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
	// 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.

func (*CustomerSearchParams) AddExpand

func (p *CustomerSearchParams) AddExpand(f string)

AddExpand appends a new field to expand.

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 CustomerSession

type CustomerSession struct {
	APIResource
	// The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`.
	//
	// The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.
	ClientSecret string `json:"client_secret"`
	// Configuration for the components supported by this Customer Session.
	Components *CustomerSessionComponents `json:"components"`
	// Time at which the object was created. Measured in seconds since the Unix epoch.
	Created int64 `json:"created"`
	// The Customer the Customer Session was created for.
	Customer *Customer `json:"customer"`
	// The timestamp at which this Customer Session will expire.
	ExpiresAt int64 `json:"expires_at"`
	// 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"`
}

A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access control over a Customer.

Related guides: [Customer Session with the Payment Element](https://stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods), [Customer Session with the Pricing Table](https://stripe.com/payments/checkout/pricing-table#customer-session), [Customer Session with the Buy Button](https://stripe.com/payment-links/buy-button#pass-an-existing-customer).

type CustomerSessionComponents

type CustomerSessionComponents struct {
	// This hash contains whether the buy button is enabled.
	BuyButton *CustomerSessionComponentsBuyButton `json:"buy_button"`
	// This hash contains whether the Payment Element is enabled and the features it supports.
	PaymentElement *CustomerSessionComponentsPaymentElement `json:"payment_element"`
	// This hash contains whether the pricing table is enabled.
	PricingTable *CustomerSessionComponentsPricingTable `json:"pricing_table"`
}

Configuration for the components supported by this Customer Session.

type CustomerSessionComponentsBuyButton

type CustomerSessionComponentsBuyButton struct {
	// Whether the buy button is enabled.
	Enabled bool `json:"enabled"`
}

This hash contains whether the buy button is enabled.

type CustomerSessionComponentsBuyButtonParams

type CustomerSessionComponentsBuyButtonParams struct {
	// Whether the buy button is enabled.
	Enabled *bool `form:"enabled"`
}

Configuration for buy button.

type CustomerSessionComponentsParams

type CustomerSessionComponentsParams struct {
	// Configuration for buy button.
	BuyButton *CustomerSessionComponentsBuyButtonParams `form:"buy_button"`
	// Configuration for the Payment Element.
	PaymentElement *CustomerSessionComponentsPaymentElementParams `form:"payment_element"`
	// Configuration for the pricing table.
	PricingTable *CustomerSessionComponentsPricingTableParams `form:"pricing_table"`
}

Configuration for each component. Exactly 1 component must be enabled.

type CustomerSessionComponentsPaymentElement

type CustomerSessionComponentsPaymentElement struct {
	// Whether the Payment Element is enabled.
	Enabled bool `json:"enabled"`
	// This hash defines whether the Payment Element supports certain features.
	Features *CustomerSessionComponentsPaymentElementFeatures `json:"features"`
}

This hash contains whether the Payment Element is enabled and the features it supports.

type CustomerSessionComponentsPaymentElementFeatures

type CustomerSessionComponentsPaymentElementFeatures struct {
	// A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
	//
	// If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
	PaymentMethodAllowRedisplayFilters []CustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilter `json:"payment_method_allow_redisplay_filters"`
	// Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
	PaymentMethodRedisplay CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay `json:"payment_method_redisplay"`
	// Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
	PaymentMethodRedisplayLimit int64 `json:"payment_method_redisplay_limit"`
	// Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
	//
	// Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
	PaymentMethodRemove CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove `json:"payment_method_remove"`
	// Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
	//
	// If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
	PaymentMethodSave CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave `json:"payment_method_save"`
	// When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
	//
	// When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
	PaymentMethodSaveUsage CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage `json:"payment_method_save_usage"`
}

This hash defines whether the Payment Element supports certain features.

type CustomerSessionComponentsPaymentElementFeaturesParams

type CustomerSessionComponentsPaymentElementFeaturesParams struct {
	// A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
	//
	// If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
	PaymentMethodAllowRedisplayFilters []*string `form:"payment_method_allow_redisplay_filters"`
	// Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
	PaymentMethodRedisplay *string `form:"payment_method_redisplay"`
	// Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
	PaymentMethodRedisplayLimit *int64 `form:"payment_method_redisplay_limit"`
	// Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
	//
	// Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
	PaymentMethodRemove *string `form:"payment_method_remove"`
	// Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
	//
	// If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
	PaymentMethodSave *string `form:"payment_method_save"`
	// When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
	//
	// When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
	PaymentMethodSaveUsage *string `form:"payment_method_save_usage"`
}

This hash defines whether the Payment Element supports certain features.

type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilter

type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilter string

A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.

If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].

const (
	CustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilterAlways      CustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilter = "always"
	CustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilterLimited     CustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilter = "limited"
	CustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilterUnspecified CustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilter = "unspecified"
)

List of values that CustomerSessionComponentsPaymentElementFeaturesPaymentMethodAllowRedisplayFilter can take

type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay

type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay string

Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.

const (
	CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplayDisabled CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay = "disabled"
	CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplayEnabled  CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay = "enabled"
)

List of values that CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRedisplay can take

type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove

type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove string

Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.

Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that PaymentMethod(https://docs.stripe.com/api/payment_methods).

const (
	CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemoveDisabled CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove = "disabled"
	CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemoveEnabled  CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove = "enabled"
)

List of values that CustomerSessionComponentsPaymentElementFeaturesPaymentMethodRemove can take

type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave

type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave string

Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.

If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.

const (
	CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveDisabled CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave = "disabled"
	CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveEnabled  CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave = "enabled"
)

List of values that CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSave can take

type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage

type CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage string

When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.

When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.

const (
	CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsageOffSession CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage = "off_session"
	CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsageOnSession  CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage = "on_session"
)

List of values that CustomerSessionComponentsPaymentElementFeaturesPaymentMethodSaveUsage can take

type CustomerSessionComponentsPaymentElementParams

type CustomerSessionComponentsPaymentElementParams struct {
	// Whether the Payment Element is enabled.
	Enabled *bool `form:"enabled"`
	// This hash defines whether the Payment Element supports certain features.
	Features *CustomerSessionComponentsPaymentElementFeaturesParams `form:"features"`
}

Configuration for the Payment Element.

type CustomerSessionComponentsPricingTable

type CustomerSessionComponentsPricingTable struct {
	// Whether the pricing table is enabled.
	Enabled bool `json:"enabled"`
}

This hash contains whether the pricing table is enabled.

type CustomerSessionComponentsPricingTableParams

type CustomerSessionComponentsPricingTableParams struct {
	// Whether the pricing table is enabled.
	Enabled *bool `form:"enabled"`
}

Configuration for the pricing table.

type CustomerSessionParams

type CustomerSessionParams struct {
	Params `form:"*"`
	// Configuration for each component. Exactly 1 component must be enabled.
	Components *CustomerSessionComponentsParams `form:"components"`
	// The ID of an existing customer for which to create the Customer Session.
	Customer *string `form:"customer"`
	// Specifies which fields in the response should be expanded.
	Expand []*string `form:"expand"`
}

Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.

func (*CustomerSessionParams) AddExpand

func (p *CustomerSessionParams) AddExpand(f string)

AddExpand appends a new field to expand.

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, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following 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 `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
	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"`
	// A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`.
	ValidateLocation *string `form:"validate_location"`
}

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"`
	// The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
	SubscriptionItem string `json:"subscription_item"`
}

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 it 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's 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"`
	// List of eligibility types that are included in `enhanced_evidence`.
	EnhancedEligibilityTypes []DisputeEnhancedEligibilityType `json:"enhanced_eligibility_types"`
	Evidence                 *DisputeEvidence                 `json:"evidence"`
	EvidenceDetails          *DisputeEvidenceDetails          `json:"evidence_details"`
	// Unique identifier for the object.
	ID string `json:"id"`
	// If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are 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's disputed.
	PaymentIntent        *PaymentIntent               `json:"payment_intent"`
	PaymentMethodDetails *DisputePaymentMethodDetails `json:"payment_method_details"`
	// 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`. Learn 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`, `won`, or `lost`.
	Status DisputeStatus `json:"status"`
}

A dispute occurs when a customer questions your charge with their card issuer. When this happens, you have the opportunity to respond to the dispute with evidence that shows that the charge is legitimate.

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 DisputeEnhancedEligibilityType

type DisputeEnhancedEligibilityType string

List of eligibility types that are included in `enhanced_evidence`.

const (
	DisputeEnhancedEligibilityTypeVisaCompellingEvidence3 DisputeEnhancedEligibilityType = "visa_compelling_evidence_3"
)

List of values that DisputeEnhancedEligibilityType can take

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"`
	EnhancedEvidence  *DisputeEvidenceEnhancedEvidence `json:"enhanced_evidence"`
	// 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 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute.
	DueBy               int64                                      `json:"due_by"`
	EnhancedEligibility *DisputeEvidenceDetailsEnhancedEligibility `json:"enhanced_eligibility"`
	// 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 DisputeEvidenceDetailsEnhancedEligibility

type DisputeEvidenceDetailsEnhancedEligibility struct {
	VisaCompellingEvidence3 *DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 `json:"visa_compelling_evidence_3"`
	VisaCompliance          *DisputeEvidenceDetailsEnhancedEligibilityVisaCompliance          `json:"visa_compliance"`
}

type DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3

type DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3 struct {
	// List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission.
	RequiredActions []DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredAction `json:"required_actions"`
	// Visa Compelling Evidence 3.0 eligibility status.
	Status DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status `json:"status"`
}

type DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredAction

type DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredAction string

List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission.

const (
	DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredActionMissingCustomerIdentifiers                   DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredAction = "missing_customer_identifiers"
	DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredActionMissingDisputedTransactionDescription        DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredAction = "missing_disputed_transaction_description"
	DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredActionMissingMerchandiseOrServices                 DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredAction = "missing_merchandise_or_services"
	DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredActionMissingPriorUndisputedTransactionDescription DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredAction = "missing_prior_undisputed_transaction_description"
	DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredActionMissingPriorUndisputedTransactions           DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredAction = "missing_prior_undisputed_transactions"
)

List of values that DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3RequiredAction can take

type DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status

type DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status string

Visa Compelling Evidence 3.0 eligibility status.

const (
	DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3StatusNotQualified   DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status = "not_qualified"
	DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3StatusQualified      DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status = "qualified"
	DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3StatusRequiresAction DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status = "requires_action"
)

List of values that DisputeEvidenceDetailsEnhancedEligibilityVisaCompellingEvidence3Status can take

type DisputeEvidenceDetailsEnhancedEligibilityVisaCompliance added in v81.2.0

type DisputeEvidenceDetailsEnhancedEligibilityVisaCompliance struct {
	// Visa compliance eligibility status.
	Status DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus `json:"status"`
}

type DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus added in v81.2.0

type DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus string

Visa compliance eligibility status.

const (
	DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatusFeeAcknowledged            DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus = "fee_acknowledged"
	DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatusRequiresFeeAcknowledgement DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus = "requires_fee_acknowledgement"
)

List of values that DisputeEvidenceDetailsEnhancedEligibilityVisaComplianceStatus can take

type DisputeEvidenceEnhancedEvidence

type DisputeEvidenceEnhancedEvidence struct {
	VisaCompellingEvidence3 *DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 `json:"visa_compelling_evidence_3"`
	VisaCompliance          *DisputeEvidenceEnhancedEvidenceVisaCompliance          `json:"visa_compliance"`
}

type DisputeEvidenceEnhancedEvidenceParams

type DisputeEvidenceEnhancedEvidenceParams struct {
	// Evidence provided for Visa Compelling Evidence 3.0 evidence submission.
	VisaCompellingEvidence3 *DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Params `form:"visa_compelling_evidence_3"`
	// Evidence provided for Visa compliance evidence submission.
	VisaCompliance *DisputeEvidenceEnhancedEvidenceVisaComplianceParams `form:"visa_compliance"`
}

Additional evidence for qualifying evidence programs.

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3 struct {
	// Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
	DisputedTransaction *DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction `json:"disputed_transaction"`
	// List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
	PriorUndisputedTransactions []*DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction `json:"prior_undisputed_transactions"`
}

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction struct {
	// User Account ID used to log into business platform. Must be recognizable by the user.
	CustomerAccountID string `json:"customer_account_id"`
	// Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
	CustomerDeviceFingerprint string `json:"customer_device_fingerprint"`
	// Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
	CustomerDeviceID string `json:"customer_device_id"`
	// The email address of the customer.
	CustomerEmailAddress string `json:"customer_email_address"`
	// The IP address that the customer used when making the purchase.
	CustomerPurchaseIP string `json:"customer_purchase_ip"`
	// Categorization of disputed payment.
	MerchandiseOrServices DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionMerchandiseOrServices `json:"merchandise_or_services"`
	// A description of the product or service that was sold.
	ProductDescription string `json:"product_description"`
	// The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
	ShippingAddress *Address `json:"shipping_address"`
}

Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionMerchandiseOrServices

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionMerchandiseOrServices string

Categorization of disputed payment.

const (
	DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionMerchandiseOrServicesMerchandise DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionMerchandiseOrServices = "merchandise"
	DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionMerchandiseOrServicesServices    DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionMerchandiseOrServices = "services"
)

List of values that DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionMerchandiseOrServices can take

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionParams

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionParams struct {
	// User Account ID used to log into business platform. Must be recognizable by the user.
	CustomerAccountID *string `form:"customer_account_id"`
	// Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
	CustomerDeviceFingerprint *string `form:"customer_device_fingerprint"`
	// Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
	CustomerDeviceID *string `form:"customer_device_id"`
	// The email address of the customer.
	CustomerEmailAddress *string `form:"customer_email_address"`
	// The IP address that the customer used when making the purchase.
	CustomerPurchaseIP *string `form:"customer_purchase_ip"`
	// Categorization of disputed payment.
	MerchandiseOrServices *string `form:"merchandise_or_services"`
	// A description of the product or service that was sold.
	ProductDescription *string `form:"product_description"`
	// The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
	ShippingAddress *AddressParams `form:"shipping_address"`
}

Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Params

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3Params struct {
	// Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
	DisputedTransaction *DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionParams `form:"disputed_transaction"`
	// List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
	PriorUndisputedTransactions []*DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionParams `form:"prior_undisputed_transactions"`
}

Evidence provided for Visa Compelling Evidence 3.0 evidence submission.

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction struct {
	// Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.
	Charge string `json:"charge"`
	// User Account ID used to log into business platform. Must be recognizable by the user.
	CustomerAccountID string `json:"customer_account_id"`
	// Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
	CustomerDeviceFingerprint string `json:"customer_device_fingerprint"`
	// Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
	CustomerDeviceID string `json:"customer_device_id"`
	// The email address of the customer.
	CustomerEmailAddress string `json:"customer_email_address"`
	// The IP address that the customer used when making the purchase.
	CustomerPurchaseIP string `json:"customer_purchase_ip"`
	// A description of the product or service that was sold.
	ProductDescription string `json:"product_description"`
	// The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
	ShippingAddress *Address `json:"shipping_address"`
}

List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionParams

type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionParams struct {
	// Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.
	Charge *string `form:"charge"`
	// User Account ID used to log into business platform. Must be recognizable by the user.
	CustomerAccountID *string `form:"customer_account_id"`
	// Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
	CustomerDeviceFingerprint *string `form:"customer_device_fingerprint"`
	// Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
	CustomerDeviceID *string `form:"customer_device_id"`
	// The email address of the customer.
	CustomerEmailAddress *string `form:"customer_email_address"`
	// The IP address that the customer used when making the purchase.
	CustomerPurchaseIP *string `form:"customer_purchase_ip"`
	// A description of the product or service that was sold.
	ProductDescription *string `form:"product_description"`
	// The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
	ShippingAddress *AddressParams `form:"shipping_address"`
}

List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.

type DisputeEvidenceEnhancedEvidenceVisaCompliance added in v81.2.0

type DisputeEvidenceEnhancedEvidenceVisaCompliance struct {
	// A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute.
	FeeAcknowledged bool `json:"fee_acknowledged"`
}

type DisputeEvidenceEnhancedEvidenceVisaComplianceParams added in v81.2.0

type DisputeEvidenceEnhancedEvidenceVisaComplianceParams struct {
	// A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute.
	FeeAcknowledged *bool `form:"fee_acknowledged"`
}

Evidence provided for Visa compliance evidence submission.

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"`
	// Additional evidence for qualifying evidence programs.
	EnhancedEvidence *DisputeEvidenceEnhancedEvidenceParams `form:"enhanced_evidence"`
	// 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 custo