diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index f659e74479..1036b7753c 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v1669
\ No newline at end of file
+v1669
diff --git a/account.go b/account.go
index 9ec0cb38da..157724672d 100644
--- a/account.go
+++ b/account.go
@@ -1476,6 +1476,2331 @@ func (p *AccountRejectParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// 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.
+type AccountDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves the details of an account.
+type AccountRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *AccountRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// The applicant's gross annual revenue for its preceding fiscal year.
+type AccountUpdateBusinessProfileAnnualRevenueParams 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"`
+}
+
+// An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+type AccountUpdateBusinessProfileMonthlyEstimatedRevenueParams 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"`
+}
+
+// Business information about the account.
+type AccountUpdateBusinessProfileParams struct {
+ // The applicant's gross annual revenue for its preceding fiscal year.
+ AnnualRevenue *AccountUpdateBusinessProfileAnnualRevenueParams `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"`
+ // Whether the business is a minority-owned, women-owned, and/or LGBTQI+-owned business.
+ MinorityOwnedBusinessDesignation []*string `form:"minority_owned_business_designation"`
+ // An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+ MonthlyEstimatedRevenue *AccountUpdateBusinessProfileMonthlyEstimatedRevenueParams `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"`
+}
+
+// The acss_debit_payments capability.
+type AccountUpdateCapabilitiesACSSDebitPaymentsParams 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 AccountUpdateCapabilitiesAffirmPaymentsParams 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 AccountUpdateCapabilitiesAfterpayClearpayPaymentsParams 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 AccountUpdateCapabilitiesAlmaPaymentsParams 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 AccountUpdateCapabilitiesAmazonPayPaymentsParams 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 AccountUpdateCapabilitiesAUBECSDebitPaymentsParams 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 automatic_indirect_tax capability.
+type AccountUpdateCapabilitiesAutomaticIndirectTaxParams 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 AccountUpdateCapabilitiesBACSDebitPaymentsParams 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 AccountUpdateCapabilitiesBancontactPaymentsParams 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 AccountUpdateCapabilitiesBankTransferPaymentsParams 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 billie_payments capability.
+type AccountUpdateCapabilitiesBilliePaymentsParams 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 AccountUpdateCapabilitiesBLIKPaymentsParams 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 AccountUpdateCapabilitiesBoletoPaymentsParams 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 AccountUpdateCapabilitiesCardIssuingParams 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 AccountUpdateCapabilitiesCardPaymentsParams 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 AccountUpdateCapabilitiesCartesBancairesPaymentsParams 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 AccountUpdateCapabilitiesCashAppPaymentsParams 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 AccountUpdateCapabilitiesEPSPaymentsParams 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 AccountUpdateCapabilitiesFPXPaymentsParams 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 AccountUpdateCapabilitiesGBBankTransferPaymentsParams 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 AccountUpdateCapabilitiesGiropayPaymentsParams 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 gopay_payments capability.
+type AccountUpdateCapabilitiesGopayPaymentsParams 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 AccountUpdateCapabilitiesGrabpayPaymentsParams 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 id_bank_transfer_payments capability.
+type AccountUpdateCapabilitiesIDBankTransferPaymentsParams 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 id_bank_transfer_payments_bca capability.
+type AccountUpdateCapabilitiesIDBankTransferPaymentsBcaParams 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 AccountUpdateCapabilitiesIDEALPaymentsParams 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 AccountUpdateCapabilitiesIndiaInternationalPaymentsParams 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 AccountUpdateCapabilitiesJCBPaymentsParams 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 AccountUpdateCapabilitiesJPBankTransferPaymentsParams 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 AccountUpdateCapabilitiesKakaoPayPaymentsParams 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 AccountUpdateCapabilitiesKlarnaPaymentsParams 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 AccountUpdateCapabilitiesKonbiniPaymentsParams 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 AccountUpdateCapabilitiesKrCardPaymentsParams 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 AccountUpdateCapabilitiesLegacyPaymentsParams 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 AccountUpdateCapabilitiesLinkPaymentsParams 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 mb_way_payments capability.
+type AccountUpdateCapabilitiesMbWayPaymentsParams 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 AccountUpdateCapabilitiesMobilepayPaymentsParams 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 AccountUpdateCapabilitiesMultibancoPaymentsParams 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 AccountUpdateCapabilitiesMXBankTransferPaymentsParams 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 AccountUpdateCapabilitiesNaverPayPaymentsParams 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 nz_bank_account_becs_debit_payments capability.
+type AccountUpdateCapabilitiesNzBankAccountBECSDebitPaymentsParams 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 AccountUpdateCapabilitiesOXXOPaymentsParams 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 AccountUpdateCapabilitiesP24PaymentsParams 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 AccountUpdateCapabilitiesPayByBankPaymentsParams 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 AccountUpdateCapabilitiesPaycoPaymentsParams 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 AccountUpdateCapabilitiesPayNowPaymentsParams 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 paypal_payments capability.
+type AccountUpdateCapabilitiesPaypalPaymentsParams 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 payto_payments capability.
+type AccountUpdateCapabilitiesPaytoPaymentsParams 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 AccountUpdateCapabilitiesPromptPayPaymentsParams 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 qris_payments capability.
+type AccountUpdateCapabilitiesQrisPaymentsParams 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 rechnung_payments capability.
+type AccountUpdateCapabilitiesRechnungPaymentsParams 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 AccountUpdateCapabilitiesRevolutPayPaymentsParams 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 AccountUpdateCapabilitiesSamsungPayPaymentsParams 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 satispay_payments capability.
+type AccountUpdateCapabilitiesSatispayPaymentsParams 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 AccountUpdateCapabilitiesSEPABankTransferPaymentsParams 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 AccountUpdateCapabilitiesSEPADebitPaymentsParams 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 shopeepay_payments capability.
+type AccountUpdateCapabilitiesShopeepayPaymentsParams 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 AccountUpdateCapabilitiesSofortPaymentsParams 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 stripe_balance_payments capability.
+type AccountUpdateCapabilitiesStripeBalancePaymentsParams 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 AccountUpdateCapabilitiesSwishPaymentsParams 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 AccountUpdateCapabilitiesTaxReportingUS1099KParams 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 AccountUpdateCapabilitiesTaxReportingUS1099MISCParams 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 AccountUpdateCapabilitiesTransfersParams 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 AccountUpdateCapabilitiesTreasuryParams 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_evolve capability.
+type AccountUpdateCapabilitiesTreasuryEvolveParams 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_fifth_third capability.
+type AccountUpdateCapabilitiesTreasuryFifthThirdParams 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_goldman_sachs capability.
+type AccountUpdateCapabilitiesTreasuryGoldmanSachsParams 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 AccountUpdateCapabilitiesTWINTPaymentsParams 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 AccountUpdateCapabilitiesUSBankAccountACHPaymentsParams 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 AccountUpdateCapabilitiesUSBankTransferPaymentsParams 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 AccountUpdateCapabilitiesZipPaymentsParams 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"`
+}
+
+// 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 AccountUpdateCapabilitiesParams struct {
+ // The acss_debit_payments capability.
+ ACSSDebitPayments *AccountUpdateCapabilitiesACSSDebitPaymentsParams `form:"acss_debit_payments"`
+ // The affirm_payments capability.
+ AffirmPayments *AccountUpdateCapabilitiesAffirmPaymentsParams `form:"affirm_payments"`
+ // The afterpay_clearpay_payments capability.
+ AfterpayClearpayPayments *AccountUpdateCapabilitiesAfterpayClearpayPaymentsParams `form:"afterpay_clearpay_payments"`
+ // The alma_payments capability.
+ AlmaPayments *AccountUpdateCapabilitiesAlmaPaymentsParams `form:"alma_payments"`
+ // The amazon_pay_payments capability.
+ AmazonPayPayments *AccountUpdateCapabilitiesAmazonPayPaymentsParams `form:"amazon_pay_payments"`
+ // The au_becs_debit_payments capability.
+ AUBECSDebitPayments *AccountUpdateCapabilitiesAUBECSDebitPaymentsParams `form:"au_becs_debit_payments"`
+ // The automatic_indirect_tax capability.
+ AutomaticIndirectTax *AccountUpdateCapabilitiesAutomaticIndirectTaxParams `form:"automatic_indirect_tax"`
+ // The bacs_debit_payments capability.
+ BACSDebitPayments *AccountUpdateCapabilitiesBACSDebitPaymentsParams `form:"bacs_debit_payments"`
+ // The bancontact_payments capability.
+ BancontactPayments *AccountUpdateCapabilitiesBancontactPaymentsParams `form:"bancontact_payments"`
+ // The bank_transfer_payments capability.
+ BankTransferPayments *AccountUpdateCapabilitiesBankTransferPaymentsParams `form:"bank_transfer_payments"`
+ // The billie_payments capability.
+ BilliePayments *AccountUpdateCapabilitiesBilliePaymentsParams `form:"billie_payments"`
+ // The blik_payments capability.
+ BLIKPayments *AccountUpdateCapabilitiesBLIKPaymentsParams `form:"blik_payments"`
+ // The boleto_payments capability.
+ BoletoPayments *AccountUpdateCapabilitiesBoletoPaymentsParams `form:"boleto_payments"`
+ // The card_issuing capability.
+ CardIssuing *AccountUpdateCapabilitiesCardIssuingParams `form:"card_issuing"`
+ // The card_payments capability.
+ CardPayments *AccountUpdateCapabilitiesCardPaymentsParams `form:"card_payments"`
+ // The cartes_bancaires_payments capability.
+ CartesBancairesPayments *AccountUpdateCapabilitiesCartesBancairesPaymentsParams `form:"cartes_bancaires_payments"`
+ // The cashapp_payments capability.
+ CashAppPayments *AccountUpdateCapabilitiesCashAppPaymentsParams `form:"cashapp_payments"`
+ // The eps_payments capability.
+ EPSPayments *AccountUpdateCapabilitiesEPSPaymentsParams `form:"eps_payments"`
+ // The fpx_payments capability.
+ FPXPayments *AccountUpdateCapabilitiesFPXPaymentsParams `form:"fpx_payments"`
+ // The gb_bank_transfer_payments capability.
+ GBBankTransferPayments *AccountUpdateCapabilitiesGBBankTransferPaymentsParams `form:"gb_bank_transfer_payments"`
+ // The giropay_payments capability.
+ GiropayPayments *AccountUpdateCapabilitiesGiropayPaymentsParams `form:"giropay_payments"`
+ // The gopay_payments capability.
+ GopayPayments *AccountUpdateCapabilitiesGopayPaymentsParams `form:"gopay_payments"`
+ // The grabpay_payments capability.
+ GrabpayPayments *AccountUpdateCapabilitiesGrabpayPaymentsParams `form:"grabpay_payments"`
+ // The id_bank_transfer_payments capability.
+ IDBankTransferPayments *AccountUpdateCapabilitiesIDBankTransferPaymentsParams `form:"id_bank_transfer_payments"`
+ // The id_bank_transfer_payments_bca capability.
+ IDBankTransferPaymentsBca *AccountUpdateCapabilitiesIDBankTransferPaymentsBcaParams `form:"id_bank_transfer_payments_bca"`
+ // The ideal_payments capability.
+ IDEALPayments *AccountUpdateCapabilitiesIDEALPaymentsParams `form:"ideal_payments"`
+ // The india_international_payments capability.
+ IndiaInternationalPayments *AccountUpdateCapabilitiesIndiaInternationalPaymentsParams `form:"india_international_payments"`
+ // The jcb_payments capability.
+ JCBPayments *AccountUpdateCapabilitiesJCBPaymentsParams `form:"jcb_payments"`
+ // The jp_bank_transfer_payments capability.
+ JPBankTransferPayments *AccountUpdateCapabilitiesJPBankTransferPaymentsParams `form:"jp_bank_transfer_payments"`
+ // The kakao_pay_payments capability.
+ KakaoPayPayments *AccountUpdateCapabilitiesKakaoPayPaymentsParams `form:"kakao_pay_payments"`
+ // The klarna_payments capability.
+ KlarnaPayments *AccountUpdateCapabilitiesKlarnaPaymentsParams `form:"klarna_payments"`
+ // The konbini_payments capability.
+ KonbiniPayments *AccountUpdateCapabilitiesKonbiniPaymentsParams `form:"konbini_payments"`
+ // The kr_card_payments capability.
+ KrCardPayments *AccountUpdateCapabilitiesKrCardPaymentsParams `form:"kr_card_payments"`
+ // The legacy_payments capability.
+ LegacyPayments *AccountUpdateCapabilitiesLegacyPaymentsParams `form:"legacy_payments"`
+ // The link_payments capability.
+ LinkPayments *AccountUpdateCapabilitiesLinkPaymentsParams `form:"link_payments"`
+ // The mb_way_payments capability.
+ MbWayPayments *AccountUpdateCapabilitiesMbWayPaymentsParams `form:"mb_way_payments"`
+ // The mobilepay_payments capability.
+ MobilepayPayments *AccountUpdateCapabilitiesMobilepayPaymentsParams `form:"mobilepay_payments"`
+ // The multibanco_payments capability.
+ MultibancoPayments *AccountUpdateCapabilitiesMultibancoPaymentsParams `form:"multibanco_payments"`
+ // The mx_bank_transfer_payments capability.
+ MXBankTransferPayments *AccountUpdateCapabilitiesMXBankTransferPaymentsParams `form:"mx_bank_transfer_payments"`
+ // The naver_pay_payments capability.
+ NaverPayPayments *AccountUpdateCapabilitiesNaverPayPaymentsParams `form:"naver_pay_payments"`
+ // The nz_bank_account_becs_debit_payments capability.
+ NzBankAccountBECSDebitPayments *AccountUpdateCapabilitiesNzBankAccountBECSDebitPaymentsParams `form:"nz_bank_account_becs_debit_payments"`
+ // The oxxo_payments capability.
+ OXXOPayments *AccountUpdateCapabilitiesOXXOPaymentsParams `form:"oxxo_payments"`
+ // The p24_payments capability.
+ P24Payments *AccountUpdateCapabilitiesP24PaymentsParams `form:"p24_payments"`
+ // The pay_by_bank_payments capability.
+ PayByBankPayments *AccountUpdateCapabilitiesPayByBankPaymentsParams `form:"pay_by_bank_payments"`
+ // The payco_payments capability.
+ PaycoPayments *AccountUpdateCapabilitiesPaycoPaymentsParams `form:"payco_payments"`
+ // The paynow_payments capability.
+ PayNowPayments *AccountUpdateCapabilitiesPayNowPaymentsParams `form:"paynow_payments"`
+ // The paypal_payments capability.
+ PaypalPayments *AccountUpdateCapabilitiesPaypalPaymentsParams `form:"paypal_payments"`
+ // The payto_payments capability.
+ PaytoPayments *AccountUpdateCapabilitiesPaytoPaymentsParams `form:"payto_payments"`
+ // The promptpay_payments capability.
+ PromptPayPayments *AccountUpdateCapabilitiesPromptPayPaymentsParams `form:"promptpay_payments"`
+ // The qris_payments capability.
+ QrisPayments *AccountUpdateCapabilitiesQrisPaymentsParams `form:"qris_payments"`
+ // The rechnung_payments capability.
+ RechnungPayments *AccountUpdateCapabilitiesRechnungPaymentsParams `form:"rechnung_payments"`
+ // The revolut_pay_payments capability.
+ RevolutPayPayments *AccountUpdateCapabilitiesRevolutPayPaymentsParams `form:"revolut_pay_payments"`
+ // The samsung_pay_payments capability.
+ SamsungPayPayments *AccountUpdateCapabilitiesSamsungPayPaymentsParams `form:"samsung_pay_payments"`
+ // The satispay_payments capability.
+ SatispayPayments *AccountUpdateCapabilitiesSatispayPaymentsParams `form:"satispay_payments"`
+ // The sepa_bank_transfer_payments capability.
+ SEPABankTransferPayments *AccountUpdateCapabilitiesSEPABankTransferPaymentsParams `form:"sepa_bank_transfer_payments"`
+ // The sepa_debit_payments capability.
+ SEPADebitPayments *AccountUpdateCapabilitiesSEPADebitPaymentsParams `form:"sepa_debit_payments"`
+ // The shopeepay_payments capability.
+ ShopeepayPayments *AccountUpdateCapabilitiesShopeepayPaymentsParams `form:"shopeepay_payments"`
+ // The sofort_payments capability.
+ SofortPayments *AccountUpdateCapabilitiesSofortPaymentsParams `form:"sofort_payments"`
+ // The stripe_balance_payments capability.
+ StripeBalancePayments *AccountUpdateCapabilitiesStripeBalancePaymentsParams `form:"stripe_balance_payments"`
+ // The swish_payments capability.
+ SwishPayments *AccountUpdateCapabilitiesSwishPaymentsParams `form:"swish_payments"`
+ // The tax_reporting_us_1099_k capability.
+ TaxReportingUS1099K *AccountUpdateCapabilitiesTaxReportingUS1099KParams `form:"tax_reporting_us_1099_k"`
+ // The tax_reporting_us_1099_misc capability.
+ TaxReportingUS1099MISC *AccountUpdateCapabilitiesTaxReportingUS1099MISCParams `form:"tax_reporting_us_1099_misc"`
+ // The transfers capability.
+ Transfers *AccountUpdateCapabilitiesTransfersParams `form:"transfers"`
+ // The treasury capability.
+ Treasury *AccountUpdateCapabilitiesTreasuryParams `form:"treasury"`
+ // The treasury_evolve capability.
+ TreasuryEvolve *AccountUpdateCapabilitiesTreasuryEvolveParams `form:"treasury_evolve"`
+ // The treasury_fifth_third capability.
+ TreasuryFifthThird *AccountUpdateCapabilitiesTreasuryFifthThirdParams `form:"treasury_fifth_third"`
+ // The treasury_goldman_sachs capability.
+ TreasuryGoldmanSachs *AccountUpdateCapabilitiesTreasuryGoldmanSachsParams `form:"treasury_goldman_sachs"`
+ // The twint_payments capability.
+ TWINTPayments *AccountUpdateCapabilitiesTWINTPaymentsParams `form:"twint_payments"`
+ // The us_bank_account_ach_payments capability.
+ USBankAccountACHPayments *AccountUpdateCapabilitiesUSBankAccountACHPaymentsParams `form:"us_bank_account_ach_payments"`
+ // The us_bank_transfer_payments capability.
+ USBankTransferPayments *AccountUpdateCapabilitiesUSBankTransferPaymentsParams `form:"us_bank_transfer_payments"`
+ // The zip_payments capability.
+ ZipPayments *AccountUpdateCapabilitiesZipPaymentsParams `form:"zip_payments"`
+}
+
+// The Kana variation of the company's primary address (Japan only).
+type AccountUpdateCompanyAddressKanaParams 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 AccountUpdateCompanyAddressKanjiParams 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"`
+}
+
+// This hash is used to attest that the directors information provided to Stripe is both current and correct.
+type AccountUpdateCompanyDirectorshipDeclarationParams 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 beneficial owner information provided to Stripe is both current and correct.
+type AccountUpdateCompanyOwnershipDeclarationParams 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"`
+}
+
+// A document verifying the business.
+type AccountUpdateCompanyVerificationDocumentParams 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"`
+}
+
+// Information on the verification state of the company.
+type AccountUpdateCompanyVerificationParams struct {
+ // A document verifying the business.
+ Document *AccountUpdateCompanyVerificationDocumentParams `form:"document"`
+}
+
+// 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 AccountUpdateCompanyParams struct {
+ // The company's primary address.
+ Address *AddressParams `form:"address"`
+ // The Kana variation of the company's primary address (Japan only).
+ AddressKana *AccountUpdateCompanyAddressKanaParams `form:"address_kana"`
+ // The Kanji variation of the company's primary address (Japan only).
+ AddressKanji *AccountUpdateCompanyAddressKanjiParams `form:"address_kanji"`
+ // This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ DirectorshipDeclaration *AccountUpdateCompanyDirectorshipDeclarationParams `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 *AccountUpdateCompanyOwnershipDeclarationParams `form:"ownership_declaration"`
+ // This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ 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 *AccountUpdateCompanyVerificationParams `form:"verification"`
+}
+
+// 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 AccountUpdateDocumentsBankAccountOwnershipVerificationParams 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 AccountUpdateDocumentsCompanyLicenseParams 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 AccountUpdateDocumentsCompanyMemorandumOfAssociationParams 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 AccountUpdateDocumentsCompanyMinisterialDecreeParams 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 AccountUpdateDocumentsCompanyRegistrationVerificationParams 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 AccountUpdateDocumentsCompanyTaxIDVerificationParams 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 AccountUpdateDocumentsProofOfRegistrationParams 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 AccountUpdateDocumentsProofOfUltimateBeneficialOwnershipParams 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"`
+}
+
+// Documents that may be submitted to satisfy various informational requests.
+type AccountUpdateDocumentsParams 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 *AccountUpdateDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"`
+ // One or more documents that demonstrate proof of a company's license to operate.
+ CompanyLicense *AccountUpdateDocumentsCompanyLicenseParams `form:"company_license"`
+ // One or more documents showing the company's Memorandum of Association.
+ CompanyMemorandumOfAssociation *AccountUpdateDocumentsCompanyMemorandumOfAssociationParams `form:"company_memorandum_of_association"`
+ // (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
+ CompanyMinisterialDecree *AccountUpdateDocumentsCompanyMinisterialDecreeParams `form:"company_ministerial_decree"`
+ // One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ CompanyRegistrationVerification *AccountUpdateDocumentsCompanyRegistrationVerificationParams `form:"company_registration_verification"`
+ // One or more documents that demonstrate proof of a company's tax ID.
+ CompanyTaxIDVerification *AccountUpdateDocumentsCompanyTaxIDVerificationParams `form:"company_tax_id_verification"`
+ // One or more documents showing the company's proof of registration with the national business registry.
+ ProofOfRegistration *AccountUpdateDocumentsProofOfRegistrationParams `form:"proof_of_registration"`
+ // One or more documents that demonstrate proof of ultimate beneficial ownership.
+ ProofOfUltimateBeneficialOwnership *AccountUpdateDocumentsProofOfUltimateBeneficialOwnershipParams `form:"proof_of_ultimate_beneficial_ownership"`
+}
+
+// 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.
+type AccountUpdateExternalAccountParams struct {
+ // The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ AccountHolderName *string `form:"account_holder_name"`
+ // The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ 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"`
+ AddressCity *string `form:"address_city"`
+ AddressCountry *string `form:"address_country"`
+ AddressLine1 *string `form:"address_line1"`
+ AddressLine2 *string `form:"address_line2"`
+ AddressState *string `form:"address_state"`
+ AddressZip *string `form:"address_zip"`
+ // 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.](docs/payouts)
+ Currency *string `form:"currency"`
+ CVC *string `form:"cvc"`
+ DefaultForCurrency *bool `form:"default_for_currency"`
+ ExpMonth *int64 `form:"exp_month"`
+ ExpYear *int64 `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.
+ Metadata map[string]string `form:"metadata"`
+ Name *string `form:"name"`
+ Number *string `form:"number"`
+ Object *string `form:"object"`
+ // The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe 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"`
+ Token *string `form:"token"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *AccountUpdateExternalAccountParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// A hash of account group type to tokens. These are account groups this account should be added to.
+type AccountUpdateGroupsParams 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"`
+}
+
+// Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts).
+type AccountUpdateRiskControlsChargesParams struct {
+ // To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`.
+ // There can be a delay before the risk control is paused or unpaused.
+ PauseRequested *bool `form:"pause_requested"`
+}
+
+// Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts).
+type AccountUpdateRiskControlsPayoutsParams struct {
+ // To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`.
+ // There can be a delay before the risk control is paused or unpaused.
+ PauseRequested *bool `form:"pause_requested"`
+}
+
+// A hash to configure risk controls on the account. Please see [this page for more details](https://stripe.com/connect/pausing-payments-or-payouts-on-connected-accounts).
+type AccountUpdateRiskControlsParams struct {
+ // Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts).
+ Charges *AccountUpdateRiskControlsChargesParams `form:"charges"`
+ // Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts).
+ Payouts *AccountUpdateRiskControlsPayoutsParams `form:"payouts"`
+}
+
+// Settings specific to Bacs Direct Debit payments.
+type AccountUpdateSettingsBACSDebitPaymentsParams 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 bank BCA onboarding for Indonesia bank transfers payments method.
+type AccountUpdateSettingsBankBcaOnboardingParams struct {
+ // Bank BCA business account holder name
+ AccountHolderName *string `form:"account_holder_name"`
+ // Bank BCA business account number
+ BusinessAccountNumber *string `form:"business_account_number"`
+}
+
+// Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+type AccountUpdateSettingsBrandingParams 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"`
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ 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 specific to the account's use of the Capital product.
+type AccountUpdateSettingsCapitalParams struct {
+ // Per-currency mapping of user-selected destination accounts used to pay out loans.
+ PayoutDestination map[string]string `form:"payout_destination"`
+ // Per-currency mapping of all destination accounts eligible to receive Capital financing payouts.
+ PayoutDestinationSelector map[string][]*string `form:"payout_destination_selector"`
+}
+
+// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/issuing/connect/tos_acceptance).
+type AccountUpdateSettingsCardIssuingTOSAcceptanceParams 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"`
+}
+
+// Settings specific to the account's use of the Card Issuing product.
+type AccountUpdateSettingsCardIssuingParams struct {
+ // Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/issuing/connect/tos_acceptance).
+ TOSAcceptance *AccountUpdateSettingsCardIssuingTOSAcceptanceParams `form:"tos_acceptance"`
+}
+
+// Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+type AccountUpdateSettingsCardPaymentsDeclineOnParams 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"`
+}
+
+// Settings specific to card charging on the account.
+type AccountUpdateSettingsCardPaymentsParams struct {
+ // Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ DeclineOn *AccountUpdateSettingsCardPaymentsDeclineOnParams `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 the account's use of Invoices.
+type AccountUpdateSettingsInvoicesParams 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"`
+ // Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ HostedPaymentMethodSave *string `form:"hosted_payment_method_save"`
+}
+
+// Settings that apply across payment methods for charging on the account.
+type AccountUpdateSettingsPaymentsParams 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"`
+}
+
+// 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.
+type AccountUpdateSettingsPayoutsScheduleParams 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"`
+}
+
+// AppendTo implements custom encoding logic for AccountUpdateSettingsPayoutsScheduleParams.
+func (p *AccountUpdateSettingsPayoutsScheduleParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.DelayDaysMinimum) {
+ body.Add(form.FormatKey(append(keyParts, "delay_days")), "minimum")
+ }
+}
+
+// Settings specific to the account's payouts.
+type AccountUpdateSettingsPayoutsParams 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 *AccountUpdateSettingsPayoutsScheduleParams `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 tax forms.
+type AccountUpdateSettingsTaxFormsParams struct {
+ // Whether the account opted out of receiving their tax forms by postal delivery.
+ ConsentedToPaperlessDelivery *bool `form:"consented_to_paperless_delivery"`
+}
+
+// Details on the account's acceptance of the Stripe Treasury Services Agreement.
+type AccountUpdateSettingsTreasuryTOSAcceptanceParams 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"`
+}
+
+// Settings specific to the account's Treasury FinancialAccounts.
+type AccountUpdateSettingsTreasuryParams struct {
+ // Details on the account's acceptance of the Stripe Treasury Services Agreement.
+ TOSAcceptance *AccountUpdateSettingsTreasuryTOSAcceptanceParams `form:"tos_acceptance"`
+}
+
+// Options for customizing how the account functions within Stripe.
+type AccountUpdateSettingsParams struct {
+ // Settings specific to Bacs Direct Debit payments.
+ BACSDebitPayments *AccountUpdateSettingsBACSDebitPaymentsParams `form:"bacs_debit_payments"`
+ // Settings specific to bank BCA onboarding for Indonesia bank transfers payments method.
+ BankBcaOnboarding *AccountUpdateSettingsBankBcaOnboardingParams `form:"bank_bca_onboarding"`
+ // Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+ Branding *AccountUpdateSettingsBrandingParams `form:"branding"`
+ // Settings specific to the account's use of the Capital product.
+ Capital *AccountUpdateSettingsCapitalParams `form:"capital"`
+ // Settings specific to the account's use of the Card Issuing product.
+ CardIssuing *AccountUpdateSettingsCardIssuingParams `form:"card_issuing"`
+ // Settings specific to card charging on the account.
+ CardPayments *AccountUpdateSettingsCardPaymentsParams `form:"card_payments"`
+ // Settings specific to the account's use of Invoices.
+ Invoices *AccountUpdateSettingsInvoicesParams `form:"invoices"`
+ // Settings that apply across payment methods for charging on the account.
+ Payments *AccountUpdateSettingsPaymentsParams `form:"payments"`
+ // Settings specific to the account's payouts.
+ Payouts *AccountUpdateSettingsPayoutsParams `form:"payouts"`
+ // Settings specific to the account's tax forms.
+ TaxForms *AccountUpdateSettingsTaxFormsParams `form:"tax_forms"`
+ // Settings specific to the account's Treasury FinancialAccounts.
+ Treasury *AccountUpdateSettingsTreasuryParams `form:"treasury"`
+}
+
+// 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 AccountUpdateTOSAcceptanceParams 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"`
+}
+
+// Updates a [connected account](https://stripe.com/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are
+// left unchanged.
+//
+// For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+// is application, which includes Custom accounts, you can update any information on the account.
+//
+// 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, you can update all information until you create
+// an [Account Link or Account Session](https://stripe.com/api/account_links) to start Connect onboarding,
+// after which some properties can no longer be updated.
+//
+// To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our
+// [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.
+type AccountUpdateParams 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 *AccountUpdateBusinessProfileParams `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 *AccountUpdateCapabilitiesParams `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 *AccountUpdateCompanyParams `form:"company"`
+ // 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 *AccountUpdateDocumentsParams `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"`
+ // ExternalAccount *[todo({"shape":"primitive","primitive":"string"} | {"shape":"nullable","type":{"shape":"ref","namespaces":[],"ref":"AccountUpdateExternalAccountParams"}} | {"shape":"nullable","type":{"shape":"ref","namespaces":[],"ref":"AccountUpdateExternalAccountParams"}} | {"shape":"nullable","type":{"shape":"ref","namespaces":[],"ref":"AccountUpdateExternalAccountParams"}})] `form:"external_account"`
+ // A hash of account group type to tokens. These are account groups this account should be added to.
+ Groups *AccountUpdateGroupsParams `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"`
+ // A hash to configure risk controls on the account. Please see [this page for more details](https://stripe.com/connect/pausing-payments-or-payouts-on-connected-accounts).
+ RiskControls *AccountUpdateRiskControlsParams `form:"risk_controls"`
+ // Options for customizing how the account functions within Stripe.
+ Settings *AccountUpdateSettingsParams `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 *AccountUpdateTOSAcceptanceParams `form:"tos_acceptance"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *AccountUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *AccountUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// The applicant's gross annual revenue for its preceding fiscal year.
+type AccountCreateBusinessProfileAnnualRevenueParams 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"`
+}
+
+// An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+type AccountCreateBusinessProfileMonthlyEstimatedRevenueParams 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"`
+}
+
+// Business information about the account.
+type AccountCreateBusinessProfileParams struct {
+ // The applicant's gross annual revenue for its preceding fiscal year.
+ AnnualRevenue *AccountCreateBusinessProfileAnnualRevenueParams `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"`
+ // Whether the business is a minority-owned, women-owned, and/or LGBTQI+-owned business.
+ MinorityOwnedBusinessDesignation []*string `form:"minority_owned_business_designation"`
+ // An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
+ MonthlyEstimatedRevenue *AccountCreateBusinessProfileMonthlyEstimatedRevenueParams `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"`
+}
+
+// The acss_debit_payments capability.
+type AccountCreateCapabilitiesACSSDebitPaymentsParams 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 AccountCreateCapabilitiesAffirmPaymentsParams 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 AccountCreateCapabilitiesAfterpayClearpayPaymentsParams 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 AccountCreateCapabilitiesAlmaPaymentsParams 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 AccountCreateCapabilitiesAmazonPayPaymentsParams 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 AccountCreateCapabilitiesAUBECSDebitPaymentsParams 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 automatic_indirect_tax capability.
+type AccountCreateCapabilitiesAutomaticIndirectTaxParams 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 AccountCreateCapabilitiesBACSDebitPaymentsParams 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 AccountCreateCapabilitiesBancontactPaymentsParams 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 AccountCreateCapabilitiesBankTransferPaymentsParams 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 billie_payments capability.
+type AccountCreateCapabilitiesBilliePaymentsParams 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 AccountCreateCapabilitiesBLIKPaymentsParams 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 AccountCreateCapabilitiesBoletoPaymentsParams 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 AccountCreateCapabilitiesCardIssuingParams 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 AccountCreateCapabilitiesCardPaymentsParams 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 AccountCreateCapabilitiesCartesBancairesPaymentsParams 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 AccountCreateCapabilitiesCashAppPaymentsParams 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 AccountCreateCapabilitiesEPSPaymentsParams 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 AccountCreateCapabilitiesFPXPaymentsParams 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 AccountCreateCapabilitiesGBBankTransferPaymentsParams 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 AccountCreateCapabilitiesGiropayPaymentsParams 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 gopay_payments capability.
+type AccountCreateCapabilitiesGopayPaymentsParams 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 AccountCreateCapabilitiesGrabpayPaymentsParams 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 id_bank_transfer_payments capability.
+type AccountCreateCapabilitiesIDBankTransferPaymentsParams 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 id_bank_transfer_payments_bca capability.
+type AccountCreateCapabilitiesIDBankTransferPaymentsBcaParams 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 AccountCreateCapabilitiesIDEALPaymentsParams 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 AccountCreateCapabilitiesIndiaInternationalPaymentsParams 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 AccountCreateCapabilitiesJCBPaymentsParams 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 AccountCreateCapabilitiesJPBankTransferPaymentsParams 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 AccountCreateCapabilitiesKakaoPayPaymentsParams 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 AccountCreateCapabilitiesKlarnaPaymentsParams 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 AccountCreateCapabilitiesKonbiniPaymentsParams 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 AccountCreateCapabilitiesKrCardPaymentsParams 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 AccountCreateCapabilitiesLegacyPaymentsParams 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 AccountCreateCapabilitiesLinkPaymentsParams 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 mb_way_payments capability.
+type AccountCreateCapabilitiesMbWayPaymentsParams 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 AccountCreateCapabilitiesMobilepayPaymentsParams 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 AccountCreateCapabilitiesMultibancoPaymentsParams 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 AccountCreateCapabilitiesMXBankTransferPaymentsParams 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 AccountCreateCapabilitiesNaverPayPaymentsParams 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 nz_bank_account_becs_debit_payments capability.
+type AccountCreateCapabilitiesNzBankAccountBECSDebitPaymentsParams 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 AccountCreateCapabilitiesOXXOPaymentsParams 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 AccountCreateCapabilitiesP24PaymentsParams 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 AccountCreateCapabilitiesPayByBankPaymentsParams 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 AccountCreateCapabilitiesPaycoPaymentsParams 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 AccountCreateCapabilitiesPayNowPaymentsParams 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 paypal_payments capability.
+type AccountCreateCapabilitiesPaypalPaymentsParams 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 payto_payments capability.
+type AccountCreateCapabilitiesPaytoPaymentsParams 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 AccountCreateCapabilitiesPromptPayPaymentsParams 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 qris_payments capability.
+type AccountCreateCapabilitiesQrisPaymentsParams 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 rechnung_payments capability.
+type AccountCreateCapabilitiesRechnungPaymentsParams 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 AccountCreateCapabilitiesRevolutPayPaymentsParams 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 AccountCreateCapabilitiesSamsungPayPaymentsParams 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 satispay_payments capability.
+type AccountCreateCapabilitiesSatispayPaymentsParams 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 AccountCreateCapabilitiesSEPABankTransferPaymentsParams 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 AccountCreateCapabilitiesSEPADebitPaymentsParams 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 shopeepay_payments capability.
+type AccountCreateCapabilitiesShopeepayPaymentsParams 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 AccountCreateCapabilitiesSofortPaymentsParams 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 stripe_balance_payments capability.
+type AccountCreateCapabilitiesStripeBalancePaymentsParams 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 AccountCreateCapabilitiesSwishPaymentsParams 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 AccountCreateCapabilitiesTaxReportingUS1099KParams 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 AccountCreateCapabilitiesTaxReportingUS1099MISCParams 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 AccountCreateCapabilitiesTransfersParams 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 AccountCreateCapabilitiesTreasuryParams 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_evolve capability.
+type AccountCreateCapabilitiesTreasuryEvolveParams 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_fifth_third capability.
+type AccountCreateCapabilitiesTreasuryFifthThirdParams 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_goldman_sachs capability.
+type AccountCreateCapabilitiesTreasuryGoldmanSachsParams 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 AccountCreateCapabilitiesTWINTPaymentsParams 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 AccountCreateCapabilitiesUSBankAccountACHPaymentsParams 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 AccountCreateCapabilitiesUSBankTransferPaymentsParams 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 AccountCreateCapabilitiesZipPaymentsParams 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"`
+}
+
+// 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 AccountCreateCapabilitiesParams struct {
+ // The acss_debit_payments capability.
+ ACSSDebitPayments *AccountCreateCapabilitiesACSSDebitPaymentsParams `form:"acss_debit_payments"`
+ // The affirm_payments capability.
+ AffirmPayments *AccountCreateCapabilitiesAffirmPaymentsParams `form:"affirm_payments"`
+ // The afterpay_clearpay_payments capability.
+ AfterpayClearpayPayments *AccountCreateCapabilitiesAfterpayClearpayPaymentsParams `form:"afterpay_clearpay_payments"`
+ // The alma_payments capability.
+ AlmaPayments *AccountCreateCapabilitiesAlmaPaymentsParams `form:"alma_payments"`
+ // The amazon_pay_payments capability.
+ AmazonPayPayments *AccountCreateCapabilitiesAmazonPayPaymentsParams `form:"amazon_pay_payments"`
+ // The au_becs_debit_payments capability.
+ AUBECSDebitPayments *AccountCreateCapabilitiesAUBECSDebitPaymentsParams `form:"au_becs_debit_payments"`
+ // The automatic_indirect_tax capability.
+ AutomaticIndirectTax *AccountCreateCapabilitiesAutomaticIndirectTaxParams `form:"automatic_indirect_tax"`
+ // The bacs_debit_payments capability.
+ BACSDebitPayments *AccountCreateCapabilitiesBACSDebitPaymentsParams `form:"bacs_debit_payments"`
+ // The bancontact_payments capability.
+ BancontactPayments *AccountCreateCapabilitiesBancontactPaymentsParams `form:"bancontact_payments"`
+ // The bank_transfer_payments capability.
+ BankTransferPayments *AccountCreateCapabilitiesBankTransferPaymentsParams `form:"bank_transfer_payments"`
+ // The billie_payments capability.
+ BilliePayments *AccountCreateCapabilitiesBilliePaymentsParams `form:"billie_payments"`
+ // The blik_payments capability.
+ BLIKPayments *AccountCreateCapabilitiesBLIKPaymentsParams `form:"blik_payments"`
+ // The boleto_payments capability.
+ BoletoPayments *AccountCreateCapabilitiesBoletoPaymentsParams `form:"boleto_payments"`
+ // The card_issuing capability.
+ CardIssuing *AccountCreateCapabilitiesCardIssuingParams `form:"card_issuing"`
+ // The card_payments capability.
+ CardPayments *AccountCreateCapabilitiesCardPaymentsParams `form:"card_payments"`
+ // The cartes_bancaires_payments capability.
+ CartesBancairesPayments *AccountCreateCapabilitiesCartesBancairesPaymentsParams `form:"cartes_bancaires_payments"`
+ // The cashapp_payments capability.
+ CashAppPayments *AccountCreateCapabilitiesCashAppPaymentsParams `form:"cashapp_payments"`
+ // The eps_payments capability.
+ EPSPayments *AccountCreateCapabilitiesEPSPaymentsParams `form:"eps_payments"`
+ // The fpx_payments capability.
+ FPXPayments *AccountCreateCapabilitiesFPXPaymentsParams `form:"fpx_payments"`
+ // The gb_bank_transfer_payments capability.
+ GBBankTransferPayments *AccountCreateCapabilitiesGBBankTransferPaymentsParams `form:"gb_bank_transfer_payments"`
+ // The giropay_payments capability.
+ GiropayPayments *AccountCreateCapabilitiesGiropayPaymentsParams `form:"giropay_payments"`
+ // The gopay_payments capability.
+ GopayPayments *AccountCreateCapabilitiesGopayPaymentsParams `form:"gopay_payments"`
+ // The grabpay_payments capability.
+ GrabpayPayments *AccountCreateCapabilitiesGrabpayPaymentsParams `form:"grabpay_payments"`
+ // The id_bank_transfer_payments capability.
+ IDBankTransferPayments *AccountCreateCapabilitiesIDBankTransferPaymentsParams `form:"id_bank_transfer_payments"`
+ // The id_bank_transfer_payments_bca capability.
+ IDBankTransferPaymentsBca *AccountCreateCapabilitiesIDBankTransferPaymentsBcaParams `form:"id_bank_transfer_payments_bca"`
+ // The ideal_payments capability.
+ IDEALPayments *AccountCreateCapabilitiesIDEALPaymentsParams `form:"ideal_payments"`
+ // The india_international_payments capability.
+ IndiaInternationalPayments *AccountCreateCapabilitiesIndiaInternationalPaymentsParams `form:"india_international_payments"`
+ // The jcb_payments capability.
+ JCBPayments *AccountCreateCapabilitiesJCBPaymentsParams `form:"jcb_payments"`
+ // The jp_bank_transfer_payments capability.
+ JPBankTransferPayments *AccountCreateCapabilitiesJPBankTransferPaymentsParams `form:"jp_bank_transfer_payments"`
+ // The kakao_pay_payments capability.
+ KakaoPayPayments *AccountCreateCapabilitiesKakaoPayPaymentsParams `form:"kakao_pay_payments"`
+ // The klarna_payments capability.
+ KlarnaPayments *AccountCreateCapabilitiesKlarnaPaymentsParams `form:"klarna_payments"`
+ // The konbini_payments capability.
+ KonbiniPayments *AccountCreateCapabilitiesKonbiniPaymentsParams `form:"konbini_payments"`
+ // The kr_card_payments capability.
+ KrCardPayments *AccountCreateCapabilitiesKrCardPaymentsParams `form:"kr_card_payments"`
+ // The legacy_payments capability.
+ LegacyPayments *AccountCreateCapabilitiesLegacyPaymentsParams `form:"legacy_payments"`
+ // The link_payments capability.
+ LinkPayments *AccountCreateCapabilitiesLinkPaymentsParams `form:"link_payments"`
+ // The mb_way_payments capability.
+ MbWayPayments *AccountCreateCapabilitiesMbWayPaymentsParams `form:"mb_way_payments"`
+ // The mobilepay_payments capability.
+ MobilepayPayments *AccountCreateCapabilitiesMobilepayPaymentsParams `form:"mobilepay_payments"`
+ // The multibanco_payments capability.
+ MultibancoPayments *AccountCreateCapabilitiesMultibancoPaymentsParams `form:"multibanco_payments"`
+ // The mx_bank_transfer_payments capability.
+ MXBankTransferPayments *AccountCreateCapabilitiesMXBankTransferPaymentsParams `form:"mx_bank_transfer_payments"`
+ // The naver_pay_payments capability.
+ NaverPayPayments *AccountCreateCapabilitiesNaverPayPaymentsParams `form:"naver_pay_payments"`
+ // The nz_bank_account_becs_debit_payments capability.
+ NzBankAccountBECSDebitPayments *AccountCreateCapabilitiesNzBankAccountBECSDebitPaymentsParams `form:"nz_bank_account_becs_debit_payments"`
+ // The oxxo_payments capability.
+ OXXOPayments *AccountCreateCapabilitiesOXXOPaymentsParams `form:"oxxo_payments"`
+ // The p24_payments capability.
+ P24Payments *AccountCreateCapabilitiesP24PaymentsParams `form:"p24_payments"`
+ // The pay_by_bank_payments capability.
+ PayByBankPayments *AccountCreateCapabilitiesPayByBankPaymentsParams `form:"pay_by_bank_payments"`
+ // The payco_payments capability.
+ PaycoPayments *AccountCreateCapabilitiesPaycoPaymentsParams `form:"payco_payments"`
+ // The paynow_payments capability.
+ PayNowPayments *AccountCreateCapabilitiesPayNowPaymentsParams `form:"paynow_payments"`
+ // The paypal_payments capability.
+ PaypalPayments *AccountCreateCapabilitiesPaypalPaymentsParams `form:"paypal_payments"`
+ // The payto_payments capability.
+ PaytoPayments *AccountCreateCapabilitiesPaytoPaymentsParams `form:"payto_payments"`
+ // The promptpay_payments capability.
+ PromptPayPayments *AccountCreateCapabilitiesPromptPayPaymentsParams `form:"promptpay_payments"`
+ // The qris_payments capability.
+ QrisPayments *AccountCreateCapabilitiesQrisPaymentsParams `form:"qris_payments"`
+ // The rechnung_payments capability.
+ RechnungPayments *AccountCreateCapabilitiesRechnungPaymentsParams `form:"rechnung_payments"`
+ // The revolut_pay_payments capability.
+ RevolutPayPayments *AccountCreateCapabilitiesRevolutPayPaymentsParams `form:"revolut_pay_payments"`
+ // The samsung_pay_payments capability.
+ SamsungPayPayments *AccountCreateCapabilitiesSamsungPayPaymentsParams `form:"samsung_pay_payments"`
+ // The satispay_payments capability.
+ SatispayPayments *AccountCreateCapabilitiesSatispayPaymentsParams `form:"satispay_payments"`
+ // The sepa_bank_transfer_payments capability.
+ SEPABankTransferPayments *AccountCreateCapabilitiesSEPABankTransferPaymentsParams `form:"sepa_bank_transfer_payments"`
+ // The sepa_debit_payments capability.
+ SEPADebitPayments *AccountCreateCapabilitiesSEPADebitPaymentsParams `form:"sepa_debit_payments"`
+ // The shopeepay_payments capability.
+ ShopeepayPayments *AccountCreateCapabilitiesShopeepayPaymentsParams `form:"shopeepay_payments"`
+ // The sofort_payments capability.
+ SofortPayments *AccountCreateCapabilitiesSofortPaymentsParams `form:"sofort_payments"`
+ // The stripe_balance_payments capability.
+ StripeBalancePayments *AccountCreateCapabilitiesStripeBalancePaymentsParams `form:"stripe_balance_payments"`
+ // The swish_payments capability.
+ SwishPayments *AccountCreateCapabilitiesSwishPaymentsParams `form:"swish_payments"`
+ // The tax_reporting_us_1099_k capability.
+ TaxReportingUS1099K *AccountCreateCapabilitiesTaxReportingUS1099KParams `form:"tax_reporting_us_1099_k"`
+ // The tax_reporting_us_1099_misc capability.
+ TaxReportingUS1099MISC *AccountCreateCapabilitiesTaxReportingUS1099MISCParams `form:"tax_reporting_us_1099_misc"`
+ // The transfers capability.
+ Transfers *AccountCreateCapabilitiesTransfersParams `form:"transfers"`
+ // The treasury capability.
+ Treasury *AccountCreateCapabilitiesTreasuryParams `form:"treasury"`
+ // The treasury_evolve capability.
+ TreasuryEvolve *AccountCreateCapabilitiesTreasuryEvolveParams `form:"treasury_evolve"`
+ // The treasury_fifth_third capability.
+ TreasuryFifthThird *AccountCreateCapabilitiesTreasuryFifthThirdParams `form:"treasury_fifth_third"`
+ // The treasury_goldman_sachs capability.
+ TreasuryGoldmanSachs *AccountCreateCapabilitiesTreasuryGoldmanSachsParams `form:"treasury_goldman_sachs"`
+ // The twint_payments capability.
+ TWINTPayments *AccountCreateCapabilitiesTWINTPaymentsParams `form:"twint_payments"`
+ // The us_bank_account_ach_payments capability.
+ USBankAccountACHPayments *AccountCreateCapabilitiesUSBankAccountACHPaymentsParams `form:"us_bank_account_ach_payments"`
+ // The us_bank_transfer_payments capability.
+ USBankTransferPayments *AccountCreateCapabilitiesUSBankTransferPaymentsParams `form:"us_bank_transfer_payments"`
+ // The zip_payments capability.
+ ZipPayments *AccountCreateCapabilitiesZipPaymentsParams `form:"zip_payments"`
+}
+
+// The Kana variation of the company's primary address (Japan only).
+type AccountCreateCompanyAddressKanaParams 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 AccountCreateCompanyAddressKanjiParams 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"`
+}
+
+// This hash is used to attest that the directors information provided to Stripe is both current and correct.
+type AccountCreateCompanyDirectorshipDeclarationParams 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 beneficial owner information provided to Stripe is both current and correct.
+type AccountCreateCompanyOwnershipDeclarationParams 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"`
+}
+
+// A document verifying the business.
+type AccountCreateCompanyVerificationDocumentParams 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"`
+}
+
+// Information on the verification state of the company.
+type AccountCreateCompanyVerificationParams struct {
+ // A document verifying the business.
+ Document *AccountCreateCompanyVerificationDocumentParams `form:"document"`
+}
+
+// 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 AccountCreateCompanyParams struct {
+ // The company's primary address.
+ Address *AddressParams `form:"address"`
+ // The Kana variation of the company's primary address (Japan only).
+ AddressKana *AccountCreateCompanyAddressKanaParams `form:"address_kana"`
+ // The Kanji variation of the company's primary address (Japan only).
+ AddressKanji *AccountCreateCompanyAddressKanjiParams `form:"address_kanji"`
+ // This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ DirectorshipDeclaration *AccountCreateCompanyDirectorshipDeclarationParams `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 *AccountCreateCompanyOwnershipDeclarationParams `form:"ownership_declaration"`
+ OwnershipDeclarationShownAndSigned *bool `form:"ownership_declaration_shown_and_signed"`
+ // This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details.
+ 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 *AccountCreateCompanyVerificationParams `form:"verification"`
+}
+
+// A hash of configuration describing the Connect application that controls the account.
+type AccountCreateControllerApplicationParams struct {
+ // Whether the controller is liable for losses on this account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances).
+ LossLiable *bool `form:"loss_liable"`
+ // Whether the controller owns onboarding for this account.
+ OnboardingOwner *bool `form:"onboarding_owner"`
+ // Whether the controller has pricing controls for this account.
+ PricingControls *bool `form:"pricing_controls"`
+}
+
+// Properties of the account's dashboard.
+type AccountCreateControllerDashboardParams 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 who pays Stripe fees for product usage on this account.
+type AccountCreateControllerFeesParams 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 products that have negative balance liability, and whether Stripe or a Connect application is responsible for them.
+type AccountCreateControllerLossesParams 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 Stripe-hosted dashboards.
+type AccountCreateControllerStripeDashboardParams 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 describing the account controller's attributes.
+type AccountCreateControllerParams struct {
+ // A hash of configuration describing the Connect application that controls the account.
+ Application *AccountCreateControllerApplicationParams `form:"application"`
+ // Properties of the account's dashboard.
+ Dashboard *AccountCreateControllerDashboardParams `form:"dashboard"`
+ // A hash of configuration for who pays Stripe fees for product usage on this account.
+ Fees *AccountCreateControllerFeesParams `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 *AccountCreateControllerLossesParams `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 *AccountCreateControllerStripeDashboardParams `form:"stripe_dashboard"`
+}
+
+// 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 AccountCreateDocumentsBankAccountOwnershipVerificationParams 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 AccountCreateDocumentsCompanyLicenseParams 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 AccountCreateDocumentsCompanyMemorandumOfAssociationParams 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 AccountCreateDocumentsCompanyMinisterialDecreeParams 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 AccountCreateDocumentsCompanyRegistrationVerificationParams 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 AccountCreateDocumentsCompanyTaxIDVerificationParams 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 AccountCreateDocumentsProofOfRegistrationParams 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 AccountCreateDocumentsProofOfUltimateBeneficialOwnershipParams 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"`
+}
+
+// Documents that may be submitted to satisfy various informational requests.
+type AccountCreateDocumentsParams 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 *AccountCreateDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"`
+ // One or more documents that demonstrate proof of a company's license to operate.
+ CompanyLicense *AccountCreateDocumentsCompanyLicenseParams `form:"company_license"`
+ // One or more documents showing the company's Memorandum of Association.
+ CompanyMemorandumOfAssociation *AccountCreateDocumentsCompanyMemorandumOfAssociationParams `form:"company_memorandum_of_association"`
+ // (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment.
+ CompanyMinisterialDecree *AccountCreateDocumentsCompanyMinisterialDecreeParams `form:"company_ministerial_decree"`
+ // One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ CompanyRegistrationVerification *AccountCreateDocumentsCompanyRegistrationVerificationParams `form:"company_registration_verification"`
+ // One or more documents that demonstrate proof of a company's tax ID.
+ CompanyTaxIDVerification *AccountCreateDocumentsCompanyTaxIDVerificationParams `form:"company_tax_id_verification"`
+ // One or more documents showing the company's proof of registration with the national business registry.
+ ProofOfRegistration *AccountCreateDocumentsProofOfRegistrationParams `form:"proof_of_registration"`
+ // One or more documents that demonstrate proof of ultimate beneficial ownership.
+ ProofOfUltimateBeneficialOwnership *AccountCreateDocumentsProofOfUltimateBeneficialOwnershipParams `form:"proof_of_ultimate_beneficial_ownership"`
+}
+
+// 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.
+type AccountCreateExternalAccountParams struct {
+ // The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object.
+ AccountHolderName *string `form:"account_holder_name"`
+ // The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object.
+ 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"`
+ AddressCity *string `form:"address_city"`
+ AddressCountry *string `form:"address_country"`
+ AddressLine1 *string `form:"address_line1"`
+ AddressLine2 *string `form:"address_line2"`
+ AddressState *string `form:"address_state"`
+ AddressZip *string `form:"address_zip"`
+ // 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.](docs/payouts)
+ Currency *string `form:"currency"`
+ CVC *string `form:"cvc"`
+ DefaultForCurrency *bool `form:"default_for_currency"`
+ ExpMonth *int64 `form:"exp_month"`
+ ExpYear *int64 `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.
+ Metadata map[string]string `form:"metadata"`
+ Name *string `form:"name"`
+ Number *string `form:"number"`
+ Object *string `form:"object"`
+ // The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe 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"`
+ Token *string `form:"token"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *AccountCreateExternalAccountParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// A hash of account group type to tokens. These are account groups this account should be added to.
+type AccountCreateGroupsParams 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"`
+}
+
+// Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts).
+type AccountCreateRiskControlsChargesParams struct {
+ // To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`.
+ // There can be a delay before the risk control is paused or unpaused.
+ PauseRequested *bool `form:"pause_requested"`
+}
+
+// Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts).
+type AccountCreateRiskControlsPayoutsParams struct {
+ // To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`.
+ // There can be a delay before the risk control is paused or unpaused.
+ PauseRequested *bool `form:"pause_requested"`
+}
+
+// A hash to configure risk controls on the account. Please see [this page for more details](https://stripe.com/connect/pausing-payments-or-payouts-on-connected-accounts).
+type AccountCreateRiskControlsParams struct {
+ // Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts).
+ Charges *AccountCreateRiskControlsChargesParams `form:"charges"`
+ // Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts).
+ Payouts *AccountCreateRiskControlsPayoutsParams `form:"payouts"`
+}
+
+// Settings specific to Bacs Direct Debit.
+type AccountCreateSettingsBACSDebitPaymentsParams 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 bank BCA onboarding for Indonesia bank transfers payments method.
+type AccountCreateSettingsBankBcaOnboardingParams struct {
+ // Bank BCA business account holder name
+ AccountHolderName *string `form:"account_holder_name"`
+ // Bank BCA business account number
+ BusinessAccountNumber *string `form:"business_account_number"`
+}
+
+// Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+type AccountCreateSettingsBrandingParams 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"`
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px.
+ 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 specific to the account's use of the Capital product.
+type AccountCreateSettingsCapitalParams struct {
+ // Per-currency mapping of user-selected destination accounts used to pay out loans.
+ PayoutDestination map[string]string `form:"payout_destination"`
+ // Per-currency mapping of all destination accounts eligible to receive Capital financing payouts.
+ PayoutDestinationSelector map[string][]*string `form:"payout_destination_selector"`
+}
+
+// Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/issuing/connect/tos_acceptance).
+type AccountCreateSettingsCardIssuingTOSAcceptanceParams 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"`
+}
+
+// Settings specific to the account's use of the Card Issuing product.
+type AccountCreateSettingsCardIssuingParams struct {
+ // Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/issuing/connect/tos_acceptance).
+ TOSAcceptance *AccountCreateSettingsCardIssuingTOSAcceptanceParams `form:"tos_acceptance"`
+}
+
+// Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+type AccountCreateSettingsCardPaymentsDeclineOnParams 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"`
+}
+
+// Settings specific to card charging on the account.
+type AccountCreateSettingsCardPaymentsParams struct {
+ // Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ DeclineOn *AccountCreateSettingsCardPaymentsDeclineOnParams `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 the account's use of Invoices.
+type AccountCreateSettingsInvoicesParams struct {
+ // Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page.
+ HostedPaymentMethodSave *string `form:"hosted_payment_method_save"`
+}
+
+// Settings that apply across payment methods for charging on the account.
+type AccountCreateSettingsPaymentsParams 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"`
+}
+
+// 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.
+type AccountCreateSettingsPayoutsScheduleParams 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"`
+}
+
+// AppendTo implements custom encoding logic for AccountCreateSettingsPayoutsScheduleParams.
+func (p *AccountCreateSettingsPayoutsScheduleParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.DelayDaysMinimum) {
+ body.Add(form.FormatKey(append(keyParts, "delay_days")), "minimum")
+ }
+}
+
+// Settings specific to the account's payouts.
+type AccountCreateSettingsPayoutsParams 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 *AccountCreateSettingsPayoutsScheduleParams `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 tax forms.
+type AccountCreateSettingsTaxFormsParams struct {
+ // Whether the account opted out of receiving their tax forms by postal delivery.
+ ConsentedToPaperlessDelivery *bool `form:"consented_to_paperless_delivery"`
+}
+
+// Details on the account's acceptance of the Stripe Treasury Services Agreement.
+type AccountCreateSettingsTreasuryTOSAcceptanceParams 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"`
+}
+
+// Settings specific to the account's Treasury FinancialAccounts.
+type AccountCreateSettingsTreasuryParams struct {
+ // Details on the account's acceptance of the Stripe Treasury Services Agreement.
+ TOSAcceptance *AccountCreateSettingsTreasuryTOSAcceptanceParams `form:"tos_acceptance"`
+}
+
+// Options for customizing how the account functions within Stripe.
+type AccountCreateSettingsParams struct {
+ // Settings specific to Bacs Direct Debit.
+ BACSDebitPayments *AccountCreateSettingsBACSDebitPaymentsParams `form:"bacs_debit_payments"`
+ // Settings specific to bank BCA onboarding for Indonesia bank transfers payments method.
+ BankBcaOnboarding *AccountCreateSettingsBankBcaOnboardingParams `form:"bank_bca_onboarding"`
+ // Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products.
+ Branding *AccountCreateSettingsBrandingParams `form:"branding"`
+ // Settings specific to the account's use of the Capital product.
+ Capital *AccountCreateSettingsCapitalParams `form:"capital"`
+ // Settings specific to the account's use of the Card Issuing product.
+ CardIssuing *AccountCreateSettingsCardIssuingParams `form:"card_issuing"`
+ // Settings specific to card charging on the account.
+ CardPayments *AccountCreateSettingsCardPaymentsParams `form:"card_payments"`
+ // Settings specific to the account's use of Invoices.
+ Invoices *AccountCreateSettingsInvoicesParams `form:"invoices"`
+ // Settings that apply across payment methods for charging on the account.
+ Payments *AccountCreateSettingsPaymentsParams `form:"payments"`
+ // Settings specific to the account's payouts.
+ Payouts *AccountCreateSettingsPayoutsParams `form:"payouts"`
+ // Settings specific to the account's tax forms.
+ TaxForms *AccountCreateSettingsTaxFormsParams `form:"tax_forms"`
+ // Settings specific to the account's Treasury FinancialAccounts.
+ Treasury *AccountCreateSettingsTreasuryParams `form:"treasury"`
+}
+
+// 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 AccountCreateTOSAcceptanceParams 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"`
+}
+
+// With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users.
+// To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings).
+//
+// If you've already collected information for your connected accounts, you [can prefill that information](https://stripe.com/docs/connect/best-practices#onboarding) when
+// creating the account. Connect Onboarding won't ask for the prefilled information during account onboarding.
+// You can prefill any information on the account.
+type AccountCreateParams 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 *AccountCreateBusinessProfileParams `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 *AccountCreateCapabilitiesParams `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 *AccountCreateCompanyParams `form:"company"`
+ // A hash of configuration describing the account controller's attributes.
+ Controller *AccountCreateControllerParams `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 *AccountCreateDocumentsParams `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"`
+ // ExternalAccount *[todo({"shape":"primitive","primitive":"string"} | {"shape":"nullable","type":{"shape":"ref","namespaces":[],"ref":"AccountCreateExternalAccountParams"}} | {"shape":"nullable","type":{"shape":"ref","namespaces":[],"ref":"AccountCreateExternalAccountParams"}} | {"shape":"nullable","type":{"shape":"ref","namespaces":[],"ref":"AccountCreateExternalAccountParams"}})] `form:"external_account"`
+ // A hash of account group type to tokens. These are account groups this account should be added to.
+ Groups *AccountCreateGroupsParams `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"`
+ // A hash to configure risk controls on the account. Please see [this page for more details](https://stripe.com/connect/pausing-payments-or-payouts-on-connected-accounts).
+ RiskControls *AccountCreateRiskControlsParams `form:"risk_controls"`
+ // Options for customizing how the account functions within Stripe.
+ Settings *AccountCreateSettingsParams `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 *AccountCreateTOSAcceptanceParams `form:"tos_acceptance"`
+ // The type of Stripe account to create. May be one of `custom`, `express` or `standard`.
+ Type *string `form:"type"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *AccountCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *AccountCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// The applicant's gross annual revenue for its preceding fiscal year.
type AccountBusinessProfileAnnualRevenue struct {
// A non-negative integer representing the amount in the [smallest currency unit](https://stripe.com/currencies#zero-decimal).
diff --git a/accountlink.go b/accountlink.go
index 8db8768bce..75fd1d8af5 100644
--- a/accountlink.go
+++ b/accountlink.go
@@ -56,6 +56,38 @@ func (p *AccountLinkParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
+type AccountLinkCreateCollectionOptionsParams 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"`
+}
+
+// Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
+type AccountLinkCreateParams 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 *AccountLinkCreateCollectionOptionsParams `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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *AccountLinkCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Account Links are the means by which a Connect platform grants a connected account permission to access
// Stripe-hosted applications, such as Connect Onboarding.
//
diff --git a/accountnotice.go b/accountnotice.go
index 58d301824c..cdcf8f7da4 100644
--- a/accountnotice.go
+++ b/accountnotice.go
@@ -77,6 +77,55 @@ type AccountNoticeEmailParams struct {
Subject *string `form:"subject"`
}
+// Retrieves an AccountNotice object.
+type AccountNoticeRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *AccountNoticeRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Information about the email you sent.
+type AccountNoticeUpdateEmailParams struct {
+ // Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use.
+ PlainText *string `form:"plain_text"`
+ // Email address of the recipient.
+ Recipient *string `form:"recipient"`
+ // Subject of the email.
+ Subject *string `form:"subject"`
+}
+
+// Updates an AccountNotice object.
+type AccountNoticeUpdateParams struct {
+ Params `form:"*"`
+ // Information about the email you sent.
+ Email *AccountNoticeUpdateEmailParams `form:"email"`
+ // 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"`
+ // Date when you sent the notice.
+ SentAt *int64 `form:"sent_at"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *AccountNoticeUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *AccountNoticeUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Information about the email when sent.
type AccountNoticeEmail struct {
// Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use.
diff --git a/accountsession.go b/accountsession.go
index db62069612..927397c9e3 100644
--- a/accountsession.go
+++ b/accountsession.go
@@ -490,6 +490,490 @@ func (p *AccountSessionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsAccountManagementFeaturesParams 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"`
+}
+
+// Configuration for the account management embedded component.
+type AccountSessionCreateComponentsAccountManagementParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsAccountManagementFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsAccountOnboardingFeaturesParams 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"`
+}
+
+// Configuration for the account onboarding embedded component.
+type AccountSessionCreateComponentsAccountOnboardingParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsAccountOnboardingFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsAppInstallFeaturesParams struct {
+ // List of apps allowed to be enabled for this account session.
+ AllowedApps []*string `form:"allowed_apps"`
+}
+
+// Configuration for the app install component.
+type AccountSessionCreateComponentsAppInstallParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsAppInstallFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsAppViewportFeaturesParams struct {
+ // List of apps allowed to be enabled for this account session.
+ AllowedApps []*string `form:"allowed_apps"`
+}
+
+// Configuration for the app viewport component.
+type AccountSessionCreateComponentsAppViewportParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsAppViewportFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsBalancesFeaturesParams 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"`
+}
+
+// Configuration for the balances embedded component.
+type AccountSessionCreateComponentsBalancesParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsBalancesFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsCapitalFinancingFeaturesParams struct{}
+
+// Configuration for the capital financing embedded component.
+type AccountSessionCreateComponentsCapitalFinancingParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsCapitalFinancingFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsCapitalFinancingApplicationFeaturesParams struct{}
+
+// Configuration for the capital financing application embedded component.
+type AccountSessionCreateComponentsCapitalFinancingApplicationParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsCapitalFinancingApplicationFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsCapitalFinancingPromotionFeaturesParams struct{}
+
+// Configuration for the capital financing promotion embedded component.
+type AccountSessionCreateComponentsCapitalFinancingPromotionParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsCapitalFinancingPromotionFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsCapitalOverviewFeaturesParams struct{}
+
+// Configuration for the capital overview embedded component.
+type AccountSessionCreateComponentsCapitalOverviewParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsCapitalOverviewFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsDocumentsFeaturesParams struct{}
+
+// Configuration for the documents embedded component.
+type AccountSessionCreateComponentsDocumentsParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsDocumentsFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsExportTaxTransactionsFeaturesParams struct{}
+
+// Configuration for the export tax transactions embedded component.
+type AccountSessionCreateComponentsExportTaxTransactionsParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsExportTaxTransactionsFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsFinancialAccountFeaturesParams 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"`
+}
+
+// Configuration for the financial account embedded component.
+type AccountSessionCreateComponentsFinancialAccountParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsFinancialAccountFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsFinancialAccountTransactionsFeaturesParams struct {
+ // Whether to allow card spend dispute management features.
+ CardSpendDisputeManagement *bool `form:"card_spend_dispute_management"`
+}
+
+// Configuration for the financial account transactions embedded component.
+type AccountSessionCreateComponentsFinancialAccountTransactionsParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsFinancialAccountTransactionsFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsIssuingCardFeaturesParams 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"`
+}
+
+// Configuration for the issuing card embedded component.
+type AccountSessionCreateComponentsIssuingCardParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsIssuingCardFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsIssuingCardsListFeaturesParams 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"`
+}
+
+// Configuration for the issuing cards list embedded component.
+type AccountSessionCreateComponentsIssuingCardsListParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsIssuingCardsListFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsNotificationBannerFeaturesParams 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"`
+}
+
+// Configuration for the notification banner embedded component.
+type AccountSessionCreateComponentsNotificationBannerParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsNotificationBannerFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsPaymentDetailsFeaturesParams 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"`
+}
+
+// Configuration for the payment details embedded component.
+type AccountSessionCreateComponentsPaymentDetailsParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsPaymentDetailsFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsPaymentDisputesFeaturesParams struct {
+ // 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"`
+}
+
+// Configuration for the payment disputes embedded component.
+type AccountSessionCreateComponentsPaymentDisputesParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsPaymentDisputesFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsPaymentMethodSettingsFeaturesParams struct{}
+
+// Configuration for the payment method settings embedded component.
+type AccountSessionCreateComponentsPaymentMethodSettingsParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsPaymentMethodSettingsFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsPaymentsFeaturesParams 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"`
+}
+
+// Configuration for the payments embedded component.
+type AccountSessionCreateComponentsPaymentsParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsPaymentsFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsPayoutsFeaturesParams 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"`
+}
+
+// Configuration for the payouts embedded component.
+type AccountSessionCreateComponentsPayoutsParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsPayoutsFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsPayoutsListFeaturesParams struct{}
+
+// Configuration for the payouts list embedded component.
+type AccountSessionCreateComponentsPayoutsListParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsPayoutsListFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsProductTaxCodeSelectorFeaturesParams struct{}
+
+// Configuration for the product tax code selector embedded component.
+type AccountSessionCreateComponentsProductTaxCodeSelectorParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsProductTaxCodeSelectorFeaturesParams `form:"features"`
+}
+type AccountSessionCreateComponentsRecipientsFeaturesParams struct {
+ // Whether to allow sending money.
+ SendMoney *bool `form:"send_money"`
+}
+
+// Configuration for the recipients component.
+type AccountSessionCreateComponentsRecipientsParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ Features *AccountSessionCreateComponentsRecipientsFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsReportingChartFeaturesParams struct{}
+
+// Configuration for the reporting chart embedded component.
+type AccountSessionCreateComponentsReportingChartParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsReportingChartFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsTaxRegistrationsFeaturesParams struct{}
+
+// Configuration for the tax registrations embedded component.
+type AccountSessionCreateComponentsTaxRegistrationsParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsTaxRegistrationsFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsTaxSettingsFeaturesParams struct{}
+
+// Configuration for the tax settings embedded component.
+type AccountSessionCreateComponentsTaxSettingsParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsTaxSettingsFeaturesParams `form:"features"`
+}
+
+// The list of features enabled in the embedded component.
+type AccountSessionCreateComponentsTaxThresholdMonitoringFeaturesParams struct{}
+
+// Configuration for the tax threshold monitoring embedded component.
+type AccountSessionCreateComponentsTaxThresholdMonitoringParams struct {
+ // Whether the embedded component is enabled.
+ Enabled *bool `form:"enabled"`
+ // The list of features enabled in the embedded component.
+ Features *AccountSessionCreateComponentsTaxThresholdMonitoringFeaturesParams `form:"features"`
+}
+
+// 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 AccountSessionCreateComponentsParams struct {
+ // Configuration for the account management embedded component.
+ AccountManagement *AccountSessionCreateComponentsAccountManagementParams `form:"account_management"`
+ // Configuration for the account onboarding embedded component.
+ AccountOnboarding *AccountSessionCreateComponentsAccountOnboardingParams `form:"account_onboarding"`
+ // Configuration for the app install component.
+ AppInstall *AccountSessionCreateComponentsAppInstallParams `form:"app_install"`
+ // Configuration for the app viewport component.
+ AppViewport *AccountSessionCreateComponentsAppViewportParams `form:"app_viewport"`
+ // Configuration for the balances embedded component.
+ Balances *AccountSessionCreateComponentsBalancesParams `form:"balances"`
+ // Configuration for the capital financing embedded component.
+ CapitalFinancing *AccountSessionCreateComponentsCapitalFinancingParams `form:"capital_financing"`
+ // Configuration for the capital financing application embedded component.
+ CapitalFinancingApplication *AccountSessionCreateComponentsCapitalFinancingApplicationParams `form:"capital_financing_application"`
+ // Configuration for the capital financing promotion embedded component.
+ CapitalFinancingPromotion *AccountSessionCreateComponentsCapitalFinancingPromotionParams `form:"capital_financing_promotion"`
+ // Configuration for the capital overview embedded component.
+ CapitalOverview *AccountSessionCreateComponentsCapitalOverviewParams `form:"capital_overview"`
+ // Configuration for the documents embedded component.
+ Documents *AccountSessionCreateComponentsDocumentsParams `form:"documents"`
+ // Configuration for the export tax transactions embedded component.
+ ExportTaxTransactions *AccountSessionCreateComponentsExportTaxTransactionsParams `form:"export_tax_transactions"`
+ // Configuration for the financial account embedded component.
+ FinancialAccount *AccountSessionCreateComponentsFinancialAccountParams `form:"financial_account"`
+ // Configuration for the financial account transactions embedded component.
+ FinancialAccountTransactions *AccountSessionCreateComponentsFinancialAccountTransactionsParams `form:"financial_account_transactions"`
+ // Configuration for the issuing card embedded component.
+ IssuingCard *AccountSessionCreateComponentsIssuingCardParams `form:"issuing_card"`
+ // Configuration for the issuing cards list embedded component.
+ IssuingCardsList *AccountSessionCreateComponentsIssuingCardsListParams `form:"issuing_cards_list"`
+ // Configuration for the notification banner embedded component.
+ NotificationBanner *AccountSessionCreateComponentsNotificationBannerParams `form:"notification_banner"`
+ // Configuration for the payment details embedded component.
+ PaymentDetails *AccountSessionCreateComponentsPaymentDetailsParams `form:"payment_details"`
+ // Configuration for the payment disputes embedded component.
+ PaymentDisputes *AccountSessionCreateComponentsPaymentDisputesParams `form:"payment_disputes"`
+ // Configuration for the payment method settings embedded component.
+ PaymentMethodSettings *AccountSessionCreateComponentsPaymentMethodSettingsParams `form:"payment_method_settings"`
+ // Configuration for the payments embedded component.
+ Payments *AccountSessionCreateComponentsPaymentsParams `form:"payments"`
+ // Configuration for the payouts embedded component.
+ Payouts *AccountSessionCreateComponentsPayoutsParams `form:"payouts"`
+ // Configuration for the payouts list embedded component.
+ PayoutsList *AccountSessionCreateComponentsPayoutsListParams `form:"payouts_list"`
+ // Configuration for the product tax code selector embedded component.
+ ProductTaxCodeSelector *AccountSessionCreateComponentsProductTaxCodeSelectorParams `form:"product_tax_code_selector"`
+ // Configuration for the recipients component.
+ Recipients *AccountSessionCreateComponentsRecipientsParams `form:"recipients"`
+ // Configuration for the reporting chart embedded component.
+ ReportingChart *AccountSessionCreateComponentsReportingChartParams `form:"reporting_chart"`
+ // Configuration for the tax registrations embedded component.
+ TaxRegistrations *AccountSessionCreateComponentsTaxRegistrationsParams `form:"tax_registrations"`
+ // Configuration for the tax settings embedded component.
+ TaxSettings *AccountSessionCreateComponentsTaxSettingsParams `form:"tax_settings"`
+ // Configuration for the tax threshold monitoring embedded component.
+ TaxThresholdMonitoring *AccountSessionCreateComponentsTaxThresholdMonitoringParams `form:"tax_threshold_monitoring"`
+}
+
+// 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.
+type AccountSessionCreateParams 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 *AccountSessionCreateComponentsParams `form:"components"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *AccountSessionCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
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"`
diff --git a/applepaydomain.go b/applepaydomain.go
index cd5424de51..e2daf04860 100644
--- a/applepaydomain.go
+++ b/applepaydomain.go
@@ -32,6 +32,36 @@ func (p *ApplePayDomainListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Delete an apple pay domain.
+type ApplePayDomainDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieve an apple pay domain.
+type ApplePayDomainRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ApplePayDomainRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Create an apple pay domain.
+type ApplePayDomainCreateParams struct {
+ Params `form:"*"`
+ DomainName *string `form:"domain_name"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ApplePayDomainCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type ApplePayDomain struct {
APIResource
// Time at which the object was created. Measured in seconds since the Unix epoch.
diff --git a/applicationfee.go b/applicationfee.go
index 5e5d19f3b5..ae2e3e1981 100644
--- a/applicationfee.go
+++ b/applicationfee.go
@@ -47,6 +47,18 @@ func (p *ApplicationFeeParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.
+type ApplicationFeeRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ApplicationFeeRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.
type ApplicationFeeFeeSource struct {
// Charge ID that created this application fee.
diff --git a/apps_secret.go b/apps_secret.go
index ce2af32544..c394ec4d65 100644
--- a/apps_secret.go
+++ b/apps_secret.go
@@ -113,6 +113,34 @@ func (p *AppsSecretDeleteWhereParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// 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 AppsSecretCreateScopeParams 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"`
+}
+
+// Create or replace a secret in the secret store.
+type AppsSecretCreateParams 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 *AppsSecretCreateScopeParams `form:"scope"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *AppsSecretCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type AppsSecretScope struct {
// The secret scope type.
Type AppsSecretScopeType `json:"type"`
diff --git a/balance.go b/balance.go
index 55f44305f2..d27d4d3ad5 100644
--- a/balance.go
+++ b/balance.go
@@ -30,6 +30,20 @@ func (p *BalanceParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the current account balance, based on the authentication that was used to make the request.
+//
+// For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances).
+type BalanceRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BalanceRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// 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 BalanceAmount struct {
// Balance amount.
diff --git a/balancesettings.go b/balancesettings.go
index 69a182215a..402fd6b1d0 100644
--- a/balancesettings.go
+++ b/balancesettings.go
@@ -82,6 +82,64 @@ type BalanceSettingsSettlementTimingParams struct {
DelayDays *int64 `form:"delay_days"`
}
+// Retrieves balance settings for a given connected account.
+//
+// Related guide: [Making API calls for connected accounts](https://stripe.com/connect/authentication)
+type BalanceSettingsRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BalanceSettingsRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// 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.
+type BalanceSettingsUpdatePayoutsScheduleParams struct {
+ // 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 (required and applicable only if `interval` is `weekly`.)
+ WeeklyAnchor *string `form:"weekly_anchor"`
+}
+
+// Settings specific to the account's payouts.
+type BalanceSettingsUpdatePayoutsParams struct {
+ // 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 *BalanceSettingsUpdatePayoutsScheduleParams `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 related to the account's balance settlement timing.
+type BalanceSettingsUpdateSettlementTimingParams struct {
+ // The number of days charge funds are held before becoming available. 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 `payouts.schedule.interval` is `manual`. [Learn more about controlling payout delay days](https://stripe.com/connect/manage-payout-schedule).
+ DelayDays *int64 `form:"delay_days"`
+}
+
+// Updates balance settings for a given connected account.
+//
+// Related guide: [Making API calls for connected accounts](https://stripe.com/connect/authentication)
+type BalanceSettingsUpdateParams struct {
+ Params `form:"*"`
+ // 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"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Settings specific to the account's payouts.
+ Payouts *BalanceSettingsUpdatePayoutsParams `form:"payouts"`
+ // Settings related to the account's balance settlement timing.
+ SettlementTiming *BalanceSettingsUpdateSettlementTimingParams `form:"settlement_timing"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BalanceSettingsUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Details on when funds from charges are available, and when they are paid out to an external account. See our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation for details.
type BalanceSettingsPayoutsSchedule struct {
// How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.
diff --git a/balancetransaction.go b/balancetransaction.go
index 267ca4c541..983a737afa 100644
--- a/balancetransaction.go
+++ b/balancetransaction.go
@@ -163,6 +163,20 @@ func (p *BalanceTransactionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the balance transaction with the given ID.
+//
+// Note that this endpoint previously used the path /v1/balance/history/:id.
+type BalanceTransactionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BalanceTransactionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
type BalanceTransactionFeeDetail struct {
// Amount of the fee, in cents.
diff --git a/bankaccount.go b/bankaccount.go
index 988e8bd6d8..3f03be8c28 100644
--- a/bankaccount.go
+++ b/bankaccount.go
@@ -417,6 +417,113 @@ func (p *BankAccountListParams) AppendTo(body *form.Values, keyParts []string) {
body.Add(form.FormatKey(append(keyParts, "object")), "bank_account")
}
+// Delete a specified external account for a given account.
+type BankAccountDeleteParams struct {
+ Params `form:"*"`
+ Account *string `form:"-"` // Included in URL
+}
+
+// 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 BankAccountUpdateDocumentsBankAccountOwnershipVerificationParams 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"`
+}
+
+// Documents that may be submitted to satisfy various informational requests.
+type BankAccountUpdateDocumentsParams 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 *BankAccountUpdateDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification"`
+}
+
+// Updates the metadata, account holder name, account holder type of a bank account belonging to
+// a connected account and optionally sets it as the default for its currency. Other bank account
+// details are not editable by design.
+//
+// You can only update bank accounts when [account.controller.requirement_collection is application, which includes Custom accounts](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection).
+//
+// You can re-enable a disabled bank account by performing an update call without providing any
+// arguments or changes.
+type BankAccountUpdateParams struct {
+ Params `form:"*"`
+ 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 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"`
+ // 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 *BankAccountUpdateDocumentsParams `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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BankAccountUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *BankAccountUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// New creates a new bank account
+type BankAccountCreateParams struct {
+ Params `form:"*"`
+ Account *string `form:"-"` // Included in URL
+ Customer *string `form:"-"` // Included in URL
+ Token *string `form:"-"` // Included in URL
+ // The account number for the bank account, in string form. Must be a checking account.
+ AccountNumber *string `form:"account_number"`
+ // 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"`
+ // 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"`
+}
+
+// Get returns the details of a bank account.
+type BankAccountRetrieveParams struct {
+ Params `form:"*"`
+ Account *string `form:"-"` // Included in URL
+}
+
// Fields that are `currently_due` and need to be collected again because validation or verification failed.
type BankAccountFutureRequirementsError struct {
// The code for the type of error.
diff --git a/billing_alert.go b/billing_alert.go
index 8993f803ed..a9a325669f 100644
--- a/billing_alert.go
+++ b/billing_alert.go
@@ -129,6 +129,56 @@ func (p *BillingAlertDeactivateParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.
+type BillingAlertCreateUsageThresholdFilterParams 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 configuration of the usage threshold.
+type BillingAlertCreateUsageThresholdParams struct {
+ // The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.
+ Filters []*BillingAlertCreateUsageThresholdFilterParams `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"`
+}
+
+// Creates a billing alert
+type BillingAlertCreateParams 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 *BillingAlertCreateUsageThresholdParams `form:"usage_threshold"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingAlertCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Retrieves a billing alert given an ID
+type BillingAlertRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingAlertRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
type BillingAlertUsageThresholdFilter struct {
// Limit the scope of the alert to this customer ID
diff --git a/billing_creditbalancesummary.go b/billing_creditbalancesummary.go
index 2f468812a4..848df355b7 100644
--- a/billing_creditbalancesummary.go
+++ b/billing_creditbalancesummary.go
@@ -64,6 +64,48 @@ func (p *BillingCreditBalanceSummaryParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
+type BillingCreditBalanceSummaryRetrieveFilterApplicabilityScopePriceParams struct {
+ // The price ID this credit grant should apply to.
+ ID *string `form:"id"`
+}
+
+// The billing credit applicability scope for which to fetch credit balance summary.
+type BillingCreditBalanceSummaryRetrieveFilterApplicabilityScopeParams struct {
+ // A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
+ Prices []*BillingCreditBalanceSummaryRetrieveFilterApplicabilityScopePriceParams `form:"prices"`
+ // The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
+ PriceType *string `form:"price_type"`
+}
+
+// The filter criteria for the credit balance summary.
+type BillingCreditBalanceSummaryRetrieveFilterParams struct {
+ // The billing credit applicability scope for which to fetch credit balance summary.
+ ApplicabilityScope *BillingCreditBalanceSummaryRetrieveFilterApplicabilityScopeParams `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"`
+}
+
+// Retrieves the credit balance summary for a customer.
+type BillingCreditBalanceSummaryRetrieveParams struct {
+ Params `form:"*"`
+ // The customer for which to fetch credit balance summary.
+ Customer *string `form:"customer"`
+ // The account for which to fetch credit balance summary.
+ CustomerAccount *string `form:"customer_account"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The filter criteria for the credit balance summary.
+ Filter *BillingCreditBalanceSummaryRetrieveFilterParams `form:"filter"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingCreditBalanceSummaryRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The monetary amount.
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).
diff --git a/billing_creditbalancetransaction.go b/billing_creditbalancetransaction.go
index 2197cace1a..4c4b26721c 100644
--- a/billing_creditbalancetransaction.go
+++ b/billing_creditbalancetransaction.go
@@ -82,6 +82,18 @@ func (p *BillingCreditBalanceTransactionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves a credit balance transaction.
+type BillingCreditBalanceTransactionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingCreditBalanceTransactionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The monetary amount.
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).
diff --git a/billing_creditgrant.go b/billing_creditgrant.go
index 669931efe5..57467d535d 100644
--- a/billing_creditgrant.go
+++ b/billing_creditgrant.go
@@ -150,6 +150,120 @@ func (p *BillingCreditGrantVoidGrantParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// The monetary amount.
+type BillingCreditGrantCreateAmountMonetaryParams 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"`
+}
+
+// Amount of this credit grant.
+type BillingCreditGrantCreateAmountParams struct {
+ // The monetary amount.
+ Monetary *BillingCreditGrantCreateAmountMonetaryParams `form:"monetary"`
+ // Specify the type of this amount. We currently only support `monetary` billing credits.
+ Type *string `form:"type"`
+}
+
+// A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
+type BillingCreditGrantCreateApplicabilityConfigScopePriceParams struct {
+ // The price ID this credit grant should apply to.
+ ID *string `form:"id"`
+}
+
+// Specify the scope of this applicability config.
+type BillingCreditGrantCreateApplicabilityConfigScopeParams struct {
+ // A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
+ Prices []*BillingCreditGrantCreateApplicabilityConfigScopePriceParams `form:"prices"`
+ // The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
+ PriceType *string `form:"price_type"`
+}
+
+// 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 BillingCreditGrantCreateApplicabilityConfigParams struct {
+ // Specify the scope of this applicability config.
+ Scope *BillingCreditGrantCreateApplicabilityConfigScopeParams `form:"scope"`
+}
+
+// Creates a credit grant.
+type BillingCreditGrantCreateParams struct {
+ Params `form:"*"`
+ // Amount of this credit grant.
+ Amount *BillingCreditGrantCreateAmountParams `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 *BillingCreditGrantCreateApplicabilityConfigParams `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"`
+ // ID of the account to receive the billing credits.
+ CustomerAccount *string `form:"customer_account"`
+ // 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 expire. If not specified, the billing credits don't 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingCreditGrantCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *BillingCreditGrantCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves a credit grant.
+type BillingCreditGrantRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingCreditGrantRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates a credit grant.
+type BillingCreditGrantUpdateParams struct {
+ Params `form:"*"`
+ // 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 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingCreditGrantUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *BillingCreditGrantUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// The monetary amount.
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).
diff --git a/billing_meter.go b/billing_meter.go
index fcb15122cf..1e7cbc2478 100644
--- a/billing_meter.go
+++ b/billing_meter.go
@@ -126,6 +126,76 @@ func (p *BillingMeterReactivateParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Fields that specify how to map a meter event to a customer.
+type BillingMeterCreateCustomerMappingParams 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"`
+}
+
+// The default settings to aggregate a meter's events with.
+type BillingMeterCreateDefaultAggregationParams struct {
+ // Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value and `last` to take the last event's value in the window.
+ Formula *string `form:"formula"`
+}
+
+// Fields that specify how to calculate a meter event's value.
+type BillingMeterCreateValueSettingsParams 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"`
+}
+
+// Creates a billing meter.
+type BillingMeterCreateParams struct {
+ Params `form:"*"`
+ // Fields that specify how to map a meter event to a customer.
+ CustomerMapping *BillingMeterCreateCustomerMappingParams `form:"customer_mapping"`
+ // The default settings to aggregate a meter's events with.
+ DefaultAggregation *BillingMeterCreateDefaultAggregationParams `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 *BillingMeterCreateValueSettingsParams `form:"value_settings"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingMeterCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Retrieves a billing meter given an ID.
+type BillingMeterRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingMeterRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates a billing meter.
+type BillingMeterUpdateParams struct {
+ Params `form:"*"`
+ // The meter's name. Not visible to the customer.
+ DisplayName *string `form:"display_name"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingMeterUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
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"`
diff --git a/billing_meterevent.go b/billing_meterevent.go
index e16178f892..227417b881 100644
--- a/billing_meterevent.go
+++ b/billing_meterevent.go
@@ -26,6 +26,26 @@ func (p *BillingMeterEventParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Creates a billing meter event.
+type BillingMeterEventCreateParams 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingMeterEventCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// 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 BillingMeterEvent struct {
APIResource
diff --git a/billing_metereventadjustment.go b/billing_metereventadjustment.go
index 6121355c8c..43a4abe796 100644
--- a/billing_metereventadjustment.go
+++ b/billing_metereventadjustment.go
@@ -47,6 +47,30 @@ func (p *BillingMeterEventAdjustmentParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Specifies which event to cancel.
+type BillingMeterEventAdjustmentCreateCancelParams struct {
+ // Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
+ Identifier *string `form:"identifier"`
+}
+
+// Creates a billing meter event adjustment.
+type BillingMeterEventAdjustmentCreateParams struct {
+ Params `form:"*"`
+ // Specifies which event to cancel.
+ Cancel *BillingMeterEventAdjustmentCreateCancelParams `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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingMeterEventAdjustmentCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Specifies which event to cancel.
type BillingMeterEventAdjustmentCancel struct {
// Unique identifier for the event.
diff --git a/billingportal_configuration.go b/billingportal_configuration.go
index 7c3db0f08c..5194a4a044 100644
--- a/billingportal_configuration.go
+++ b/billingportal_configuration.go
@@ -239,6 +239,292 @@ func (p *BillingPortalConfigurationParams) AddMetadata(key string, value string)
p.Metadata[key] = value
}
+// The business information shown to customers in the portal.
+type BillingPortalConfigurationCreateBusinessProfileParams 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"`
+}
+
+// Information about updating the customer details in the portal.
+type BillingPortalConfigurationCreateFeaturesCustomerUpdateParams 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 showing the billing history in the portal.
+type BillingPortalConfigurationCreateFeaturesInvoiceHistoryParams struct {
+ // Whether the feature is enabled.
+ Enabled *bool `form:"enabled"`
+}
+
+// Information about updating payment methods in the portal.
+type BillingPortalConfigurationCreateFeaturesPaymentMethodUpdateParams struct {
+ // Whether the feature is enabled.
+ Enabled *bool `form:"enabled"`
+}
+
+// Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+type BillingPortalConfigurationCreateFeaturesSubscriptionCancelCancellationReasonParams 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"`
+}
+
+// Information about canceling subscriptions in the portal.
+type BillingPortalConfigurationCreateFeaturesSubscriptionCancelParams struct {
+ // Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+ CancellationReason *BillingPortalConfigurationCreateFeaturesSubscriptionCancelCancellationReasonParams `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"`
+}
+
+// The list of up to 10 products that support subscription updates.
+type BillingPortalConfigurationCreateFeaturesSubscriptionUpdateProductParams 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"`
+}
+
+// List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+type BillingPortalConfigurationCreateFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionParams struct {
+ // The type of condition.
+ Type *string `form:"type"`
+}
+
+// Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
+type BillingPortalConfigurationCreateFeaturesSubscriptionUpdateScheduleAtPeriodEndParams struct {
+ // List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+ Conditions []*BillingPortalConfigurationCreateFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionParams `form:"conditions"`
+}
+
+// Information about updating subscriptions in the portal.
+type BillingPortalConfigurationCreateFeaturesSubscriptionUpdateParams 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 []*BillingPortalConfigurationCreateFeaturesSubscriptionUpdateProductParams `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 *BillingPortalConfigurationCreateFeaturesSubscriptionUpdateScheduleAtPeriodEndParams `form:"schedule_at_period_end"`
+}
+
+// Information about the features available in the portal.
+type BillingPortalConfigurationCreateFeaturesParams struct {
+ // Information about updating the customer details in the portal.
+ CustomerUpdate *BillingPortalConfigurationCreateFeaturesCustomerUpdateParams `form:"customer_update"`
+ // Information about showing the billing history in the portal.
+ InvoiceHistory *BillingPortalConfigurationCreateFeaturesInvoiceHistoryParams `form:"invoice_history"`
+ // Information about updating payment methods in the portal.
+ PaymentMethodUpdate *BillingPortalConfigurationCreateFeaturesPaymentMethodUpdateParams `form:"payment_method_update"`
+ // Information about canceling subscriptions in the portal.
+ SubscriptionCancel *BillingPortalConfigurationCreateFeaturesSubscriptionCancelParams `form:"subscription_cancel"`
+ // Information about updating subscriptions in the portal.
+ SubscriptionUpdate *BillingPortalConfigurationCreateFeaturesSubscriptionUpdateParams `form:"subscription_update"`
+}
+
+// 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 BillingPortalConfigurationCreateLoginPageParams 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.
+ Enabled *bool `form:"enabled"`
+}
+
+// Creates a configuration that describes the functionality and behavior of a PortalSession
+type BillingPortalConfigurationCreateParams struct {
+ Params `form:"*"`
+ // The business information shown to customers in the portal.
+ BusinessProfile *BillingPortalConfigurationCreateBusinessProfileParams `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 *BillingPortalConfigurationCreateFeaturesParams `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 *BillingPortalConfigurationCreateLoginPageParams `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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingPortalConfigurationCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *BillingPortalConfigurationCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves a configuration that describes the functionality of the customer portal.
+type BillingPortalConfigurationRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingPortalConfigurationRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// The business information shown to customers in the portal.
+type BillingPortalConfigurationUpdateBusinessProfileParams 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"`
+}
+
+// Information about updating the customer details in the portal.
+type BillingPortalConfigurationUpdateFeaturesCustomerUpdateParams 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 showing the billing history in the portal.
+type BillingPortalConfigurationUpdateFeaturesInvoiceHistoryParams struct {
+ // Whether the feature is enabled.
+ Enabled *bool `form:"enabled"`
+}
+
+// Information about updating payment methods in the portal.
+type BillingPortalConfigurationUpdateFeaturesPaymentMethodUpdateParams struct {
+ // Whether the feature is enabled.
+ Enabled *bool `form:"enabled"`
+}
+
+// Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+type BillingPortalConfigurationUpdateFeaturesSubscriptionCancelCancellationReasonParams 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"`
+}
+
+// Information about canceling subscriptions in the portal.
+type BillingPortalConfigurationUpdateFeaturesSubscriptionCancelParams struct {
+ // Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
+ CancellationReason *BillingPortalConfigurationUpdateFeaturesSubscriptionCancelCancellationReasonParams `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"`
+}
+
+// The list of up to 10 products that support subscription updates.
+type BillingPortalConfigurationUpdateFeaturesSubscriptionUpdateProductParams 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"`
+}
+
+// List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+type BillingPortalConfigurationUpdateFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionParams struct {
+ // The type of condition.
+ Type *string `form:"type"`
+}
+
+// Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
+type BillingPortalConfigurationUpdateFeaturesSubscriptionUpdateScheduleAtPeriodEndParams struct {
+ // List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
+ Conditions []*BillingPortalConfigurationUpdateFeaturesSubscriptionUpdateScheduleAtPeriodEndConditionParams `form:"conditions"`
+}
+
+// Information about updating subscriptions in the portal.
+type BillingPortalConfigurationUpdateFeaturesSubscriptionUpdateParams 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 []*BillingPortalConfigurationUpdateFeaturesSubscriptionUpdateProductParams `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 *BillingPortalConfigurationUpdateFeaturesSubscriptionUpdateScheduleAtPeriodEndParams `form:"schedule_at_period_end"`
+}
+
+// Information about the features available in the portal.
+type BillingPortalConfigurationUpdateFeaturesParams struct {
+ // Information about updating the customer details in the portal.
+ CustomerUpdate *BillingPortalConfigurationUpdateFeaturesCustomerUpdateParams `form:"customer_update"`
+ // Information about showing the billing history in the portal.
+ InvoiceHistory *BillingPortalConfigurationUpdateFeaturesInvoiceHistoryParams `form:"invoice_history"`
+ // Information about updating payment methods in the portal.
+ PaymentMethodUpdate *BillingPortalConfigurationUpdateFeaturesPaymentMethodUpdateParams `form:"payment_method_update"`
+ // Information about canceling subscriptions in the portal.
+ SubscriptionCancel *BillingPortalConfigurationUpdateFeaturesSubscriptionCancelParams `form:"subscription_cancel"`
+ // Information about updating subscriptions in the portal.
+ SubscriptionUpdate *BillingPortalConfigurationUpdateFeaturesSubscriptionUpdateParams `form:"subscription_update"`
+}
+
+// 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 BillingPortalConfigurationUpdateLoginPageParams 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"`
+}
+
+// Updates a configuration that describes the functionality of the customer portal.
+type BillingPortalConfigurationUpdateParams 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 *BillingPortalConfigurationUpdateBusinessProfileParams `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 *BillingPortalConfigurationUpdateFeaturesParams `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 *BillingPortalConfigurationUpdateLoginPageParams `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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingPortalConfigurationUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *BillingPortalConfigurationUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type BillingPortalConfigurationBusinessProfile struct {
// The messaging shown to customers in the portal.
Headline string `json:"headline"`
diff --git a/billingportal_session.go b/billingportal_session.go
index ae8a4d73bf..d20c7c0918 100644
--- a/billingportal_session.go
+++ b/billingportal_session.go
@@ -153,6 +153,124 @@ func (p *BillingPortalSessionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Configuration when `after_completion.type=hosted_confirmation`.
+type BillingPortalSessionCreateFlowDataAfterCompletionHostedConfirmationParams struct {
+ // A custom message to display to the customer after the flow is completed.
+ CustomMessage *string `form:"custom_message"`
+}
+
+// Configuration when `after_completion.type=redirect`.
+type BillingPortalSessionCreateFlowDataAfterCompletionRedirectParams struct {
+ // The URL the customer will be redirected to after the flow is completed.
+ ReturnURL *string `form:"return_url"`
+}
+
+// Behavior after the flow is completed.
+type BillingPortalSessionCreateFlowDataAfterCompletionParams struct {
+ // Configuration when `after_completion.type=hosted_confirmation`.
+ HostedConfirmation *BillingPortalSessionCreateFlowDataAfterCompletionHostedConfirmationParams `form:"hosted_confirmation"`
+ // Configuration when `after_completion.type=redirect`.
+ Redirect *BillingPortalSessionCreateFlowDataAfterCompletionRedirectParams `form:"redirect"`
+ // The specified behavior after the flow is completed.
+ Type *string `form:"type"`
+}
+
+// Configuration when `retention.type=coupon_offer`.
+type BillingPortalSessionCreateFlowDataSubscriptionCancelRetentionCouponOfferParams struct {
+ // The ID of the coupon to be offered.
+ Coupon *string `form:"coupon"`
+}
+
+// Specify a retention strategy to be used in the cancellation flow.
+type BillingPortalSessionCreateFlowDataSubscriptionCancelRetentionParams struct {
+ // Configuration when `retention.type=coupon_offer`.
+ CouponOffer *BillingPortalSessionCreateFlowDataSubscriptionCancelRetentionCouponOfferParams `form:"coupon_offer"`
+ // Type of retention strategy to use with the customer.
+ Type *string `form:"type"`
+}
+
+// Configuration when `flow_data.type=subscription_cancel`.
+type BillingPortalSessionCreateFlowDataSubscriptionCancelParams struct {
+ // Specify a retention strategy to be used in the cancellation flow.
+ Retention *BillingPortalSessionCreateFlowDataSubscriptionCancelRetentionParams `form:"retention"`
+ // The ID of the subscription to be canceled.
+ Subscription *string `form:"subscription"`
+}
+
+// Configuration when `flow_data.type=subscription_update`.
+type BillingPortalSessionCreateFlowDataSubscriptionUpdateParams struct {
+ // The ID of the subscription to be updated.
+ Subscription *string `form:"subscription"`
+}
+
+// The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
+type BillingPortalSessionCreateFlowDataSubscriptionUpdateConfirmDiscountParams 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 [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 BillingPortalSessionCreateFlowDataSubscriptionUpdateConfirmItemParams 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"`
+}
+
+// Configuration when `flow_data.type=subscription_update_confirm`.
+type BillingPortalSessionCreateFlowDataSubscriptionUpdateConfirmParams struct {
+ // The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
+ Discounts []*BillingPortalSessionCreateFlowDataSubscriptionUpdateConfirmDiscountParams `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 []*BillingPortalSessionCreateFlowDataSubscriptionUpdateConfirmItemParams `form:"items"`
+ // The ID of the subscription to be updated.
+ Subscription *string `form:"subscription"`
+}
+
+// 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 BillingPortalSessionCreateFlowDataParams struct {
+ // Behavior after the flow is completed.
+ AfterCompletion *BillingPortalSessionCreateFlowDataAfterCompletionParams `form:"after_completion"`
+ // Configuration when `flow_data.type=subscription_cancel`.
+ SubscriptionCancel *BillingPortalSessionCreateFlowDataSubscriptionCancelParams `form:"subscription_cancel"`
+ // Configuration when `flow_data.type=subscription_update`.
+ SubscriptionUpdate *BillingPortalSessionCreateFlowDataSubscriptionUpdateParams `form:"subscription_update"`
+ // Configuration when `flow_data.type=subscription_update_confirm`.
+ SubscriptionUpdateConfirm *BillingPortalSessionCreateFlowDataSubscriptionUpdateConfirmParams `form:"subscription_update_confirm"`
+ // Type of flow that the customer will go through.
+ Type *string `form:"type"`
+}
+
+// Creates a session of the customer portal.
+type BillingPortalSessionCreateParams struct {
+ Params `form:"*"`
+ // The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.
+ Configuration *string `form:"configuration"`
+ // The ID of an existing customer.
+ Customer *string `form:"customer"`
+ // The ID of an existing account.
+ CustomerAccount *string `form:"customer_account"`
+ // 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 *BillingPortalSessionCreateFlowDataParams `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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *BillingPortalSessionCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Configuration when `after_completion.type=hosted_confirmation`.
type BillingPortalSessionFlowAfterCompletionHostedConfirmation struct {
// A custom message to display to the customer after the flow is completed.
diff --git a/capability.go b/capability.go
index f0bdbc5a0f..0980137846 100644
--- a/capability.go
+++ b/capability.go
@@ -82,6 +82,36 @@ func (p *CapabilityParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves information about the specified Account Capability.
+type CapabilityRetrieveParams struct {
+ Params `form:"*"`
+ Account *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CapabilityRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates an existing Account Capability. Request or remove a capability by updating its requested parameter.
+type CapabilityUpdateParams 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CapabilityUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
type CapabilityFutureRequirementsAlternative struct {
// Fields that can be provided to satisfy all fields in `original_fields_due`.
diff --git a/capital_financingoffer.go b/capital_financingoffer.go
index a1daf0fb8e..f7430e72f6 100644
--- a/capital_financingoffer.go
+++ b/capital_financingoffer.go
@@ -106,6 +106,18 @@ func (p *CapitalFinancingOfferMarkDeliveredParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Get the details of the financing offer
+type CapitalFinancingOfferRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CapitalFinancingOfferRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// This is an object representing the terms of an offer of financing from
// Stripe Capital to a Connected account. This resource represents
// the terms accepted by the Connected account, which may differ from those
diff --git a/capital_financingsummary.go b/capital_financingsummary.go
index def16a6f2c..9c063b4910 100644
--- a/capital_financingsummary.go
+++ b/capital_financingsummary.go
@@ -28,6 +28,18 @@ func (p *CapitalFinancingSummaryParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieve the financing state for the account that was authenticated in the request.
+type CapitalFinancingSummaryRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CapitalFinancingSummaryRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The chronologically current repayment interval for the financing offer.
type CapitalFinancingSummaryDetailsCurrentRepaymentInterval struct {
// The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited.
diff --git a/capital_financingtransaction.go b/capital_financingtransaction.go
index 634b60dfe5..b41b9f8023 100644
--- a/capital_financingtransaction.go
+++ b/capital_financingtransaction.go
@@ -64,6 +64,18 @@ func (p *CapitalFinancingTransactionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves a financing transaction for a financing offer.
+type CapitalFinancingTransactionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CapitalFinancingTransactionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// This is an object representing a linked transaction on a Capital Financing Transaction.
type CapitalFinancingTransactionDetailsTransaction struct {
// The linked payment ID.
diff --git a/card.go b/card.go
index 432a4d78eb..81af7f0b07 100644
--- a/card.go
+++ b/card.go
@@ -293,6 +293,98 @@ func (p *CardListParams) AppendTo(body *form.Values, keyParts []string) {
}
}
+// Delete a specified source for a given customer.
+type CardDeleteParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CardDeleteParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+type CardUpdateOwnerParams 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"`
+}
+
+// Update a specified source for a given customer.
+type CardUpdateParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+ // The name of the person or business that owns the bank account.
+ AccountHolderName *string `form:"account_holder_name"`
+ // The type of entity that holds the account. This can be either `individual` or `company`.
+ AccountHolderType *string `form:"account_holder_type"`
+ // City/District/Suburb/Town/Village.
+ AddressCity *string `form:"address_city"`
+ // Billing address country, if provided when creating card.
+ AddressCountry *string `form:"address_country"`
+ // Address line 1 (Street address/PO Box/Company name).
+ AddressLine1 *string `form:"address_line1"`
+ // Address line 2 (Apartment/Suite/Unit/Building).
+ AddressLine2 *string `form:"address_line2"`
+ // State/County/Province/Region.
+ AddressState *string `form:"address_state"`
+ // ZIP or postal code.
+ AddressZip *string `form:"address_zip"`
+ // 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 *CardUpdateOwnerParams `form:"owner"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CardUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CardUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// New creates a new card
+type CardCreateParams struct {
+ Params `form:"*"`
+ Account *string `form:"-"` // Included in URL
+ Customer *string `form:"-"` // Included in URL
+ Token *string `form:"-"` // Included in URL
+}
+
+// Get returns the details of a card.
+type CardRetrieveParams struct {
+ Params `form:"*"`
+ Account *string `form:"-"` // Included in URL
+}
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"`
diff --git a/cashbalance.go b/cashbalance.go
index f7806f9824..2c947e8e5b 100644
--- a/cashbalance.go
+++ b/cashbalance.go
@@ -35,6 +35,39 @@ 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"`
}
+
+// Retrieves a customer's cash balance.
+type CashBalanceRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CashBalanceRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// A hash of settings for this cash balance.
+type CashBalanceUpdateSettingsParams 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"`
+}
+
+// Changes the settings on a customer's cash balance.
+type CashBalanceUpdateParams 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 *CashBalanceUpdateSettingsParams `form:"settings"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CashBalanceUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type CashBalanceSettings struct {
// The configuration for how funds that land in the customer cash balance are reconciled.
ReconciliationMode CashBalanceSettingsReconciliationMode `json:"reconciliation_mode"`
diff --git a/charge.go b/charge.go
index d7b38bb9aa..e6f8416dc8 100644
--- a/charge.go
+++ b/charge.go
@@ -1244,6 +1244,469 @@ func (p *ChargeCaptureParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+type ChargeCreateDestinationParams 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"`
+}
+
+// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+type ChargeCreateRadarOptionsParams 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"`
+}
+
+// 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 ChargeCreateTransferDataParams 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"`
+ // ID of an existing, connected Stripe account.
+ Destination *string `form:"destination"`
+}
+type ChargeCreateLevel3LineItemParams 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 ChargeCreateLevel3Params struct {
+ CustomerReference *string `form:"customer_reference"`
+ LineItems []*ChargeCreateLevel3LineItemParams `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"`
+}
+
+// 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.
+type ChargeCreateParams 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 charged in this request.
+ 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 *ChargeCreateDestinationParams `form:"destination"`
+ ExchangeRate *float64 `form:"exchange_rate"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ Level3 *ChargeCreateLevel3Params `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 *ChargeCreateRadarOptionsParams `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"`
+ // A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer.
+ Source *string `form:"source"`
+ // 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 *ChargeCreateTransferDataParams `form:"transfer_data"`
+ // A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options).
+ TransferGroup *string `form:"transfer_group"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ChargeCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *ChargeCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.
+type ChargeRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ChargeRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// 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 ChargeUpdateFraudDetailsParams struct {
+ // Either `safe` or `fraudulent`.
+ UserReport *string `form:"user_report"`
+}
+
+// Affiliate details for this purchase.
+type ChargeUpdatePaymentDetailsCarRentalAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type ChargeUpdatePaymentDetailsCarRentalDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type ChargeUpdatePaymentDetailsCarRentalDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *ChargeUpdatePaymentDetailsCarRentalDeliveryRecipientParams `form:"recipient"`
+}
+
+// The details of the passengers in the travel reservation
+type ChargeUpdatePaymentDetailsCarRentalDriverParams struct {
+ // Full name of the person or entity on the car reservation.
+ Name *string `form:"name"`
+}
+
+// Car rental details for this PaymentIntent.
+type ChargeUpdatePaymentDetailsCarRentalParams struct {
+ // Affiliate details for this purchase.
+ Affiliate *ChargeUpdatePaymentDetailsCarRentalAffiliateParams `form:"affiliate"`
+ // The booking number associated with the car rental.
+ BookingNumber *string `form:"booking_number"`
+ // Class code of the car.
+ CarClassCode *string `form:"car_class_code"`
+ // Make of the car.
+ CarMake *string `form:"car_make"`
+ // Model of the car.
+ CarModel *string `form:"car_model"`
+ // The name of the rental car company.
+ Company *string `form:"company"`
+ // The customer service phone number of the car rental company.
+ CustomerServicePhoneNumber *string `form:"customer_service_phone_number"`
+ // Number of days the car is being rented.
+ DaysRented *int64 `form:"days_rented"`
+ // Delivery details for this purchase.
+ Delivery *ChargeUpdatePaymentDetailsCarRentalDeliveryParams `form:"delivery"`
+ // The details of the passengers in the travel reservation
+ Drivers []*ChargeUpdatePaymentDetailsCarRentalDriverParams `form:"drivers"`
+ // List of additional charges being billed.
+ ExtraCharges []*string `form:"extra_charges"`
+ // Indicates if the customer did not keep nor cancel their booking.
+ NoShow *bool `form:"no_show"`
+ // Car pick-up address.
+ PickupAddress *AddressParams `form:"pickup_address"`
+ // Car pick-up time. Measured in seconds since the Unix epoch.
+ PickupAt *int64 `form:"pickup_at"`
+ // Rental rate.
+ RateAmount *int64 `form:"rate_amount"`
+ // The frequency at which the rate amount is applied. One of `day`, `week` or `month`
+ RateInterval *string `form:"rate_interval"`
+ // The name of the person or entity renting the car.
+ RenterName *string `form:"renter_name"`
+ // Car return address.
+ ReturnAddress *AddressParams `form:"return_address"`
+ // Car return time. Measured in seconds since the Unix epoch.
+ ReturnAt *int64 `form:"return_at"`
+ // Indicates whether the goods or services are tax-exempt or tax is not collected.
+ TaxExempt *bool `form:"tax_exempt"`
+}
+
+// Affiliate details for this purchase.
+type ChargeUpdatePaymentDetailsEventDetailsAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type ChargeUpdatePaymentDetailsEventDetailsDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type ChargeUpdatePaymentDetailsEventDetailsDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *ChargeUpdatePaymentDetailsEventDetailsDeliveryRecipientParams `form:"recipient"`
+}
+
+// Event details for this PaymentIntent
+type ChargeUpdatePaymentDetailsEventDetailsParams struct {
+ // Indicates if the tickets are digitally checked when entering the venue.
+ AccessControlledVenue *bool `form:"access_controlled_venue"`
+ // The event location's address.
+ Address *AddressParams `form:"address"`
+ // Affiliate details for this purchase.
+ Affiliate *ChargeUpdatePaymentDetailsEventDetailsAffiliateParams `form:"affiliate"`
+ // The name of the company
+ Company *string `form:"company"`
+ // Delivery details for this purchase.
+ Delivery *ChargeUpdatePaymentDetailsEventDetailsDeliveryParams `form:"delivery"`
+ // Event end time. Measured in seconds since the Unix epoch.
+ EndsAt *int64 `form:"ends_at"`
+ // Type of the event entertainment (concert, sports event etc)
+ Genre *string `form:"genre"`
+ // The name of the event.
+ Name *string `form:"name"`
+ // Event start time. Measured in seconds since the Unix epoch.
+ StartsAt *int64 `form:"starts_at"`
+}
+
+// Affiliate details for this purchase.
+type ChargeUpdatePaymentDetailsFlightAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type ChargeUpdatePaymentDetailsFlightDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type ChargeUpdatePaymentDetailsFlightDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *ChargeUpdatePaymentDetailsFlightDeliveryRecipientParams `form:"recipient"`
+}
+
+// The details of the passengers in the travel reservation.
+type ChargeUpdatePaymentDetailsFlightPassengerParams struct {
+ // Full name of the person or entity on the flight reservation.
+ Name *string `form:"name"`
+}
+
+// The individual flight segments associated with the trip.
+type ChargeUpdatePaymentDetailsFlightSegmentParams struct {
+ // The flight segment amount.
+ Amount *int64 `form:"amount"`
+ // The International Air Transport Association (IATA) airport code for the arrival airport.
+ ArrivalAirport *string `form:"arrival_airport"`
+ // The arrival time for the flight segment. Measured in seconds since the Unix epoch.
+ ArrivesAt *int64 `form:"arrives_at"`
+ // The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment.
+ Carrier *string `form:"carrier"`
+ // The departure time for the flight segment. Measured in seconds since the Unix epoch.
+ DepartsAt *int64 `form:"departs_at"`
+ // The International Air Transport Association (IATA) airport code for the departure airport.
+ DepartureAirport *string `form:"departure_airport"`
+ // The flight number associated with the segment
+ FlightNumber *string `form:"flight_number"`
+ // The fare class for the segment.
+ ServiceClass *string `form:"service_class"`
+}
+
+// Flight reservation details for this PaymentIntent
+type ChargeUpdatePaymentDetailsFlightParams struct {
+ // Affiliate details for this purchase.
+ Affiliate *ChargeUpdatePaymentDetailsFlightAffiliateParams `form:"affiliate"`
+ // The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking.
+ AgencyNumber *string `form:"agency_number"`
+ // The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket.
+ Carrier *string `form:"carrier"`
+ // Delivery details for this purchase.
+ Delivery *ChargeUpdatePaymentDetailsFlightDeliveryParams `form:"delivery"`
+ // The name of the person or entity on the reservation.
+ PassengerName *string `form:"passenger_name"`
+ // The details of the passengers in the travel reservation.
+ Passengers []*ChargeUpdatePaymentDetailsFlightPassengerParams `form:"passengers"`
+ // The individual flight segments associated with the trip.
+ Segments []*ChargeUpdatePaymentDetailsFlightSegmentParams `form:"segments"`
+ // The ticket number associated with the travel reservation.
+ TicketNumber *string `form:"ticket_number"`
+}
+
+// Affiliate details for this purchase.
+type ChargeUpdatePaymentDetailsLodgingAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type ChargeUpdatePaymentDetailsLodgingDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type ChargeUpdatePaymentDetailsLodgingDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *ChargeUpdatePaymentDetailsLodgingDeliveryRecipientParams `form:"recipient"`
+}
+
+// The details of the passengers in the travel reservation
+type ChargeUpdatePaymentDetailsLodgingPassengerParams struct {
+ // Full name of the person or entity on the lodging reservation.
+ Name *string `form:"name"`
+}
+
+// Lodging reservation details for this PaymentIntent
+type ChargeUpdatePaymentDetailsLodgingParams struct {
+ // The lodging location's address.
+ Address *AddressParams `form:"address"`
+ // The number of adults on the booking
+ Adults *int64 `form:"adults"`
+ // Affiliate details for this purchase.
+ Affiliate *ChargeUpdatePaymentDetailsLodgingAffiliateParams `form:"affiliate"`
+ // The booking number associated with the lodging reservation.
+ BookingNumber *string `form:"booking_number"`
+ // The lodging category
+ Category *string `form:"category"`
+ // Loding check-in time. Measured in seconds since the Unix epoch.
+ CheckinAt *int64 `form:"checkin_at"`
+ // Lodging check-out time. Measured in seconds since the Unix epoch.
+ CheckoutAt *int64 `form:"checkout_at"`
+ // The customer service phone number of the lodging company.
+ CustomerServicePhoneNumber *string `form:"customer_service_phone_number"`
+ // The daily lodging room rate.
+ DailyRoomRateAmount *int64 `form:"daily_room_rate_amount"`
+ // Delivery details for this purchase.
+ Delivery *ChargeUpdatePaymentDetailsLodgingDeliveryParams `form:"delivery"`
+ // List of additional charges being billed.
+ ExtraCharges []*string `form:"extra_charges"`
+ // Indicates whether the lodging location is compliant with the Fire Safety Act.
+ FireSafetyActCompliance *bool `form:"fire_safety_act_compliance"`
+ // The name of the lodging location.
+ Name *string `form:"name"`
+ // Indicates if the customer did not keep their booking while failing to cancel the reservation.
+ NoShow *bool `form:"no_show"`
+ // The number of rooms on the booking
+ NumberOfRooms *int64 `form:"number_of_rooms"`
+ // The details of the passengers in the travel reservation
+ Passengers []*ChargeUpdatePaymentDetailsLodgingPassengerParams `form:"passengers"`
+ // The phone number of the lodging location.
+ PropertyPhoneNumber *string `form:"property_phone_number"`
+ // The room class for this purchase.
+ RoomClass *string `form:"room_class"`
+ // The number of room nights
+ RoomNights *int64 `form:"room_nights"`
+ // The total tax amount associating with the room reservation.
+ TotalRoomTaxAmount *int64 `form:"total_room_tax_amount"`
+ // The total tax amount
+ TotalTaxAmount *int64 `form:"total_tax_amount"`
+}
+
+// Affiliate details for this purchase.
+type ChargeUpdatePaymentDetailsSubscriptionAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Subscription billing details for this purchase.
+type ChargeUpdatePaymentDetailsSubscriptionBillingIntervalParams struct {
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ Count *int64 `form:"count"`
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+}
+
+// Subscription details for this PaymentIntent
+type ChargeUpdatePaymentDetailsSubscriptionParams struct {
+ // Affiliate details for this purchase.
+ Affiliate *ChargeUpdatePaymentDetailsSubscriptionAffiliateParams `form:"affiliate"`
+ // Info whether the subscription will be auto renewed upon expiry.
+ AutoRenewal *bool `form:"auto_renewal"`
+ // Subscription billing details for this purchase.
+ BillingInterval *ChargeUpdatePaymentDetailsSubscriptionBillingIntervalParams `form:"billing_interval"`
+ // Subscription end time. Measured in seconds since the Unix epoch.
+ EndsAt *int64 `form:"ends_at"`
+ // Name of the product on subscription. e.g. Apple Music Subscription
+ Name *string `form:"name"`
+ // Subscription start time. Measured in seconds since the Unix epoch.
+ StartsAt *int64 `form:"starts_at"`
+}
+
+// Provides industry-specific information about the charge.
+type ChargeUpdatePaymentDetailsParams struct {
+ // Car rental details for this PaymentIntent.
+ CarRental *ChargeUpdatePaymentDetailsCarRentalParams `form:"car_rental"`
+ // Event details for this PaymentIntent
+ EventDetails *ChargeUpdatePaymentDetailsEventDetailsParams `form:"event_details"`
+ // Flight reservation details for this PaymentIntent
+ Flight *ChargeUpdatePaymentDetailsFlightParams `form:"flight"`
+ // Lodging reservation details for this PaymentIntent
+ Lodging *ChargeUpdatePaymentDetailsLodgingParams `form:"lodging"`
+ // Subscription details for this PaymentIntent
+ Subscription *ChargeUpdatePaymentDetailsSubscriptionParams `form:"subscription"`
+}
+
+// Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+type ChargeUpdateParams struct {
+ Params `form:"*"`
+ // 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"`
+ // 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 *ChargeUpdateFraudDetailsParams `form:"fraud_details"`
+ // 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"`
+ // Provides industry-specific information about the charge.
+ PaymentDetails *ChargeUpdatePaymentDetailsParams `form:"payment_details"`
+ // This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.
+ ReceiptEmail *string `form:"receipt_email"`
+ // Shipping information for the charge. Helps prevent fraud on charges for physical goods.
+ Shipping *ShippingDetailsParams `form:"shipping"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ChargeUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *ChargeUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type ChargeBillingDetails struct {
// Billing address.
Address *Address `json:"address"`
diff --git a/checkout_session.go b/checkout_session.go
index 27ce97faf9..a9e2ae8ccd 100644
--- a/checkout_session.go
+++ b/checkout_session.go
@@ -2944,6 +2944,1753 @@ func (p *CheckoutSessionExpireParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
+type CheckoutSessionCreateAdaptivePricingParams 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"`
+}
+
+// Configure a Checkout Session that can be used to recover an expired session.
+type CheckoutSessionCreateAfterExpirationRecoveryParams 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 actions after a Checkout Session has expired.
+type CheckoutSessionCreateAfterExpirationParams struct {
+ // Configure a Checkout Session that can be used to recover an expired session.
+ Recovery *CheckoutSessionCreateAfterExpirationRecoveryParams `form:"recovery"`
+}
+
+// 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 CheckoutSessionCreateAutomaticTaxLiabilityParams 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"`
+}
+
+// Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions.
+type CheckoutSessionCreateAutomaticTaxParams 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 *CheckoutSessionCreateAutomaticTaxLiabilityParams `form:"liability"`
+}
+
+// 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 CheckoutSessionCreateConsentCollectionPaymentMethodReuseAgreementParams 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"`
+}
+
+// Configure fields for the Checkout Session to gather active consent from customers.
+type CheckoutSessionCreateConsentCollectionParams 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 *CheckoutSessionCreateConsentCollectionPaymentMethodReuseAgreementParams `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"`
+}
+
+// The options available for the customer to select. Up to 200 options allowed.
+type CheckoutSessionCreateCustomFieldDropdownOptionParams 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"`
+}
+
+// Configuration for `type=dropdown` fields.
+type CheckoutSessionCreateCustomFieldDropdownParams 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 []*CheckoutSessionCreateCustomFieldDropdownOptionParams `form:"options"`
+}
+
+// The label for the field, displayed to the customer.
+type CheckoutSessionCreateCustomFieldLabelParams 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"`
+}
+
+// Configuration for `type=numeric` fields.
+type CheckoutSessionCreateCustomFieldNumericParams 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 CheckoutSessionCreateCustomFieldTextParams 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"`
+}
+
+// Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+type CheckoutSessionCreateCustomFieldParams struct {
+ // Configuration for `type=dropdown` fields.
+ Dropdown *CheckoutSessionCreateCustomFieldDropdownParams `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 *CheckoutSessionCreateCustomFieldLabelParams `form:"label"`
+ // Configuration for `type=numeric` fields.
+ Numeric *CheckoutSessionCreateCustomFieldNumericParams `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 *CheckoutSessionCreateCustomFieldTextParams `form:"text"`
+ // The type of the field.
+ Type *string `form:"type"`
+}
+
+// Custom text that should be displayed after the payment confirmation button.
+type CheckoutSessionCreateCustomTextAfterSubmitParams 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 CheckoutSessionCreateCustomTextShippingAddressParams 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 CheckoutSessionCreateCustomTextSubmitParams 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 CheckoutSessionCreateCustomTextTermsOfServiceAcceptanceParams struct {
+ // Text may be up to 1200 characters in length.
+ Message *string `form:"message"`
+}
+
+// Display additional text for your customers using custom text.
+type CheckoutSessionCreateCustomTextParams struct {
+ // Custom text that should be displayed after the payment confirmation button.
+ AfterSubmit *CheckoutSessionCreateCustomTextAfterSubmitParams `form:"after_submit"`
+ // Custom text that should be displayed alongside shipping address collection.
+ ShippingAddress *CheckoutSessionCreateCustomTextShippingAddressParams `form:"shipping_address"`
+ // Custom text that should be displayed alongside the payment confirmation button.
+ Submit *CheckoutSessionCreateCustomTextSubmitParams `form:"submit"`
+ // Custom text that should be displayed in place of the default terms of service agreement text.
+ TermsOfServiceAcceptance *CheckoutSessionCreateCustomTextTermsOfServiceAcceptanceParams `form:"terms_of_service_acceptance"`
+}
+
+// Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided.
+type CheckoutSessionCreateCustomerUpdateParams 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"`
+}
+
+// The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
+type CheckoutSessionCreateDiscountParams 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"`
+}
+
+// Default custom fields to be displayed on invoices for this customer.
+type CheckoutSessionCreateInvoiceCreationInvoiceDataCustomFieldParams 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 connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type CheckoutSessionCreateInvoiceCreationInvoiceDataIssuerParams 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"`
+}
+
+// Default options for invoice PDF rendering for this customer.
+type CheckoutSessionCreateInvoiceCreationInvoiceDataRenderingOptionsParams 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"`
+}
+
+// Parameters passed when creating invoices for payment-mode Checkout Sessions.
+type CheckoutSessionCreateInvoiceCreationInvoiceDataParams 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 []*CheckoutSessionCreateInvoiceCreationInvoiceDataCustomFieldParams `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 *CheckoutSessionCreateInvoiceCreationInvoiceDataIssuerParams `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 *CheckoutSessionCreateInvoiceCreationInvoiceDataRenderingOptionsParams `form:"rendering_options"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CheckoutSessionCreateInvoiceCreationInvoiceDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Generate a post-purchase Invoice for one-time payments.
+type CheckoutSessionCreateInvoiceCreationParams struct {
+ // Set to `true` to enable invoice creation.
+ Enabled *bool `form:"enabled"`
+ // Parameters passed when creating invoices for payment-mode Checkout Sessions.
+ InvoiceData *CheckoutSessionCreateInvoiceCreationInvoiceDataParams `form:"invoice_data"`
+}
+
+// When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
+type CheckoutSessionCreateLineItemAdjustableQuantityParams 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"`
+}
+
+// Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+type CheckoutSessionCreateLineItemPriceDataProductDataParams 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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CheckoutSessionCreateLineItemPriceDataProductDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// The recurring components of a price such as `interval` and `interval_count`.
+type CheckoutSessionCreateLineItemPriceDataRecurringParams 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"`
+}
+
+// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+type CheckoutSessionCreateLineItemPriceDataParams 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](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ Product *string `form:"product"`
+ // Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ ProductData *CheckoutSessionCreateLineItemPriceDataProductDataParams `form:"product_data"`
+ // The recurring components of a price such as `interval` and `interval_count`.
+ Recurring *CheckoutSessionCreateLineItemPriceDataRecurringParams `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"`
+}
+
+// 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 CheckoutSessionCreateLineItemParams struct {
+ // When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
+ AdjustableQuantity *CheckoutSessionCreateLineItemAdjustableQuantityParams `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"`
+ // 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 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 *CheckoutSessionCreateLineItemPriceDataParams `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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CheckoutSessionCreateLineItemParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order.
+type CheckoutSessionCreateOptionalItemAdjustableQuantityParams struct {
+ // Set to true if the quantity can be adjusted to any non-negative integer.
+ Enabled *bool `form:"enabled"`
+ // The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999.
+ Maximum *int64 `form:"maximum"`
+ // The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0.
+ Minimum *int64 `form:"minimum"`
+}
+
+// A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
+//
+// There is a maximum of 10 optional items allowed on a Checkout Session, and the existing limits on the number of line items allowed on a Checkout Session apply to the combined number of line items and optional items.
+//
+// For `payment` mode, there is a maximum of 100 combined line items and optional items, however it is recommended to consolidate items if there are more than a few dozen.
+//
+// For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices.
+type CheckoutSessionCreateOptionalItemParams struct {
+ // When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order.
+ AdjustableQuantity *CheckoutSessionCreateOptionalItemAdjustableQuantityParams `form:"adjustable_quantity"`
+ // The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ Price *string `form:"price"`
+ // The initial quantity of the line item created when a customer chooses to add this optional item to their order.
+ Quantity *int64 `form:"quantity"`
+}
+
+// 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 CheckoutSessionCreatePaymentIntentDataTransferDataParams 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"`
+}
+
+// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+type CheckoutSessionCreatePaymentIntentDataParams 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 amount captured. 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 *CheckoutSessionCreatePaymentIntentDataTransferDataParams `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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CheckoutSessionCreatePaymentIntentDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// This parameter allows you to set some attributes on the payment method created during a Checkout session.
+type CheckoutSessionCreatePaymentMethodDataParams 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"`
+}
+
+// Additional fields for Mandate creation
+type CheckoutSessionCreatePaymentMethodOptionsACSSDebitMandateOptionsParams 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"`
+}
+
+// contains details about the ACSS Debit payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsACSSDebitParams 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 *CheckoutSessionCreatePaymentMethodOptionsACSSDebitMandateOptionsParams `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 Affirm payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsAffirmParams 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 CheckoutSessionCreatePaymentMethodOptionsAfterpayClearpayParams 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 CheckoutSessionCreatePaymentMethodOptionsAlipayParams 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 CheckoutSessionCreatePaymentMethodOptionsAmazonPayParams 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 AU Becs Debit payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsAUBECSDebitParams 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"`
+}
+
+// Additional fields for Mandate creation
+type CheckoutSessionCreatePaymentMethodOptionsBACSDebitMandateOptionsParams 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"`
+}
+
+// contains details about the Bacs Debit payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsBACSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *CheckoutSessionCreatePaymentMethodOptionsBACSDebitMandateOptionsParams `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 Bancontact payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsBancontactParams 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 Boleto payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsBoletoParams 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"`
+}
+
+// Installment options for card payments
+type CheckoutSessionCreatePaymentMethodOptionsCardInstallmentsParams 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"`
+}
+
+// Restrictions to apply to the card payment method. For example, you can block specific card brands.
+type CheckoutSessionCreatePaymentMethodOptionsCardRestrictionsParams 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"`
+}
+
+// contains details about the Card payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsCardParams struct {
+ // Installment options for card payments
+ Installments *CheckoutSessionCreatePaymentMethodOptionsCardInstallmentsParams `form:"installments"`
+ // Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.
+ RequestDecrementalAuthorization *string `form:"request_decremental_authorization"`
+ // 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 *CheckoutSessionCreatePaymentMethodOptionsCardRestrictionsParams `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 Cashapp Pay payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsCashAppParams 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"`
+}
+
+// Configuration for eu_bank_transfer funding type.
+type CheckoutSessionCreatePaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams 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 the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+type CheckoutSessionCreatePaymentMethodOptionsCustomerBalanceBankTransferParams struct {
+ // Configuration for eu_bank_transfer funding type.
+ EUBankTransfer *CheckoutSessionCreatePaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `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"`
+}
+
+// contains details about the Customer Balance payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsCustomerBalanceParams struct {
+ // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ BankTransfer *CheckoutSessionCreatePaymentMethodOptionsCustomerBalanceBankTransferParams `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 EPS payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsEPSParams 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 CheckoutSessionCreatePaymentMethodOptionsFPXParams 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 CheckoutSessionCreatePaymentMethodOptionsGiropayParams 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 CheckoutSessionCreatePaymentMethodOptionsGrabpayParams 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 CheckoutSessionCreatePaymentMethodOptionsIDEALParams 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 Kakao Pay payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsKakaoPayParams 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 Klarna payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsKlarnaParams 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 Konbini payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsKonbiniParams 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 Korean card payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsKrCardParams 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 Link payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsLinkParams 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 CheckoutSessionCreatePaymentMethodOptionsMobilepayParams 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 CheckoutSessionCreatePaymentMethodOptionsMultibancoParams 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 Naver Pay payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsNaverPayParams 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 OXXO payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsOXXOParams 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 P24 payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsP24Params 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 Pay By Bank payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsPayByBankParams struct{}
+
+// contains details about the PAYCO payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsPaycoParams struct {
+ // Controls when the funds will be captured from the customer's account.
+ CaptureMethod *string `form:"capture_method"`
+}
+
+// contains details about the PayNow payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsPayNowParams 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 PayPal payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsPaypalParams 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"`
+ // 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.
+ ReferenceID *string `form:"reference_id"`
+ // 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"`
+ // The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
+ Subsellers []*string `form:"subsellers"`
+}
+
+// Additional fields for Mandate creation
+type CheckoutSessionCreatePaymentMethodOptionsPaytoMandateOptionsParams struct {
+ // Amount that will be collected. It is required when `amount_type` is `fixed`.
+ Amount *int64 `form:"amount"`
+ // The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively.
+ AmountType *string `form:"amount_type"`
+ // Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
+ EndDate *string `form:"end_date"`
+ // The periodicity at which payments will be collected.
+ PaymentSchedule *string `form:"payment_schedule"`
+ // The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.
+ PaymentsPerPeriod *int64 `form:"payments_per_period"`
+ // The purpose for which payments are made. Defaults to retail.
+ Purpose *string `form:"purpose"`
+ // Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
+ StartDate *string `form:"start_date"`
+}
+
+// contains details about the PayTo payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsPaytoParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *CheckoutSessionCreatePaymentMethodOptionsPaytoMandateOptionsParams `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"`
+}
+
+// contains details about the Pix payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsPixParams 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 RevolutPay payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsRevolutPayParams 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 Samsung Pay payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsSamsungPayParams struct {
+ // Controls when the funds will be captured from the customer's account.
+ CaptureMethod *string `form:"capture_method"`
+}
+
+// Additional fields for Mandate creation
+type CheckoutSessionCreatePaymentMethodOptionsSEPADebitMandateOptionsParams 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"`
+}
+
+// contains details about the Sepa Debit payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsSEPADebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *CheckoutSessionCreatePaymentMethodOptionsSEPADebitMandateOptionsParams `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 Sofort payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsSofortParams 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 Swish payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsSwishParams 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"`
+}
+
+// Additional fields for Financial Connections Session creation
+type CheckoutSessionCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsParams 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"`
+}
+
+// contains details about the Us Bank Account payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsUSBankAccountParams struct {
+ // Additional fields for Financial Connections Session creation
+ FinancialConnections *CheckoutSessionCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsParams `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 WeChat Pay payment method options.
+type CheckoutSessionCreatePaymentMethodOptionsWeChatPayParams 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"`
+}
+
+// Payment-method-specific configuration.
+type CheckoutSessionCreatePaymentMethodOptionsParams struct {
+ // contains details about the ACSS Debit payment method options.
+ ACSSDebit *CheckoutSessionCreatePaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
+ // contains details about the Affirm payment method options.
+ Affirm *CheckoutSessionCreatePaymentMethodOptionsAffirmParams `form:"affirm"`
+ // contains details about the Afterpay Clearpay payment method options.
+ AfterpayClearpay *CheckoutSessionCreatePaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // contains details about the Alipay payment method options.
+ Alipay *CheckoutSessionCreatePaymentMethodOptionsAlipayParams `form:"alipay"`
+ // contains details about the AmazonPay payment method options.
+ AmazonPay *CheckoutSessionCreatePaymentMethodOptionsAmazonPayParams `form:"amazon_pay"`
+ // contains details about the AU Becs Debit payment method options.
+ AUBECSDebit *CheckoutSessionCreatePaymentMethodOptionsAUBECSDebitParams `form:"au_becs_debit"`
+ // contains details about the Bacs Debit payment method options.
+ BACSDebit *CheckoutSessionCreatePaymentMethodOptionsBACSDebitParams `form:"bacs_debit"`
+ // contains details about the Bancontact payment method options.
+ Bancontact *CheckoutSessionCreatePaymentMethodOptionsBancontactParams `form:"bancontact"`
+ // contains details about the Boleto payment method options.
+ Boleto *CheckoutSessionCreatePaymentMethodOptionsBoletoParams `form:"boleto"`
+ // contains details about the Card payment method options.
+ Card *CheckoutSessionCreatePaymentMethodOptionsCardParams `form:"card"`
+ // contains details about the Cashapp Pay payment method options.
+ CashApp *CheckoutSessionCreatePaymentMethodOptionsCashAppParams `form:"cashapp"`
+ // contains details about the Customer Balance payment method options.
+ CustomerBalance *CheckoutSessionCreatePaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
+ // contains details about the EPS payment method options.
+ EPS *CheckoutSessionCreatePaymentMethodOptionsEPSParams `form:"eps"`
+ // contains details about the FPX payment method options.
+ FPX *CheckoutSessionCreatePaymentMethodOptionsFPXParams `form:"fpx"`
+ // contains details about the Giropay payment method options.
+ Giropay *CheckoutSessionCreatePaymentMethodOptionsGiropayParams `form:"giropay"`
+ // contains details about the Grabpay payment method options.
+ Grabpay *CheckoutSessionCreatePaymentMethodOptionsGrabpayParams `form:"grabpay"`
+ // contains details about the Ideal payment method options.
+ IDEAL *CheckoutSessionCreatePaymentMethodOptionsIDEALParams `form:"ideal"`
+ // contains details about the Kakao Pay payment method options.
+ KakaoPay *CheckoutSessionCreatePaymentMethodOptionsKakaoPayParams `form:"kakao_pay"`
+ // contains details about the Klarna payment method options.
+ Klarna *CheckoutSessionCreatePaymentMethodOptionsKlarnaParams `form:"klarna"`
+ // contains details about the Konbini payment method options.
+ Konbini *CheckoutSessionCreatePaymentMethodOptionsKonbiniParams `form:"konbini"`
+ // contains details about the Korean card payment method options.
+ KrCard *CheckoutSessionCreatePaymentMethodOptionsKrCardParams `form:"kr_card"`
+ // contains details about the Link payment method options.
+ Link *CheckoutSessionCreatePaymentMethodOptionsLinkParams `form:"link"`
+ // contains details about the Mobilepay payment method options.
+ Mobilepay *CheckoutSessionCreatePaymentMethodOptionsMobilepayParams `form:"mobilepay"`
+ // contains details about the Multibanco payment method options.
+ Multibanco *CheckoutSessionCreatePaymentMethodOptionsMultibancoParams `form:"multibanco"`
+ // contains details about the Naver Pay payment method options.
+ NaverPay *CheckoutSessionCreatePaymentMethodOptionsNaverPayParams `form:"naver_pay"`
+ // contains details about the OXXO payment method options.
+ OXXO *CheckoutSessionCreatePaymentMethodOptionsOXXOParams `form:"oxxo"`
+ // contains details about the P24 payment method options.
+ P24 *CheckoutSessionCreatePaymentMethodOptionsP24Params `form:"p24"`
+ // contains details about the Pay By Bank payment method options.
+ PayByBank *CheckoutSessionCreatePaymentMethodOptionsPayByBankParams `form:"pay_by_bank"`
+ // contains details about the PAYCO payment method options.
+ Payco *CheckoutSessionCreatePaymentMethodOptionsPaycoParams `form:"payco"`
+ // contains details about the PayNow payment method options.
+ PayNow *CheckoutSessionCreatePaymentMethodOptionsPayNowParams `form:"paynow"`
+ // contains details about the PayPal payment method options.
+ Paypal *CheckoutSessionCreatePaymentMethodOptionsPaypalParams `form:"paypal"`
+ // contains details about the PayTo payment method options.
+ Payto *CheckoutSessionCreatePaymentMethodOptionsPaytoParams `form:"payto"`
+ // contains details about the Pix payment method options.
+ Pix *CheckoutSessionCreatePaymentMethodOptionsPixParams `form:"pix"`
+ // contains details about the RevolutPay payment method options.
+ RevolutPay *CheckoutSessionCreatePaymentMethodOptionsRevolutPayParams `form:"revolut_pay"`
+ // contains details about the Samsung Pay payment method options.
+ SamsungPay *CheckoutSessionCreatePaymentMethodOptionsSamsungPayParams `form:"samsung_pay"`
+ // contains details about the Sepa Debit payment method options.
+ SEPADebit *CheckoutSessionCreatePaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
+ // contains details about the Sofort payment method options.
+ Sofort *CheckoutSessionCreatePaymentMethodOptionsSofortParams `form:"sofort"`
+ // contains details about the Swish payment method options.
+ Swish *CheckoutSessionCreatePaymentMethodOptionsSwishParams `form:"swish"`
+ // contains details about the Us Bank Account payment method options.
+ USBankAccount *CheckoutSessionCreatePaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
+ // contains details about the WeChat Pay payment method options.
+ WeChatPay *CheckoutSessionCreatePaymentMethodOptionsWeChatPayParams `form:"wechat_pay"`
+}
+
+// Permissions for updating the Checkout Session.
+type CheckoutSessionCreatePermissionsUpdateParams struct {
+ // Determines which entity is allowed to update the line items.
+ //
+ // Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items.
+ //
+ // When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API.
+ LineItems *string `form:"line_items"`
+ // Determines which entity is allowed to update the shipping details.
+ //
+ // Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
+ //
+ // When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
+ ShippingDetails *string `form:"shipping_details"`
+}
+
+// This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
+//
+// For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
+type CheckoutSessionCreatePermissionsParams struct {
+ // Permissions for updating the Checkout Session.
+ Update *CheckoutSessionCreatePermissionsUpdateParams `form:"update"`
+ // Determines which entity is allowed to update the line items.
+ //
+ // Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items.
+ //
+ // When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API.
+ UpdateLineItems *string `form:"update_line_items"`
+ // Determines which entity is allowed to update the shipping details.
+ //
+ // Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
+ //
+ // When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
+ UpdateShippingDetails *string `form:"update_shipping_details"`
+}
+
+// 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 CheckoutSessionCreatePhoneNumberCollectionParams struct {
+ // Set to `true` to enable phone number collection.
+ //
+ // Can only be set in `payment` and `subscription` mode.
+ Enabled *bool `form:"enabled"`
+}
+
+// Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
+type CheckoutSessionCreateSavedPaymentMethodOptionsParams 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"`
+}
+
+// A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
+type CheckoutSessionCreateSetupIntentDataParams 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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CheckoutSessionCreateSetupIntentDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// When set, provides configuration for Checkout to collect a shipping address from a customer.
+type CheckoutSessionCreateShippingAddressCollectionParams 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"`
+}
+
+// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+type CheckoutSessionCreateShippingOptionShippingRateDataDeliveryEstimateMaximumParams 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 CheckoutSessionCreateShippingOptionShippingRateDataDeliveryEstimateMinimumParams struct {
+ // A unit of time.
+ Unit *string `form:"unit"`
+ // Must be greater than 0.
+ Value *int64 `form:"value"`
+}
+
+// The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+type CheckoutSessionCreateShippingOptionShippingRateDataDeliveryEstimateParams struct {
+ // The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ Maximum *CheckoutSessionCreateShippingOptionShippingRateDataDeliveryEstimateMaximumParams `form:"maximum"`
+ // The lower bound of the estimated range. If empty, represents no lower bound.
+ Minimum *CheckoutSessionCreateShippingOptionShippingRateDataDeliveryEstimateMinimumParams `form:"minimum"`
+}
+
+// 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 CheckoutSessionCreateShippingOptionShippingRateDataFixedAmountCurrencyOptionsParams 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"`
+}
+
+// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+type CheckoutSessionCreateShippingOptionShippingRateDataFixedAmountParams 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]*CheckoutSessionCreateShippingOptionShippingRateDataFixedAmountCurrencyOptionsParams `form:"currency_options"`
+}
+
+// Parameters to be passed to Shipping Rate creation for this shipping option.
+type CheckoutSessionCreateShippingOptionShippingRateDataParams struct {
+ // The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ DeliveryEstimate *CheckoutSessionCreateShippingOptionShippingRateDataDeliveryEstimateParams `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 *CheckoutSessionCreateShippingOptionShippingRateDataFixedAmountParams `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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CheckoutSessionCreateShippingOptionShippingRateDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// The shipping rate options to apply to this Session. Up to a maximum of 5.
+type CheckoutSessionCreateShippingOptionParams 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 *CheckoutSessionCreateShippingOptionShippingRateDataParams `form:"shipping_rate_data"`
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type CheckoutSessionCreateSubscriptionDataInvoiceSettingsIssuerParams 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"`
+}
+
+// All invoices will be billed using the specified settings.
+type CheckoutSessionCreateSubscriptionDataInvoiceSettingsParams struct {
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *CheckoutSessionCreateSubscriptionDataInvoiceSettingsIssuerParams `form:"issuer"`
+}
+
+// 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 CheckoutSessionCreateSubscriptionDataTransferDataParams 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"`
+}
+
+// Defines how the subscription should behave when the user's free trial ends.
+type CheckoutSessionCreateSubscriptionDataTrialSettingsEndBehaviorParams 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"`
+}
+
+// Settings related to subscription trials.
+type CheckoutSessionCreateSubscriptionDataTrialSettingsParams struct {
+ // Defines how the subscription should behave when the user's free trial ends.
+ EndBehavior *CheckoutSessionCreateSubscriptionDataTrialSettingsEndBehaviorParams `form:"end_behavior"`
+}
+
+// A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
+type CheckoutSessionCreateSubscriptionDataParams 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 *CheckoutSessionCreateSubscriptionDataInvoiceSettingsParams `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 *CheckoutSessionCreateSubscriptionDataTransferDataParams `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 *CheckoutSessionCreateSubscriptionDataTrialSettingsParams `form:"trial_settings"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CheckoutSessionCreateSubscriptionDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Controls tax ID collection during checkout.
+type CheckoutSessionCreateTaxIDCollectionParams 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"`
+}
+
+// contains details about the Link wallet options.
+type CheckoutSessionCreateWalletOptionsLinkParams struct {
+ // Specifies whether Checkout should display Link as a payment option. By default, Checkout will display all the supported wallets that the Checkout Session was created with. This is the `auto` behavior, and it is the default choice.
+ Display *string `form:"display"`
+}
+
+// Wallet-specific configuration.
+type CheckoutSessionCreateWalletOptionsParams struct {
+ // contains details about the Link wallet options.
+ Link *CheckoutSessionCreateWalletOptionsLinkParams `form:"link"`
+}
+
+// Creates a Checkout Session object.
+type CheckoutSessionCreateParams struct {
+ Params `form:"*"`
+ // Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
+ AdaptivePricing *CheckoutSessionCreateAdaptivePricingParams `form:"adaptive_pricing"`
+ // Configure actions after a Checkout Session has expired.
+ AfterExpiration *CheckoutSessionCreateAfterExpirationParams `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 *CheckoutSessionCreateAutomaticTaxParams `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` or `custom`.
+ CancelURL *string `form:"cancel_url"`
+ // A unique string to reference the Checkout Session. This can be a
+ // customer ID, a cart ID, or similar, and can be used to reconcile the
+ // session with your internal systems.
+ ClientReferenceID *string `form:"client_reference_id"`
+ // Configure fields for the Checkout Session to gather active consent from customers.
+ ConsentCollection *CheckoutSessionCreateConsentCollectionParams `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"`
+ // ID of an existing Account, if one exists. Has the same behavior as `customer`.
+ CustomerAccount *string `form:"customer_account"`
+ // 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 *CheckoutSessionCreateCustomerUpdateParams `form:"customer_update"`
+ // Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ CustomFields []*CheckoutSessionCreateCustomFieldParams `form:"custom_fields"`
+ // Display additional text for your customers using custom text.
+ CustomText *CheckoutSessionCreateCustomTextParams `form:"custom_text"`
+ // The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.
+ Discounts []*CheckoutSessionCreateDiscountParams `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 *CheckoutSessionCreateInvoiceCreationParams `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 []*CheckoutSessionCreateLineItemParams `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 list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
+ //
+ // There is a maximum of 10 optional items allowed on a Checkout Session, and the existing limits on the number of line items allowed on a Checkout Session apply to the combined number of line items and optional items.
+ //
+ // For `payment` mode, there is a maximum of 100 combined line items and optional items, however it is recommended to consolidate items if there are more than a few dozen.
+ //
+ // For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices.
+ OptionalItems []*CheckoutSessionCreateOptionalItemParams `form:"optional_items"`
+ // A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ PaymentIntentData *CheckoutSessionCreatePaymentIntentDataParams `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 *CheckoutSessionCreatePaymentMethodDataParams `form:"payment_method_data"`
+ // Payment-method-specific configuration.
+ PaymentMethodOptions *CheckoutSessionCreatePaymentMethodOptionsParams `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"`
+ // This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
+ //
+ // For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
+ Permissions *CheckoutSessionCreatePermissionsParams `form:"permissions"`
+ // 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 *CheckoutSessionCreatePhoneNumberCollectionParams `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` or `custom`
+ // 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 *CheckoutSessionCreateSavedPaymentMethodOptionsParams `form:"saved_payment_method_options"`
+ // A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode.
+ SetupIntentData *CheckoutSessionCreateSetupIntentDataParams `form:"setup_intent_data"`
+ // When set, provides configuration for Checkout to collect a shipping address from a customer.
+ ShippingAddressCollection *CheckoutSessionCreateShippingAddressCollectionParams `form:"shipping_address_collection"`
+ // The shipping rate options to apply to this Session. Up to a maximum of 5.
+ ShippingOptions []*CheckoutSessionCreateShippingOptionParams `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` or `subscription` 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 *CheckoutSessionCreateSubscriptionDataParams `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` or `custom`. 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 *CheckoutSessionCreateTaxIDCollectionParams `form:"tax_id_collection"`
+ // The UI mode of the Session. Defaults to `hosted`.
+ UIMode *string `form:"ui_mode"`
+ // Wallet-specific configuration.
+ WalletOptions *CheckoutSessionCreateWalletOptionsParams `form:"wallet_options"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CheckoutSessionCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CheckoutSessionCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves a Checkout Session object.
+type CheckoutSessionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CheckoutSessionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// The shipping details to apply to this Session.
+type CheckoutSessionUpdateCollectedInformationShippingDetailsParams struct {
+ // The address of the customer
+ Address *AddressParams `form:"address"`
+ // The name of customer
+ Name *string `form:"name"`
+}
+
+// Information about the customer collected within the Checkout Session.
+type CheckoutSessionUpdateCollectedInformationParams struct {
+ // The shipping details to apply to this Session.
+ ShippingDetails *CheckoutSessionUpdateCollectedInformationShippingDetailsParams `form:"shipping_details"`
+}
+
+// When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
+type CheckoutSessionUpdateLineItemAdjustableQuantityParams struct {
+ // Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity.
+ 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"`
+}
+
+// A list of items the customer is purchasing.
+//
+// When updating line items, you must retransmit the entire array of line items.
+//
+// To retain an existing line item, specify its `id`.
+//
+// To update an existing line item, specify its `id` along with the new values of the fields to update.
+//
+// To add a new line item, specify a `price` and `quantity`.
+//
+// To remove an existing line item, omit the line item's ID from the retransmitted array.
+//
+// To reorder a line item, specify it at the desired position in the retransmitted array.
+type CheckoutSessionUpdateLineItemParams struct {
+ // When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
+ AdjustableQuantity *CheckoutSessionUpdateLineItemAdjustableQuantityParams `form:"adjustable_quantity"`
+ // ID of an existing line item.
+ ID *string `form:"id"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The ID of the [Price](https://stripe.com/docs/api/prices).
+ Price *string `form:"price"`
+ // The quantity of the line item being purchased.
+ 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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CheckoutSessionUpdateLineItemParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+type CheckoutSessionUpdateShippingOptionShippingRateDataDeliveryEstimateMaximumParams 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 CheckoutSessionUpdateShippingOptionShippingRateDataDeliveryEstimateMinimumParams struct {
+ // A unit of time.
+ Unit *string `form:"unit"`
+ // Must be greater than 0.
+ Value *int64 `form:"value"`
+}
+
+// The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+type CheckoutSessionUpdateShippingOptionShippingRateDataDeliveryEstimateParams struct {
+ // The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ Maximum *CheckoutSessionUpdateShippingOptionShippingRateDataDeliveryEstimateMaximumParams `form:"maximum"`
+ // The lower bound of the estimated range. If empty, represents no lower bound.
+ Minimum *CheckoutSessionUpdateShippingOptionShippingRateDataDeliveryEstimateMinimumParams `form:"minimum"`
+}
+
+// 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 CheckoutSessionUpdateShippingOptionShippingRateDataFixedAmountCurrencyOptionsParams 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"`
+}
+
+// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+type CheckoutSessionUpdateShippingOptionShippingRateDataFixedAmountParams 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]*CheckoutSessionUpdateShippingOptionShippingRateDataFixedAmountCurrencyOptionsParams `form:"currency_options"`
+}
+
+// Parameters to be passed to Shipping Rate creation for this shipping option.
+type CheckoutSessionUpdateShippingOptionShippingRateDataParams struct {
+ // The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ DeliveryEstimate *CheckoutSessionUpdateShippingOptionShippingRateDataDeliveryEstimateParams `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 *CheckoutSessionUpdateShippingOptionShippingRateDataFixedAmountParams `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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CheckoutSessionUpdateShippingOptionShippingRateDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// The shipping rate options to apply to this Session. Up to a maximum of 5.
+type CheckoutSessionUpdateShippingOptionParams 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 *CheckoutSessionUpdateShippingOptionShippingRateDataParams `form:"shipping_rate_data"`
+}
+
+// Updates a Checkout Session object.
+type CheckoutSessionUpdateParams struct {
+ Params `form:"*"`
+ // Information about the customer collected within the Checkout Session.
+ CollectedInformation *CheckoutSessionUpdateCollectedInformationParams `form:"collected_information"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // A list of items the customer is purchasing.
+ //
+ // When updating line items, you must retransmit the entire array of line items.
+ //
+ // To retain an existing line item, specify its `id`.
+ //
+ // To update an existing line item, specify its `id` along with the new values of the fields to update.
+ //
+ // To add a new line item, specify a `price` and `quantity`.
+ //
+ // To remove an existing line item, omit the line item's ID from the retransmitted array.
+ //
+ // To reorder a line item, specify it at the desired position in the retransmitted array.
+ LineItems []*CheckoutSessionUpdateLineItemParams `form:"line_items"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The shipping rate options to apply to this Session. Up to a maximum of 5.
+ ShippingOptions []*CheckoutSessionUpdateShippingOptionParams `form:"shipping_options"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CheckoutSessionUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CheckoutSessionUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
type CheckoutSessionAdaptivePricing struct {
// Whether Adaptive Pricing is enabled.
diff --git a/climate_order.go b/climate_order.go
index 3fb9867c80..5dbc0b30e0 100644
--- a/climate_order.go
+++ b/climate_order.go
@@ -96,6 +96,89 @@ func (p *ClimateOrderCancelParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
+type ClimateOrderCreateBeneficiaryParams struct {
+ // Publicly displayable name for the end beneficiary of carbon removal.
+ PublicName *string `form:"public_name"`
+}
+
+// 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.
+type ClimateOrderCreateParams 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 *ClimateOrderCreateBeneficiaryParams `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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ClimateOrderCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *ClimateOrderCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of a Climate order object with the given ID.
+type ClimateOrderRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ClimateOrderRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
+type ClimateOrderUpdateBeneficiaryParams struct {
+ // Publicly displayable name for the end beneficiary of carbon removal.
+ PublicName *string `form:"public_name"`
+}
+
+// Updates the specified order by setting the values of the parameters passed.
+type ClimateOrderUpdateParams struct {
+ Params `form:"*"`
+ // Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
+ Beneficiary *ClimateOrderUpdateBeneficiaryParams `form:"beneficiary"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ClimateOrderUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *ClimateOrderUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type ClimateOrderBeneficiary struct {
// Publicly displayable name for the end beneficiary of carbon removal.
PublicName string `json:"public_name"`
diff --git a/climate_product.go b/climate_product.go
index 433cd79bf0..fc41d2992a 100644
--- a/climate_product.go
+++ b/climate_product.go
@@ -32,6 +32,18 @@ func (p *ClimateProductParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of a Climate product with the given ID.
+type ClimateProductRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ClimateProductRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Current prices for a metric ton of carbon removal in a currency's smallest unit.
type ClimateProductCurrentPricesPerMetricTon struct {
// Fees for one metric ton of carbon removal in the currency's smallest unit.
diff --git a/climate_supplier.go b/climate_supplier.go
index 406e87b70f..4232db68d0 100644
--- a/climate_supplier.go
+++ b/climate_supplier.go
@@ -40,6 +40,18 @@ func (p *ClimateSupplierParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves a Climate supplier object.
+type ClimateSupplierRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ClimateSupplierRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The locations in which this supplier operates.
type ClimateSupplierLocation struct {
// The city where the supplier is located.
diff --git a/confirmationtoken.go b/confirmationtoken.go
index 0afe57dc2c..3dec53d344 100644
--- a/confirmationtoken.go
+++ b/confirmationtoken.go
@@ -499,6 +499,18 @@ func (p *ConfirmationTokenParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves an existing ConfirmationToken object
+type ConfirmationTokenRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ConfirmationTokenRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// If this is a Mandate accepted online, this hash contains details about the online acceptance.
type ConfirmationTokenMandateDataCustomerAcceptanceOnline struct {
// The IP address from which the Mandate was accepted by the customer.
diff --git a/countryspec.go b/countryspec.go
index 9752cc5612..3460557cab 100644
--- a/countryspec.go
+++ b/countryspec.go
@@ -33,6 +33,18 @@ func (p *CountrySpecParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Returns a Country Spec for a given Country code.
+type CountrySpecRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CountrySpecRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// VerificationFieldsList lists the fields needed for an account verification.
// For more details see https://stripe.com/docs/api#country_spec_object-verification_fields.
type VerificationFieldsList struct {
diff --git a/coupon.go b/coupon.go
index f3d0cd079b..cab03f47cf 100644
--- a/coupon.go
+++ b/coupon.go
@@ -90,6 +90,116 @@ type CouponAppliesToParams struct {
// An array of Product IDs that this Coupon will apply to.
Products []*string `form:"products"`
}
+
+// 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.
+type CouponDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves the coupon with the given ID.
+type CouponRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CouponRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// 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 CouponUpdateCurrencyOptionsParams struct {
+ // A positive integer representing the amount to subtract from an invoice total.
+ AmountOff *int64 `form:"amount_off"`
+}
+
+// Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.
+type CouponUpdateParams struct {
+ Params `form:"*"`
+ // 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]*CouponUpdateCurrencyOptionsParams `form:"currency_options"`
+ // 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"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CouponUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CouponUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// A hash containing directions for what this Coupon will apply discounts to.
+type CouponCreateAppliesToParams struct {
+ // An array of Product IDs that this Coupon will apply to.
+ Products []*string `form:"products"`
+}
+
+// Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+type CouponCreateCurrencyOptionsParams struct {
+ // A positive integer representing the amount to subtract from an invoice total.
+ AmountOff *int64 `form:"amount_off"`
+}
+
+// You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
+//
+// A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.
+type CouponCreateParams 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 *CouponCreateAppliesToParams `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 `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ CurrencyOptions map[string]*CouponCreateCurrencyOptionsParams `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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CouponCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CouponCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type CouponAppliesTo struct {
// A list of product IDs this coupon applies to
Products []string `json:"products"`
diff --git a/creditnote.go b/creditnote.go
index c382aa35d2..3773ab180e 100644
--- a/creditnote.go
+++ b/creditnote.go
@@ -373,7 +373,7 @@ type CreditNotePreviewLinesShippingCostParams struct {
ShippingRate *string `form:"shipping_rate"`
}
-// 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.
+// Line items that make up the credit note.
type CreditNotePreviewLinesParams struct {
ListParams `form:"*"`
// The integer amount in cents (or local equivalent) representing the total amount of the credit note.
@@ -445,6 +445,147 @@ func (p *CreditNoteListLinesParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
+type CreditNoteCreateLineTaxAmountParams 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"`
+}
+
+// Line items that make up the credit note.
+type CreditNoteCreateLineParams 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 []*CreditNoteCreateLineTaxAmountParams `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"`
+}
+
+// Refunds to link to this credit note.
+type CreditNoteCreateRefundParams struct {
+ // Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
+ AmountRefunded *int64 `form:"amount_refunded"`
+ // ID of an existing refund to link this credit note to.
+ Refund *string `form:"refund"`
+}
+
+// When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+type CreditNoteCreateShippingCostParams struct {
+ // The ID of the shipping rate to use for this order.
+ ShippingRate *string `form:"shipping_rate"`
+}
+
+// Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces
+// its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result
+// in any combination of the following:
+//
+// Refund: create a new refund (using refund_amount) or link an existing refund (using refund).
+// Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized.
+// Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).
+//
+// For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
+//
+// You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount
+// or post_payment_credit_notes_amount depending on its status at the time of credit note creation.
+type CreditNoteCreateParams 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 []*CreditNoteCreateLineParams `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"`
+ // 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"`
+ // Refunds to link to this credit note.
+ Refunds []*CreditNoteCreateRefundParams `form:"refunds"`
+ // When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
+ ShippingCost *CreditNoteCreateShippingCostParams `form:"shipping_cost"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CreditNoteCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CreditNoteCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the credit note object with the given identifier.
+type CreditNoteRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CreditNoteRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates an existing credit note.
+type CreditNoteUpdateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Credit note memo.
+ 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CreditNoteUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CreditNoteUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
type CreditNoteDiscountAmount struct {
// The amount, in cents (or local equivalent), of the discount.
diff --git a/customer.go b/customer.go
index 7b531bbeb4..07b8faf08c 100644
--- a/customer.go
+++ b/customer.go
@@ -282,6 +282,270 @@ func (p *CustomerCreateFundingInstructionsParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
+type CustomerDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves a Customer object.
+type CustomerRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CustomerRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Settings controlling the behavior of the customer's cash balance,
+// such as reconciliation of funds received.
+type CustomerUpdateCashBalanceSettingsParams 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"`
+}
+
+// Balance information and default balance settings for this customer.
+type CustomerUpdateCashBalanceParams struct {
+ // Settings controlling the behavior of the customer's cash balance,
+ // such as reconciliation of funds received.
+ Settings *CustomerUpdateCashBalanceSettingsParams `form:"settings"`
+}
+
+// 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 CustomerUpdateInvoiceSettingsCustomFieldParams 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 options for invoice PDF rendering for this customer.
+type CustomerUpdateInvoiceSettingsRenderingOptionsParams 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 invoice settings for this customer.
+type CustomerUpdateInvoiceSettingsParams 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 []*CustomerUpdateInvoiceSettingsCustomFieldParams `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 *CustomerUpdateInvoiceSettingsRenderingOptionsParams `form:"rendering_options"`
+}
+
+// The customer's shipping information. Appears on invoices emailed to this customer.
+type CustomerUpdateShippingParams struct {
+ // Customer shipping address.
+ Address *AddressParams `form:"address"`
+ // Customer name.
+ Name *string `form:"name"`
+ // Customer phone (including extension).
+ Phone *string `form:"phone"`
+}
+
+// Tax details about the customer.
+type CustomerUpdateTaxParams 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 `auto`.
+ ValidateLocation *string `form:"validate_location"`
+}
+
+// Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.
+//
+// This request accepts mostly the same arguments as the customer creation call.
+type CustomerUpdateParams 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 *CustomerUpdateCashBalanceParams `form:"cash_balance"`
+ // 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 *CustomerUpdateInvoiceSettingsParams `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"`
+ // The customer's phone number.
+ Phone *string `form:"phone"`
+ // Customer's preferred languages, ordered by preference.
+ PreferredLocales []*string `form:"preferred_locales"`
+ // The customer's shipping information. Appears on invoices emailed to this customer.
+ Shipping *CustomerUpdateShippingParams `form:"shipping"`
+ Source *string `form:"source"`
+ // Tax details about the customer.
+ Tax *CustomerUpdateTaxParams `form:"tax"`
+ // The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ TaxExempt *string `form:"tax_exempt"`
+ Validate *bool `form:"validate"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CustomerUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CustomerUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Settings controlling the behavior of the customer's cash balance,
+// such as reconciliation of funds received.
+type CustomerCreateCashBalanceSettingsParams 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"`
+}
+
+// Balance information and default balance settings for this customer.
+type CustomerCreateCashBalanceParams struct {
+ // Settings controlling the behavior of the customer's cash balance,
+ // such as reconciliation of funds received.
+ Settings *CustomerCreateCashBalanceSettingsParams `form:"settings"`
+}
+
+// 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 CustomerCreateInvoiceSettingsCustomFieldParams 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 options for invoice PDF rendering for this customer.
+type CustomerCreateInvoiceSettingsRenderingOptionsParams 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 invoice settings for this customer.
+type CustomerCreateInvoiceSettingsParams 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 []*CustomerCreateInvoiceSettingsCustomFieldParams `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 *CustomerCreateInvoiceSettingsRenderingOptionsParams `form:"rendering_options"`
+}
+
+// The customer's shipping information. Appears on invoices emailed to this customer.
+type CustomerCreateShippingParams struct {
+ // Customer shipping address.
+ Address *AddressParams `form:"address"`
+ // Customer name.
+ Name *string `form:"name"`
+ // Customer phone (including extension).
+ Phone *string `form:"phone"`
+}
+
+// Tax details about the customer.
+type CustomerCreateTaxParams 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"`
+}
+
+// The customer's tax IDs.
+type CustomerCreateTaxIDDatumParams 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"`
+}
+
+// Creates a new customer object.
+type CustomerCreateParams 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 *CustomerCreateCashBalanceParams `form:"cash_balance"`
+ // 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 *CustomerCreateInvoiceSettingsParams `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 customer's shipping information. Appears on invoices emailed to this customer.
+ Shipping *CustomerCreateShippingParams `form:"shipping"`
+ Source *string `form:"source"`
+ // Tax details about the customer.
+ Tax *CustomerCreateTaxParams `form:"tax"`
+ // The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
+ TaxExempt *string `form:"tax_exempt"`
+ // The customer's tax IDs.
+ TaxIDData []*CustomerCreateTaxIDDatumParams `form:"tax_id_data"`
+ // ID of the test clock to attach to the customer.
+ TestClock *string `form:"test_clock"`
+ Validate *bool `form:"validate"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CustomerCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CustomerCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Default custom fields to be displayed on invoices for this customer.
type CustomerInvoiceSettingsCustomField struct {
// The name of the custom field.
diff --git a/customerbalancetransaction.go b/customerbalancetransaction.go
index 5361827484..3319e19c26 100644
--- a/customerbalancetransaction.go
+++ b/customerbalancetransaction.go
@@ -70,6 +70,75 @@ func (p *CustomerBalanceTransactionParams) AddMetadata(key string, value string)
p.Metadata[key] = value
}
+// Creates an immutable transaction that updates the customer's credit [balance](https://stripe.com/docs/billing/customer/balance).
+type CustomerBalanceTransactionCreateParams 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CustomerBalanceTransactionCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CustomerBalanceTransactionCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves a specific customer balance transaction that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance).
+type CustomerBalanceTransactionRetrieveParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CustomerBalanceTransactionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Most credit balance transaction fields are immutable, but you may update its description and metadata.
+type CustomerBalanceTransactionUpdateParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CustomerBalanceTransactionUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *CustomerBalanceTransactionUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// 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),
diff --git a/customercashbalancetransaction.go b/customercashbalancetransaction.go
index 4f012a6900..e400a025ab 100644
--- a/customercashbalancetransaction.go
+++ b/customercashbalancetransaction.go
@@ -72,6 +72,19 @@ func (p *CustomerCashBalanceTransactionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://stripe.com/docs/payments/customer-balance).
+type CustomerCashBalanceTransactionRetrieveParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CustomerCashBalanceTransactionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
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"`
diff --git a/customersession.go b/customersession.go
index 9ab31f0daf..a75780ca5b 100644
--- a/customersession.go
+++ b/customersession.go
@@ -132,6 +132,78 @@ func (p *CustomerSessionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Configuration for buy button.
+type CustomerSessionCreateComponentsBuyButtonParams struct {
+ // Whether the buy button is enabled.
+ Enabled *bool `form:"enabled"`
+}
+
+// This hash defines whether the Payment Element supports certain features.
+type CustomerSessionCreateComponentsPaymentElementFeaturesParams 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"`
+}
+
+// Configuration for the Payment Element.
+type CustomerSessionCreateComponentsPaymentElementParams struct {
+ // Whether the Payment Element is enabled.
+ Enabled *bool `form:"enabled"`
+ // This hash defines whether the Payment Element supports certain features.
+ Features *CustomerSessionCreateComponentsPaymentElementFeaturesParams `form:"features"`
+}
+
+// Configuration for the pricing table.
+type CustomerSessionCreateComponentsPricingTableParams struct {
+ // Whether the pricing table is enabled.
+ Enabled *bool `form:"enabled"`
+}
+
+// Configuration for each component. Exactly 1 component must be enabled.
+type CustomerSessionCreateComponentsParams struct {
+ // Configuration for buy button.
+ BuyButton *CustomerSessionCreateComponentsBuyButtonParams `form:"buy_button"`
+ // Configuration for the Payment Element.
+ PaymentElement *CustomerSessionCreateComponentsPaymentElementParams `form:"payment_element"`
+ // Configuration for the pricing table.
+ PricingTable *CustomerSessionCreateComponentsPricingTableParams `form:"pricing_table"`
+}
+
+// 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.
+type CustomerSessionCreateParams struct {
+ Params `form:"*"`
+ // Configuration for each component. Exactly 1 component must be enabled.
+ Components *CustomerSessionCreateComponentsParams `form:"components"`
+ // The ID of an existing customer for which to create the Customer Session.
+ Customer *string `form:"customer"`
+ // The ID of an existing Account for which to create the Customer Session.
+ CustomerAccount *string `form:"customer_account"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *CustomerSessionCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// This hash contains whether the buy button is enabled.
type CustomerSessionComponentsBuyButton struct {
// Whether the buy button is enabled.
diff --git a/dispute.go b/dispute.go
index 2dd2a78b49..cfbdaf8590 100644
--- a/dispute.go
+++ b/dispute.go
@@ -289,6 +289,169 @@ type DisputeEvidenceParams struct {
UncategorizedText *string `form:"uncategorized_text"`
}
+// Retrieves the dispute with the given ID.
+type DisputeRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *DisputeRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
+type DisputeUpdateEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionParams 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"`
+}
+
+// List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
+type DisputeUpdateEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionParams 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"`
+}
+
+// Evidence provided for Visa Compelling Evidence 3.0 evidence submission.
+type DisputeUpdateEvidenceEnhancedEvidenceVisaCompellingEvidence3Params struct {
+ // Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
+ DisputedTransaction *DisputeUpdateEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionParams `form:"disputed_transaction"`
+ // List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
+ PriorUndisputedTransactions []*DisputeUpdateEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionParams `form:"prior_undisputed_transactions"`
+}
+
+// Evidence provided for Visa compliance evidence submission.
+type DisputeUpdateEvidenceEnhancedEvidenceVisaComplianceParams 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"`
+}
+
+// Additional evidence for qualifying evidence programs.
+type DisputeUpdateEvidenceEnhancedEvidenceParams struct {
+ // Evidence provided for Visa Compelling Evidence 3.0 evidence submission.
+ VisaCompellingEvidence3 *DisputeUpdateEvidenceEnhancedEvidenceVisaCompellingEvidence3Params `form:"visa_compelling_evidence_3"`
+ // Evidence provided for Visa compliance evidence submission.
+ VisaCompliance *DisputeUpdateEvidenceEnhancedEvidenceVisaComplianceParams `form:"visa_compliance"`
+}
+
+// Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.
+type DisputeUpdateEvidenceParams 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 *DisputeUpdateEvidenceEnhancedEvidenceParams `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 customer received or began receiving the purchased service, in a clear human-readable format.
+ ServiceDate *string `form:"service_date"`
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.
+ ServiceDocumentation *string `form:"service_documentation"`
+ // The address to which a physical product was shipped. You should try to include as complete address information as possible.
+ ShippingAddress *string `form:"shipping_address"`
+ // The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.
+ ShippingCarrier *string `form:"shipping_carrier"`
+ // The date on which a physical product began its route to the shipping address, in a clear human-readable format.
+ ShippingDate *string `form:"shipping_date"`
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.
+ ShippingDocumentation *string `form:"shipping_documentation"`
+ // The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
+ ShippingTrackingNumber *string `form:"shipping_tracking_number"`
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.
+ UncategorizedFile *string `form:"uncategorized_file"`
+ // Any additional evidence or statements. Has a maximum character count of 20,000.
+ UncategorizedText *string `form:"uncategorized_text"`
+}
+
+// When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically.
+//
+// Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](https://stripe.com/docs/disputes/categories).
+type DisputeUpdateParams struct {
+ Params `form:"*"`
+ // Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.
+ Evidence *DisputeUpdateEvidenceParams `form:"evidence"`
+ // 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"`
+ // Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).
+ Submit *bool `form:"submit"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *DisputeUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *DisputeUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
type DisputeEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction struct {
// User Account ID used to log into business platform. Must be recognizable by the user.
diff --git a/entitlements_activeentitlement.go b/entitlements_activeentitlement.go
index 43cad64601..c2c981e647 100644
--- a/entitlements_activeentitlement.go
+++ b/entitlements_activeentitlement.go
@@ -32,6 +32,18 @@ func (p *EntitlementsActiveEntitlementParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieve an active entitlement
+type EntitlementsActiveEntitlementRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *EntitlementsActiveEntitlementRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// An active entitlement describes access to a feature for a customer.
type EntitlementsActiveEntitlement struct {
APIResource
diff --git a/entitlements_feature.go b/entitlements_feature.go
index 709229eabd..d66b461140 100644
--- a/entitlements_feature.go
+++ b/entitlements_feature.go
@@ -53,6 +53,72 @@ func (p *EntitlementsFeatureParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// Creates a feature
+type EntitlementsFeatureCreateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // A unique key you provide as your own system identifier. This may be up to 80 characters.
+ LookupKey *string `form:"lookup_key"`
+ // Set of key-value pairs 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 `form:"metadata"`
+ // The feature's name, for your own purpose, not meant to be displayable to the customer.
+ Name *string `form:"name"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *EntitlementsFeatureCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *EntitlementsFeatureCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves a feature
+type EntitlementsFeatureRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *EntitlementsFeatureRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Update a feature's metadata or permanently deactivate it.
+type EntitlementsFeatureUpdateParams struct {
+ Params `form:"*"`
+ // Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
+ Active *bool `form:"active"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Set of key-value pairs 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 `form:"metadata"`
+ // The feature's name, for your own purpose, not meant to be displayable to the customer.
+ Name *string `form:"name"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *EntitlementsFeatureUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *EntitlementsFeatureUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// A feature represents a monetizable ability or functionality in your system.
// Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer.
type EntitlementsFeature struct {
diff --git a/ephemeralkey.go b/ephemeralkey.go
index dfba39c04f..0ae7d61d5f 100644
--- a/ephemeralkey.go
+++ b/ephemeralkey.go
@@ -29,6 +29,38 @@ func (p *EphemeralKeyParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Invalidates a short-lived API key for a given resource.
+type EphemeralKeyDeleteParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *EphemeralKeyDeleteParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Creates a short-lived API key for a given resource.
+type EphemeralKeyCreateParams struct {
+ Params `form:"*"`
+ // The ID of the Customer you'd like to modify using the resulting ephemeral key.
+ Customer *string `form:"customer"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The ID of the Issuing Card you'd like to access using the resulting ephemeral key.
+ IssuingCard *string `form:"issuing_card"`
+ // A single-use token, created by Stripe.js, used for creating ephemeral keys for Issuing Cards without exchanging sensitive information.
+ Nonce *string `form:"nonce"`
+ // The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key
+ VerificationSession *string `form:"verification_session"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *EphemeralKeyCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type EphemeralKey struct {
APIResource
// Time at which the object was created. Measured in seconds since the Unix epoch.
diff --git a/event.go b/event.go
index 838ee65609..f9ddfff487 100644
--- a/event.go
+++ b/event.go
@@ -357,6 +357,18 @@ func (p *EventParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook.
+type EventRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *EventRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type EventData struct {
// Object is a raw mapping of the API resource contained in the event.
// Although marked with json:"-", it's still populated independently by
diff --git a/example/generated_examples_test.go b/example/generated_examples_test.go
index 97546f002d..fb078d4218 100644
--- a/example/generated_examples_test.go
+++ b/example/generated_examples_test.go
@@ -131,13 +131,13 @@ func TestAccountLinksPost(t *testing.T) {
}
func TestAccountLinksPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.AccountLinkParams{
Account: stripe.String("acct_xxxxxxxxxxxxx"),
RefreshURL: stripe.String("https://example.com/reauth"),
ReturnURL: stripe.String("https://example.com/return"),
Type: stripe.String("account_onboarding"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.AccountLinks.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -153,10 +153,10 @@ func TestAccountsCapabilitiesGet(t *testing.T) {
}
func TestAccountsCapabilitiesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CapabilityListParams{
Account: stripe.String("acct_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.Capabilities.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -172,10 +172,10 @@ func TestAccountsCapabilitiesGet2(t *testing.T) {
}
func TestAccountsCapabilitiesGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CapabilityParams{
Account: stripe.String("acct_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Capabilities.Get("card_payments", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -192,11 +192,11 @@ func TestAccountsCapabilitiesPost(t *testing.T) {
}
func TestAccountsCapabilitiesPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CapabilityParams{
Requested: stripe.Bool(true),
Account: stripe.String("acct_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Capabilities.Update("card_payments", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -210,8 +210,8 @@ func TestAccountsDelete(t *testing.T) {
}
func TestAccountsDeleteService(t *testing.T) {
- params := &stripe.AccountParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.AccountParams{}
result, err := sc.Accounts.Del("acct_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -226,9 +226,9 @@ func TestAccountsGet(t *testing.T) {
}
func TestAccountsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.AccountListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Accounts.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -242,8 +242,8 @@ func TestAccountsGet2(t *testing.T) {
}
func TestAccountsGet2Service(t *testing.T) {
- params := &stripe.AccountParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.AccountParams{}
result, err := sc.Accounts.GetByID("acct_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -259,10 +259,10 @@ func TestAccountsLoginLinksPost(t *testing.T) {
}
func TestAccountsLoginLinksPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.LoginLinkParams{
Account: stripe.String("acct_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.LoginLinks.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -276,8 +276,8 @@ func TestAccountsPersonsDelete(t *testing.T) {
}
func TestAccountsPersonsDeleteService(t *testing.T) {
- params := &stripe.PersonParams{Account: stripe.String("acct_xxxxxxxxxxxxx")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PersonParams{Account: stripe.String("acct_xxxxxxxxxxxxx")}
result, err := sc.Persons.Del("person_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -294,11 +294,11 @@ func TestAccountsPersonsGet(t *testing.T) {
}
func TestAccountsPersonsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PersonListParams{
Account: stripe.String("acct_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Persons.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -312,8 +312,8 @@ func TestAccountsPersonsGet2(t *testing.T) {
}
func TestAccountsPersonsGet2Service(t *testing.T) {
- params := &stripe.PersonParams{Account: stripe.String("acct_xxxxxxxxxxxxx")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PersonParams{Account: stripe.String("acct_xxxxxxxxxxxxx")}
result, err := sc.Persons.Get("person_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -331,12 +331,12 @@ func TestAccountsPersonsPost(t *testing.T) {
}
func TestAccountsPersonsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PersonParams{
FirstName: stripe.String("Jane"),
LastName: stripe.String("Diaz"),
Account: stripe.String("acct_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Persons.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -351,9 +351,9 @@ func TestAccountsPersonsPost2(t *testing.T) {
}
func TestAccountsPersonsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PersonParams{Account: stripe.String("acct_xxxxxxxxxxxxx")}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Persons.Update("person_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -379,6 +379,7 @@ func TestAccountsPost(t *testing.T) {
}
func TestAccountsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.AccountParams{
Type: stripe.String(string(stripe.AccountTypeCustom)),
Country: stripe.String("US"),
@@ -392,7 +393,6 @@ func TestAccountsPostService(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Accounts.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -407,9 +407,9 @@ func TestAccountsPost2(t *testing.T) {
}
func TestAccountsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.AccountParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Accounts.Update("acct_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -423,8 +423,8 @@ func TestAccountsRejectPost(t *testing.T) {
}
func TestAccountsRejectPostService(t *testing.T) {
- params := &stripe.AccountRejectParams{Reason: stripe.String("fraud")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.AccountRejectParams{Reason: stripe.String("fraud")}
result, err := sc.Accounts.Reject("acct_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -439,9 +439,9 @@ func TestApplicationFeesGet(t *testing.T) {
}
func TestApplicationFeesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ApplicationFeeListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.ApplicationFees.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -455,8 +455,8 @@ func TestApplicationFeesGet2(t *testing.T) {
}
func TestApplicationFeesGet2Service(t *testing.T) {
- params := &stripe.ApplicationFeeParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ApplicationFeeParams{}
result, err := sc.ApplicationFees.Get("fee_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -471,9 +471,9 @@ func TestApplicationFeesRefundsGet(t *testing.T) {
}
func TestApplicationFeesRefundsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.FeeRefundListParams{ID: stripe.String("fee_xxxxxxxxxxxxx")}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.FeeRefunds.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -487,8 +487,8 @@ func TestApplicationFeesRefundsGet2(t *testing.T) {
}
func TestApplicationFeesRefundsGet2Service(t *testing.T) {
- params := &stripe.FeeRefundParams{Fee: stripe.String("fee_xxxxxxxxxxxxx")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.FeeRefundParams{Fee: stripe.String("fee_xxxxxxxxxxxxx")}
result, err := sc.FeeRefunds.Get("fr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -502,8 +502,8 @@ func TestApplicationFeesRefundsPost(t *testing.T) {
}
func TestApplicationFeesRefundsPostService(t *testing.T) {
- params := &stripe.FeeRefundParams{ID: stripe.String("fee_xxxxxxxxxxxxx")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.FeeRefundParams{ID: stripe.String("fee_xxxxxxxxxxxxx")}
result, err := sc.FeeRefunds.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -518,9 +518,9 @@ func TestApplicationFeesRefundsPost2(t *testing.T) {
}
func TestApplicationFeesRefundsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.FeeRefundParams{Fee: stripe.String("fee_xxxxxxxxxxxxx")}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.FeeRefunds.Update("fr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -539,13 +539,13 @@ func TestAppsSecretsDeletePost(t *testing.T) {
}
func TestAppsSecretsDeletePostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.AppsSecretDeleteWhereParams{
Name: stripe.String("my-api-key"),
Scope: &stripe.AppsSecretDeleteWhereScopeParams{
Type: stripe.String(string(stripe.AppsSecretScopeTypeAccount)),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.AppsSecrets.DeleteWhere(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -564,13 +564,13 @@ func TestAppsSecretsFindGet(t *testing.T) {
}
func TestAppsSecretsFindGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.AppsSecretFindParams{
Name: stripe.String("sec_123"),
Scope: &stripe.AppsSecretFindScopeParams{
Type: stripe.String(string(stripe.AppsSecretScopeTypeAccount)),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.AppsSecrets.Find(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -589,13 +589,13 @@ func TestAppsSecretsGet(t *testing.T) {
}
func TestAppsSecretsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.AppsSecretListParams{
Scope: &stripe.AppsSecretListScopeParams{
Type: stripe.String(string(stripe.AppsSecretScopeTypeAccount)),
},
}
params.Limit = stripe.Int64(2)
- sc := client.New(TestAPIKey, nil)
result := sc.AppsSecrets.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -614,13 +614,13 @@ func TestAppsSecretsGet2(t *testing.T) {
}
func TestAppsSecretsGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.AppsSecretListParams{
Scope: &stripe.AppsSecretListScopeParams{
Type: stripe.String(string(stripe.AppsSecretScopeTypeAccount)),
},
}
params.Limit = stripe.Int64(2)
- sc := client.New(TestAPIKey, nil)
result := sc.AppsSecrets.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -640,6 +640,7 @@ func TestAppsSecretsPost(t *testing.T) {
}
func TestAppsSecretsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.AppsSecretParams{
Name: stripe.String("sec_123"),
Payload: stripe.String("very secret string"),
@@ -647,7 +648,6 @@ func TestAppsSecretsPostService(t *testing.T) {
Type: stripe.String(string(stripe.AppsSecretScopeTypeAccount)),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.AppsSecrets.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -667,6 +667,7 @@ func TestAppsSecretsPost2(t *testing.T) {
}
func TestAppsSecretsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.AppsSecretParams{
Name: stripe.String("my-api-key"),
Payload: stripe.String("secret_key_xxxxxx"),
@@ -674,7 +675,6 @@ func TestAppsSecretsPost2Service(t *testing.T) {
Type: stripe.String(string(stripe.AppsSecretScopeTypeAccount)),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.AppsSecrets.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -689,9 +689,9 @@ func TestBalanceTransactionsGet(t *testing.T) {
}
func TestBalanceTransactionsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.BalanceTransactionListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.BalanceTransactions.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -705,8 +705,8 @@ func TestBalanceTransactionsGet2(t *testing.T) {
}
func TestBalanceTransactionsGet2Service(t *testing.T) {
- params := &stripe.BalanceTransactionParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.BalanceTransactionParams{}
result, err := sc.BalanceTransactions.Get("txn_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -721,9 +721,9 @@ func TestBillingPortalConfigurationsGet(t *testing.T) {
}
func TestBillingPortalConfigurationsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.BillingPortalConfigurationListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.BillingPortalConfigurations.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -737,8 +737,8 @@ func TestBillingPortalConfigurationsGet2(t *testing.T) {
}
func TestBillingPortalConfigurationsGet2Service(t *testing.T) {
- params := &stripe.BillingPortalConfigurationParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.BillingPortalConfigurationParams{}
result, err := sc.BillingPortalConfigurations.Get(
"bpc_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -770,6 +770,7 @@ func TestBillingPortalConfigurationsPost(t *testing.T) {
}
func TestBillingPortalConfigurationsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.BillingPortalConfigurationParams{
Features: &stripe.BillingPortalConfigurationFeaturesParams{
CustomerUpdate: &stripe.BillingPortalConfigurationFeaturesCustomerUpdateParams{
@@ -788,7 +789,6 @@ func TestBillingPortalConfigurationsPostService(t *testing.T) {
TermsOfServiceURL: stripe.String("https://example.com/terms"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.BillingPortalConfigurations.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -808,13 +808,13 @@ func TestBillingPortalConfigurationsPost2(t *testing.T) {
}
func TestBillingPortalConfigurationsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.BillingPortalConfigurationParams{
BusinessProfile: &stripe.BillingPortalConfigurationBusinessProfileParams{
PrivacyPolicyURL: stripe.String("https://example.com/privacy"),
TermsOfServiceURL: stripe.String("https://example.com/terms"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.BillingPortalConfigurations.Update(
"bpc_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -832,11 +832,11 @@ func TestBillingPortalSessionsPost(t *testing.T) {
}
func TestBillingPortalSessionsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.BillingPortalSessionParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
ReturnURL: stripe.String("https://example.com/account"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.BillingPortalSessions.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -850,8 +850,8 @@ func TestChargesCapturePost(t *testing.T) {
}
func TestChargesCapturePostService(t *testing.T) {
- params := &stripe.ChargeCaptureParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ChargeCaptureParams{}
result, err := sc.Charges.Capture("ch_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -866,9 +866,9 @@ func TestChargesGet(t *testing.T) {
}
func TestChargesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ChargeListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Charges.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -882,8 +882,8 @@ func TestChargesGet2(t *testing.T) {
}
func TestChargesGet2Service(t *testing.T) {
- params := &stripe.ChargeParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ChargeParams{}
result, err := sc.Charges.Get("ch_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -902,13 +902,13 @@ func TestChargesPost(t *testing.T) {
}
func TestChargesPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ChargeParams{
Amount: stripe.Int64(2000),
Currency: stripe.String(string(stripe.CurrencyUSD)),
Source: &stripe.PaymentSourceSourceParams{Token: stripe.String("tok_xxxx")},
Description: stripe.String("My First Test Charge (created for API docs at https://www.stripe.com/docs/api)"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Charges.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -923,9 +923,9 @@ func TestChargesPost2(t *testing.T) {
}
func TestChargesPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ChargeParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Charges.Update("ch_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -943,12 +943,12 @@ func TestChargesSearchGet(t *testing.T) {
}
func TestChargesSearchGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ChargeSearchParams{
SearchParams: stripe.SearchParams{
Query: "amount>999 AND metadata['order_id']:'6735'",
},
}
- sc := client.New(TestAPIKey, nil)
result := sc.Charges.Search(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -962,8 +962,8 @@ func TestCheckoutSessionsExpirePost(t *testing.T) {
}
func TestCheckoutSessionsExpirePostService(t *testing.T) {
- params := &stripe.CheckoutSessionExpireParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.CheckoutSessionExpireParams{}
result, err := sc.CheckoutSessions.Expire("sess_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -977,8 +977,8 @@ func TestCheckoutSessionsExpirePost2(t *testing.T) {
}
func TestCheckoutSessionsExpirePost2Service(t *testing.T) {
- params := &stripe.CheckoutSessionExpireParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.CheckoutSessionExpireParams{}
result, err := sc.CheckoutSessions.Expire("cs_test_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -993,9 +993,9 @@ func TestCheckoutSessionsGet(t *testing.T) {
}
func TestCheckoutSessionsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CheckoutSessionListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.CheckoutSessions.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1009,8 +1009,8 @@ func TestCheckoutSessionsGet2(t *testing.T) {
}
func TestCheckoutSessionsGet2Service(t *testing.T) {
- params := &stripe.CheckoutSessionParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.CheckoutSessionParams{}
result, err := sc.CheckoutSessions.Get("cs_test_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1026,10 +1026,10 @@ func TestCheckoutSessionsLineItemsGet(t *testing.T) {
}
func TestCheckoutSessionsLineItemsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CheckoutSessionListLineItemsParams{
Session: stripe.String("sess_xyz"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.CheckoutSessions.ListLineItems(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1067,6 +1067,7 @@ func TestCheckoutSessionsPost(t *testing.T) {
}
func TestCheckoutSessionsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CheckoutSessionParams{
SuccessURL: stripe.String("https://example.com/success"),
CancelURL: stripe.String("https://example.com/cancel"),
@@ -1092,7 +1093,6 @@ func TestCheckoutSessionsPostService(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.CheckoutSessions.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1115,6 +1115,7 @@ func TestCheckoutSessionsPost2(t *testing.T) {
}
func TestCheckoutSessionsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CheckoutSessionParams{
SuccessURL: stripe.String("https://example.com/success"),
LineItems: []*stripe.CheckoutSessionLineItemParams{
@@ -1125,7 +1126,6 @@ func TestCheckoutSessionsPost2Service(t *testing.T) {
},
Mode: stripe.String(string(stripe.CheckoutSessionModePayment)),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.CheckoutSessions.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1140,9 +1140,9 @@ func TestCountrySpecsGet(t *testing.T) {
}
func TestCountrySpecsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CountrySpecListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.CountrySpecs.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1156,8 +1156,8 @@ func TestCountrySpecsGet2(t *testing.T) {
}
func TestCountrySpecsGet2Service(t *testing.T) {
- params := &stripe.CountrySpecParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.CountrySpecParams{}
result, err := sc.CountrySpecs.Get("US", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1171,8 +1171,8 @@ func TestCouponsDelete(t *testing.T) {
}
func TestCouponsDeleteService(t *testing.T) {
- params := &stripe.CouponParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.CouponParams{}
result, err := sc.Coupons.Del("Z4OV52SU", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1187,9 +1187,9 @@ func TestCouponsGet(t *testing.T) {
}
func TestCouponsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CouponListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Coupons.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1203,8 +1203,8 @@ func TestCouponsGet2(t *testing.T) {
}
func TestCouponsGet2Service(t *testing.T) {
- params := &stripe.CouponParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.CouponParams{}
result, err := sc.Coupons.Get("Z4OV52SU", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1221,11 +1221,11 @@ func TestCouponsPost(t *testing.T) {
}
func TestCouponsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CouponParams{
PercentOff: stripe.Float64(25.5),
Duration: stripe.String(string(stripe.CouponDurationOnce)),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Coupons.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1240,9 +1240,9 @@ func TestCouponsPost2(t *testing.T) {
}
func TestCouponsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CouponParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Coupons.Update("Z4OV52SU", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1263,6 +1263,7 @@ func TestCustomerSessionsPost(t *testing.T) {
}
func TestCustomerSessionsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerSessionParams{
Customer: stripe.String("cus_123"),
Components: &stripe.CustomerSessionComponentsParams{
@@ -1271,7 +1272,6 @@ func TestCustomerSessionsPostService(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.CustomerSessions.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1288,11 +1288,11 @@ func TestCustomersBalanceTransactionsGet(t *testing.T) {
}
func TestCustomersBalanceTransactionsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerBalanceTransactionListParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.CustomerBalanceTransactions.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1308,10 +1308,10 @@ func TestCustomersBalanceTransactionsGet2(t *testing.T) {
}
func TestCustomersBalanceTransactionsGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerBalanceTransactionParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.CustomerBalanceTransactions.Get(
"cbtxn_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -1330,12 +1330,12 @@ func TestCustomersBalanceTransactionsPost(t *testing.T) {
}
func TestCustomersBalanceTransactionsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerBalanceTransactionParams{
Amount: stripe.Int64(-500),
Currency: stripe.String(string(stripe.CurrencyUSD)),
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.CustomerBalanceTransactions.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1353,11 +1353,11 @@ func TestCustomersBalanceTransactionsPost2(t *testing.T) {
}
func TestCustomersBalanceTransactionsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerBalanceTransactionParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.CustomerBalanceTransactions.Update(
"cbtxn_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -1372,8 +1372,8 @@ func TestCustomersCashBalanceGet(t *testing.T) {
}
func TestCustomersCashBalanceGetService(t *testing.T) {
- params := &stripe.CashBalanceParams{Customer: stripe.String("cus_123")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.CashBalanceParams{Customer: stripe.String("cus_123")}
result, err := sc.CashBalances.Get(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1392,13 +1392,13 @@ func TestCustomersCashBalancePost(t *testing.T) {
}
func TestCustomersCashBalancePostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CashBalanceParams{
Settings: &stripe.CashBalanceSettingsParams{
ReconciliationMode: stripe.String(string(stripe.CashBalanceSettingsReconciliationModeManual)),
},
Customer: stripe.String("cus_123"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.CashBalances.Update(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1415,11 +1415,11 @@ func TestCustomersCashBalanceTransactionsGet(t *testing.T) {
}
func TestCustomersCashBalanceTransactionsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerCashBalanceTransactionListParams{
Customer: stripe.String("cus_123"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.CustomerCashBalanceTransactions.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1433,8 +1433,8 @@ func TestCustomersDelete(t *testing.T) {
}
func TestCustomersDeleteService(t *testing.T) {
- params := &stripe.CustomerParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.CustomerParams{}
result, err := sc.Customers.Del("cus_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1455,6 +1455,7 @@ func TestCustomersFundingInstructionsPost(t *testing.T) {
}
func TestCustomersFundingInstructionsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerCreateFundingInstructionsParams{
BankTransfer: &stripe.CustomerCreateFundingInstructionsBankTransferParams{
RequestedAddressTypes: []*string{stripe.String("zengin")},
@@ -1463,7 +1464,6 @@ func TestCustomersFundingInstructionsPostService(t *testing.T) {
Currency: stripe.String(string(stripe.CurrencyUSD)),
FundingType: stripe.String("bank_transfer"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Customers.CreateFundingInstructions("cus_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1478,9 +1478,9 @@ func TestCustomersGet(t *testing.T) {
}
func TestCustomersGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Customers.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1495,9 +1495,9 @@ func TestCustomersGet2(t *testing.T) {
}
func TestCustomersGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Customers.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1511,8 +1511,8 @@ func TestCustomersGet3(t *testing.T) {
}
func TestCustomersGet3Service(t *testing.T) {
- params := &stripe.CustomerParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.CustomerParams{}
result, err := sc.Customers.Get("cus_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1529,11 +1529,11 @@ func TestCustomersPaymentMethodsGet(t *testing.T) {
}
func TestCustomersPaymentMethodsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerListPaymentMethodsParams{
Type: stripe.String("card"),
Customer: stripe.String("cus_xyz"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.Customers.ListPaymentMethods(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1550,11 +1550,11 @@ func TestCustomersPaymentMethodsGet2(t *testing.T) {
}
func TestCustomersPaymentMethodsGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerListPaymentMethodsParams{
Type: stripe.String("card"),
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.Customers.ListPaymentMethods(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1570,10 +1570,10 @@ func TestCustomersPost(t *testing.T) {
}
func TestCustomersPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerParams{
Description: stripe.String("My First Test Customer (created for API docs at https://www.stripe.com/docs/api)"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Customers.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1588,9 +1588,9 @@ func TestCustomersPost2(t *testing.T) {
}
func TestCustomersPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Customers.Update("cus_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1608,12 +1608,12 @@ func TestCustomersSearchGet(t *testing.T) {
}
func TestCustomersSearchGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerSearchParams{
SearchParams: stripe.SearchParams{
Query: "name:'fakename' AND metadata['foo']:'bar'",
},
}
- sc := client.New(TestAPIKey, nil)
result := sc.Customers.Search(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1631,12 +1631,12 @@ func TestCustomersSearchGet2(t *testing.T) {
}
func TestCustomersSearchGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CustomerSearchParams{
SearchParams: stripe.SearchParams{
Query: "name:'fakename' AND metadata['foo']:'bar'",
},
}
- sc := client.New(TestAPIKey, nil)
result := sc.Customers.Search(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1650,8 +1650,8 @@ func TestCustomersSourcesDelete(t *testing.T) {
}
func TestCustomersSourcesDeleteService(t *testing.T) {
- params := &stripe.CardParams{Customer: stripe.String("cus_xxxxxxxxxxxxx")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.CardParams{Customer: stripe.String("cus_xxxxxxxxxxxxx")}
result, err := sc.Cards.Del("ba_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1665,8 +1665,8 @@ func TestCustomersSourcesDelete2(t *testing.T) {
}
func TestCustomersSourcesDelete2Service(t *testing.T) {
- params := &stripe.CardParams{Customer: stripe.String("cus_xxxxxxxxxxxxx")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.CardParams{Customer: stripe.String("cus_xxxxxxxxxxxxx")}
result, err := sc.Cards.Del("card_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1684,12 +1684,12 @@ func TestCustomersSourcesGet(t *testing.T) {
}
func TestCustomersSourcesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentSourceListParams{
Object: stripe.String("bank_account"),
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.PaymentSources.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1707,12 +1707,12 @@ func TestCustomersSourcesGet2(t *testing.T) {
}
func TestCustomersSourcesGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentSourceListParams{
Object: stripe.String("card"),
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.PaymentSources.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1728,10 +1728,10 @@ func TestCustomersSourcesGet3(t *testing.T) {
}
func TestCustomersSourcesGet3Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentSourceParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentSources.Get("ba_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1747,10 +1747,10 @@ func TestCustomersSourcesGet4(t *testing.T) {
}
func TestCustomersSourcesGet4Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentSourceParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentSources.Get("card_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1767,11 +1767,11 @@ func TestCustomersSourcesPost(t *testing.T) {
}
func TestCustomersSourcesPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CardParams{
AccountHolderName: stripe.String("Kamil"),
Customer: stripe.String("cus_123"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Cards.Update("card_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1788,11 +1788,11 @@ func TestCustomersSourcesPost5(t *testing.T) {
}
func TestCustomersSourcesPost5Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.CardParams{
Name: stripe.String("Jenny Rosen"),
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Cards.Update("card_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1806,8 +1806,8 @@ func TestCustomersTaxIdsDelete(t *testing.T) {
}
func TestCustomersTaxIdsDeleteService(t *testing.T) {
- params := &stripe.TaxIDParams{Customer: stripe.String("cus_xxxxxxxxxxxxx")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TaxIDParams{Customer: stripe.String("cus_xxxxxxxxxxxxx")}
result, err := sc.TaxIDs.Del("txi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1824,11 +1824,11 @@ func TestCustomersTaxIdsGet(t *testing.T) {
}
func TestCustomersTaxIdsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TaxIDListParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TaxIDs.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1842,8 +1842,8 @@ func TestCustomersTaxIdsGet2(t *testing.T) {
}
func TestCustomersTaxIdsGet2Service(t *testing.T) {
- params := &stripe.TaxIDParams{Customer: stripe.String("cus_xxxxxxxxxxxxx")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TaxIDParams{Customer: stripe.String("cus_xxxxxxxxxxxxx")}
result, err := sc.TaxIDs.Get("txi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1861,12 +1861,12 @@ func TestCustomersTaxIdsPost(t *testing.T) {
}
func TestCustomersTaxIdsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TaxIDParams{
Type: stripe.String(string(stripe.TaxIDTypeEUVAT)),
Value: stripe.String("DE123456789"),
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TaxIDs.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1880,8 +1880,8 @@ func TestDisputesClosePost(t *testing.T) {
}
func TestDisputesClosePostService(t *testing.T) {
- params := &stripe.DisputeParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.DisputeParams{}
result, err := sc.Disputes.Close("dp_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1896,9 +1896,9 @@ func TestDisputesGet(t *testing.T) {
}
func TestDisputesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.DisputeListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Disputes.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1912,8 +1912,8 @@ func TestDisputesGet2(t *testing.T) {
}
func TestDisputesGet2Service(t *testing.T) {
- params := &stripe.DisputeParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.DisputeParams{}
result, err := sc.Disputes.Get("dp_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1928,9 +1928,9 @@ func TestDisputesPost(t *testing.T) {
}
func TestDisputesPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.DisputeParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Disputes.Update("dp_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1945,9 +1945,9 @@ func TestEventsGet(t *testing.T) {
}
func TestEventsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.EventListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Events.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -1961,8 +1961,8 @@ func TestEventsGet2(t *testing.T) {
}
func TestEventsGet2Service(t *testing.T) {
- params := &stripe.EventParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.EventParams{}
result, err := sc.Events.Get("evt_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1976,8 +1976,8 @@ func TestFinancialConnectionsAccountsDisconnectPost(t *testing.T) {
}
func TestFinancialConnectionsAccountsDisconnectPostService(t *testing.T) {
- params := &stripe.FinancialConnectionsAccountDisconnectParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.FinancialConnectionsAccountDisconnectParams{}
result, err := sc.FinancialConnectionsAccounts.Disconnect("fca_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -1992,8 +1992,8 @@ func TestFinancialConnectionsAccountsDisconnectPost2(t *testing.T) {
}
func TestFinancialConnectionsAccountsDisconnectPost2Service(t *testing.T) {
- params := &stripe.FinancialConnectionsAccountDisconnectParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.FinancialConnectionsAccountDisconnectParams{}
result, err := sc.FinancialConnectionsAccounts.Disconnect(
"fca_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -2008,8 +2008,8 @@ func TestFinancialConnectionsAccountsGet(t *testing.T) {
}
func TestFinancialConnectionsAccountsGetService(t *testing.T) {
- params := &stripe.FinancialConnectionsAccountListParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.FinancialConnectionsAccountListParams{}
result := sc.FinancialConnectionsAccounts.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2023,8 +2023,8 @@ func TestFinancialConnectionsAccountsGet2(t *testing.T) {
}
func TestFinancialConnectionsAccountsGet2Service(t *testing.T) {
- params := &stripe.FinancialConnectionsAccountParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.FinancialConnectionsAccountParams{}
result, err := sc.FinancialConnectionsAccounts.GetByID("fca_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2042,12 +2042,12 @@ func TestFinancialConnectionsAccountsGet3(t *testing.T) {
}
func TestFinancialConnectionsAccountsGet3Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.FinancialConnectionsAccountListParams{
AccountHolder: &stripe.FinancialConnectionsAccountListAccountHolderParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
},
}
- sc := client.New(TestAPIKey, nil)
result := sc.FinancialConnectionsAccounts.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2062,8 +2062,8 @@ func TestFinancialConnectionsAccountsGet4(t *testing.T) {
}
func TestFinancialConnectionsAccountsGet4Service(t *testing.T) {
- params := &stripe.FinancialConnectionsAccountParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.FinancialConnectionsAccountParams{}
result, err := sc.FinancialConnectionsAccounts.GetByID(
"fca_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -2081,11 +2081,11 @@ func TestFinancialConnectionsAccountsOwnersGet(t *testing.T) {
}
func TestFinancialConnectionsAccountsOwnersGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.FinancialConnectionsAccountListOwnersParams{
Ownership: stripe.String("fcaowns_xyz"),
Account: stripe.String("fca_xyz"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.FinancialConnectionsAccounts.ListOwners(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2103,12 +2103,12 @@ func TestFinancialConnectionsAccountsOwnersGet2(t *testing.T) {
}
func TestFinancialConnectionsAccountsOwnersGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.FinancialConnectionsAccountListOwnersParams{
Ownership: stripe.String("fcaowns_xxxxxxxxxxxxx"),
Account: stripe.String("fca_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.FinancialConnectionsAccounts.ListOwners(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2124,10 +2124,10 @@ func TestFinancialConnectionsAccountsRefreshPost(t *testing.T) {
}
func TestFinancialConnectionsAccountsRefreshPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.FinancialConnectionsAccountRefreshParams{
Features: []*string{stripe.String("balance")},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.FinancialConnectionsAccounts.Refresh("fca_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2143,10 +2143,10 @@ func TestFinancialConnectionsAccountsSubscribePost(t *testing.T) {
}
func TestFinancialConnectionsAccountsSubscribePostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.FinancialConnectionsAccountSubscribeParams{
Features: []*string{stripe.String("transactions")},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.FinancialConnectionsAccounts.Subscribe("fa_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2162,10 +2162,10 @@ func TestFinancialConnectionsAccountsUnsubscribePost(t *testing.T) {
}
func TestFinancialConnectionsAccountsUnsubscribePostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.FinancialConnectionsAccountUnsubscribeParams{
Features: []*string{stripe.String("transactions")},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.FinancialConnectionsAccounts.Unsubscribe("fa_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2179,8 +2179,8 @@ func TestFinancialConnectionsSessionsGet(t *testing.T) {
}
func TestFinancialConnectionsSessionsGetService(t *testing.T) {
- params := &stripe.FinancialConnectionsSessionParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.FinancialConnectionsSessionParams{}
result, err := sc.FinancialConnectionsSessions.Get("fcsess_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2195,8 +2195,8 @@ func TestFinancialConnectionsSessionsGet2(t *testing.T) {
}
func TestFinancialConnectionsSessionsGet2Service(t *testing.T) {
- params := &stripe.FinancialConnectionsSessionParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.FinancialConnectionsSessionParams{}
result, err := sc.FinancialConnectionsSessions.Get(
"fcsess_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -2219,6 +2219,7 @@ func TestFinancialConnectionsSessionsPost(t *testing.T) {
}
func TestFinancialConnectionsSessionsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.FinancialConnectionsSessionParams{
AccountHolder: &stripe.FinancialConnectionsSessionAccountHolderParams{
Type: stripe.String(string(stripe.FinancialConnectionsSessionAccountHolderTypeCustomer)),
@@ -2228,7 +2229,6 @@ func TestFinancialConnectionsSessionsPostService(t *testing.T) {
stripe.String(string(stripe.FinancialConnectionsSessionPermissionBalances)),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.FinancialConnectionsSessions.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2254,6 +2254,7 @@ func TestFinancialConnectionsSessionsPost2(t *testing.T) {
}
func TestFinancialConnectionsSessionsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.FinancialConnectionsSessionParams{
AccountHolder: &stripe.FinancialConnectionsSessionAccountHolderParams{
Type: stripe.String(string(stripe.FinancialConnectionsSessionAccountHolderTypeCustomer)),
@@ -2267,7 +2268,6 @@ func TestFinancialConnectionsSessionsPost2Service(t *testing.T) {
Countries: []*string{stripe.String("US")},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.FinancialConnectionsSessions.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2281,8 +2281,8 @@ func TestFinancialConnectionsTransactionsGet(t *testing.T) {
}
func TestFinancialConnectionsTransactionsGetService(t *testing.T) {
- params := &stripe.FinancialConnectionsTransactionParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.FinancialConnectionsTransactionParams{}
result, err := sc.FinancialConnectionsTransactions.Get("tr_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2298,10 +2298,10 @@ func TestFinancialConnectionsTransactionsGet2(t *testing.T) {
}
func TestFinancialConnectionsTransactionsGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.FinancialConnectionsTransactionListParams{
Account: stripe.String("fca_xyz"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.FinancialConnectionsTransactions.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2316,9 +2316,9 @@ func TestIdentityVerificationReportsGet(t *testing.T) {
}
func TestIdentityVerificationReportsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IdentityVerificationReportListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.IdentityVerificationReports.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2332,8 +2332,8 @@ func TestIdentityVerificationReportsGet2(t *testing.T) {
}
func TestIdentityVerificationReportsGet2Service(t *testing.T) {
- params := &stripe.IdentityVerificationReportParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IdentityVerificationReportParams{}
result, err := sc.IdentityVerificationReports.Get("vr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2348,8 +2348,8 @@ func TestIdentityVerificationSessionsCancelPost(t *testing.T) {
}
func TestIdentityVerificationSessionsCancelPostService(t *testing.T) {
- params := &stripe.IdentityVerificationSessionCancelParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IdentityVerificationSessionCancelParams{}
result, err := sc.IdentityVerificationSessions.Cancel(
"vs_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -2365,9 +2365,9 @@ func TestIdentityVerificationSessionsGet(t *testing.T) {
}
func TestIdentityVerificationSessionsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IdentityVerificationSessionListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.IdentityVerificationSessions.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2381,8 +2381,8 @@ func TestIdentityVerificationSessionsGet2(t *testing.T) {
}
func TestIdentityVerificationSessionsGet2Service(t *testing.T) {
- params := &stripe.IdentityVerificationSessionParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IdentityVerificationSessionParams{}
result, err := sc.IdentityVerificationSessions.Get(
"vs_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -2399,10 +2399,10 @@ func TestIdentityVerificationSessionsPost(t *testing.T) {
}
func TestIdentityVerificationSessionsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IdentityVerificationSessionParams{
Type: stripe.String(string(stripe.IdentityVerificationSessionTypeDocument)),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.IdentityVerificationSessions.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2419,10 +2419,10 @@ func TestIdentityVerificationSessionsPost2(t *testing.T) {
}
func TestIdentityVerificationSessionsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IdentityVerificationSessionParams{
Type: stripe.String(string(stripe.IdentityVerificationSessionTypeIDNumber)),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.IdentityVerificationSessions.Update(
"vs_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -2438,8 +2438,8 @@ func TestIdentityVerificationSessionsRedactPost(t *testing.T) {
}
func TestIdentityVerificationSessionsRedactPostService(t *testing.T) {
- params := &stripe.IdentityVerificationSessionRedactParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IdentityVerificationSessionRedactParams{}
result, err := sc.IdentityVerificationSessions.Redact(
"vs_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -2454,8 +2454,8 @@ func TestInvoiceitemsDelete(t *testing.T) {
}
func TestInvoiceitemsDeleteService(t *testing.T) {
- params := &stripe.InvoiceItemParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.InvoiceItemParams{}
result, err := sc.InvoiceItems.Del("ii_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2471,10 +2471,10 @@ func TestInvoiceitemsPost(t *testing.T) {
}
func TestInvoiceitemsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.InvoiceItemParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.InvoiceItems.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2489,9 +2489,9 @@ func TestInvoiceitemsPost2(t *testing.T) {
}
func TestInvoiceitemsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.InvoiceItemParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.InvoiceItems.Update("ii_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2505,8 +2505,8 @@ func TestInvoicesDelete(t *testing.T) {
}
func TestInvoicesDeleteService(t *testing.T) {
- params := &stripe.InvoiceParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.InvoiceParams{}
result, err := sc.Invoices.Del("in_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2520,8 +2520,8 @@ func TestInvoicesFinalizePost(t *testing.T) {
}
func TestInvoicesFinalizePostService(t *testing.T) {
- params := &stripe.InvoiceFinalizeInvoiceParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.InvoiceFinalizeInvoiceParams{}
result, err := sc.Invoices.FinalizeInvoice("in_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2536,9 +2536,9 @@ func TestInvoicesGet(t *testing.T) {
}
func TestInvoicesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.InvoiceListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Invoices.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2552,8 +2552,8 @@ func TestInvoicesGet2(t *testing.T) {
}
func TestInvoicesGet2Service(t *testing.T) {
- params := &stripe.InvoiceParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.InvoiceParams{}
result, err := sc.Invoices.Get("in_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2568,9 +2568,9 @@ func TestInvoicesGet3(t *testing.T) {
}
func TestInvoicesGet3Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.InvoiceParams{}
params.AddExpand("customer")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Invoices.Get("in_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2584,8 +2584,8 @@ func TestInvoicesPayPost(t *testing.T) {
}
func TestInvoicesPayPostService(t *testing.T) {
- params := &stripe.InvoicePayParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.InvoicePayParams{}
result, err := sc.Invoices.Pay("in_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2599,8 +2599,8 @@ func TestInvoicesPost(t *testing.T) {
}
func TestInvoicesPostService(t *testing.T) {
- params := &stripe.InvoiceParams{Customer: stripe.String("cus_xxxxxxxxxxxxx")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.InvoiceParams{Customer: stripe.String("cus_xxxxxxxxxxxxx")}
result, err := sc.Invoices.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2615,9 +2615,9 @@ func TestInvoicesPost2(t *testing.T) {
}
func TestInvoicesPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.InvoiceParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Invoices.Update("in_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2635,12 +2635,12 @@ func TestInvoicesSearchGet(t *testing.T) {
}
func TestInvoicesSearchGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.InvoiceSearchParams{
SearchParams: stripe.SearchParams{
Query: "total>999 AND metadata['order_id']:'6735'",
},
}
- sc := client.New(TestAPIKey, nil)
result := sc.Invoices.Search(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2654,8 +2654,8 @@ func TestInvoicesSendPost(t *testing.T) {
}
func TestInvoicesSendPostService(t *testing.T) {
- params := &stripe.InvoiceSendInvoiceParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.InvoiceSendInvoiceParams{}
result, err := sc.Invoices.SendInvoice("in_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2669,8 +2669,8 @@ func TestInvoicesVoidPost(t *testing.T) {
}
func TestInvoicesVoidPostService(t *testing.T) {
- params := &stripe.InvoiceVoidInvoiceParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.InvoiceVoidInvoiceParams{}
result, err := sc.Invoices.VoidInvoice("in_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2684,8 +2684,8 @@ func TestIssuingAuthorizationsApprovePost(t *testing.T) {
}
func TestIssuingAuthorizationsApprovePostService(t *testing.T) {
- params := &stripe.IssuingAuthorizationApproveParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingAuthorizationApproveParams{}
result, err := sc.IssuingAuthorizations.Approve(
"iauth_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -2700,8 +2700,8 @@ func TestIssuingAuthorizationsDeclinePost(t *testing.T) {
}
func TestIssuingAuthorizationsDeclinePostService(t *testing.T) {
- params := &stripe.IssuingAuthorizationDeclineParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingAuthorizationDeclineParams{}
result, err := sc.IssuingAuthorizations.Decline(
"iauth_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -2717,9 +2717,9 @@ func TestIssuingAuthorizationsGet(t *testing.T) {
}
func TestIssuingAuthorizationsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingAuthorizationListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.IssuingAuthorizations.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2733,8 +2733,8 @@ func TestIssuingAuthorizationsGet2(t *testing.T) {
}
func TestIssuingAuthorizationsGet2Service(t *testing.T) {
- params := &stripe.IssuingAuthorizationParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingAuthorizationParams{}
result, err := sc.IssuingAuthorizations.Get("iauth_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2749,9 +2749,9 @@ func TestIssuingAuthorizationsPost(t *testing.T) {
}
func TestIssuingAuthorizationsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingAuthorizationParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.IssuingAuthorizations.Update("iauth_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2766,9 +2766,9 @@ func TestIssuingCardholdersGet(t *testing.T) {
}
func TestIssuingCardholdersGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingCardholderListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.IssuingCardholders.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2782,8 +2782,8 @@ func TestIssuingCardholdersGet2(t *testing.T) {
}
func TestIssuingCardholdersGet2Service(t *testing.T) {
- params := &stripe.IssuingCardholderParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingCardholderParams{}
result, err := sc.IssuingCardholders.Get("ich_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2811,6 +2811,7 @@ func TestIssuingCardholdersPost(t *testing.T) {
}
func TestIssuingCardholdersPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingCardholderParams{
Type: stripe.String(string(stripe.IssuingCardholderTypeIndividual)),
Name: stripe.String("Jenny Rosen"),
@@ -2826,7 +2827,6 @@ func TestIssuingCardholdersPostService(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.IssuingCardholders.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2841,9 +2841,9 @@ func TestIssuingCardholdersPost2(t *testing.T) {
}
func TestIssuingCardholdersPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingCardholderParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.IssuingCardholders.Update("ich_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2858,9 +2858,9 @@ func TestIssuingCardsGet(t *testing.T) {
}
func TestIssuingCardsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingCardListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.IssuingCards.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2874,8 +2874,8 @@ func TestIssuingCardsGet2(t *testing.T) {
}
func TestIssuingCardsGet2Service(t *testing.T) {
- params := &stripe.IssuingCardParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingCardParams{}
result, err := sc.IssuingCards.Get("ic_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2893,12 +2893,12 @@ func TestIssuingCardsPost(t *testing.T) {
}
func TestIssuingCardsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingCardParams{
Cardholder: stripe.String("ich_xxxxxxxxxxxxx"),
Currency: stripe.String(string(stripe.CurrencyUSD)),
Type: stripe.String(string(stripe.IssuingCardTypeVirtual)),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.IssuingCards.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2913,9 +2913,9 @@ func TestIssuingCardsPost2(t *testing.T) {
}
func TestIssuingCardsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingCardParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.IssuingCards.Update("ic_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2930,9 +2930,9 @@ func TestIssuingDisputesGet(t *testing.T) {
}
func TestIssuingDisputesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingDisputeListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.IssuingDisputes.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -2946,8 +2946,8 @@ func TestIssuingDisputesGet2(t *testing.T) {
}
func TestIssuingDisputesGet2Service(t *testing.T) {
- params := &stripe.IssuingDisputeParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingDisputeParams{}
result, err := sc.IssuingDisputes.Get("idp_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2969,6 +2969,7 @@ func TestIssuingDisputesPost(t *testing.T) {
}
func TestIssuingDisputesPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingDisputeParams{
Transaction: stripe.String("ipi_xxxxxxxxxxxxx"),
Evidence: &stripe.IssuingDisputeEvidenceParams{
@@ -2978,7 +2979,6 @@ func TestIssuingDisputesPostService(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.IssuingDisputes.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -2992,8 +2992,8 @@ func TestIssuingDisputesSubmitPost(t *testing.T) {
}
func TestIssuingDisputesSubmitPostService(t *testing.T) {
- params := &stripe.IssuingDisputeSubmitParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingDisputeSubmitParams{}
result, err := sc.IssuingDisputes.Submit("idp_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3007,8 +3007,8 @@ func TestIssuingPersonalizationDesignsGet(t *testing.T) {
}
func TestIssuingPersonalizationDesignsGetService(t *testing.T) {
- params := &stripe.IssuingPersonalizationDesignListParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingPersonalizationDesignListParams{}
result := sc.IssuingPersonalizationDesigns.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -3022,8 +3022,8 @@ func TestIssuingPersonalizationDesignsGet2(t *testing.T) {
}
func TestIssuingPersonalizationDesignsGet2Service(t *testing.T) {
- params := &stripe.IssuingPersonalizationDesignParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingPersonalizationDesignParams{}
result, err := sc.IssuingPersonalizationDesigns.Get("pd_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3039,10 +3039,10 @@ func TestIssuingPersonalizationDesignsPost(t *testing.T) {
}
func TestIssuingPersonalizationDesignsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingPersonalizationDesignParams{
PhysicalBundle: stripe.String("pb_xyz"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.IssuingPersonalizationDesigns.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3056,8 +3056,8 @@ func TestIssuingPersonalizationDesignsPost2(t *testing.T) {
}
func TestIssuingPersonalizationDesignsPost2Service(t *testing.T) {
- params := &stripe.IssuingPersonalizationDesignParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingPersonalizationDesignParams{}
result, err := sc.IssuingPersonalizationDesigns.Update("pd_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3071,8 +3071,8 @@ func TestIssuingPhysicalBundlesGet(t *testing.T) {
}
func TestIssuingPhysicalBundlesGetService(t *testing.T) {
- params := &stripe.IssuingPhysicalBundleListParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingPhysicalBundleListParams{}
result := sc.IssuingPhysicalBundles.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -3086,8 +3086,8 @@ func TestIssuingPhysicalBundlesGet2(t *testing.T) {
}
func TestIssuingPhysicalBundlesGet2Service(t *testing.T) {
- params := &stripe.IssuingPhysicalBundleParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingPhysicalBundleParams{}
result, err := sc.IssuingPhysicalBundles.Get("pb_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3102,9 +3102,9 @@ func TestIssuingTransactionsGet(t *testing.T) {
}
func TestIssuingTransactionsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingTransactionListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.IssuingTransactions.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -3118,8 +3118,8 @@ func TestIssuingTransactionsGet2(t *testing.T) {
}
func TestIssuingTransactionsGet2Service(t *testing.T) {
- params := &stripe.IssuingTransactionParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.IssuingTransactionParams{}
result, err := sc.IssuingTransactions.Get("ipi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3134,9 +3134,9 @@ func TestIssuingTransactionsPost(t *testing.T) {
}
func TestIssuingTransactionsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.IssuingTransactionParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.IssuingTransactions.Update("ipi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3150,8 +3150,8 @@ func TestMandatesGet(t *testing.T) {
}
func TestMandatesGetService(t *testing.T) {
- params := &stripe.MandateParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.MandateParams{}
result, err := sc.Mandates.Get("mandate_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3165,8 +3165,8 @@ func TestPaymentIntentsApplyCustomerBalancePost(t *testing.T) {
}
func TestPaymentIntentsApplyCustomerBalancePostService(t *testing.T) {
- params := &stripe.PaymentIntentApplyCustomerBalanceParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PaymentIntentApplyCustomerBalanceParams{}
result, err := sc.PaymentIntents.ApplyCustomerBalance(
"pi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -3181,8 +3181,8 @@ func TestPaymentIntentsCancelPost(t *testing.T) {
}
func TestPaymentIntentsCancelPostService(t *testing.T) {
- params := &stripe.PaymentIntentCancelParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PaymentIntentCancelParams{}
result, err := sc.PaymentIntents.Cancel("pi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3196,8 +3196,8 @@ func TestPaymentIntentsCapturePost(t *testing.T) {
}
func TestPaymentIntentsCapturePostService(t *testing.T) {
- params := &stripe.PaymentIntentCaptureParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PaymentIntentCaptureParams{}
result, err := sc.PaymentIntents.Capture("pi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3213,10 +3213,10 @@ func TestPaymentIntentsConfirmPost(t *testing.T) {
}
func TestPaymentIntentsConfirmPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentIntentConfirmParams{
PaymentMethod: stripe.String("pm_card_visa"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentIntents.Confirm("pi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3231,9 +3231,9 @@ func TestPaymentIntentsGet(t *testing.T) {
}
func TestPaymentIntentsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentIntentListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.PaymentIntents.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -3247,8 +3247,8 @@ func TestPaymentIntentsGet2(t *testing.T) {
}
func TestPaymentIntentsGet2Service(t *testing.T) {
- params := &stripe.PaymentIntentParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PaymentIntentParams{}
result, err := sc.PaymentIntents.Get("pi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3265,10 +3265,10 @@ func TestPaymentIntentsIncrementAuthorizationPost(t *testing.T) {
}
func TestPaymentIntentsIncrementAuthorizationPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentIntentIncrementAuthorizationParams{
Amount: stripe.Int64(2099),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentIntents.IncrementAuthorization(
"pi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -3289,6 +3289,7 @@ func TestPaymentIntentsPost(t *testing.T) {
}
func TestPaymentIntentsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentIntentParams{
Amount: stripe.Int64(1099),
Currency: stripe.String(string(stripe.CurrencyEUR)),
@@ -3296,7 +3297,6 @@ func TestPaymentIntentsPostService(t *testing.T) {
Enabled: stripe.Bool(true),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentIntents.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3316,6 +3316,7 @@ func TestPaymentIntentsPost2(t *testing.T) {
}
func TestPaymentIntentsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentIntentParams{
Amount: stripe.Int64(2000),
Currency: stripe.String(string(stripe.CurrencyUSD)),
@@ -3323,7 +3324,6 @@ func TestPaymentIntentsPost2Service(t *testing.T) {
Enabled: stripe.Bool(true),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentIntents.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3338,9 +3338,9 @@ func TestPaymentIntentsPost3(t *testing.T) {
}
func TestPaymentIntentsPost3Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentIntentParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentIntents.Update("pi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3361,6 +3361,7 @@ func TestPaymentIntentsPost4(t *testing.T) {
}
func TestPaymentIntentsPost4Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentIntentParams{
Amount: stripe.Int64(200),
Currency: stripe.String(string(stripe.CurrencyUSD)),
@@ -3369,7 +3370,6 @@ func TestPaymentIntentsPost4Service(t *testing.T) {
P24: &stripe.PaymentMethodP24Params{Bank: stripe.String("blik")},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentIntents.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3387,12 +3387,12 @@ func TestPaymentIntentsSearchGet(t *testing.T) {
}
func TestPaymentIntentsSearchGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentIntentSearchParams{
SearchParams: stripe.SearchParams{
Query: "status:'succeeded' AND metadata['order_id']:'6735'",
},
}
- sc := client.New(TestAPIKey, nil)
result := sc.PaymentIntents.Search(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -3406,8 +3406,8 @@ func TestPaymentIntentsVerifyMicrodepositsPost(t *testing.T) {
}
func TestPaymentIntentsVerifyMicrodepositsPostService(t *testing.T) {
- params := &stripe.PaymentIntentVerifyMicrodepositsParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PaymentIntentVerifyMicrodepositsParams{}
result, err := sc.PaymentIntents.VerifyMicrodeposits(
"pi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -3424,10 +3424,10 @@ func TestPaymentIntentsVerifyMicrodepositsPost2(t *testing.T) {
}
func TestPaymentIntentsVerifyMicrodepositsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentIntentVerifyMicrodepositsParams{
Amounts: []*int64{stripe.Int64(32), stripe.Int64(45)},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentIntents.VerifyMicrodeposits(
"pi_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -3442,8 +3442,8 @@ func TestPaymentLinksGet(t *testing.T) {
}
func TestPaymentLinksGetService(t *testing.T) {
- params := &stripe.PaymentLinkParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PaymentLinkParams{}
result, err := sc.PaymentLinks.Get("pl_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3458,9 +3458,9 @@ func TestPaymentLinksGet2(t *testing.T) {
}
func TestPaymentLinksGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentLinkListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.PaymentLinks.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -3474,8 +3474,8 @@ func TestPaymentLinksGet3(t *testing.T) {
}
func TestPaymentLinksGet3Service(t *testing.T) {
- params := &stripe.PaymentLinkParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PaymentLinkParams{}
result, err := sc.PaymentLinks.Get("plink_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3491,10 +3491,10 @@ func TestPaymentLinksLineItemsGet(t *testing.T) {
}
func TestPaymentLinksLineItemsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentLinkListLineItemsParams{
PaymentLink: stripe.String("pl_xyz"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.PaymentLinks.ListLineItems(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -3515,6 +3515,7 @@ func TestPaymentLinksPost(t *testing.T) {
}
func TestPaymentLinksPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentLinkParams{
LineItems: []*stripe.PaymentLinkLineItemParams{
{
@@ -3523,7 +3524,6 @@ func TestPaymentLinksPostService(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentLinks.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3544,6 +3544,7 @@ func TestPaymentLinksPost2(t *testing.T) {
}
func TestPaymentLinksPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentLinkParams{
LineItems: []*stripe.PaymentLinkLineItemParams{
{
@@ -3552,7 +3553,6 @@ func TestPaymentLinksPost2Service(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentLinks.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3566,8 +3566,8 @@ func TestPaymentLinksPost3(t *testing.T) {
}
func TestPaymentLinksPost3Service(t *testing.T) {
- params := &stripe.PaymentLinkParams{Active: stripe.Bool(false)}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PaymentLinkParams{Active: stripe.Bool(false)}
result, err := sc.PaymentLinks.Update("plink_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3583,10 +3583,10 @@ func TestPaymentMethodConfigurationsGet(t *testing.T) {
}
func TestPaymentMethodConfigurationsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentMethodConfigurationListParams{
Application: stripe.String("foo"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.PaymentMethodConfigurations.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -3600,8 +3600,8 @@ func TestPaymentMethodConfigurationsGet2(t *testing.T) {
}
func TestPaymentMethodConfigurationsGet2Service(t *testing.T) {
- params := &stripe.PaymentMethodConfigurationParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PaymentMethodConfigurationParams{}
result, err := sc.PaymentMethodConfigurations.Get("foo", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3626,6 +3626,7 @@ func TestPaymentMethodConfigurationsPost(t *testing.T) {
}
func TestPaymentMethodConfigurationsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentMethodConfigurationParams{
ACSSDebit: &stripe.PaymentMethodConfigurationACSSDebitParams{
DisplayPreference: &stripe.PaymentMethodConfigurationACSSDebitDisplayPreferenceParams{
@@ -3638,7 +3639,6 @@ func TestPaymentMethodConfigurationsPostService(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentMethodConfigurations.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3658,6 +3658,7 @@ func TestPaymentMethodConfigurationsPost2(t *testing.T) {
}
func TestPaymentMethodConfigurationsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentMethodConfigurationParams{
ACSSDebit: &stripe.PaymentMethodConfigurationACSSDebitParams{
DisplayPreference: &stripe.PaymentMethodConfigurationACSSDebitDisplayPreferenceParams{
@@ -3665,7 +3666,6 @@ func TestPaymentMethodConfigurationsPost2Service(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentMethodConfigurations.Update("foo", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3681,10 +3681,10 @@ func TestPaymentMethodsAttachPost(t *testing.T) {
}
func TestPaymentMethodsAttachPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentMethodAttachParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentMethods.Attach("pm_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3698,8 +3698,8 @@ func TestPaymentMethodsDetachPost(t *testing.T) {
}
func TestPaymentMethodsDetachPostService(t *testing.T) {
- params := &stripe.PaymentMethodDetachParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PaymentMethodDetachParams{}
result, err := sc.PaymentMethods.Detach("pm_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3716,11 +3716,11 @@ func TestPaymentMethodsGet(t *testing.T) {
}
func TestPaymentMethodsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentMethodListParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
Type: stripe.String(string(stripe.PaymentMethodTypeCard)),
}
- sc := client.New(TestAPIKey, nil)
result := sc.PaymentMethods.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -3734,8 +3734,8 @@ func TestPaymentMethodsGet2(t *testing.T) {
}
func TestPaymentMethodsGet2Service(t *testing.T) {
- params := &stripe.PaymentMethodParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PaymentMethodParams{}
result, err := sc.PaymentMethods.Get("pm_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3757,6 +3757,7 @@ func TestPaymentMethodsPost(t *testing.T) {
}
func TestPaymentMethodsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentMethodParams{
Type: stripe.String(string(stripe.PaymentMethodTypeCard)),
Card: &stripe.PaymentMethodCardParams{
@@ -3766,7 +3767,6 @@ func TestPaymentMethodsPostService(t *testing.T) {
CVC: stripe.String("314"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentMethods.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3781,9 +3781,9 @@ func TestPaymentMethodsPost2(t *testing.T) {
}
func TestPaymentMethodsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PaymentMethodParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.PaymentMethods.Update("pm_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3797,8 +3797,8 @@ func TestPayoutsCancelPost(t *testing.T) {
}
func TestPayoutsCancelPostService(t *testing.T) {
- params := &stripe.PayoutParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PayoutParams{}
result, err := sc.Payouts.Cancel("po_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3813,9 +3813,9 @@ func TestPayoutsGet(t *testing.T) {
}
func TestPayoutsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PayoutListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Payouts.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -3829,8 +3829,8 @@ func TestPayoutsGet2(t *testing.T) {
}
func TestPayoutsGet2Service(t *testing.T) {
- params := &stripe.PayoutParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PayoutParams{}
result, err := sc.Payouts.Get("po_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3847,11 +3847,11 @@ func TestPayoutsPost(t *testing.T) {
}
func TestPayoutsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PayoutParams{
Amount: stripe.Int64(1100),
Currency: stripe.String(string(stripe.CurrencyUSD)),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Payouts.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3866,9 +3866,9 @@ func TestPayoutsPost2(t *testing.T) {
}
func TestPayoutsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PayoutParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Payouts.Update("po_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3882,8 +3882,8 @@ func TestPayoutsReversePost(t *testing.T) {
}
func TestPayoutsReversePostService(t *testing.T) {
- params := &stripe.PayoutReverseParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PayoutReverseParams{}
result, err := sc.Payouts.Reverse("po_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3897,8 +3897,8 @@ func TestPlansDelete(t *testing.T) {
}
func TestPlansDeleteService(t *testing.T) {
- params := &stripe.PlanParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PlanParams{}
result, err := sc.Plans.Del("price_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3913,9 +3913,9 @@ func TestPlansGet(t *testing.T) {
}
func TestPlansGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PlanListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Plans.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -3929,8 +3929,8 @@ func TestPlansGet2(t *testing.T) {
}
func TestPlansGet2Service(t *testing.T) {
- params := &stripe.PlanParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PlanParams{}
result, err := sc.Plans.Get("price_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3949,13 +3949,13 @@ func TestPlansPost(t *testing.T) {
}
func TestPlansPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PlanParams{
Amount: stripe.Int64(2000),
Currency: stripe.String(string(stripe.CurrencyUSD)),
Interval: stripe.String(string(stripe.PlanIntervalMonth)),
Product: &stripe.PlanProductParams{Name: stripe.String("My product")},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Plans.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3970,9 +3970,9 @@ func TestPlansPost2(t *testing.T) {
}
func TestPlansPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PlanParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Plans.Update("price_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -3987,9 +3987,9 @@ func TestPricesGet(t *testing.T) {
}
func TestPricesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PriceListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Prices.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4003,8 +4003,8 @@ func TestPricesGet2(t *testing.T) {
}
func TestPricesGet2Service(t *testing.T) {
- params := &stripe.PriceParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PriceParams{}
result, err := sc.Prices.Get("price_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4029,6 +4029,7 @@ func TestPricesPost(t *testing.T) {
}
func TestPricesPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PriceParams{
UnitAmount: stripe.Int64(2000),
Currency: stripe.String(string(stripe.CurrencyUSD)),
@@ -4041,7 +4042,6 @@ func TestPricesPostService(t *testing.T) {
},
Product: stripe.String("prod_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Prices.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4062,6 +4062,7 @@ func TestPricesPost2(t *testing.T) {
}
func TestPricesPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PriceParams{
UnitAmount: stripe.Int64(2000),
Currency: stripe.String(string(stripe.CurrencyUSD)),
@@ -4070,7 +4071,6 @@ func TestPricesPost2Service(t *testing.T) {
},
Product: stripe.String("prod_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Prices.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4085,9 +4085,9 @@ func TestPricesPost3(t *testing.T) {
}
func TestPricesPost3Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PriceParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Prices.Update("price_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4105,12 +4105,12 @@ func TestPricesSearchGet(t *testing.T) {
}
func TestPricesSearchGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PriceSearchParams{
SearchParams: stripe.SearchParams{
Query: "active:'true' AND metadata['order_id']:'6735'",
},
}
- sc := client.New(TestAPIKey, nil)
result := sc.Prices.Search(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4124,8 +4124,8 @@ func TestProductsDelete(t *testing.T) {
}
func TestProductsDeleteService(t *testing.T) {
- params := &stripe.ProductParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ProductParams{}
result, err := sc.Products.Del("prod_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4140,9 +4140,9 @@ func TestProductsGet(t *testing.T) {
}
func TestProductsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ProductListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Products.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4156,8 +4156,8 @@ func TestProductsGet2(t *testing.T) {
}
func TestProductsGet2Service(t *testing.T) {
- params := &stripe.ProductParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ProductParams{}
result, err := sc.Products.Get("prod_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4171,8 +4171,8 @@ func TestProductsPost(t *testing.T) {
}
func TestProductsPostService(t *testing.T) {
- params := &stripe.ProductParams{Name: stripe.String("Gold Special")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ProductParams{Name: stripe.String("Gold Special")}
result, err := sc.Products.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4187,9 +4187,9 @@ func TestProductsPost2(t *testing.T) {
}
func TestProductsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ProductParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Products.Update("prod_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4207,12 +4207,12 @@ func TestProductsSearchGet(t *testing.T) {
}
func TestProductsSearchGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ProductSearchParams{
SearchParams: stripe.SearchParams{
Query: "active:'true' AND metadata['order_id']:'6735'",
},
}
- sc := client.New(TestAPIKey, nil)
result := sc.Products.Search(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4227,9 +4227,9 @@ func TestPromotionCodesGet(t *testing.T) {
}
func TestPromotionCodesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PromotionCodeListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.PromotionCodes.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4243,8 +4243,8 @@ func TestPromotionCodesGet2(t *testing.T) {
}
func TestPromotionCodesGet2Service(t *testing.T) {
- params := &stripe.PromotionCodeParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PromotionCodeParams{}
result, err := sc.PromotionCodes.Get("promo_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4258,8 +4258,8 @@ func TestPromotionCodesPost(t *testing.T) {
}
func TestPromotionCodesPostService(t *testing.T) {
- params := &stripe.PromotionCodeParams{Coupon: stripe.String("Z4OV52SU")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.PromotionCodeParams{Coupon: stripe.String("Z4OV52SU")}
result, err := sc.PromotionCodes.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4274,9 +4274,9 @@ func TestPromotionCodesPost2(t *testing.T) {
}
func TestPromotionCodesPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.PromotionCodeParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.PromotionCodes.Update("promo_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4290,8 +4290,8 @@ func TestQuotesAcceptPost(t *testing.T) {
}
func TestQuotesAcceptPostService(t *testing.T) {
- params := &stripe.QuoteAcceptParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.QuoteAcceptParams{}
result, err := sc.Quotes.Accept("qt_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4305,8 +4305,8 @@ func TestQuotesCancelPost(t *testing.T) {
}
func TestQuotesCancelPostService(t *testing.T) {
- params := &stripe.QuoteCancelParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.QuoteCancelParams{}
result, err := sc.Quotes.Cancel("qt_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4320,8 +4320,8 @@ func TestQuotesFinalizePost(t *testing.T) {
}
func TestQuotesFinalizePostService(t *testing.T) {
- params := &stripe.QuoteFinalizeQuoteParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.QuoteFinalizeQuoteParams{}
result, err := sc.Quotes.FinalizeQuote("qt_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4336,9 +4336,9 @@ func TestQuotesGet(t *testing.T) {
}
func TestQuotesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.QuoteListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Quotes.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4352,8 +4352,8 @@ func TestQuotesGet2(t *testing.T) {
}
func TestQuotesGet2Service(t *testing.T) {
- params := &stripe.QuoteParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.QuoteParams{}
result, err := sc.Quotes.Get("qt_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4369,10 +4369,10 @@ func TestQuotesLineItemsGet(t *testing.T) {
}
func TestQuotesLineItemsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.QuoteListLineItemsParams{
Quote: stripe.String("qt_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.Quotes.ListLineItems(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4386,8 +4386,8 @@ func TestQuotesPdfGet(t *testing.T) {
}
func TestQuotesPdfGetService(t *testing.T) {
- params := &stripe.QuotePDFParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.QuotePDFParams{}
result, err := sc.Quotes.PDF("qt_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4409,6 +4409,7 @@ func TestQuotesPost(t *testing.T) {
}
func TestQuotesPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.QuoteParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
LineItems: []*stripe.QuoteLineItemParams{
@@ -4418,7 +4419,6 @@ func TestQuotesPostService(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Quotes.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4433,9 +4433,9 @@ func TestQuotesPost2(t *testing.T) {
}
func TestQuotesPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.QuoteParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Quotes.Update("qt_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4452,11 +4452,11 @@ func TestQuotesPreviewInvoicesLinesGet(t *testing.T) {
}
func TestQuotesPreviewInvoicesLinesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.QuoteListPreviewInvoiceLinesParams{
Quote: stripe.String("qt_xyz"),
PreviewInvoice: stripe.String("in_xyz"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.Quotes.ListPreviewInvoiceLines(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4471,9 +4471,9 @@ func TestRadarEarlyFraudWarningsGet(t *testing.T) {
}
func TestRadarEarlyFraudWarningsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.RadarEarlyFraudWarningListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.RadarEarlyFraudWarnings.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4487,8 +4487,8 @@ func TestRadarEarlyFraudWarningsGet2(t *testing.T) {
}
func TestRadarEarlyFraudWarningsGet2Service(t *testing.T) {
- params := &stripe.RadarEarlyFraudWarningParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.RadarEarlyFraudWarningParams{}
result, err := sc.RadarEarlyFraudWarnings.Get("issfr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4502,8 +4502,8 @@ func TestRadarValueListItemsDelete(t *testing.T) {
}
func TestRadarValueListItemsDeleteService(t *testing.T) {
- params := &stripe.RadarValueListItemParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.RadarValueListItemParams{}
result, err := sc.RadarValueListItems.Del("rsli_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4520,11 +4520,11 @@ func TestRadarValueListItemsGet(t *testing.T) {
}
func TestRadarValueListItemsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.RadarValueListItemListParams{
ValueList: stripe.String("rsl_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.RadarValueListItems.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4538,8 +4538,8 @@ func TestRadarValueListItemsGet2(t *testing.T) {
}
func TestRadarValueListItemsGet2Service(t *testing.T) {
- params := &stripe.RadarValueListItemParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.RadarValueListItemParams{}
result, err := sc.RadarValueListItems.Get("rsli_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4556,11 +4556,11 @@ func TestRadarValueListItemsPost(t *testing.T) {
}
func TestRadarValueListItemsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.RadarValueListItemParams{
ValueList: stripe.String("rsl_xxxxxxxxxxxxx"),
Value: stripe.String("1.2.3.4"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.RadarValueListItems.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4574,8 +4574,8 @@ func TestRadarValueListsDelete(t *testing.T) {
}
func TestRadarValueListsDeleteService(t *testing.T) {
- params := &stripe.RadarValueListParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.RadarValueListParams{}
result, err := sc.RadarValueLists.Del("rsl_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4590,9 +4590,9 @@ func TestRadarValueListsGet(t *testing.T) {
}
func TestRadarValueListsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.RadarValueListListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.RadarValueLists.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4606,8 +4606,8 @@ func TestRadarValueListsGet2(t *testing.T) {
}
func TestRadarValueListsGet2Service(t *testing.T) {
- params := &stripe.RadarValueListParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.RadarValueListParams{}
result, err := sc.RadarValueLists.Get("rsl_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4625,12 +4625,12 @@ func TestRadarValueListsPost(t *testing.T) {
}
func TestRadarValueListsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.RadarValueListParams{
Alias: stripe.String("custom_ip_xxxxxxxxxxxxx"),
Name: stripe.String("Custom IP Blocklist"),
ItemType: stripe.String(string(stripe.RadarValueListItemTypeIPAddress)),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.RadarValueLists.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4646,10 +4646,10 @@ func TestRadarValueListsPost2(t *testing.T) {
}
func TestRadarValueListsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.RadarValueListParams{
Name: stripe.String("Updated IP Block List"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.RadarValueLists.Update("rsl_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4663,8 +4663,8 @@ func TestRefundsCancelPost(t *testing.T) {
}
func TestRefundsCancelPostService(t *testing.T) {
- params := &stripe.RefundCancelParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.RefundCancelParams{}
result, err := sc.Refunds.Cancel("re_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4679,9 +4679,9 @@ func TestRefundsGet(t *testing.T) {
}
func TestRefundsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.RefundListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Refunds.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4695,8 +4695,8 @@ func TestRefundsGet2(t *testing.T) {
}
func TestRefundsGet2Service(t *testing.T) {
- params := &stripe.RefundParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.RefundParams{}
result, err := sc.Refunds.Get("re_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4710,8 +4710,8 @@ func TestRefundsPost(t *testing.T) {
}
func TestRefundsPostService(t *testing.T) {
- params := &stripe.RefundParams{Charge: stripe.String("ch_xxxxxxxxxxxxx")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.RefundParams{Charge: stripe.String("ch_xxxxxxxxxxxxx")}
result, err := sc.Refunds.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4726,9 +4726,9 @@ func TestRefundsPost2(t *testing.T) {
}
func TestRefundsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.RefundParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Refunds.Update("re_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4743,9 +4743,9 @@ func TestReportingReportRunsGet(t *testing.T) {
}
func TestReportingReportRunsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ReportingReportRunListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.ReportingReportRuns.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4759,8 +4759,8 @@ func TestReportingReportRunsGet2(t *testing.T) {
}
func TestReportingReportRunsGet2Service(t *testing.T) {
- params := &stripe.ReportingReportRunParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ReportingReportRunParams{}
result, err := sc.ReportingReportRuns.Get("frr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4780,6 +4780,7 @@ func TestReportingReportRunsPost(t *testing.T) {
}
func TestReportingReportRunsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ReportingReportRunParams{
ReportType: stripe.String("balance.summary.1"),
Parameters: &stripe.ReportingReportRunParametersParams{
@@ -4787,7 +4788,6 @@ func TestReportingReportRunsPostService(t *testing.T) {
IntervalEnd: stripe.Int64(1525132800),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.ReportingReportRuns.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4801,8 +4801,8 @@ func TestReportingReportTypesGet(t *testing.T) {
}
func TestReportingReportTypesGetService(t *testing.T) {
- params := &stripe.ReportingReportTypeListParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ReportingReportTypeListParams{}
result := sc.ReportingReportTypes.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4816,8 +4816,8 @@ func TestReportingReportTypesGet2(t *testing.T) {
}
func TestReportingReportTypesGet2Service(t *testing.T) {
- params := &stripe.ReportingReportTypeParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ReportingReportTypeParams{}
result, err := sc.ReportingReportTypes.Get("balance.summary.1", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4831,8 +4831,8 @@ func TestReviewsApprovePost(t *testing.T) {
}
func TestReviewsApprovePostService(t *testing.T) {
- params := &stripe.ReviewApproveParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ReviewApproveParams{}
result, err := sc.Reviews.Approve("prv_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4847,9 +4847,9 @@ func TestReviewsGet(t *testing.T) {
}
func TestReviewsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ReviewListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Reviews.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4863,8 +4863,8 @@ func TestReviewsGet2(t *testing.T) {
}
func TestReviewsGet2Service(t *testing.T) {
- params := &stripe.ReviewParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ReviewParams{}
result, err := sc.Reviews.Get("prv_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4881,11 +4881,11 @@ func TestSetupAttemptsGet(t *testing.T) {
}
func TestSetupAttemptsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SetupAttemptListParams{
SetupIntent: stripe.String("si_xyz"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.SetupAttempts.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4899,8 +4899,8 @@ func TestSetupIntentsCancelPost(t *testing.T) {
}
func TestSetupIntentsCancelPostService(t *testing.T) {
- params := &stripe.SetupIntentCancelParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SetupIntentCancelParams{}
result, err := sc.SetupIntents.Cancel("seti_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4916,10 +4916,10 @@ func TestSetupIntentsConfirmPost(t *testing.T) {
}
func TestSetupIntentsConfirmPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SetupIntentConfirmParams{
PaymentMethod: stripe.String("pm_card_visa"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.SetupIntents.Confirm("seti_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4934,9 +4934,9 @@ func TestSetupIntentsGet(t *testing.T) {
}
func TestSetupIntentsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SetupIntentListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.SetupIntents.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -4950,8 +4950,8 @@ func TestSetupIntentsGet2(t *testing.T) {
}
func TestSetupIntentsGet2Service(t *testing.T) {
- params := &stripe.SetupIntentParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SetupIntentParams{}
result, err := sc.SetupIntents.Get("seti_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4967,10 +4967,10 @@ func TestSetupIntentsPost(t *testing.T) {
}
func TestSetupIntentsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SetupIntentParams{
PaymentMethodTypes: []*string{stripe.String("card")},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.SetupIntents.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -4985,9 +4985,9 @@ func TestSetupIntentsPost2(t *testing.T) {
}
func TestSetupIntentsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SetupIntentParams{}
params.AddMetadata("user_id", "3435453")
- sc := client.New(TestAPIKey, nil)
result, err := sc.SetupIntents.Update("seti_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5001,8 +5001,8 @@ func TestSetupIntentsVerifyMicrodepositsPost(t *testing.T) {
}
func TestSetupIntentsVerifyMicrodepositsPostService(t *testing.T) {
- params := &stripe.SetupIntentVerifyMicrodepositsParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SetupIntentVerifyMicrodepositsParams{}
result, err := sc.SetupIntents.VerifyMicrodeposits(
"seti_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -5019,10 +5019,10 @@ func TestSetupIntentsVerifyMicrodepositsPost2(t *testing.T) {
}
func TestSetupIntentsVerifyMicrodepositsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SetupIntentVerifyMicrodepositsParams{
Amounts: []*int64{stripe.Int64(32), stripe.Int64(45)},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.SetupIntents.VerifyMicrodeposits(
"seti_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -5037,8 +5037,8 @@ func TestShippingRatesGet(t *testing.T) {
}
func TestShippingRatesGetService(t *testing.T) {
- params := &stripe.ShippingRateListParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ShippingRateListParams{}
result := sc.ShippingRates.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5053,9 +5053,9 @@ func TestShippingRatesGet2(t *testing.T) {
}
func TestShippingRatesGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ShippingRateListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.ShippingRates.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5069,8 +5069,8 @@ func TestShippingRatesGet3(t *testing.T) {
}
func TestShippingRatesGet3Service(t *testing.T) {
- params := &stripe.ShippingRateParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.ShippingRateParams{}
result, err := sc.ShippingRates.Get("shr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5091,6 +5091,7 @@ func TestShippingRatesPost(t *testing.T) {
}
func TestShippingRatesPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ShippingRateParams{
DisplayName: stripe.String("Sample Shipper"),
FixedAmount: &stripe.ShippingRateFixedAmountParams{
@@ -5099,7 +5100,6 @@ func TestShippingRatesPostService(t *testing.T) {
},
Type: stripe.String("fixed_amount"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.ShippingRates.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5120,6 +5120,7 @@ func TestShippingRatesPost2(t *testing.T) {
}
func TestShippingRatesPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ShippingRateParams{
DisplayName: stripe.String("Ground shipping"),
Type: stripe.String("fixed_amount"),
@@ -5128,7 +5129,6 @@ func TestShippingRatesPost2Service(t *testing.T) {
Currency: stripe.String(string(stripe.CurrencyUSD)),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.ShippingRates.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5143,9 +5143,9 @@ func TestShippingRatesPost3(t *testing.T) {
}
func TestShippingRatesPost3Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.ShippingRateParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.ShippingRates.Update("shr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5160,9 +5160,9 @@ func TestSigmaScheduledQueryRunsGet(t *testing.T) {
}
func TestSigmaScheduledQueryRunsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SigmaScheduledQueryRunListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.SigmaScheduledQueryRuns.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5176,8 +5176,8 @@ func TestSigmaScheduledQueryRunsGet2(t *testing.T) {
}
func TestSigmaScheduledQueryRunsGet2Service(t *testing.T) {
- params := &stripe.SigmaScheduledQueryRunParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SigmaScheduledQueryRunParams{}
result, err := sc.SigmaScheduledQueryRuns.Get("sqr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5191,8 +5191,8 @@ func TestSourcesGet(t *testing.T) {
}
func TestSourcesGetService(t *testing.T) {
- params := &stripe.SourceParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SourceParams{}
result, err := sc.Sources.Get("src_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5206,8 +5206,8 @@ func TestSourcesGet2(t *testing.T) {
}
func TestSourcesGet2Service(t *testing.T) {
- params := &stripe.SourceParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SourceParams{}
result, err := sc.Sources.Get("src_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5222,9 +5222,9 @@ func TestSourcesPost(t *testing.T) {
}
func TestSourcesPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SourceParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Sources.Update("src_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5238,8 +5238,8 @@ func TestSubscriptionItemsDelete(t *testing.T) {
}
func TestSubscriptionItemsDeleteService(t *testing.T) {
- params := &stripe.SubscriptionItemParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SubscriptionItemParams{}
result, err := sc.SubscriptionItems.Del("si_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5255,10 +5255,10 @@ func TestSubscriptionItemsGet(t *testing.T) {
}
func TestSubscriptionItemsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SubscriptionItemListParams{
Subscription: stripe.String("sub_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.SubscriptionItems.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5272,8 +5272,8 @@ func TestSubscriptionItemsGet2(t *testing.T) {
}
func TestSubscriptionItemsGet2Service(t *testing.T) {
- params := &stripe.SubscriptionItemParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SubscriptionItemParams{}
result, err := sc.SubscriptionItems.Get("si_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5291,12 +5291,12 @@ func TestSubscriptionItemsPost(t *testing.T) {
}
func TestSubscriptionItemsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SubscriptionItemParams{
Subscription: stripe.String("sub_xxxxxxxxxxxxx"),
Price: stripe.String("price_xxxxxxxxxxxxx"),
Quantity: stripe.Int64(2),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.SubscriptionItems.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5311,9 +5311,9 @@ func TestSubscriptionItemsPost2(t *testing.T) {
}
func TestSubscriptionItemsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SubscriptionItemParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.SubscriptionItems.Update("si_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5327,8 +5327,8 @@ func TestSubscriptionSchedulesCancelPost(t *testing.T) {
}
func TestSubscriptionSchedulesCancelPostService(t *testing.T) {
- params := &stripe.SubscriptionScheduleCancelParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SubscriptionScheduleCancelParams{}
result, err := sc.SubscriptionSchedules.Cancel(
"sub_sched_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -5344,9 +5344,9 @@ func TestSubscriptionSchedulesGet(t *testing.T) {
}
func TestSubscriptionSchedulesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SubscriptionScheduleListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.SubscriptionSchedules.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5360,8 +5360,8 @@ func TestSubscriptionSchedulesGet2(t *testing.T) {
}
func TestSubscriptionSchedulesGet2Service(t *testing.T) {
- params := &stripe.SubscriptionScheduleParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SubscriptionScheduleParams{}
result, err := sc.SubscriptionSchedules.Get(
"sub_sched_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -5391,6 +5391,7 @@ func TestSubscriptionSchedulesPost(t *testing.T) {
}
func TestSubscriptionSchedulesPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SubscriptionScheduleParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
StartDate: stripe.Int64(1676070661),
@@ -5407,7 +5408,6 @@ func TestSubscriptionSchedulesPostService(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.SubscriptionSchedules.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5423,10 +5423,10 @@ func TestSubscriptionSchedulesPost2(t *testing.T) {
}
func TestSubscriptionSchedulesPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SubscriptionScheduleParams{
EndBehavior: stripe.String(string(stripe.SubscriptionScheduleEndBehaviorRelease)),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.SubscriptionSchedules.Update(
"sub_sched_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -5442,8 +5442,8 @@ func TestSubscriptionSchedulesReleasePost(t *testing.T) {
}
func TestSubscriptionSchedulesReleasePostService(t *testing.T) {
- params := &stripe.SubscriptionScheduleReleaseParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SubscriptionScheduleReleaseParams{}
result, err := sc.SubscriptionSchedules.Release(
"sub_sched_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -5458,8 +5458,8 @@ func TestSubscriptionsDelete(t *testing.T) {
}
func TestSubscriptionsDeleteService(t *testing.T) {
- params := &stripe.SubscriptionCancelParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SubscriptionCancelParams{}
result, err := sc.Subscriptions.Cancel("sub_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5473,8 +5473,8 @@ func TestSubscriptionsDiscountDelete(t *testing.T) {
}
func TestSubscriptionsDiscountDeleteService(t *testing.T) {
- params := &stripe.SubscriptionDeleteDiscountParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SubscriptionDeleteDiscountParams{}
result, err := sc.Subscriptions.DeleteDiscount("sub_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5489,9 +5489,9 @@ func TestSubscriptionsGet(t *testing.T) {
}
func TestSubscriptionsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SubscriptionListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Subscriptions.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5505,8 +5505,8 @@ func TestSubscriptionsGet2(t *testing.T) {
}
func TestSubscriptionsGet2Service(t *testing.T) {
- params := &stripe.SubscriptionParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.SubscriptionParams{}
result, err := sc.Subscriptions.Get("sub_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5527,6 +5527,7 @@ func TestSubscriptionsPost(t *testing.T) {
}
func TestSubscriptionsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SubscriptionParams{
Customer: stripe.String("cus_xxxxxxxxxxxxx"),
Items: []*stripe.SubscriptionItemsParams{
@@ -5535,7 +5536,6 @@ func TestSubscriptionsPostService(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Subscriptions.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5550,9 +5550,9 @@ func TestSubscriptionsPost2(t *testing.T) {
}
func TestSubscriptionsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SubscriptionParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Subscriptions.Update("sub_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5570,12 +5570,12 @@ func TestSubscriptionsSearchGet(t *testing.T) {
}
func TestSubscriptionsSearchGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.SubscriptionSearchParams{
SearchParams: stripe.SearchParams{
Query: "status:'active' AND metadata['order_id']:'6735'",
},
}
- sc := client.New(TestAPIKey, nil)
result := sc.Subscriptions.Search(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5591,10 +5591,10 @@ func TestTaxCalculationsLineItemsGet(t *testing.T) {
}
func TestTaxCalculationsLineItemsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TaxCalculationListLineItemsParams{
Calculation: stripe.String("xxx"),
}
- sc := client.New(TestAPIKey, nil)
result := sc.TaxCalculations.ListLineItems(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5626,6 +5626,7 @@ func TestTaxCalculationsPost(t *testing.T) {
}
func TestTaxCalculationsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TaxCalculationParams{
Currency: stripe.String(string(stripe.CurrencyUSD)),
LineItems: []*stripe.TaxCalculationLineItemParams{
@@ -5645,7 +5646,6 @@ func TestTaxCalculationsPostService(t *testing.T) {
AddressSource: stripe.String(string(stripe.TaxCalculationCustomerDetailsAddressSourceShipping)),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TaxCalculations.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5660,9 +5660,9 @@ func TestTaxCodesGet(t *testing.T) {
}
func TestTaxCodesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TaxCodeListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TaxCodes.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5676,8 +5676,8 @@ func TestTaxCodesGet2(t *testing.T) {
}
func TestTaxCodesGet2Service(t *testing.T) {
- params := &stripe.TaxCodeParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TaxCodeParams{}
result, err := sc.TaxCodes.Get("txcd_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5691,8 +5691,8 @@ func TestTaxFormsPdfGet(t *testing.T) {
}
func TestTaxFormsPdfGetService(t *testing.T) {
- params := &stripe.TaxFormPDFParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TaxFormPDFParams{}
result, err := sc.TaxForms.PDF("form_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5706,8 +5706,8 @@ func TestTaxIdsDelete(t *testing.T) {
}
func TestTaxIdsDeleteService(t *testing.T) {
- params := &stripe.TaxIDParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TaxIDParams{}
result, err := sc.TaxIDs.Del("taxid_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5721,8 +5721,8 @@ func TestTaxIdsGet(t *testing.T) {
}
func TestTaxIdsGetService(t *testing.T) {
- params := &stripe.TaxIDListParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TaxIDListParams{}
result := sc.TaxIDs.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5736,8 +5736,8 @@ func TestTaxIdsGet2(t *testing.T) {
}
func TestTaxIdsGet2Service(t *testing.T) {
- params := &stripe.TaxIDParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TaxIDParams{}
result, err := sc.TaxIDs.Get("taxid_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5754,11 +5754,11 @@ func TestTaxIdsPost(t *testing.T) {
}
func TestTaxIdsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TaxIDParams{
Type: stripe.String(string(stripe.TaxIDTypeEUVAT)),
Value: stripe.String("123"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TaxIDs.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5773,9 +5773,9 @@ func TestTaxRatesGet(t *testing.T) {
}
func TestTaxRatesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TaxRateListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TaxRates.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5789,8 +5789,8 @@ func TestTaxRatesGet2(t *testing.T) {
}
func TestTaxRatesGet2Service(t *testing.T) {
- params := &stripe.TaxRateParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TaxRateParams{}
result, err := sc.TaxRates.Get("txr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5810,6 +5810,7 @@ func TestTaxRatesPost(t *testing.T) {
}
func TestTaxRatesPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TaxRateParams{
DisplayName: stripe.String("VAT"),
Description: stripe.String("VAT Germany"),
@@ -5817,7 +5818,6 @@ func TestTaxRatesPostService(t *testing.T) {
Percentage: stripe.Float64(16),
Inclusive: stripe.Bool(false),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TaxRates.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5831,8 +5831,8 @@ func TestTaxRatesPost2(t *testing.T) {
}
func TestTaxRatesPost2Service(t *testing.T) {
- params := &stripe.TaxRateParams{Active: stripe.Bool(false)}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TaxRateParams{Active: stripe.Bool(false)}
result, err := sc.TaxRates.Update("txr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5846,8 +5846,8 @@ func TestTaxSettingsGet(t *testing.T) {
}
func TestTaxSettingsGetService(t *testing.T) {
- params := &stripe.TaxSettingsParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TaxSettingsParams{}
result, err := sc.TaxSettings.Get(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5865,12 +5865,12 @@ func TestTaxSettingsPost(t *testing.T) {
}
func TestTaxSettingsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TaxSettingsParams{
Defaults: &stripe.TaxSettingsDefaultsParams{
TaxCode: stripe.String("txcd_10000000"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TaxSettings.Update(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5887,11 +5887,11 @@ func TestTaxTransactionsCreateFromCalculationPost(t *testing.T) {
}
func TestTaxTransactionsCreateFromCalculationPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TaxTransactionCreateFromCalculationParams{
Calculation: stripe.String("xxx"),
Reference: stripe.String("yyy"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TaxTransactions.CreateFromCalculation(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5905,8 +5905,8 @@ func TestTerminalConfigurationsDelete(t *testing.T) {
}
func TestTerminalConfigurationsDeleteService(t *testing.T) {
- params := &stripe.TerminalConfigurationParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalConfigurationParams{}
result, err := sc.TerminalConfigurations.Del("uc_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5920,8 +5920,8 @@ func TestTerminalConfigurationsDelete2(t *testing.T) {
}
func TestTerminalConfigurationsDelete2Service(t *testing.T) {
- params := &stripe.TerminalConfigurationParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalConfigurationParams{}
result, err := sc.TerminalConfigurations.Del("tmc_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5935,8 +5935,8 @@ func TestTerminalConfigurationsGet(t *testing.T) {
}
func TestTerminalConfigurationsGetService(t *testing.T) {
- params := &stripe.TerminalConfigurationListParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalConfigurationListParams{}
result := sc.TerminalConfigurations.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5950,8 +5950,8 @@ func TestTerminalConfigurationsGet2(t *testing.T) {
}
func TestTerminalConfigurationsGet2Service(t *testing.T) {
- params := &stripe.TerminalConfigurationParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalConfigurationParams{}
result, err := sc.TerminalConfigurations.Get("uc_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5966,9 +5966,9 @@ func TestTerminalConfigurationsGet3(t *testing.T) {
}
func TestTerminalConfigurationsGet3Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TerminalConfigurationListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TerminalConfigurations.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -5982,8 +5982,8 @@ func TestTerminalConfigurationsGet4(t *testing.T) {
}
func TestTerminalConfigurationsGet4Service(t *testing.T) {
- params := &stripe.TerminalConfigurationParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalConfigurationParams{}
result, err := sc.TerminalConfigurations.Get("tmc_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -5997,8 +5997,8 @@ func TestTerminalConfigurationsPost(t *testing.T) {
}
func TestTerminalConfigurationsPostService(t *testing.T) {
- params := &stripe.TerminalConfigurationParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalConfigurationParams{}
result, err := sc.TerminalConfigurations.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6018,6 +6018,7 @@ func TestTerminalConfigurationsPost2(t *testing.T) {
}
func TestTerminalConfigurationsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TerminalConfigurationParams{
Tipping: &stripe.TerminalConfigurationTippingParams{
USD: &stripe.TerminalConfigurationTippingUSDParams{
@@ -6025,7 +6026,6 @@ func TestTerminalConfigurationsPost2Service(t *testing.T) {
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TerminalConfigurations.Update("uc_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6043,12 +6043,12 @@ func TestTerminalConfigurationsPost3(t *testing.T) {
}
func TestTerminalConfigurationsPost3Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TerminalConfigurationParams{
BBPOSWisePOSE: &stripe.TerminalConfigurationBBPOSWisePOSEParams{
Splashscreen: stripe.String("file_xxxxxxxxxxxxx"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TerminalConfigurations.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6066,12 +6066,12 @@ func TestTerminalConfigurationsPost4(t *testing.T) {
}
func TestTerminalConfigurationsPost4Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TerminalConfigurationParams{
BBPOSWisePOSE: &stripe.TerminalConfigurationBBPOSWisePOSEParams{
Splashscreen: stripe.String("file_xxxxxxxxxxxxx"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TerminalConfigurations.Update("tmc_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6085,8 +6085,8 @@ func TestTerminalConnectionTokensPost(t *testing.T) {
}
func TestTerminalConnectionTokensPostService(t *testing.T) {
- params := &stripe.TerminalConnectionTokenParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalConnectionTokenParams{}
result, err := sc.TerminalConnectionTokens.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6100,8 +6100,8 @@ func TestTerminalLocationsDelete(t *testing.T) {
}
func TestTerminalLocationsDeleteService(t *testing.T) {
- params := &stripe.TerminalLocationParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalLocationParams{}
result, err := sc.TerminalLocations.Del("tml_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6116,9 +6116,9 @@ func TestTerminalLocationsGet(t *testing.T) {
}
func TestTerminalLocationsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TerminalLocationListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TerminalLocations.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -6132,8 +6132,8 @@ func TestTerminalLocationsGet2(t *testing.T) {
}
func TestTerminalLocationsGet2Service(t *testing.T) {
- params := &stripe.TerminalLocationParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalLocationParams{}
result, err := sc.TerminalLocations.Get("tml_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6156,6 +6156,7 @@ func TestTerminalLocationsPost(t *testing.T) {
}
func TestTerminalLocationsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TerminalLocationParams{
DisplayName: stripe.String("My First Store"),
Address: &stripe.AddressParams{
@@ -6166,7 +6167,6 @@ func TestTerminalLocationsPostService(t *testing.T) {
Country: stripe.String("US"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TerminalLocations.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6182,10 +6182,10 @@ func TestTerminalLocationsPost2(t *testing.T) {
}
func TestTerminalLocationsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TerminalLocationParams{
DisplayName: stripe.String("My First Store"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TerminalLocations.Update("tml_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6199,8 +6199,8 @@ func TestTerminalReadersCancelActionPost(t *testing.T) {
}
func TestTerminalReadersCancelActionPostService(t *testing.T) {
- params := &stripe.TerminalReaderCancelActionParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalReaderCancelActionParams{}
result, err := sc.TerminalReaders.CancelAction("tmr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6214,8 +6214,8 @@ func TestTerminalReadersDelete(t *testing.T) {
}
func TestTerminalReadersDeleteService(t *testing.T) {
- params := &stripe.TerminalReaderParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalReaderParams{}
result, err := sc.TerminalReaders.Del("tmr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6230,9 +6230,9 @@ func TestTerminalReadersGet(t *testing.T) {
}
func TestTerminalReadersGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TerminalReaderListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TerminalReaders.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -6246,8 +6246,8 @@ func TestTerminalReadersGet2(t *testing.T) {
}
func TestTerminalReadersGet2Service(t *testing.T) {
- params := &stripe.TerminalReaderParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalReaderParams{}
result, err := sc.TerminalReaders.Get("tmr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6265,12 +6265,12 @@ func TestTerminalReadersPost(t *testing.T) {
}
func TestTerminalReadersPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TerminalReaderParams{
RegistrationCode: stripe.String("puppies-plug-could"),
Label: stripe.String("Blue Rabbit"),
Location: stripe.String("tml_1234"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TerminalReaders.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6284,8 +6284,8 @@ func TestTerminalReadersPost2(t *testing.T) {
}
func TestTerminalReadersPost2Service(t *testing.T) {
- params := &stripe.TerminalReaderParams{Label: stripe.String("Blue Rabbit")}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TerminalReaderParams{Label: stripe.String("Blue Rabbit")}
result, err := sc.TerminalReaders.Update("tmr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6302,10 +6302,10 @@ func TestTerminalReadersProcessPaymentIntentPost(t *testing.T) {
}
func TestTerminalReadersProcessPaymentIntentPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TerminalReaderProcessPaymentIntentParams{
PaymentIntent: stripe.String("pi_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TerminalReaders.ProcessPaymentIntent(
"tmr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -6324,11 +6324,11 @@ func TestTerminalReadersProcessSetupIntentPost(t *testing.T) {
}
func TestTerminalReadersProcessSetupIntentPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TerminalReaderProcessSetupIntentParams{
SetupIntent: stripe.String("seti_xxxxxxxxxxxxx"),
AllowRedisplay: stripe.String("always"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TerminalReaders.ProcessSetupIntent(
"tmr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -6346,11 +6346,11 @@ func TestTestHelpersCustomersFundCashBalancePost(t *testing.T) {
}
func TestTestHelpersCustomersFundCashBalancePostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersCustomerFundCashBalanceParams{
Amount: stripe.Int64(30),
Currency: stripe.String(string(stripe.CurrencyEUR)),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersCustomers.FundCashBalance("cus_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6405,6 +6405,7 @@ func TestTestHelpersIssuingAuthorizationsCapturePost(t *testing.T) {
}
func TestTestHelpersIssuingAuthorizationsCapturePostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersIssuingAuthorizationCaptureParams{
CaptureAmount: stripe.Int64(100),
CloseAuthorization: stripe.Bool(true),
@@ -6446,7 +6447,6 @@ func TestTestHelpersIssuingAuthorizationsCapturePostService(t *testing.T) {
Reference: stripe.String("foo"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersIssuingAuthorizations.Capture(
"example_authorization", params)
assert.NotNil(t, result)
@@ -6462,8 +6462,8 @@ func TestTestHelpersIssuingAuthorizationsExpirePost(t *testing.T) {
}
func TestTestHelpersIssuingAuthorizationsExpirePostService(t *testing.T) {
- params := &stripe.TestHelpersIssuingAuthorizationExpireParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersIssuingAuthorizationExpireParams{}
result, err := sc.TestHelpersIssuingAuthorizations.Expire(
"example_authorization", params)
assert.NotNil(t, result)
@@ -6482,11 +6482,11 @@ func TestTestHelpersIssuingAuthorizationsIncrementPost(t *testing.T) {
}
func TestTestHelpersIssuingAuthorizationsIncrementPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersIssuingAuthorizationIncrementParams{
IncrementAmount: stripe.Int64(50),
IsAmountControllable: stripe.Bool(true),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersIssuingAuthorizations.Increment(
"example_authorization", params)
assert.NotNil(t, result)
@@ -6531,6 +6531,7 @@ func TestTestHelpersIssuingAuthorizationsPost(t *testing.T) {
}
func TestTestHelpersIssuingAuthorizationsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersIssuingAuthorizationParams{
Amount: stripe.Int64(100),
AmountDetails: &stripe.TestHelpersIssuingAuthorizationAmountDetailsParams{
@@ -6562,7 +6563,6 @@ func TestTestHelpersIssuingAuthorizationsPostService(t *testing.T) {
},
Wallet: stripe.String("apple_pay"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersIssuingAuthorizations.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6579,10 +6579,10 @@ func TestTestHelpersIssuingAuthorizationsReversePost(t *testing.T) {
}
func TestTestHelpersIssuingAuthorizationsReversePostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersIssuingAuthorizationReverseParams{
ReverseAmount: stripe.Int64(20),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersIssuingAuthorizations.Reverse(
"example_authorization", params)
assert.NotNil(t, result)
@@ -6597,8 +6597,8 @@ func TestTestHelpersIssuingCardsShippingDeliverPost(t *testing.T) {
}
func TestTestHelpersIssuingCardsShippingDeliverPostService(t *testing.T) {
- params := &stripe.TestHelpersIssuingCardDeliverCardParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersIssuingCardDeliverCardParams{}
result, err := sc.TestHelpersIssuingCards.DeliverCard("card_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6612,8 +6612,8 @@ func TestTestHelpersIssuingCardsShippingFailPost(t *testing.T) {
}
func TestTestHelpersIssuingCardsShippingFailPostService(t *testing.T) {
- params := &stripe.TestHelpersIssuingCardFailCardParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersIssuingCardFailCardParams{}
result, err := sc.TestHelpersIssuingCards.FailCard("card_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6627,8 +6627,8 @@ func TestTestHelpersIssuingCardsShippingReturnPost(t *testing.T) {
}
func TestTestHelpersIssuingCardsShippingReturnPostService(t *testing.T) {
- params := &stripe.TestHelpersIssuingCardReturnCardParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersIssuingCardReturnCardParams{}
result, err := sc.TestHelpersIssuingCards.ReturnCard("card_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6642,8 +6642,8 @@ func TestTestHelpersIssuingCardsShippingShipPost(t *testing.T) {
}
func TestTestHelpersIssuingCardsShippingShipPostService(t *testing.T) {
- params := &stripe.TestHelpersIssuingCardShipCardParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersIssuingCardShipCardParams{}
result, err := sc.TestHelpersIssuingCards.ShipCard("card_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6660,8 +6660,8 @@ func TestTestHelpersIssuingPersonalizationDesignsActivatePost(t *testing.T) {
func TestTestHelpersIssuingPersonalizationDesignsActivatePostService(
t *testing.T,
) {
- params := &stripe.TestHelpersIssuingPersonalizationDesignActivateParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersIssuingPersonalizationDesignActivateParams{}
result, err := sc.TestHelpersIssuingPersonalizationDesigns.Activate(
"pd_xyz", params)
assert.NotNil(t, result)
@@ -6679,8 +6679,8 @@ func TestTestHelpersIssuingPersonalizationDesignsDeactivatePost(t *testing.T) {
func TestTestHelpersIssuingPersonalizationDesignsDeactivatePostService(
t *testing.T,
) {
- params := &stripe.TestHelpersIssuingPersonalizationDesignDeactivateParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersIssuingPersonalizationDesignDeactivateParams{}
result, err := sc.TestHelpersIssuingPersonalizationDesigns.Deactivate(
"pd_xyz", params)
assert.NotNil(t, result)
@@ -6704,6 +6704,7 @@ func TestTestHelpersIssuingPersonalizationDesignsRejectPost(t *testing.T) {
func TestTestHelpersIssuingPersonalizationDesignsRejectPostService(
t *testing.T,
) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersIssuingPersonalizationDesignRejectParams{
RejectionReasons: &stripe.TestHelpersIssuingPersonalizationDesignRejectRejectionReasonsParams{
CardLogo: []*string{
@@ -6711,7 +6712,6 @@ func TestTestHelpersIssuingPersonalizationDesignsRejectPostService(
},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersIssuingPersonalizationDesigns.Reject(
"pd_xyz", params)
assert.NotNil(t, result)
@@ -6779,6 +6779,7 @@ func TestTestHelpersIssuingTransactionsCreateForceCapturePost(t *testing.T) {
func TestTestHelpersIssuingTransactionsCreateForceCapturePostService(
t *testing.T,
) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersIssuingTransactionCreateForceCaptureParams{
Amount: stripe.Int64(100),
Card: stripe.String("foo"),
@@ -6831,7 +6832,6 @@ func TestTestHelpersIssuingTransactionsCreateForceCapturePostService(
Reference: stripe.String("foo"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersIssuingTransactions.CreateForceCapture(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6898,6 +6898,7 @@ func TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPost(t *testing.T) {
func TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPostService(
t *testing.T,
) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersIssuingTransactionCreateUnlinkedRefundParams{
Amount: stripe.Int64(100),
Card: stripe.String("foo"),
@@ -6950,7 +6951,6 @@ func TestTestHelpersIssuingTransactionsCreateUnlinkedRefundPostService(
Reference: stripe.String("foo"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersIssuingTransactions.CreateUnlinkedRefund(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -6967,10 +6967,10 @@ func TestTestHelpersIssuingTransactionsRefundPost(t *testing.T) {
}
func TestTestHelpersIssuingTransactionsRefundPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersIssuingTransactionRefundParams{
RefundAmount: stripe.Int64(50),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersIssuingTransactions.Refund(
"example_transaction", params)
assert.NotNil(t, result)
@@ -6985,8 +6985,8 @@ func TestTestHelpersRefundsExpirePost(t *testing.T) {
}
func TestTestHelpersRefundsExpirePostService(t *testing.T) {
- params := &stripe.TestHelpersRefundExpireParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersRefundExpireParams{}
result, err := sc.TestHelpersRefunds.Expire("re_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7002,10 +7002,10 @@ func TestTestHelpersTestClocksAdvancePost(t *testing.T) {
}
func TestTestHelpersTestClocksAdvancePostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersTestClockAdvanceParams{
FrozenTime: stripe.Int64(142),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersTestClocks.Advance("clock_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7021,10 +7021,10 @@ func TestTestHelpersTestClocksAdvancePost2(t *testing.T) {
}
func TestTestHelpersTestClocksAdvancePost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersTestClockAdvanceParams{
FrozenTime: stripe.Int64(1675552261),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersTestClocks.Advance(
"clock_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -7039,8 +7039,8 @@ func TestTestHelpersTestClocksDelete(t *testing.T) {
}
func TestTestHelpersTestClocksDeleteService(t *testing.T) {
- params := &stripe.TestHelpersTestClockParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersTestClockParams{}
result, err := sc.TestHelpersTestClocks.Del("clock_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7054,8 +7054,8 @@ func TestTestHelpersTestClocksDelete2(t *testing.T) {
}
func TestTestHelpersTestClocksDelete2Service(t *testing.T) {
- params := &stripe.TestHelpersTestClockParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersTestClockParams{}
result, err := sc.TestHelpersTestClocks.Del("clock_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7069,8 +7069,8 @@ func TestTestHelpersTestClocksGet(t *testing.T) {
}
func TestTestHelpersTestClocksGetService(t *testing.T) {
- params := &stripe.TestHelpersTestClockListParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersTestClockListParams{}
result := sc.TestHelpersTestClocks.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -7084,8 +7084,8 @@ func TestTestHelpersTestClocksGet2(t *testing.T) {
}
func TestTestHelpersTestClocksGet2Service(t *testing.T) {
- params := &stripe.TestHelpersTestClockParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersTestClockParams{}
result, err := sc.TestHelpersTestClocks.Get("clock_xyz", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7100,9 +7100,9 @@ func TestTestHelpersTestClocksGet3(t *testing.T) {
}
func TestTestHelpersTestClocksGet3Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersTestClockListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TestHelpersTestClocks.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -7116,8 +7116,8 @@ func TestTestHelpersTestClocksGet4(t *testing.T) {
}
func TestTestHelpersTestClocksGet4Service(t *testing.T) {
- params := &stripe.TestHelpersTestClockParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersTestClockParams{}
result, err := sc.TestHelpersTestClocks.Get("clock_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7134,11 +7134,11 @@ func TestTestHelpersTestClocksPost(t *testing.T) {
}
func TestTestHelpersTestClocksPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersTestClockParams{
FrozenTime: stripe.Int64(123),
Name: stripe.String("cogsworth"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersTestClocks.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7154,10 +7154,10 @@ func TestTestHelpersTestClocksPost2(t *testing.T) {
}
func TestTestHelpersTestClocksPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersTestClockParams{
FrozenTime: stripe.Int64(1577836800),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersTestClocks.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7175,12 +7175,12 @@ func TestTestHelpersTreasuryInboundTransfersFailPost(t *testing.T) {
}
func TestTestHelpersTreasuryInboundTransfersFailPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersTreasuryInboundTransferFailParams{
FailureDetails: &stripe.TestHelpersTreasuryInboundTransferFailFailureDetailsParams{
Code: stripe.String(string(stripe.TreasuryInboundTransferFailureDetailsCodeAccountClosed)),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersTreasuryInboundTransfers.Fail("ibt_123", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7195,8 +7195,8 @@ func TestTestHelpersTreasuryInboundTransfersReturnPost(t *testing.T) {
}
func TestTestHelpersTreasuryInboundTransfersReturnPostService(t *testing.T) {
- params := &stripe.TestHelpersTreasuryInboundTransferReturnInboundTransferParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersTreasuryInboundTransferReturnInboundTransferParams{}
result, err := sc.TestHelpersTreasuryInboundTransfers.ReturnInboundTransfer(
"ibt_123", params)
assert.NotNil(t, result)
@@ -7212,8 +7212,8 @@ func TestTestHelpersTreasuryInboundTransfersSucceedPost(t *testing.T) {
}
func TestTestHelpersTreasuryInboundTransfersSucceedPostService(t *testing.T) {
- params := &stripe.TestHelpersTreasuryInboundTransferSucceedParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersTreasuryInboundTransferSucceedParams{}
result, err := sc.TestHelpersTreasuryInboundTransfers.Succeed(
"ibt_123", params)
assert.NotNil(t, result)
@@ -7228,8 +7228,8 @@ func TestTestHelpersTreasuryOutboundTransfersFailPost(t *testing.T) {
}
func TestTestHelpersTreasuryOutboundTransfersFailPostService(t *testing.T) {
- params := &stripe.TestHelpersTreasuryOutboundTransferFailParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersTreasuryOutboundTransferFailParams{}
result, err := sc.TestHelpersTreasuryOutboundTransfers.Fail(
"obt_123", params)
assert.NotNil(t, result)
@@ -7244,8 +7244,8 @@ func TestTestHelpersTreasuryOutboundTransfersPostPost(t *testing.T) {
}
func TestTestHelpersTreasuryOutboundTransfersPostPostService(t *testing.T) {
- params := &stripe.TestHelpersTreasuryOutboundTransferPostParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TestHelpersTreasuryOutboundTransferPostParams{}
result, err := sc.TestHelpersTreasuryOutboundTransfers.Post(
"obt_123", params)
assert.NotNil(t, result)
@@ -7265,12 +7265,12 @@ func TestTestHelpersTreasuryOutboundTransfersReturnPost(t *testing.T) {
}
func TestTestHelpersTreasuryOutboundTransfersReturnPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersTreasuryOutboundTransferReturnOutboundTransferParams{
ReturnedDetails: &stripe.TestHelpersTreasuryOutboundTransferReturnOutboundTransferReturnedDetailsParams{
Code: stripe.String(string(stripe.TreasuryOutboundTransferReturnedDetailsCodeAccountClosed)),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersTreasuryOutboundTransfers.ReturnOutboundTransfer(
"obt_123", params)
assert.NotNil(t, result)
@@ -7290,13 +7290,13 @@ func TestTestHelpersTreasuryReceivedCreditsPost(t *testing.T) {
}
func TestTestHelpersTreasuryReceivedCreditsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersTreasuryReceivedCreditParams{
FinancialAccount: stripe.String("fa_123"),
Network: stripe.String(string(stripe.TreasuryReceivedCreditNetworkACH)),
Amount: stripe.Int64(1234),
Currency: stripe.String(string(stripe.CurrencyUSD)),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersTreasuryReceivedCredits.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7315,13 +7315,13 @@ func TestTestHelpersTreasuryReceivedDebitsPost(t *testing.T) {
}
func TestTestHelpersTreasuryReceivedDebitsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TestHelpersTreasuryReceivedDebitParams{
FinancialAccount: stripe.String("fa_123"),
Network: stripe.String("ach"),
Amount: stripe.Int64(1234),
Currency: stripe.String(string(stripe.CurrencyUSD)),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TestHelpersTreasuryReceivedDebits.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7335,8 +7335,8 @@ func TestTokensGet(t *testing.T) {
}
func TestTokensGetService(t *testing.T) {
- params := &stripe.TokenParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TokenParams{}
result, err := sc.Tokens.Get("tok_xxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7357,6 +7357,7 @@ func TestTokensPost(t *testing.T) {
}
func TestTokensPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TokenParams{
Card: &stripe.CardParams{
Number: stripe.String("4242424242424242"),
@@ -7365,7 +7366,6 @@ func TestTokensPostService(t *testing.T) {
CVC: stripe.String("314"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Tokens.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7388,6 +7388,7 @@ func TestTokensPost2(t *testing.T) {
}
func TestTokensPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TokenParams{
BankAccount: &stripe.BankAccountParams{
Country: stripe.String("US"),
@@ -7398,7 +7399,6 @@ func TestTokensPost2Service(t *testing.T) {
AccountNumber: stripe.String("000123456789"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Tokens.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7414,10 +7414,10 @@ func TestTokensPost3(t *testing.T) {
}
func TestTokensPost3Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TokenParams{
PII: &stripe.TokenPIIParams{IDNumber: stripe.String("000000000")},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Tokens.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7439,6 +7439,7 @@ func TestTokensPost4(t *testing.T) {
}
func TestTokensPost4Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TokenParams{
Account: &stripe.TokenAccountParams{
Individual: &stripe.PersonParams{
@@ -7448,7 +7449,6 @@ func TestTokensPost4Service(t *testing.T) {
TOSShownAndAccepted: stripe.Bool(true),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Tokens.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7468,6 +7468,7 @@ func TestTokensPost5(t *testing.T) {
}
func TestTokensPost5Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TokenParams{
Person: &stripe.PersonParams{
FirstName: stripe.String("Jane"),
@@ -7475,7 +7476,6 @@ func TestTokensPost5Service(t *testing.T) {
Relationship: &stripe.PersonRelationshipParams{Owner: stripe.Bool(true)},
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Tokens.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7491,10 +7491,10 @@ func TestTokensPost6(t *testing.T) {
}
func TestTokensPost6Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TokenParams{
CVCUpdate: &stripe.TokenCVCUpdateParams{CVC: stripe.String("123")},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Tokens.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7508,8 +7508,8 @@ func TestTopupsCancelPost(t *testing.T) {
}
func TestTopupsCancelPostService(t *testing.T) {
- params := &stripe.TopupParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TopupParams{}
result, err := sc.Topups.Cancel("tu_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7524,9 +7524,9 @@ func TestTopupsGet(t *testing.T) {
}
func TestTopupsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TopupListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Topups.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -7540,8 +7540,8 @@ func TestTopupsGet2(t *testing.T) {
}
func TestTopupsGet2Service(t *testing.T) {
- params := &stripe.TopupParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TopupParams{}
result, err := sc.Topups.Get("tu_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7560,13 +7560,13 @@ func TestTopupsPost(t *testing.T) {
}
func TestTopupsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TopupParams{
Amount: stripe.Int64(2000),
Currency: stripe.String(string(stripe.CurrencyUSD)),
Description: stripe.String("Top-up for Jenny Rosen"),
StatementDescriptor: stripe.String("Top-up"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Topups.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7581,9 +7581,9 @@ func TestTopupsPost2(t *testing.T) {
}
func TestTopupsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TopupParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Topups.Update("tu_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7598,9 +7598,9 @@ func TestTransfersGet(t *testing.T) {
}
func TestTransfersGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TransferListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.Transfers.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -7614,8 +7614,8 @@ func TestTransfersGet2(t *testing.T) {
}
func TestTransfersGet2Service(t *testing.T) {
- params := &stripe.TransferParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TransferParams{}
result, err := sc.Transfers.Get("tr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7634,13 +7634,13 @@ func TestTransfersPost(t *testing.T) {
}
func TestTransfersPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TransferParams{
Amount: stripe.Int64(400),
Currency: stripe.String(string(stripe.CurrencyUSD)),
Destination: stripe.String("acct_xxxxxxxxxxxxx"),
TransferGroup: stripe.String("ORDER_95"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.Transfers.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7655,9 +7655,9 @@ func TestTransfersPost2(t *testing.T) {
}
func TestTransfersPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TransferParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.Transfers.Update("tr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7674,11 +7674,11 @@ func TestTransfersReversalsGet(t *testing.T) {
}
func TestTransfersReversalsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TransferReversalListParams{
ID: stripe.String("tr_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TransferReversals.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -7694,10 +7694,10 @@ func TestTransfersReversalsGet2(t *testing.T) {
}
func TestTransfersReversalsGet2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TransferReversalParams{
ID: stripe.String("tr_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TransferReversals.Get("trr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7714,11 +7714,11 @@ func TestTransfersReversalsPost(t *testing.T) {
}
func TestTransfersReversalsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TransferReversalParams{
Amount: stripe.Int64(100),
ID: stripe.String("tr_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TransferReversals.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7735,11 +7735,11 @@ func TestTransfersReversalsPost2(t *testing.T) {
}
func TestTransfersReversalsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TransferReversalParams{
ID: stripe.String("tr_xxxxxxxxxxxxx"),
}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.TransferReversals.Update("trr_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7756,11 +7756,11 @@ func TestTreasuryCreditReversalsGet(t *testing.T) {
}
func TestTreasuryCreditReversalsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryCreditReversalListParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TreasuryCreditReversals.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -7774,8 +7774,8 @@ func TestTreasuryCreditReversalsGet2(t *testing.T) {
}
func TestTreasuryCreditReversalsGet2Service(t *testing.T) {
- params := &stripe.TreasuryCreditReversalParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryCreditReversalParams{}
result, err := sc.TreasuryCreditReversals.Get(
"credrev_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -7792,10 +7792,10 @@ func TestTreasuryCreditReversalsPost(t *testing.T) {
}
func TestTreasuryCreditReversalsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryCreditReversalParams{
ReceivedCredit: stripe.String("rc_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TreasuryCreditReversals.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7812,11 +7812,11 @@ func TestTreasuryDebitReversalsGet(t *testing.T) {
}
func TestTreasuryDebitReversalsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryDebitReversalListParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TreasuryDebitReversals.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -7830,8 +7830,8 @@ func TestTreasuryDebitReversalsGet2(t *testing.T) {
}
func TestTreasuryDebitReversalsGet2Service(t *testing.T) {
- params := &stripe.TreasuryDebitReversalParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryDebitReversalParams{}
result, err := sc.TreasuryDebitReversals.Get("debrev_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7847,10 +7847,10 @@ func TestTreasuryDebitReversalsPost(t *testing.T) {
}
func TestTreasuryDebitReversalsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryDebitReversalParams{
ReceivedDebit: stripe.String("rd_xxxxxxxxxxxxx"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TreasuryDebitReversals.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7865,8 +7865,8 @@ func TestTreasuryFinancialAccountsFeaturesGet(t *testing.T) {
}
func TestTreasuryFinancialAccountsFeaturesGetService(t *testing.T) {
- params := &stripe.TreasuryFinancialAccountRetrieveFeaturesParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryFinancialAccountRetrieveFeaturesParams{}
result, err := sc.TreasuryFinancialAccounts.RetrieveFeatures(
"fa_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -7882,9 +7882,9 @@ func TestTreasuryFinancialAccountsGet(t *testing.T) {
}
func TestTreasuryFinancialAccountsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryFinancialAccountListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TreasuryFinancialAccounts.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -7898,8 +7898,8 @@ func TestTreasuryFinancialAccountsGet2(t *testing.T) {
}
func TestTreasuryFinancialAccountsGet2Service(t *testing.T) {
- params := &stripe.TreasuryFinancialAccountParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryFinancialAccountParams{}
result, err := sc.TreasuryFinancialAccounts.Get("fa_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7916,11 +7916,11 @@ func TestTreasuryFinancialAccountsPost(t *testing.T) {
}
func TestTreasuryFinancialAccountsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryFinancialAccountParams{
SupportedCurrencies: []*string{stripe.String("usd")},
Features: &stripe.TreasuryFinancialAccountFeaturesParams{},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TreasuryFinancialAccounts.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -7935,9 +7935,9 @@ func TestTreasuryFinancialAccountsPost2(t *testing.T) {
}
func TestTreasuryFinancialAccountsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryFinancialAccountParams{}
params.AddMetadata("order_id", "6735")
- sc := client.New(TestAPIKey, nil)
result, err := sc.TreasuryFinancialAccounts.Update(
"fa_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -7952,8 +7952,8 @@ func TestTreasuryInboundTransfersCancelPost(t *testing.T) {
}
func TestTreasuryInboundTransfersCancelPostService(t *testing.T) {
- params := &stripe.TreasuryInboundTransferCancelParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryInboundTransferCancelParams{}
result, err := sc.TreasuryInboundTransfers.Cancel(
"ibt_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -7971,11 +7971,11 @@ func TestTreasuryInboundTransfersGet(t *testing.T) {
}
func TestTreasuryInboundTransfersGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryInboundTransferListParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TreasuryInboundTransfers.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -7989,8 +7989,8 @@ func TestTreasuryInboundTransfersGet2(t *testing.T) {
}
func TestTreasuryInboundTransfersGet2Service(t *testing.T) {
- params := &stripe.TreasuryInboundTransferParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryInboundTransferParams{}
result, err := sc.TreasuryInboundTransfers.Get("ibt_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8010,6 +8010,7 @@ func TestTreasuryInboundTransfersPost(t *testing.T) {
}
func TestTreasuryInboundTransfersPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryInboundTransferParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
Amount: stripe.Int64(10000),
@@ -8017,7 +8018,6 @@ func TestTreasuryInboundTransfersPostService(t *testing.T) {
OriginPaymentMethod: stripe.String("pm_xxxxxxxxxxxxx"),
Description: stripe.String("InboundTransfer from my bank account"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TreasuryInboundTransfers.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8031,8 +8031,8 @@ func TestTreasuryOutboundPaymentsCancelPost(t *testing.T) {
}
func TestTreasuryOutboundPaymentsCancelPostService(t *testing.T) {
- params := &stripe.TreasuryOutboundPaymentCancelParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryOutboundPaymentCancelParams{}
result, err := sc.TreasuryOutboundPayments.Cancel(
"bot_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -8050,11 +8050,11 @@ func TestTreasuryOutboundPaymentsGet(t *testing.T) {
}
func TestTreasuryOutboundPaymentsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryOutboundPaymentListParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TreasuryOutboundPayments.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -8068,8 +8068,8 @@ func TestTreasuryOutboundPaymentsGet2(t *testing.T) {
}
func TestTreasuryOutboundPaymentsGet2Service(t *testing.T) {
- params := &stripe.TreasuryOutboundPaymentParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryOutboundPaymentParams{}
result, err := sc.TreasuryOutboundPayments.Get("bot_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8090,6 +8090,7 @@ func TestTreasuryOutboundPaymentsPost(t *testing.T) {
}
func TestTreasuryOutboundPaymentsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryOutboundPaymentParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
Amount: stripe.Int64(10000),
@@ -8098,7 +8099,6 @@ func TestTreasuryOutboundPaymentsPostService(t *testing.T) {
DestinationPaymentMethod: stripe.String("pm_xxxxxxxxxxxxx"),
Description: stripe.String("OutboundPayment to a 3rd party"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TreasuryOutboundPayments.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8112,8 +8112,8 @@ func TestTreasuryOutboundTransfersCancelPost(t *testing.T) {
}
func TestTreasuryOutboundTransfersCancelPostService(t *testing.T) {
- params := &stripe.TreasuryOutboundTransferCancelParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryOutboundTransferCancelParams{}
result, err := sc.TreasuryOutboundTransfers.Cancel(
"obt_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -8131,11 +8131,11 @@ func TestTreasuryOutboundTransfersGet(t *testing.T) {
}
func TestTreasuryOutboundTransfersGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryOutboundTransferListParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TreasuryOutboundTransfers.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -8149,8 +8149,8 @@ func TestTreasuryOutboundTransfersGet2(t *testing.T) {
}
func TestTreasuryOutboundTransfersGet2Service(t *testing.T) {
- params := &stripe.TreasuryOutboundTransferParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryOutboundTransferParams{}
result, err := sc.TreasuryOutboundTransfers.Get("obt_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8170,6 +8170,7 @@ func TestTreasuryOutboundTransfersPost(t *testing.T) {
}
func TestTreasuryOutboundTransfersPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryOutboundTransferParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
DestinationPaymentMethod: stripe.String("pm_xxxxxxxxxxxxx"),
@@ -8177,7 +8178,6 @@ func TestTreasuryOutboundTransfersPostService(t *testing.T) {
Currency: stripe.String(string(stripe.CurrencyUSD)),
Description: stripe.String("OutboundTransfer to my external bank account"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.TreasuryOutboundTransfers.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8194,11 +8194,11 @@ func TestTreasuryReceivedCreditsGet(t *testing.T) {
}
func TestTreasuryReceivedCreditsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryReceivedCreditListParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TreasuryReceivedCredits.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -8212,8 +8212,8 @@ func TestTreasuryReceivedCreditsGet2(t *testing.T) {
}
func TestTreasuryReceivedCreditsGet2Service(t *testing.T) {
- params := &stripe.TreasuryReceivedCreditParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryReceivedCreditParams{}
result, err := sc.TreasuryReceivedCredits.Get("rc_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8230,11 +8230,11 @@ func TestTreasuryReceivedDebitsGet(t *testing.T) {
}
func TestTreasuryReceivedDebitsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryReceivedDebitListParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TreasuryReceivedDebits.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -8248,8 +8248,8 @@ func TestTreasuryReceivedDebitsGet2(t *testing.T) {
}
func TestTreasuryReceivedDebitsGet2Service(t *testing.T) {
- params := &stripe.TreasuryReceivedDebitParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryReceivedDebitParams{}
result, err := sc.TreasuryReceivedDebits.Get("rd_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8266,11 +8266,11 @@ func TestTreasuryTransactionEntriesGet(t *testing.T) {
}
func TestTreasuryTransactionEntriesGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryTransactionEntryListParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TreasuryTransactionEntries.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -8284,8 +8284,8 @@ func TestTreasuryTransactionEntriesGet2(t *testing.T) {
}
func TestTreasuryTransactionEntriesGet2Service(t *testing.T) {
- params := &stripe.TreasuryTransactionEntryParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryTransactionEntryParams{}
result, err := sc.TreasuryTransactionEntries.Get(
"trxne_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
@@ -8303,11 +8303,11 @@ func TestTreasuryTransactionsGet(t *testing.T) {
}
func TestTreasuryTransactionsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.TreasuryTransactionListParams{
FinancialAccount: stripe.String("fa_xxxxxxxxxxxxx"),
}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.TreasuryTransactions.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -8321,8 +8321,8 @@ func TestTreasuryTransactionsGet2(t *testing.T) {
}
func TestTreasuryTransactionsGet2Service(t *testing.T) {
- params := &stripe.TreasuryTransactionParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.TreasuryTransactionParams{}
result, err := sc.TreasuryTransactions.Get("trxn_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8336,8 +8336,8 @@ func TestWebhookEndpointsDelete(t *testing.T) {
}
func TestWebhookEndpointsDeleteService(t *testing.T) {
- params := &stripe.WebhookEndpointParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.WebhookEndpointParams{}
result, err := sc.WebhookEndpoints.Del("we_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8352,9 +8352,9 @@ func TestWebhookEndpointsGet(t *testing.T) {
}
func TestWebhookEndpointsGetService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.WebhookEndpointListParams{}
params.Limit = stripe.Int64(3)
- sc := client.New(TestAPIKey, nil)
result := sc.WebhookEndpoints.List(params)
assert.NotNil(t, result)
assert.Nil(t, result.Err())
@@ -8368,8 +8368,8 @@ func TestWebhookEndpointsGet2(t *testing.T) {
}
func TestWebhookEndpointsGet2Service(t *testing.T) {
- params := &stripe.WebhookEndpointParams{}
sc := client.New(TestAPIKey, nil)
+ params := &stripe.WebhookEndpointParams{}
result, err := sc.WebhookEndpoints.Get("we_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8389,6 +8389,7 @@ func TestWebhookEndpointsPost(t *testing.T) {
}
func TestWebhookEndpointsPostService(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.WebhookEndpointParams{
URL: stripe.String("https://example.com/my/webhook/endpoint"),
EnabledEvents: []*string{
@@ -8396,7 +8397,6 @@ func TestWebhookEndpointsPostService(t *testing.T) {
stripe.String("charge.succeeded"),
},
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.WebhookEndpoints.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
@@ -8412,10 +8412,10 @@ func TestWebhookEndpointsPost2(t *testing.T) {
}
func TestWebhookEndpointsPost2Service(t *testing.T) {
+ sc := client.New(TestAPIKey, nil)
params := &stripe.WebhookEndpointParams{
URL: stripe.String("https://example.com/new_endpoint"),
}
- sc := client.New(TestAPIKey, nil)
result, err := sc.WebhookEndpoints.Update("we_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
diff --git a/feerefund.go b/feerefund.go
index 183d1290a6..08dbdb6933 100644
--- a/feerefund.go
+++ b/feerefund.go
@@ -48,6 +48,79 @@ func (p *FeeRefundListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.
+type FeeRefundRetrieveParams struct {
+ Params `form:"*"`
+ Fee *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FeeRefundRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+//
+// This request only accepts metadata as an argument.
+type FeeRefundUpdateParams struct {
+ Params `form:"*"`
+ Fee *string `form:"-"` // Included in URL
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FeeRefundUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *FeeRefundUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Refunds an application fee that has previously been collected but not yet refunded.
+// Funds will be refunded to the Stripe account from which the fee was originally collected.
+//
+// You can optionally refund only part of an application fee.
+// You can do so multiple times, until the entire fee has been refunded.
+//
+// Once entirely refunded, an application fee can't be refunded again.
+// This method will raise an error when called on an already-refunded application fee,
+// or when trying to refund more money than is left on an application fee.
+type FeeRefundCreateParams struct {
+ Params `form:"*"`
+ ID *string `form:"-"` // Included in URL
+ // A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee.
+ Amount *int64 `form:"amount"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FeeRefundCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *FeeRefundCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// `Application Fee Refund` objects allow you to refund an application fee that
// has previously been created but not yet refunded. Funds will be refunded to
// the Stripe account from which the fee was originally collected.
diff --git a/file.go b/file.go
index 1ab257c81b..912a21fe7d 100644
--- a/file.go
+++ b/file.go
@@ -101,6 +101,60 @@ func (p *FileParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
+type FileCreateFileLinkDataParams struct {
+ // Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
+ Create *bool `form:"create"`
+ // The link isn't available after this future timestamp.
+ ExpiresAt *int64 `form:"expires_at"`
+ // 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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *FileCreateFileLinkDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
+//
+// All of Stripe's officially supported Client libraries support sending multipart/form-data.
+type FileCreateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // FileReader is a reader with the contents of the file that should be uploaded.
+ FileReader io.Reader
+
+ // Filename is just the name of the file without path information.
+ Filename *string
+ // Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
+ FileLinkData *FileCreateFileLinkDataParams `form:"file_link_data"`
+ // The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
+ Purpose *string `form:"purpose"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FileCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to [access file contents](https://stripe.com/docs/file-upload#download-file-contents).
+type FileRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FileRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// This object represents files hosted on Stripe's servers. You can upload
// files with the [create file](https://stripe.com/docs/api#create_file) request
// (for example, when uploading dispute evidence). Stripe also
diff --git a/filelink.go b/filelink.go
index b794604b0e..8c46f8be09 100644
--- a/filelink.go
+++ b/filelink.go
@@ -63,6 +63,78 @@ func (p *FileLinkParams) AppendTo(body *form.Values, keyParts []string) {
}
}
+// Creates a new file link object.
+type FileLinkCreateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The link isn't usable after this future timestamp.
+ ExpiresAt *int64 `form:"expires_at"`
+ // The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
+ File *string `form:"file"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FileLinkCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *FileLinkCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the file link with the given ID.
+type FileLinkRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FileLinkRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates an existing file link object. Expired links can no longer be updated.
+type FileLinkUpdateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately.
+ ExpiresAt *int64 `form:"expires_at"`
+ ExpiresAtNow *bool `form:"-"` // See custom AppendTo
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FileLinkUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *FileLinkUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// AppendTo implements custom encoding logic for FileLinkUpdateParams.
+func (p *FileLinkUpdateParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.ExpiresAtNow) {
+ body.Add(form.FormatKey(append(keyParts, "expires_at")), "now")
+ }
+}
+
// To share the contents of a `File` object with non-Stripe users, you can
// create a `FileLink`. `FileLink`s contain a URL that you can use to
// retrieve the contents of the file without authentication.
diff --git a/financialconnections_account.go b/financialconnections_account.go
index 692109639a..7cb9f5d34b 100644
--- a/financialconnections_account.go
+++ b/financialconnections_account.go
@@ -248,6 +248,18 @@ func (p *FinancialConnectionsAccountUnsubscribeParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of an Financial Connections Account.
+type FinancialConnectionsAccountRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FinancialConnectionsAccountRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The account holder that this account belongs to.
type FinancialConnectionsAccountAccountHolder struct {
// The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.
diff --git a/financialconnections_institution.go b/financialconnections_institution.go
index 693549c9c9..cf50801149 100644
--- a/financialconnections_institution.go
+++ b/financialconnections_institution.go
@@ -40,6 +40,18 @@ func (p *FinancialConnectionsInstitutionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of a Financial Connections Institution.
+type FinancialConnectionsInstitutionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FinancialConnectionsInstitutionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type FinancialConnectionsInstitutionFeaturesBalances struct {
// Whether the given feature is supported by this institution.
Supported bool `json:"supported"`
diff --git a/financialconnections_session.go b/financialconnections_session.go
index 7583716667..926dee1d0e 100644
--- a/financialconnections_session.go
+++ b/financialconnections_session.go
@@ -131,6 +131,80 @@ type FinancialConnectionsSessionManualEntryParams struct {
Mode *string `form:"mode"`
}
+// Retrieves the details of a Financial Connections Session
+type FinancialConnectionsSessionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FinancialConnectionsSessionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// The account holder to link accounts for.
+type FinancialConnectionsSessionCreateAccountHolderParams struct {
+ // The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`.
+ Account *string `form:"account"`
+ // The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`.
+ Customer *string `form:"customer"`
+ // The ID of the Stripe customer Account whose accounts will be retrieved. Should only be present if `type` is `customer`.
+ CustomerAccount *string `form:"customer_account"`
+ // Type of account holder to collect accounts for.
+ Type *string `form:"type"`
+}
+
+// Filters to restrict the kinds of accounts to collect.
+type FinancialConnectionsSessionCreateFiltersParams struct {
+ // Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
+ AccountSubcategories []*string `form:"account_subcategories"`
+ // List of countries from which to collect accounts.
+ Countries []*string `form:"countries"`
+ // Stripe ID of the institution with which the customer should be directed to log in.
+ Institution *string `form:"institution"`
+}
+
+// Settings for configuring Session-specific limits.
+type FinancialConnectionsSessionCreateLimitsParams struct {
+ // The number of accounts that can be linked in this Session.
+ Accounts *int64 `form:"accounts"`
+}
+
+// Customize manual entry behavior
+type FinancialConnectionsSessionCreateManualEntryParams struct {
+ // Whether manual entry will be handled by Stripe during the Session.
+ Mode *string `form:"mode"`
+}
+
+// To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
+type FinancialConnectionsSessionCreateParams struct {
+ Params `form:"*"`
+ // The account holder to link accounts for.
+ AccountHolder *FinancialConnectionsSessionCreateAccountHolderParams `form:"account_holder"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Filters to restrict the kinds of accounts to collect.
+ Filters *FinancialConnectionsSessionCreateFiltersParams `form:"filters"`
+ // Settings for configuring Session-specific limits.
+ Limits *FinancialConnectionsSessionCreateLimitsParams `form:"limits"`
+ // Customize manual entry behavior
+ ManualEntry *FinancialConnectionsSessionCreateManualEntryParams `form:"manual_entry"`
+ // List of data features that you would like to request access to.
+ //
+ // Possible values are `balances`, `transactions`, `ownership`, and `payment_method`.
+ Permissions []*string `form:"permissions"`
+ // List of data features that you would like to retrieve upon account creation.
+ Prefetch []*string `form:"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 `form:"return_url"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FinancialConnectionsSessionCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The account holder for whom accounts are collected in this session.
type FinancialConnectionsSessionAccountHolder struct {
// The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.
diff --git a/financialconnections_transaction.go b/financialconnections_transaction.go
index 6c0ae205d4..84a08c073a 100644
--- a/financialconnections_transaction.go
+++ b/financialconnections_transaction.go
@@ -54,6 +54,18 @@ func (p *FinancialConnectionsTransactionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of a Financial Connections Transaction
+type FinancialConnectionsTransactionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *FinancialConnectionsTransactionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type FinancialConnectionsTransactionStatusTransitions struct {
// Time at which this transaction posted. Measured in seconds since the Unix epoch.
PostedAt int64 `json:"posted_at"`
diff --git a/forwarding_request.go b/forwarding_request.go
index bb2bdd8989..e5952aa5d1 100644
--- a/forwarding_request.go
+++ b/forwarding_request.go
@@ -87,6 +87,65 @@ func (p *ForwardingRequestParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included.
+type ForwardingRequestCreateRequestHeaderParams struct {
+ // The header name.
+ Name *string `form:"name"`
+ // The header value.
+ Value *string `form:"value"`
+}
+
+// The request body and headers to be sent to the destination endpoint.
+type ForwardingRequestCreateRequestParams struct {
+ // The body payload to send to the destination endpoint.
+ Body *string `form:"body"`
+ // The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included.
+ Headers []*ForwardingRequestCreateRequestHeaderParams `form:"headers"`
+}
+
+// Creates a ForwardingRequest object.
+type ForwardingRequestCreateParams struct {
+ Params `form:"*"`
+ // 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"`
+ // The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
+ PaymentMethod *string `form:"payment_method"`
+ // The field kinds to be replaced in the forwarded request.
+ Replacements []*string `form:"replacements"`
+ // The request body and headers to be sent to the destination endpoint.
+ Request *ForwardingRequestCreateRequestParams `form:"request"`
+ // The destination URL for the forwarded request. Must be supported by the config.
+ URL *string `form:"url"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ForwardingRequestCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *ForwardingRequestCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves a ForwardingRequest object.
+type ForwardingRequestRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ForwardingRequestRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Context about the request from Stripe's servers to the destination endpoint.
type ForwardingRequestRequestContext struct {
// The time it took in milliseconds for the destination endpoint to respond.
diff --git a/giftcards_card.go b/giftcards_card.go
index 87a907f755..6051561bd7 100644
--- a/giftcards_card.go
+++ b/giftcards_card.go
@@ -89,6 +89,88 @@ func (p *GiftCardsCardValidateParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// The details for the payment that created this object.
+type GiftCardsCardCreateCreatedByPaymentParams struct {
+ // The PaymentIntent used to collect payment for this object.
+ PaymentIntent *string `form:"payment_intent"`
+}
+
+// Related objects which created this gift card.
+type GiftCardsCardCreateCreatedByParams struct {
+ // The details for the payment that created this object.
+ Payment *GiftCardsCardCreateCreatedByPaymentParams `form:"payment"`
+ // The type of event that created this object.
+ Type *string `form:"type"`
+}
+
+// Creates a new gift card object.
+type GiftCardsCardCreateParams struct {
+ Params `form:"*"`
+ // The active state for the new gift card, defaults to false. The active state can be updated after creation.
+ Active *bool `form:"active"`
+ // Related objects which created this gift card.
+ CreatedBy *GiftCardsCardCreateCreatedByParams `form:"created_by"`
+ // 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 initial amount to load onto the new gift card, defaults to 0.
+ InitialAmount *int64 `form:"initial_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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *GiftCardsCardCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *GiftCardsCardCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieve a gift card by id
+type GiftCardsCardRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *GiftCardsCardRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Update a gift card
+type GiftCardsCardUpdateParams struct {
+ Params `form:"*"`
+ // The new active state for the gift card.
+ Active *bool `form:"active"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *GiftCardsCardUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *GiftCardsCardUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type GiftCardsCardCreatedByCheckout struct {
// The Stripe CheckoutSession that created this object.
CheckoutSession string `json:"checkout_session"`
diff --git a/giftcards_transaction.go b/giftcards_transaction.go
index 575882b5c9..a7db528a16 100644
--- a/giftcards_transaction.go
+++ b/giftcards_transaction.go
@@ -118,6 +118,94 @@ func (p *GiftCardsTransactionConfirmParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// The details for the payment that created this object.
+type GiftCardsTransactionCreateCreatedByPaymentParams struct {
+ // The PaymentIntent used to collect payment for this object.
+ PaymentIntent *string `form:"payment_intent"`
+}
+
+// Related objects which created this transaction.
+type GiftCardsTransactionCreateCreatedByParams struct {
+ // The details for the payment that created this object.
+ Payment *GiftCardsTransactionCreateCreatedByPaymentParams `form:"payment"`
+ // The type of event that created this object.
+ Type *string `form:"type"`
+}
+
+// Create a gift card transaction
+type GiftCardsTransactionCreateParams struct {
+ Params `form:"*"`
+ // The amount of the transaction. A negative amount deducts funds, and a positive amount adds funds.
+ Amount *int64 `form:"amount"`
+ // Whether this is a confirmed transaction. A confirmed transaction immediately deducts from/adds to the `amount_available` on the gift card. Otherwise, it creates a held transaction that increments the `amount_held` on the gift card.
+ Confirm *bool `form:"confirm"`
+ // Related objects which created this transaction.
+ CreatedBy *GiftCardsTransactionCreateCreatedByParams `form:"created_by"`
+ // The currency of the transaction. This must match the currency of the gift card.
+ 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"`
+ // The gift card to create a new transaction on.
+ GiftCard *string `form:"gift_card"`
+ // 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"`
+ // A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
+ TransferGroup *string `form:"transfer_group"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *GiftCardsTransactionCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *GiftCardsTransactionCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the gift card transaction.
+type GiftCardsTransactionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *GiftCardsTransactionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Update a gift card transaction
+type GiftCardsTransactionUpdateParams struct {
+ Params `form:"*"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *GiftCardsTransactionUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *GiftCardsTransactionUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type GiftCardsTransactionCreatedByCheckout struct {
// The Stripe CheckoutSession that created this object.
CheckoutSession string `json:"checkout_session"`
diff --git a/identity_verificationreport.go b/identity_verificationreport.go
index ec90020791..7c1bcba44b 100644
--- a/identity_verificationreport.go
+++ b/identity_verificationreport.go
@@ -176,6 +176,18 @@ func (p *IdentityVerificationReportParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves an existing VerificationReport
+type IdentityVerificationReportRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IdentityVerificationReportRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Date of birth as it appears in the document.
type IdentityVerificationReportDocumentDOB struct {
// Numerical day between 1 and 31.
diff --git a/identity_verificationsession.go b/identity_verificationsession.go
index 82529c3351..05a08d8985 100644
--- a/identity_verificationsession.go
+++ b/identity_verificationsession.go
@@ -219,6 +219,150 @@ func (p *IdentityVerificationSessionRedactParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+type IdentityVerificationSessionCreateOptionsDocumentParams struct {
+ // Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ AllowedTypes []*string `form:"allowed_types"`
+ // Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth.
+ RequireIDNumber *bool `form:"require_id_number"`
+ // Disable image uploads, identity document images have to be captured using the device's camera.
+ RequireLiveCapture *bool `form:"require_live_capture"`
+ // Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie).
+ RequireMatchingSelfie *bool `form:"require_matching_selfie"`
+}
+
+// A set of options for the session's verification checks.
+type IdentityVerificationSessionCreateOptionsParams struct {
+ // Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+ Document *IdentityVerificationSessionCreateOptionsDocumentParams `form:"document"`
+}
+
+// Details provided about the user being verified. These details may be shown to the user.
+type IdentityVerificationSessionCreateProvidedDetailsParams struct {
+ // Email of user being verified
+ Email *string `form:"email"`
+ // Phone number of user being verified
+ Phone *string `form:"phone"`
+}
+
+// Creates a VerificationSession object.
+//
+// After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session's url.
+//
+// If your API key is in test mode, verification checks won't actually process, though everything else will occur as if in live mode.
+//
+// Related guide: [Verify your users' identity documents](https://stripe.com/docs/identity/verify-identity-documents)
+type IdentityVerificationSessionCreateParams struct {
+ Params `form:"*"`
+ // A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
+ ClientReferenceID *string `form:"client_reference_id"`
+ // 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"`
+ // A set of options for the session's verification checks.
+ Options *IdentityVerificationSessionCreateOptionsParams `form:"options"`
+ // Details provided about the user being verified. These details may be shown to the user.
+ ProvidedDetails *IdentityVerificationSessionCreateProvidedDetailsParams `form:"provided_details"`
+ // Customer ID
+ RelatedCustomer *string `form:"related_customer"`
+ // Token referencing a Customer Account resource.
+ RelatedCustomerAccount *string `form:"related_customer_account"`
+ // The URL that the user will be redirected to upon completing the verification flow.
+ ReturnURL *string `form:"return_url"`
+ // The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.
+ Type *string `form:"type"`
+ // The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows.
+ VerificationFlow *string `form:"verification_flow"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IdentityVerificationSessionCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IdentityVerificationSessionCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of a VerificationSession that was previously created.
+//
+// When the session status is requires_input, you can use this method to retrieve a valid
+// client_secret or url to allow re-submission.
+type IdentityVerificationSessionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IdentityVerificationSessionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+type IdentityVerificationSessionUpdateOptionsDocumentParams struct {
+ // Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
+ AllowedTypes []*string `form:"allowed_types"`
+ // Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth.
+ RequireIDNumber *bool `form:"require_id_number"`
+ // Disable image uploads, identity document images have to be captured using the device's camera.
+ RequireLiveCapture *bool `form:"require_live_capture"`
+ // Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie).
+ RequireMatchingSelfie *bool `form:"require_matching_selfie"`
+}
+
+// A set of options for the session's verification checks.
+type IdentityVerificationSessionUpdateOptionsParams struct {
+ // Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
+ Document *IdentityVerificationSessionUpdateOptionsDocumentParams `form:"document"`
+}
+
+// Details provided about the user being verified. These details may be shown to the user.
+type IdentityVerificationSessionUpdateProvidedDetailsParams struct {
+ // Email of user being verified
+ Email *string `form:"email"`
+ // Phone number of user being verified
+ Phone *string `form:"phone"`
+}
+
+// Updates a VerificationSession object.
+//
+// When the session status is requires_input, you can use this method to update the
+// verification check and options.
+type IdentityVerificationSessionUpdateParams struct {
+ Params `form:"*"`
+ // 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"`
+ // A set of options for the session's verification checks.
+ Options *IdentityVerificationSessionUpdateOptionsParams `form:"options"`
+ // Details provided about the user being verified. These details may be shown to the user.
+ ProvidedDetails *IdentityVerificationSessionUpdateProvidedDetailsParams `form:"provided_details"`
+ // The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
+ Type *string `form:"type"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IdentityVerificationSessionUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IdentityVerificationSessionUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// If present, this property tells you the last error encountered when processing the verification.
type IdentityVerificationSessionLastError struct {
// A short machine-readable string giving the reason for the verification or user-session failure.
diff --git a/invoice.go b/invoice.go
index a7d26b7d21..2e52ba53a8 100644
--- a/invoice.go
+++ b/invoice.go
@@ -2395,6 +2395,858 @@ func (p *InvoiceListLinesParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
+type InvoiceDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves the invoice with the given ID.
+type InvoiceRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *InvoiceRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
+type InvoiceUpdateAmountsDueParams struct {
+ // The amount in cents (or local equivalent).
+ Amount *int64 `form:"amount"`
+ // Number of days from when invoice is finalized until the payment is due.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // Date on which a payment plan's payment is due.
+ DueDate *int64 `form:"due_date"`
+}
+
+// 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 InvoiceUpdateAutomaticTaxLiabilityParams 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"`
+}
+
+// Settings for automatic tax lookup for this invoice.
+type InvoiceUpdateAutomaticTaxParams struct {
+ // Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ Enabled *bool `form:"enabled"`
+ // 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 *InvoiceUpdateAutomaticTaxLiabilityParams `form:"liability"`
+}
+
+// A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
+type InvoiceUpdateCustomFieldParams 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"`
+}
+
+// Time span for the redeemed discount.
+type InvoiceUpdateDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type InvoiceUpdateDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *InvoiceUpdateDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
+type InvoiceUpdateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *InvoiceUpdateDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type InvoiceUpdateIssuerParams 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"`
+}
+
+// Additional fields for Mandate creation
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams struct {
+ // Transaction type of the mandate.
+ TransactionType *string `form:"transaction_type"`
+}
+
+// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsACSSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *InvoiceUpdatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"`
+ // Verification method for the intent
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsBancontactParams struct {
+ // Preferred language of the Bancontact authorization page that the customer is redirected to.
+ PreferredLanguage *string `form:"preferred_language"`
+}
+
+// The selected installment plan to use for this invoice.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanParams struct {
+ // For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ Count *int64 `form:"count"`
+ // For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ // One of `month`.
+ Interval *string `form:"interval"`
+ // Type of installment plan, one of `fixed_count`.
+ Type *string `form:"type"`
+}
+
+// Installment configuration for payments attempted on this invoice (Mexico Only).
+//
+// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsCardInstallmentsParams struct {
+ // Setting to true enables installments for this invoice.
+ // Setting to false will prevent any selected plan from applying to a payment.
+ Enabled *bool `form:"enabled"`
+ // The selected installment plan to use for this invoice.
+ Plan *InvoiceUpdatePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"`
+}
+
+// If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsCardParams struct {
+ // Installment configuration for payments attempted on this invoice (Mexico Only).
+ //
+ // For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ Installments *InvoiceUpdatePaymentSettingsPaymentMethodOptionsCardInstallmentsParams `form:"installments"`
+ // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/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"`
+}
+
+// Configuration for eu_bank_transfer funding type.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams 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 the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams struct {
+ // Configuration for eu_bank_transfer funding type.
+ EUBankTransfer *InvoiceUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
+ // The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ Type *string `form:"type"`
+}
+
+// If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct {
+ // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ BankTransfer *InvoiceUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"`
+ // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ FundingType *string `form:"funding_type"`
+}
+
+// If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsIDBankTransferParams struct{}
+
+// If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsKonbiniParams struct{}
+
+// If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsSEPADebitParams struct{}
+
+// Provide filters for the linked accounts that the customer can select for the payment method.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams struct {
+ // The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ AccountSubcategories []*string `form:"account_subcategories"`
+ // ID of the institution to use to filter for selectable accounts.
+ Institution *string `form:"institution"`
+}
+
+// Additional fields for Financial Connections Session creation
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
+ // Provide filters for the linked accounts that the customer can select for the payment method.
+ Filters *InvoiceUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams `form:"filters"`
+ // 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"`
+}
+
+// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountParams struct {
+ // Additional fields for Financial Connections Session creation
+ FinancialConnections *InvoiceUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
+ // Verification method for the intent
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// Payment-method-specific configuration to provide to the invoice's PaymentIntent.
+type InvoiceUpdatePaymentSettingsPaymentMethodOptionsParams struct {
+ // If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
+ ACSSDebit *InvoiceUpdatePaymentSettingsPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
+ // If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
+ Bancontact *InvoiceUpdatePaymentSettingsPaymentMethodOptionsBancontactParams `form:"bancontact"`
+ // If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
+ Card *InvoiceUpdatePaymentSettingsPaymentMethodOptionsCardParams `form:"card"`
+ // If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
+ CustomerBalance *InvoiceUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
+ // If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
+ IDBankTransfer *InvoiceUpdatePaymentSettingsPaymentMethodOptionsIDBankTransferParams `form:"id_bank_transfer"`
+ // If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
+ Konbini *InvoiceUpdatePaymentSettingsPaymentMethodOptionsKonbiniParams `form:"konbini"`
+ // If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
+ SEPADebit *InvoiceUpdatePaymentSettingsPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
+ // If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
+ USBankAccount *InvoiceUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
+}
+
+// Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+type InvoiceUpdatePaymentSettingsParams struct {
+ // ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ DefaultMandate *string `form:"default_mandate"`
+ // Payment-method-specific configuration to provide to the invoice's PaymentIntent.
+ PaymentMethodOptions *InvoiceUpdatePaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"`
+ // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+}
+
+// Invoice pdf rendering options
+type InvoiceUpdateRenderingPDFParams struct {
+ // Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
+ // If set to `auto`, invoice PDF page size defaults to `a4` for customers with
+ // Japanese locale and `letter` for customers with other locales.
+ PageSize *string `form:"page_size"`
+}
+
+// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+type InvoiceUpdateRenderingParams 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"`
+ // Invoice pdf rendering options
+ PDF *InvoiceUpdateRenderingPDFParams `form:"pdf"`
+ // ID of the invoice rendering template to use for this invoice.
+ Template *string `form:"template"`
+ // The specific version of invoice rendering template to use for this invoice.
+ TemplateVersion *int64 `form:"template_version"`
+}
+
+// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+type InvoiceUpdateShippingCostShippingRateDataDeliveryEstimateMaximumParams 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 InvoiceUpdateShippingCostShippingRateDataDeliveryEstimateMinimumParams struct {
+ // A unit of time.
+ Unit *string `form:"unit"`
+ // Must be greater than 0.
+ Value *int64 `form:"value"`
+}
+
+// The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+type InvoiceUpdateShippingCostShippingRateDataDeliveryEstimateParams struct {
+ // The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ Maximum *InvoiceUpdateShippingCostShippingRateDataDeliveryEstimateMaximumParams `form:"maximum"`
+ // The lower bound of the estimated range. If empty, represents no lower bound.
+ Minimum *InvoiceUpdateShippingCostShippingRateDataDeliveryEstimateMinimumParams `form:"minimum"`
+}
+
+// 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 InvoiceUpdateShippingCostShippingRateDataFixedAmountCurrencyOptionsParams 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"`
+}
+
+// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+type InvoiceUpdateShippingCostShippingRateDataFixedAmountParams 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]*InvoiceUpdateShippingCostShippingRateDataFixedAmountCurrencyOptionsParams `form:"currency_options"`
+}
+
+// Parameters to create a new ad-hoc shipping rate for this order.
+type InvoiceUpdateShippingCostShippingRateDataParams struct {
+ // The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ DeliveryEstimate *InvoiceUpdateShippingCostShippingRateDataDeliveryEstimateParams `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 *InvoiceUpdateShippingCostShippingRateDataFixedAmountParams `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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *InvoiceUpdateShippingCostShippingRateDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Settings for the cost of shipping for this invoice.
+type InvoiceUpdateShippingCostParams struct {
+ // The ID of the shipping rate to use for this order.
+ ShippingRate *string `form:"shipping_rate"`
+ // Parameters to create a new ad-hoc shipping rate for this order.
+ ShippingRateData *InvoiceUpdateShippingCostShippingRateDataParams `form:"shipping_rate_data"`
+}
+
+// Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+type InvoiceUpdateShippingDetailsParams struct {
+ // Shipping address
+ Address *AddressParams `form:"address"`
+ // Recipient name.
+ Name *string `form:"name"`
+ // Recipient phone (including extension)
+ Phone *string `form:"phone"`
+}
+
+// If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
+type InvoiceUpdateTransferDataParams struct {
+ // The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
+ Amount *int64 `form:"amount"`
+ // ID of an existing, connected Stripe account.
+ Destination *string `form:"destination"`
+}
+
+// Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
+// monetary values, as well as collection_method, become uneditable.
+//
+// If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
+// sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
+// auto_advance=false.
+type InvoiceUpdateParams struct {
+ Params `form:"*"`
+ // The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ AccountTaxIDs []*string `form:"account_tax_ids"`
+ // List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
+ AmountsDue []*InvoiceUpdateAmountsDueParams `form:"amounts_due"`
+ // A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
+ ApplicationFeeAmount *int64 `form:"application_fee_amount"`
+ // Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
+ AutoAdvance *bool `form:"auto_advance"`
+ // The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false.
+ AutomaticallyFinalizesAt *int64 `form:"automatically_finalizes_at"`
+ // Settings for automatic tax lookup for this invoice.
+ AutomaticTax *InvoiceUpdateAutomaticTaxParams `form:"automatic_tax"`
+ // Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
+ CollectionMethod *string `form:"collection_method"`
+ // A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
+ CustomFields []*InvoiceUpdateCustomFieldParams `form:"custom_fields"`
+ // The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
+ DefaultMargins []*string `form:"default_margins"`
+ // ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ DefaultPaymentMethod *string `form:"default_payment_method"`
+ // ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ DefaultSource *string `form:"default_source"`
+ // The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates.
+ DefaultTaxRates []*string `form:"default_tax_rates"`
+ // An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ Description *string `form:"description"`
+ // The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
+ Discounts []*InvoiceUpdateDiscountParams `form:"discounts"`
+ // The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
+ DueDate *int64 `form:"due_date"`
+ // The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ EffectiveAt *int64 `form:"effective_at"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Footer to be displayed on the invoice.
+ 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 *InvoiceUpdateIssuerParams `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"`
+ // Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
+ Number *string `form:"number"`
+ // The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+ PaymentSettings *InvoiceUpdatePaymentSettingsParams `form:"payment_settings"`
+ // The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ Rendering *InvoiceUpdateRenderingParams `form:"rendering"`
+ // Settings for the cost of shipping for this invoice.
+ ShippingCost *InvoiceUpdateShippingCostParams `form:"shipping_cost"`
+ // Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ ShippingDetails *InvoiceUpdateShippingDetailsParams `form:"shipping_details"`
+ // Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
+ StatementDescriptor *string `form:"statement_descriptor"`
+ // If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
+ TransferData *InvoiceUpdateTransferDataParams `form:"transfer_data"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *InvoiceUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *InvoiceUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
+type InvoiceCreateAmountsDueParams struct {
+ // The amount in cents (or local equivalent).
+ Amount *int64 `form:"amount"`
+ // Number of days from when invoice is finalized until the payment is due.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // Date on which a payment plan's payment is due.
+ DueDate *int64 `form:"due_date"`
+}
+
+// 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 InvoiceCreateAutomaticTaxLiabilityParams 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"`
+}
+
+// Settings for automatic tax lookup for this invoice.
+type InvoiceCreateAutomaticTaxParams struct {
+ // Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
+ Enabled *bool `form:"enabled"`
+ // 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 *InvoiceCreateAutomaticTaxLiabilityParams `form:"liability"`
+}
+
+// A list of up to 4 custom fields to be displayed on the invoice.
+type InvoiceCreateCustomFieldParams 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"`
+}
+
+// Time span for the redeemed discount.
+type InvoiceCreateDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type InvoiceCreateDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *InvoiceCreateDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.
+type InvoiceCreateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *InvoiceCreateDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
+type InvoiceCreateFromInvoiceParams struct {
+ // The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
+ Action *string `form:"action"`
+ // The `id` of the invoice that will be cloned.
+ Invoice *string `form:"invoice"`
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type InvoiceCreateIssuerParams 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"`
+}
+
+// Additional fields for Mandate creation
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams struct {
+ // Transaction type of the mandate.
+ TransactionType *string `form:"transaction_type"`
+}
+
+// If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsACSSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *InvoiceCreatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"`
+ // Verification method for the intent
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsBancontactParams struct {
+ // Preferred language of the Bancontact authorization page that the customer is redirected to.
+ PreferredLanguage *string `form:"preferred_language"`
+}
+
+// The selected installment plan to use for this invoice.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanParams struct {
+ // For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ Count *int64 `form:"count"`
+ // For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ // One of `month`.
+ Interval *string `form:"interval"`
+ // Type of installment plan, one of `fixed_count`.
+ Type *string `form:"type"`
+}
+
+// Installment configuration for payments attempted on this invoice (Mexico Only).
+//
+// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsCardInstallmentsParams struct {
+ // Setting to true enables installments for this invoice.
+ // Setting to false will prevent any selected plan from applying to a payment.
+ Enabled *bool `form:"enabled"`
+ // The selected installment plan to use for this invoice.
+ Plan *InvoiceCreatePaymentSettingsPaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"`
+}
+
+// If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsCardParams struct {
+ // Installment configuration for payments attempted on this invoice (Mexico Only).
+ //
+ // For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ Installments *InvoiceCreatePaymentSettingsPaymentMethodOptionsCardInstallmentsParams `form:"installments"`
+ // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/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"`
+}
+
+// Configuration for eu_bank_transfer funding type.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams 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 the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams struct {
+ // Configuration for eu_bank_transfer funding type.
+ EUBankTransfer *InvoiceCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
+ // The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ Type *string `form:"type"`
+}
+
+// If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct {
+ // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ BankTransfer *InvoiceCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"`
+ // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ FundingType *string `form:"funding_type"`
+}
+
+// If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsIDBankTransferParams struct{}
+
+// If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsKonbiniParams struct{}
+
+// If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsSEPADebitParams struct{}
+
+// Provide filters for the linked accounts that the customer can select for the payment method.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams struct {
+ // The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ AccountSubcategories []*string `form:"account_subcategories"`
+ // ID of the institution to use to filter for selectable accounts.
+ Institution *string `form:"institution"`
+}
+
+// Additional fields for Financial Connections Session creation
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
+ // Provide filters for the linked accounts that the customer can select for the payment method.
+ Filters *InvoiceCreatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams `form:"filters"`
+ // 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"`
+}
+
+// If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsUSBankAccountParams struct {
+ // Additional fields for Financial Connections Session creation
+ FinancialConnections *InvoiceCreatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
+ // Verification method for the intent
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// Payment-method-specific configuration to provide to the invoice's PaymentIntent.
+type InvoiceCreatePaymentSettingsPaymentMethodOptionsParams struct {
+ // If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
+ ACSSDebit *InvoiceCreatePaymentSettingsPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
+ // If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
+ Bancontact *InvoiceCreatePaymentSettingsPaymentMethodOptionsBancontactParams `form:"bancontact"`
+ // If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
+ Card *InvoiceCreatePaymentSettingsPaymentMethodOptionsCardParams `form:"card"`
+ // If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
+ CustomerBalance *InvoiceCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
+ // If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
+ IDBankTransfer *InvoiceCreatePaymentSettingsPaymentMethodOptionsIDBankTransferParams `form:"id_bank_transfer"`
+ // If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
+ Konbini *InvoiceCreatePaymentSettingsPaymentMethodOptionsKonbiniParams `form:"konbini"`
+ // If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
+ SEPADebit *InvoiceCreatePaymentSettingsPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
+ // If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
+ USBankAccount *InvoiceCreatePaymentSettingsPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
+}
+
+// Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+type InvoiceCreatePaymentSettingsParams struct {
+ // ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
+ DefaultMandate *string `form:"default_mandate"`
+ // Payment-method-specific configuration to provide to the invoice's PaymentIntent.
+ PaymentMethodOptions *InvoiceCreatePaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"`
+ // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+}
+
+// Invoice pdf rendering options
+type InvoiceCreateRenderingPDFParams struct {
+ // Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
+ // If set to `auto`, invoice PDF page size defaults to `a4` for customers with
+ // Japanese locale and `letter` for customers with other locales.
+ PageSize *string `form:"page_size"`
+}
+
+// The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+type InvoiceCreateRenderingParams 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"`
+ // Invoice pdf rendering options
+ PDF *InvoiceCreateRenderingPDFParams `form:"pdf"`
+ // ID of the invoice rendering template to use for this invoice.
+ Template *string `form:"template"`
+ // The specific version of invoice rendering template to use for this invoice.
+ TemplateVersion *int64 `form:"template_version"`
+}
+
+// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+type InvoiceCreateShippingCostShippingRateDataDeliveryEstimateMaximumParams 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 InvoiceCreateShippingCostShippingRateDataDeliveryEstimateMinimumParams struct {
+ // A unit of time.
+ Unit *string `form:"unit"`
+ // Must be greater than 0.
+ Value *int64 `form:"value"`
+}
+
+// The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+type InvoiceCreateShippingCostShippingRateDataDeliveryEstimateParams struct {
+ // The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ Maximum *InvoiceCreateShippingCostShippingRateDataDeliveryEstimateMaximumParams `form:"maximum"`
+ // The lower bound of the estimated range. If empty, represents no lower bound.
+ Minimum *InvoiceCreateShippingCostShippingRateDataDeliveryEstimateMinimumParams `form:"minimum"`
+}
+
+// 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 InvoiceCreateShippingCostShippingRateDataFixedAmountCurrencyOptionsParams 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"`
+}
+
+// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+type InvoiceCreateShippingCostShippingRateDataFixedAmountParams 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]*InvoiceCreateShippingCostShippingRateDataFixedAmountCurrencyOptionsParams `form:"currency_options"`
+}
+
+// Parameters to create a new ad-hoc shipping rate for this order.
+type InvoiceCreateShippingCostShippingRateDataParams struct {
+ // The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ DeliveryEstimate *InvoiceCreateShippingCostShippingRateDataDeliveryEstimateParams `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 *InvoiceCreateShippingCostShippingRateDataFixedAmountParams `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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *InvoiceCreateShippingCostShippingRateDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Settings for the cost of shipping for this invoice.
+type InvoiceCreateShippingCostParams struct {
+ // The ID of the shipping rate to use for this order.
+ ShippingRate *string `form:"shipping_rate"`
+ // Parameters to create a new ad-hoc shipping rate for this order.
+ ShippingRateData *InvoiceCreateShippingCostShippingRateDataParams `form:"shipping_rate_data"`
+}
+
+// Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+type InvoiceCreateShippingDetailsParams struct {
+ // Shipping address
+ Address *AddressParams `form:"address"`
+ // Recipient name.
+ Name *string `form:"name"`
+ // Recipient phone (including extension)
+ Phone *string `form:"phone"`
+}
+
+// If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.
+type InvoiceCreateTransferDataParams struct {
+ // The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
+ Amount *int64 `form:"amount"`
+ // ID of an existing, connected Stripe account.
+ Destination *string `form:"destination"`
+}
+
+// This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
+type InvoiceCreateParams struct {
+ Params `form:"*"`
+ // The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
+ AccountTaxIDs []*string `form:"account_tax_ids"`
+ // List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
+ AmountsDue []*InvoiceCreateAmountsDueParams `form:"amounts_due"`
+ // A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
+ ApplicationFeeAmount *int64 `form:"application_fee_amount"`
+ // Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
+ AutoAdvance *bool `form:"auto_advance"`
+ // The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state.
+ AutomaticallyFinalizesAt *int64 `form:"automatically_finalizes_at"`
+ // Settings for automatic tax lookup for this invoice.
+ AutomaticTax *InvoiceCreateAutomaticTaxParams `form:"automatic_tax"`
+ // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`.
+ CollectionMethod *string `form:"collection_method"`
+ // The currency to create this invoice in. Defaults to that of `customer` if not specified.
+ Currency *string `form:"currency"`
+ // The ID of the customer who will be billed.
+ Customer *string `form:"customer"`
+ // The ID of the account who will be billed.
+ CustomerAccount *string `form:"customer_account"`
+ // A list of up to 4 custom fields to be displayed on the invoice.
+ CustomFields []*InvoiceCreateCustomFieldParams `form:"custom_fields"`
+ // The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
+ DefaultMargins []*string `form:"default_margins"`
+ // ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
+ DefaultPaymentMethod *string `form:"default_payment_method"`
+ // ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
+ DefaultSource *string `form:"default_source"`
+ // The tax rates that will apply to any line item that does not have `tax_rates` set.
+ DefaultTaxRates []*string `form:"default_tax_rates"`
+ // An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
+ Description *string `form:"description"`
+ // The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.
+ Discounts []*InvoiceCreateDiscountParams `form:"discounts"`
+ // The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.
+ DueDate *int64 `form:"due_date"`
+ // The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
+ EffectiveAt *int64 `form:"effective_at"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Footer to be displayed on the invoice.
+ Footer *string `form:"footer"`
+ // Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
+ FromInvoice *InvoiceCreateFromInvoiceParams `form:"from_invoice"`
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *InvoiceCreateIssuerParams `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"`
+ // Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
+ Number *string `form:"number"`
+ // The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
+ PaymentSettings *InvoiceCreatePaymentSettingsParams `form:"payment_settings"`
+ // How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
+ PendingInvoiceItemsBehavior *string `form:"pending_invoice_items_behavior"`
+ // The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
+ Rendering *InvoiceCreateRenderingParams `form:"rendering"`
+ // Settings for the cost of shipping for this invoice.
+ ShippingCost *InvoiceCreateShippingCostParams `form:"shipping_cost"`
+ // Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
+ ShippingDetails *InvoiceCreateShippingDetailsParams `form:"shipping_details"`
+ // Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
+ StatementDescriptor *string `form:"statement_descriptor"`
+ // The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected.
+ Subscription *string `form:"subscription"`
+ // If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.
+ TransferData *InvoiceCreateTransferDataParams `form:"transfer_data"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *InvoiceCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *InvoiceCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
type InvoiceAmountsDue struct {
// Incremental amount due for this payment in cents (or local equivalent).
diff --git a/invoiceitem.go b/invoiceitem.go
index fd5406a69a..d26827fff0 100644
--- a/invoiceitem.go
+++ b/invoiceitem.go
@@ -163,6 +163,247 @@ func (p *InvoiceItemListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice.
+type InvoiceItemDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves the invoice item with the given ID.
+type InvoiceItemRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *InvoiceItemRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Time span for the redeemed discount.
+type InvoiceItemUpdateDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type InvoiceItemUpdateDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *InvoiceItemUpdateDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+type InvoiceItemUpdateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *InvoiceItemUpdateDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+type InvoiceItemUpdatePeriodParams struct {
+ // The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ End *int64 `form:"end"`
+ // The start of the period. This value is inclusive.
+ Start *int64 `form:"start"`
+}
+
+// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+type InvoiceItemUpdatePriceDataParams 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](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ Product *string `form:"product"`
+ // 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 positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// The pricing information for the invoice item.
+type InvoiceItemUpdatePricingParams struct {
+ // The ID of the price object.
+ Price *string `form:"price"`
+}
+
+// Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed.
+type InvoiceItemUpdateParams struct {
+ Params `form:"*"`
+ // The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ Amount *int64 `form:"amount"`
+ // An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ Description *string `form:"description"`
+ // Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.
+ Discountable *bool `form:"discountable"`
+ // The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ Discounts []*InvoiceItemUpdateDiscountParams `form:"discounts"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item.
+ Margins []*string `form:"margins"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ Period *InvoiceItemUpdatePeriodParams `form:"period"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ PriceData *InvoiceItemUpdatePriceDataParams `form:"price_data"`
+ // The pricing information for the invoice item.
+ Pricing *InvoiceItemUpdatePricingParams `form:"pricing"`
+ // Non-negative integer. The quantity of units for the invoice item.
+ Quantity *int64 `form:"quantity"`
+ // 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 [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ TaxCode *string `form:"tax_code"`
+ // The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates.
+ TaxRates []*string `form:"tax_rates"`
+ // The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *InvoiceItemUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *InvoiceItemUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Time span for the redeemed discount.
+type InvoiceItemCreateDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type InvoiceItemCreateDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *InvoiceItemCreateDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item.
+type InvoiceItemCreateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *InvoiceItemCreateDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+type InvoiceItemCreatePeriodParams struct {
+ // The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ End *int64 `form:"end"`
+ // The start of the period. This value is inclusive.
+ Start *int64 `form:"start"`
+}
+
+// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+type InvoiceItemCreatePriceDataParams 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](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ Product *string `form:"product"`
+ // 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 positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// The pricing information for the invoice item.
+type InvoiceItemCreatePricingParams struct {
+ // The ID of the price object.
+ Price *string `form:"price"`
+}
+
+// Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
+type InvoiceItemCreateParams struct {
+ Params `form:"*"`
+ // The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice.
+ Amount *int64 `form:"amount"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // The ID of the customer who will be billed when this invoice item is billed.
+ Customer *string `form:"customer"`
+ // The ID of the account who will be billed when this invoice item is billed.
+ CustomerAccount *string `form:"customer_account"`
+ // An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ Description *string `form:"description"`
+ // Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items.
+ Discountable *bool `form:"discountable"`
+ // The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item.
+ Discounts []*InvoiceItemCreateDiscountParams `form:"discounts"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.
+ Invoice *string `form:"invoice"`
+ // The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item.
+ Margins []*string `form:"margins"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ Period *InvoiceItemCreatePeriodParams `form:"period"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ PriceData *InvoiceItemCreatePriceDataParams `form:"price_data"`
+ // The pricing information for the invoice item.
+ Pricing *InvoiceItemCreatePricingParams `form:"pricing"`
+ // Non-negative integer. The quantity of units for the invoice item.
+ Quantity *int64 `form:"quantity"`
+ // The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
+ Subscription *string `form:"subscription"`
+ // 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 [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ TaxCode *string `form:"tax_code"`
+ // The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.
+ TaxRates []*string `form:"tax_rates"`
+ // The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *InvoiceItemCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *InvoiceItemCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Details about the subscription that generated this invoice item
type InvoiceItemParentSubscriptionDetails struct {
// The subscription that generated this invoice item
diff --git a/invoicelineitem.go b/invoicelineitem.go
index c32431fa8e..eaf1a217b2 100644
--- a/invoicelineitem.go
+++ b/invoicelineitem.go
@@ -243,6 +243,176 @@ func (p *InvoiceLineItemParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// Time span for the redeemed discount.
+type InvoiceLineItemUpdateDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type InvoiceLineItemUpdateDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *InvoiceLineItemUpdateDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+type InvoiceLineItemUpdateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *InvoiceLineItemUpdateDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+type InvoiceLineItemUpdatePeriodParams struct {
+ // The end of the period, which must be greater than or equal to the start. This value is inclusive.
+ End *int64 `form:"end"`
+ // The start of the period. This value is inclusive.
+ Start *int64 `form:"start"`
+}
+
+// Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+type InvoiceLineItemUpdatePriceDataProductDataParams 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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *InvoiceLineItemUpdatePriceDataProductDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+type InvoiceLineItemUpdatePriceDataParams 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](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
+ Product *string `form:"product"`
+ // Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
+ ProductData *InvoiceLineItemUpdatePriceDataProductDataParams `form:"product_data"`
+ // 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"`
+}
+
+// The pricing information for the invoice item.
+type InvoiceLineItemUpdatePricingParams struct {
+ // The ID of the price object.
+ Price *string `form:"price"`
+}
+
+// Data to find or create a TaxRate object.
+//
+// Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+type InvoiceLineItemUpdateTaxAmountTaxRateDataParams struct {
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country"`
+ // An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ Description *string `form:"description"`
+ // The display name of the tax rate, which will be shown to users.
+ DisplayName *string `form:"display_name"`
+ // This specifies if the tax rate is inclusive or exclusive.
+ Inclusive *bool `form:"inclusive"`
+ // The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice.
+ Jurisdiction *string `form:"jurisdiction"`
+ // The level of the jurisdiction that imposes this tax rate.
+ JurisdictionLevel *string `form:"jurisdiction_level"`
+ // The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
+ Percentage *float64 `form:"percentage"`
+ // [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
+ State *string `form:"state"`
+ // The high-level tax type, such as `vat` or `sales_tax`.
+ TaxType *string `form:"tax_type"`
+}
+
+// A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+type InvoiceLineItemUpdateTaxAmountParams struct {
+ // The amount, in cents (or local equivalent), of the tax.
+ Amount *int64 `form:"amount"`
+ // The reasoning behind this tax, for example, if the product is tax exempt.
+ TaxabilityReason *string `form:"taxability_reason"`
+ // The amount on which tax is calculated, in cents (or local equivalent).
+ TaxableAmount *int64 `form:"taxable_amount"`
+ // Data to find or create a TaxRate object.
+ //
+ // Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items.
+ TaxRateData *InvoiceLineItemUpdateTaxAmountTaxRateDataParams `form:"tax_rate_data"`
+}
+
+// Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item,
+// so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice
+// item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.
+// Updating an invoice's line item is only possible before the invoice is finalized.
+type InvoiceLineItemUpdateParams struct {
+ Params `form:"*"`
+ Invoice *string `form:"-"` // Included in URL
+ // The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+ Amount *int64 `form:"amount"`
+ // An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
+ Description *string `form:"description"`
+ // Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
+ Discountable *bool `form:"discountable"`
+ // The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
+ Discounts []*InvoiceLineItemUpdateDiscountParams `form:"discounts"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
+ Margins []*string `form:"margins"`
+ // 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`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
+ Metadata map[string]string `form:"metadata"`
+ // The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
+ Period *InvoiceLineItemUpdatePeriodParams `form:"period"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ PriceData *InvoiceLineItemUpdatePriceDataParams `form:"price_data"`
+ // The pricing information for the invoice item.
+ Pricing *InvoiceLineItemUpdatePricingParams `form:"pricing"`
+ // Non-negative integer. The quantity of units for the line item.
+ Quantity *int64 `form:"quantity"`
+ // A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
+ TaxAmounts []*InvoiceLineItemUpdateTaxAmountParams `form:"tax_amounts"`
+ // The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
+ TaxRates []*string `form:"tax_rates"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *InvoiceLineItemUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *InvoiceLineItemUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// The amount of discount calculated per discount for this line item.
type InvoiceLineItemDiscountAmount struct {
// The amount, in cents (or local equivalent), of the discount.
diff --git a/invoicepayment.go b/invoicepayment.go
index 63ef5c6be3..5abe7e5632 100644
--- a/invoicepayment.go
+++ b/invoicepayment.go
@@ -41,6 +41,19 @@ func (p *InvoicePaymentParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the invoice payment with the given ID.
+type InvoicePaymentRetrieveParams struct {
+ Params `form:"*"`
+ Invoice *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *InvoicePaymentRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type InvoicePaymentPayment struct {
// ID of the successful charge for this payment when `type` is `charge`.
Charge *Charge `json:"charge"`
diff --git a/invoicerenderingtemplate.go b/invoicerenderingtemplate.go
index e797719c45..82a5d0bb56 100644
--- a/invoicerenderingtemplate.go
+++ b/invoicerenderingtemplate.go
@@ -65,6 +65,19 @@ func (p *InvoiceRenderingTemplateUnarchiveParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions.
+type InvoiceRenderingTemplateRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ Version *int64 `form:"version"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *InvoiceRenderingTemplateRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates
// can be created from within the Dashboard, and they can be used over the API when creating invoices.
type InvoiceRenderingTemplate struct {
diff --git a/issuing_authorization.go b/issuing_authorization.go
index 3bae0b3d44..9229ce819f 100644
--- a/issuing_authorization.go
+++ b/issuing_authorization.go
@@ -279,6 +279,41 @@ func (p *IssuingAuthorizationDeclineParams) AddMetadata(key string, value string
p.Metadata[key] = value
}
+// Retrieves an Issuing Authorization object.
+type IssuingAuthorizationRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingAuthorizationRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+type IssuingAuthorizationUpdateParams struct {
+ Params `form:"*"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingAuthorizationUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IssuingAuthorizationUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
type IssuingAuthorizationAmountDetails struct {
// The fee charged by the ATM for the cash withdrawal.
diff --git a/issuing_card.go b/issuing_card.go
index 425afaded7..59b755b03a 100644
--- a/issuing_card.go
+++ b/issuing_card.go
@@ -285,6 +285,222 @@ func (p *IssuingCardParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// The desired PIN for this card.
+type IssuingCardCreatePINParams struct {
+ // The card's desired new PIN, encrypted under Stripe's public key.
+ EncryptedNumber *string `form:"encrypted_number"`
+}
+
+// Address validation settings.
+type IssuingCardCreateShippingAddressValidationParams struct {
+ // The address validation capabilities to use.
+ Mode *string `form:"mode"`
+}
+
+// Customs information for the shipment.
+type IssuingCardCreateShippingCustomsParams struct {
+ // The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
+ EORINumber *string `form:"eori_number"`
+}
+
+// The address where the card will be shipped.
+type IssuingCardCreateShippingParams struct {
+ // The address that the card is shipped to.
+ Address *AddressParams `form:"address"`
+ // Address validation settings.
+ AddressValidation *IssuingCardCreateShippingAddressValidationParams `form:"address_validation"`
+ // Customs information for the shipment.
+ Customs *IssuingCardCreateShippingCustomsParams `form:"customs"`
+ // The name printed on the shipping label when shipping the card.
+ Name *string `form:"name"`
+ // Phone number of the recipient of the shipment.
+ PhoneNumber *string `form:"phone_number"`
+ // Whether a signature is required for card delivery.
+ RequireSignature *bool `form:"require_signature"`
+ // Shipment service.
+ Service *string `form:"service"`
+ // Packaging options.
+ Type *string `form:"type"`
+}
+
+// Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+type IssuingCardCreateSpendingControlsSpendingLimitParams struct {
+ // Maximum amount allowed to spend per interval.
+ Amount *int64 `form:"amount"`
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ Categories []*string `form:"categories"`
+ // Interval (or event) to which the amount applies.
+ Interval *string `form:"interval"`
+}
+
+// Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+type IssuingCardCreateSpendingControlsParams struct {
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ AllowedCategories []*string `form:"allowed_categories"`
+ // Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ AllowedMerchantCountries []*string `form:"allowed_merchant_countries"`
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ BlockedCategories []*string `form:"blocked_categories"`
+ // Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ BlockedMerchantCountries []*string `form:"blocked_merchant_countries"`
+ // Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ SpendingLimits []*IssuingCardCreateSpendingControlsSpendingLimitParams `form:"spending_limits"`
+}
+
+// Creates an Issuing Card object.
+type IssuingCardCreateParams struct {
+ Params `form:"*"`
+ // The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated.
+ Cardholder *string `form:"cardholder"`
+ // The currency for the card.
+ Currency *string `form:"currency"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ FinancialAccount *string `form:"financial_account"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The personalization design object belonging to this card.
+ PersonalizationDesign *string `form:"personalization_design"`
+ // The desired PIN for this card.
+ PIN *IssuingCardCreatePINParams `form:"pin"`
+ // The card this is meant to be a replacement for (if any).
+ ReplacementFor *string `form:"replacement_for"`
+ // If `replacement_for` is specified, this should indicate why that card is being replaced.
+ ReplacementReason *string `form:"replacement_reason"`
+ // The second line to print on the card. Max length: 24 characters.
+ SecondLine *string `form:"second_line"`
+ // The address where the card will be shipped.
+ Shipping *IssuingCardCreateShippingParams `form:"shipping"`
+ // Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ SpendingControls *IssuingCardCreateSpendingControlsParams `form:"spending_controls"`
+ // Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
+ Status *string `form:"status"`
+ // The type of card to issue. Possible values are `physical` or `virtual`.
+ Type *string `form:"type"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingCardCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IssuingCardCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves an Issuing Card object.
+type IssuingCardRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingCardRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// The desired new PIN for this card.
+type IssuingCardUpdatePINParams struct {
+ // The card's desired new PIN, encrypted under Stripe's public key.
+ EncryptedNumber *string `form:"encrypted_number"`
+}
+
+// Address validation settings.
+type IssuingCardUpdateShippingAddressValidationParams struct {
+ // The address validation capabilities to use.
+ Mode *string `form:"mode"`
+}
+
+// Customs information for the shipment.
+type IssuingCardUpdateShippingCustomsParams struct {
+ // The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
+ EORINumber *string `form:"eori_number"`
+}
+
+// Updated shipping information for the card.
+type IssuingCardUpdateShippingParams struct {
+ // The address that the card is shipped to.
+ Address *AddressParams `form:"address"`
+ // Address validation settings.
+ AddressValidation *IssuingCardUpdateShippingAddressValidationParams `form:"address_validation"`
+ // Customs information for the shipment.
+ Customs *IssuingCardUpdateShippingCustomsParams `form:"customs"`
+ // The name printed on the shipping label when shipping the card.
+ Name *string `form:"name"`
+ // Phone number of the recipient of the shipment.
+ PhoneNumber *string `form:"phone_number"`
+ // Whether a signature is required for card delivery.
+ RequireSignature *bool `form:"require_signature"`
+ // Shipment service.
+ Service *string `form:"service"`
+ // Packaging options.
+ Type *string `form:"type"`
+}
+
+// Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+type IssuingCardUpdateSpendingControlsSpendingLimitParams struct {
+ // Maximum amount allowed to spend per interval.
+ Amount *int64 `form:"amount"`
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ Categories []*string `form:"categories"`
+ // Interval (or event) to which the amount applies.
+ Interval *string `form:"interval"`
+}
+
+// Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+type IssuingCardUpdateSpendingControlsParams struct {
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ AllowedCategories []*string `form:"allowed_categories"`
+ // Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ AllowedMerchantCountries []*string `form:"allowed_merchant_countries"`
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ BlockedCategories []*string `form:"blocked_categories"`
+ // Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ BlockedMerchantCountries []*string `form:"blocked_merchant_countries"`
+ // Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
+ SpendingLimits []*IssuingCardUpdateSpendingControlsSpendingLimitParams `form:"spending_limits"`
+}
+
+// Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+type IssuingCardUpdateParams struct {
+ Params `form:"*"`
+ // Reason why the `status` of this card is `canceled`.
+ CancellationReason *string `form:"cancellation_reason"`
+ // 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"`
+ PersonalizationDesign *string `form:"personalization_design"`
+ // The desired new PIN for this card.
+ PIN *IssuingCardUpdatePINParams `form:"pin"`
+ // Updated shipping information for the card.
+ Shipping *IssuingCardUpdateShippingParams `form:"shipping"`
+ // Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ SpendingControls *IssuingCardUpdateSpendingControlsParams `form:"spending_controls"`
+ // Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.
+ Status *string `form:"status"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingCardUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IssuingCardUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Address validation details for the shipment.
type IssuingCardShippingAddressValidation struct {
// The address validation capabilities to use.
diff --git a/issuing_cardholder.go b/issuing_cardholder.go
index f1eb5ad674..b452fc7f0f 100644
--- a/issuing_cardholder.go
+++ b/issuing_cardholder.go
@@ -226,6 +226,287 @@ func (p *IssuingCardholderParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// The cardholder's billing address.
+type IssuingCardholderCreateBillingParams struct {
+ // The cardholder's billing address.
+ Address *AddressParams `form:"address"`
+}
+
+// Additional information about a `company` cardholder.
+type IssuingCardholderCreateCompanyParams struct {
+ // The entity's business ID number.
+ TaxID *string `form:"tax_id"`
+}
+
+// Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+type IssuingCardholderCreateIndividualCardIssuingUserTermsAcceptanceParams struct {
+ // The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ Date *int64 `form:"date"`
+ // The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ IP *string `form:"ip"`
+ // The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ UserAgent *string `form:"user_agent"`
+}
+
+// Information related to the card_issuing program for this cardholder.
+type IssuingCardholderCreateIndividualCardIssuingParams struct {
+ // Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ UserTermsAcceptance *IssuingCardholderCreateIndividualCardIssuingUserTermsAcceptanceParams `form:"user_terms_acceptance"`
+}
+
+// The date of birth of this cardholder. Cardholders must be older than 13 years old.
+type IssuingCardholderCreateIndividualDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// An identifying document, either a passport or local ID card.
+type IssuingCardholderCreateIndividualVerificationDocumentParams struct {
+ // The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ Back *string `form:"back"`
+ // The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ Front *string `form:"front"`
+}
+
+// Government-issued ID document for this cardholder.
+type IssuingCardholderCreateIndividualVerificationParams struct {
+ // An identifying document, either a passport or local ID card.
+ Document *IssuingCardholderCreateIndividualVerificationDocumentParams `form:"document"`
+}
+
+// Additional information about an `individual` cardholder.
+type IssuingCardholderCreateIndividualParams struct {
+ // Information related to the card_issuing program for this cardholder.
+ CardIssuing *IssuingCardholderCreateIndividualCardIssuingParams `form:"card_issuing"`
+ // The date of birth of this cardholder. Cardholders must be older than 13 years old.
+ DOB *IssuingCardholderCreateIndividualDOBParams `form:"dob"`
+ // The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ FirstName *string `form:"first_name"`
+ // The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ LastName *string `form:"last_name"`
+ // Government-issued ID document for this cardholder.
+ Verification *IssuingCardholderCreateIndividualVerificationParams `form:"verification"`
+}
+
+// Limit spending with amount-based rules that apply across this cardholder's cards.
+type IssuingCardholderCreateSpendingControlsSpendingLimitParams struct {
+ // Maximum amount allowed to spend per interval.
+ Amount *int64 `form:"amount"`
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ Categories []*string `form:"categories"`
+ // Interval (or event) to which the amount applies.
+ Interval *string `form:"interval"`
+}
+
+// Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+type IssuingCardholderCreateSpendingControlsParams struct {
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ AllowedCategories []*string `form:"allowed_categories"`
+ // Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ AllowedMerchantCountries []*string `form:"allowed_merchant_countries"`
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ BlockedCategories []*string `form:"blocked_categories"`
+ // Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ BlockedMerchantCountries []*string `form:"blocked_merchant_countries"`
+ // Limit spending with amount-based rules that apply across this cardholder's cards.
+ SpendingLimits []*IssuingCardholderCreateSpendingControlsSpendingLimitParams `form:"spending_limits"`
+ // Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
+ SpendingLimitsCurrency *string `form:"spending_limits_currency"`
+}
+
+// Creates a new Issuing Cardholder object that can be issued cards.
+type IssuingCardholderCreateParams struct {
+ Params `form:"*"`
+ // The cardholder's billing address.
+ Billing *IssuingCardholderCreateBillingParams `form:"billing"`
+ // Additional information about a `company` cardholder.
+ Company *IssuingCardholderCreateCompanyParams `form:"company"`
+ // The cardholder's email address.
+ Email *string `form:"email"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Additional information about an `individual` cardholder.
+ Individual *IssuingCardholderCreateIndividualParams `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"`
+ // The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers.
+ Name *string `form:"name"`
+ // The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards.
+ // While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
+ PhoneNumber *string `form:"phone_number"`
+ // The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ // This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ PreferredLocales []*string `form:"preferred_locales"`
+ // Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ SpendingControls *IssuingCardholderCreateSpendingControlsParams `form:"spending_controls"`
+ // Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`.
+ Status *string `form:"status"`
+ // One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.
+ Type *string `form:"type"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingCardholderCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IssuingCardholderCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves an Issuing Cardholder object.
+type IssuingCardholderRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingCardholderRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// The cardholder's billing address.
+type IssuingCardholderUpdateBillingParams struct {
+ // The cardholder's billing address.
+ Address *AddressParams `form:"address"`
+}
+
+// Additional information about a `company` cardholder.
+type IssuingCardholderUpdateCompanyParams struct {
+ // The entity's business ID number.
+ TaxID *string `form:"tax_id"`
+}
+
+// Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+type IssuingCardholderUpdateIndividualCardIssuingUserTermsAcceptanceParams struct {
+ // The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ Date *int64 `form:"date"`
+ // The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
+ IP *string `form:"ip"`
+ // The user agent of the browser from which the cardholder accepted the Authorized User Terms.
+ UserAgent *string `form:"user_agent"`
+}
+
+// Information related to the card_issuing program for this cardholder.
+type IssuingCardholderUpdateIndividualCardIssuingParams struct {
+ // Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
+ UserTermsAcceptance *IssuingCardholderUpdateIndividualCardIssuingUserTermsAcceptanceParams `form:"user_terms_acceptance"`
+}
+
+// The date of birth of this cardholder. Cardholders must be older than 13 years old.
+type IssuingCardholderUpdateIndividualDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// An identifying document, either a passport or local ID card.
+type IssuingCardholderUpdateIndividualVerificationDocumentParams struct {
+ // The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ Back *string `form:"back"`
+ // The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
+ Front *string `form:"front"`
+}
+
+// Government-issued ID document for this cardholder.
+type IssuingCardholderUpdateIndividualVerificationParams struct {
+ // An identifying document, either a passport or local ID card.
+ Document *IssuingCardholderUpdateIndividualVerificationDocumentParams `form:"document"`
+}
+
+// Additional information about an `individual` cardholder.
+type IssuingCardholderUpdateIndividualParams struct {
+ // Information related to the card_issuing program for this cardholder.
+ CardIssuing *IssuingCardholderUpdateIndividualCardIssuingParams `form:"card_issuing"`
+ // The date of birth of this cardholder. Cardholders must be older than 13 years old.
+ DOB *IssuingCardholderUpdateIndividualDOBParams `form:"dob"`
+ // The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ FirstName *string `form:"first_name"`
+ // The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
+ LastName *string `form:"last_name"`
+ // Government-issued ID document for this cardholder.
+ Verification *IssuingCardholderUpdateIndividualVerificationParams `form:"verification"`
+}
+
+// Limit spending with amount-based rules that apply across this cardholder's cards.
+type IssuingCardholderUpdateSpendingControlsSpendingLimitParams struct {
+ // Maximum amount allowed to spend per interval.
+ Amount *int64 `form:"amount"`
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
+ Categories []*string `form:"categories"`
+ // Interval (or event) to which the amount applies.
+ Interval *string `form:"interval"`
+}
+
+// Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+type IssuingCardholderUpdateSpendingControlsParams struct {
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
+ AllowedCategories []*string `form:"allowed_categories"`
+ // Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
+ AllowedMerchantCountries []*string `form:"allowed_merchant_countries"`
+ // Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
+ BlockedCategories []*string `form:"blocked_categories"`
+ // Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
+ BlockedMerchantCountries []*string `form:"blocked_merchant_countries"`
+ // Limit spending with amount-based rules that apply across this cardholder's cards.
+ SpendingLimits []*IssuingCardholderUpdateSpendingControlsSpendingLimitParams `form:"spending_limits"`
+ // Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
+ SpendingLimitsCurrency *string `form:"spending_limits_currency"`
+}
+
+// Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+type IssuingCardholderUpdateParams struct {
+ Params `form:"*"`
+ // The cardholder's billing address.
+ Billing *IssuingCardholderUpdateBillingParams `form:"billing"`
+ // Additional information about a `company` cardholder.
+ Company *IssuingCardholderUpdateCompanyParams `form:"company"`
+ // The cardholder's email address.
+ Email *string `form:"email"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Additional information about an `individual` cardholder.
+ Individual *IssuingCardholderUpdateIndividualParams `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"`
+ // The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details.
+ PhoneNumber *string `form:"phone_number"`
+ // The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
+ // This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
+ PreferredLocales []*string `form:"preferred_locales"`
+ // Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
+ SpendingControls *IssuingCardholderUpdateSpendingControlsParams `form:"spending_controls"`
+ // Specifies whether to permit authorizations on this cardholder's cards.
+ Status *string `form:"status"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingCardholderUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IssuingCardholderUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type IssuingCardholderBilling struct {
Address *Address `json:"address"`
}
diff --git a/issuing_creditunderwritingrecord.go b/issuing_creditunderwritingrecord.go
index 171cc94058..59e6129118 100644
--- a/issuing_creditunderwritingrecord.go
+++ b/issuing_creditunderwritingrecord.go
@@ -623,6 +623,18 @@ func (p *IssuingCreditUnderwritingRecordCreateFromProactiveReviewParams) AddMeta
p.Metadata[key] = value
}
+// Retrieves a CreditUnderwritingRecord object.
+type IssuingCreditUnderwritingRecordRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingCreditUnderwritingRecordRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// For decisions triggered by an application, details about the submission.
type IssuingCreditUnderwritingRecordApplication struct {
// The channel through which the applicant has submitted their application.
diff --git a/issuing_dispute.go b/issuing_dispute.go
index 08eebc5be4..b8865765b9 100644
--- a/issuing_dispute.go
+++ b/issuing_dispute.go
@@ -321,6 +321,350 @@ func (p *IssuingDisputeSubmitParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// Evidence provided when `reason` is 'canceled'.
+type IssuingDisputeCreateEvidenceCanceledParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Date when order was canceled.
+ CanceledAt *int64 `form:"canceled_at"`
+ // Whether the cardholder was provided with a cancellation policy.
+ CancellationPolicyProvided *bool `form:"cancellation_policy_provided"`
+ // Reason for canceling the order.
+ CancellationReason *string `form:"cancellation_reason"`
+ // Date when the cardholder expected to receive the product.
+ ExpectedAt *int64 `form:"expected_at"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Description of the merchandise or service that was purchased.
+ ProductDescription *string `form:"product_description"`
+ // Whether the product was a merchandise or service.
+ ProductType *string `form:"product_type"`
+ // Date when the product was returned or attempted to be returned.
+ ReturnedAt *int64 `form:"returned_at"`
+ // Result of cardholder's attempt to return the product.
+ ReturnStatus *string `form:"return_status"`
+}
+
+// Evidence provided when `reason` is 'duplicate'.
+type IssuingDisputeCreateEvidenceDuplicateParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ CardStatement *string `form:"card_statement"`
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ CashReceipt *string `form:"cash_receipt"`
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ CheckImage *string `form:"check_image"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ OriginalTransaction *string `form:"original_transaction"`
+}
+
+// Evidence provided when `reason` is 'fraudulent'.
+type IssuingDisputeCreateEvidenceFraudulentParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+}
+
+// Evidence provided when `reason` is 'merchandise_not_as_described'.
+type IssuingDisputeCreateEvidenceMerchandiseNotAsDescribedParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Date when the product was received.
+ ReceivedAt *int64 `form:"received_at"`
+ // Description of the cardholder's attempt to return the product.
+ ReturnDescription *string `form:"return_description"`
+ // Date when the product was returned or attempted to be returned.
+ ReturnedAt *int64 `form:"returned_at"`
+ // Result of cardholder's attempt to return the product.
+ ReturnStatus *string `form:"return_status"`
+}
+
+// Evidence provided when `reason` is 'no_valid_authorization'.
+type IssuingDisputeCreateEvidenceNoValidAuthorizationParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+}
+
+// Evidence provided when `reason` is 'not_received'.
+type IssuingDisputeCreateEvidenceNotReceivedParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Date when the cardholder expected to receive the product.
+ ExpectedAt *int64 `form:"expected_at"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Description of the merchandise or service that was purchased.
+ ProductDescription *string `form:"product_description"`
+ // Whether the product was a merchandise or service.
+ ProductType *string `form:"product_type"`
+}
+
+// Evidence provided when `reason` is 'other'.
+type IssuingDisputeCreateEvidenceOtherParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Description of the merchandise or service that was purchased.
+ ProductDescription *string `form:"product_description"`
+ // Whether the product was a merchandise or service.
+ ProductType *string `form:"product_type"`
+}
+
+// Evidence provided when `reason` is 'service_not_as_described'.
+type IssuingDisputeCreateEvidenceServiceNotAsDescribedParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Date when order was canceled.
+ CanceledAt *int64 `form:"canceled_at"`
+ // Reason for canceling the order.
+ CancellationReason *string `form:"cancellation_reason"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Date when the product was received.
+ ReceivedAt *int64 `form:"received_at"`
+}
+
+// Evidence provided for the dispute.
+type IssuingDisputeCreateEvidenceParams struct {
+ // Evidence provided when `reason` is 'canceled'.
+ Canceled *IssuingDisputeCreateEvidenceCanceledParams `form:"canceled"`
+ // Evidence provided when `reason` is 'duplicate'.
+ Duplicate *IssuingDisputeCreateEvidenceDuplicateParams `form:"duplicate"`
+ // Evidence provided when `reason` is 'fraudulent'.
+ Fraudulent *IssuingDisputeCreateEvidenceFraudulentParams `form:"fraudulent"`
+ // Evidence provided when `reason` is 'merchandise_not_as_described'.
+ MerchandiseNotAsDescribed *IssuingDisputeCreateEvidenceMerchandiseNotAsDescribedParams `form:"merchandise_not_as_described"`
+ // Evidence provided when `reason` is 'not_received'.
+ NotReceived *IssuingDisputeCreateEvidenceNotReceivedParams `form:"not_received"`
+ // Evidence provided when `reason` is 'no_valid_authorization'.
+ NoValidAuthorization *IssuingDisputeCreateEvidenceNoValidAuthorizationParams `form:"no_valid_authorization"`
+ // Evidence provided when `reason` is 'other'.
+ Other *IssuingDisputeCreateEvidenceOtherParams `form:"other"`
+ // The reason for filing the dispute. The evidence should be submitted in the field of the same name.
+ Reason *string `form:"reason"`
+ // Evidence provided when `reason` is 'service_not_as_described'.
+ ServiceNotAsDescribed *IssuingDisputeCreateEvidenceServiceNotAsDescribedParams `form:"service_not_as_described"`
+}
+
+// Params for disputes related to Treasury FinancialAccounts
+type IssuingDisputeCreateTreasuryParams struct {
+ // The ID of the ReceivedDebit to initiate an Issuings dispute for.
+ ReceivedDebit *string `form:"received_debit"`
+}
+
+// Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
+type IssuingDisputeCreateParams struct {
+ Params `form:"*"`
+ // The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount.
+ Amount *int64 `form:"amount"`
+ // Evidence provided for the dispute.
+ Evidence *IssuingDisputeCreateEvidenceParams `form:"evidence"`
+ // 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"`
+ // The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`.
+ Transaction *string `form:"transaction"`
+ // Params for disputes related to Treasury FinancialAccounts
+ Treasury *IssuingDisputeCreateTreasuryParams `form:"treasury"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingDisputeCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IssuingDisputeCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves an Issuing Dispute object.
+type IssuingDisputeRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingDisputeRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Evidence provided when `reason` is 'canceled'.
+type IssuingDisputeUpdateEvidenceCanceledParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Date when order was canceled.
+ CanceledAt *int64 `form:"canceled_at"`
+ // Whether the cardholder was provided with a cancellation policy.
+ CancellationPolicyProvided *bool `form:"cancellation_policy_provided"`
+ // Reason for canceling the order.
+ CancellationReason *string `form:"cancellation_reason"`
+ // Date when the cardholder expected to receive the product.
+ ExpectedAt *int64 `form:"expected_at"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Description of the merchandise or service that was purchased.
+ ProductDescription *string `form:"product_description"`
+ // Whether the product was a merchandise or service.
+ ProductType *string `form:"product_type"`
+ // Date when the product was returned or attempted to be returned.
+ ReturnedAt *int64 `form:"returned_at"`
+ // Result of cardholder's attempt to return the product.
+ ReturnStatus *string `form:"return_status"`
+}
+
+// Evidence provided when `reason` is 'duplicate'.
+type IssuingDisputeUpdateEvidenceDuplicateParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
+ CardStatement *string `form:"card_statement"`
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
+ CashReceipt *string `form:"cash_receipt"`
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
+ CheckImage *string `form:"check_image"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
+ OriginalTransaction *string `form:"original_transaction"`
+}
+
+// Evidence provided when `reason` is 'fraudulent'.
+type IssuingDisputeUpdateEvidenceFraudulentParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+}
+
+// Evidence provided when `reason` is 'merchandise_not_as_described'.
+type IssuingDisputeUpdateEvidenceMerchandiseNotAsDescribedParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Date when the product was received.
+ ReceivedAt *int64 `form:"received_at"`
+ // Description of the cardholder's attempt to return the product.
+ ReturnDescription *string `form:"return_description"`
+ // Date when the product was returned or attempted to be returned.
+ ReturnedAt *int64 `form:"returned_at"`
+ // Result of cardholder's attempt to return the product.
+ ReturnStatus *string `form:"return_status"`
+}
+
+// Evidence provided when `reason` is 'no_valid_authorization'.
+type IssuingDisputeUpdateEvidenceNoValidAuthorizationParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+}
+
+// Evidence provided when `reason` is 'not_received'.
+type IssuingDisputeUpdateEvidenceNotReceivedParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Date when the cardholder expected to receive the product.
+ ExpectedAt *int64 `form:"expected_at"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Description of the merchandise or service that was purchased.
+ ProductDescription *string `form:"product_description"`
+ // Whether the product was a merchandise or service.
+ ProductType *string `form:"product_type"`
+}
+
+// Evidence provided when `reason` is 'other'.
+type IssuingDisputeUpdateEvidenceOtherParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Description of the merchandise or service that was purchased.
+ ProductDescription *string `form:"product_description"`
+ // Whether the product was a merchandise or service.
+ ProductType *string `form:"product_type"`
+}
+
+// Evidence provided when `reason` is 'service_not_as_described'.
+type IssuingDisputeUpdateEvidenceServiceNotAsDescribedParams struct {
+ // (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
+ AdditionalDocumentation *string `form:"additional_documentation"`
+ // Date when order was canceled.
+ CanceledAt *int64 `form:"canceled_at"`
+ // Reason for canceling the order.
+ CancellationReason *string `form:"cancellation_reason"`
+ // Explanation of why the cardholder is disputing this transaction.
+ Explanation *string `form:"explanation"`
+ // Date when the product was received.
+ ReceivedAt *int64 `form:"received_at"`
+}
+
+// Evidence provided for the dispute.
+type IssuingDisputeUpdateEvidenceParams struct {
+ // Evidence provided when `reason` is 'canceled'.
+ Canceled *IssuingDisputeUpdateEvidenceCanceledParams `form:"canceled"`
+ // Evidence provided when `reason` is 'duplicate'.
+ Duplicate *IssuingDisputeUpdateEvidenceDuplicateParams `form:"duplicate"`
+ // Evidence provided when `reason` is 'fraudulent'.
+ Fraudulent *IssuingDisputeUpdateEvidenceFraudulentParams `form:"fraudulent"`
+ // Evidence provided when `reason` is 'merchandise_not_as_described'.
+ MerchandiseNotAsDescribed *IssuingDisputeUpdateEvidenceMerchandiseNotAsDescribedParams `form:"merchandise_not_as_described"`
+ // Evidence provided when `reason` is 'not_received'.
+ NotReceived *IssuingDisputeUpdateEvidenceNotReceivedParams `form:"not_received"`
+ // Evidence provided when `reason` is 'no_valid_authorization'.
+ NoValidAuthorization *IssuingDisputeUpdateEvidenceNoValidAuthorizationParams `form:"no_valid_authorization"`
+ // Evidence provided when `reason` is 'other'.
+ Other *IssuingDisputeUpdateEvidenceOtherParams `form:"other"`
+ // The reason for filing the dispute. The evidence should be submitted in the field of the same name.
+ Reason *string `form:"reason"`
+ // Evidence provided when `reason` is 'service_not_as_described'.
+ ServiceNotAsDescribed *IssuingDisputeUpdateEvidenceServiceNotAsDescribedParams `form:"service_not_as_described"`
+}
+
+// Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.
+type IssuingDisputeUpdateParams struct {
+ Params `form:"*"`
+ // The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ Amount *int64 `form:"amount"`
+ // Evidence provided for the dispute.
+ Evidence *IssuingDisputeUpdateEvidenceParams `form:"evidence"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingDisputeUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IssuingDisputeUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type IssuingDisputeEvidenceCanceled struct {
// (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
AdditionalDocumentation *File `json:"additional_documentation"`
diff --git a/issuing_disputesettlementdetail.go b/issuing_disputesettlementdetail.go
index 9fa414c4ee..1de0055c1b 100644
--- a/issuing_disputesettlementdetail.go
+++ b/issuing_disputesettlementdetail.go
@@ -53,6 +53,18 @@ func (p *IssuingDisputeSettlementDetailParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves an Issuing DisputeSettlementDetail object.
+type IssuingDisputeSettlementDetailRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingDisputeSettlementDetailRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Details about the transaction, such as processing dates, set by the card network.
type IssuingDisputeSettlementDetailNetworkData struct {
// The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network.
diff --git a/issuing_fraudliabilitydebit.go b/issuing_fraudliabilitydebit.go
index cae6f4ac53..80fe622ff0 100644
--- a/issuing_fraudliabilitydebit.go
+++ b/issuing_fraudliabilitydebit.go
@@ -34,6 +34,18 @@ func (p *IssuingFraudLiabilityDebitParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves an Issuing FraudLiabilityDebit object.
+type IssuingFraudLiabilityDebitRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingFraudLiabilityDebitRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions.
type IssuingFraudLiabilityDebit struct {
APIResource
diff --git a/issuing_personalizationdesign.go b/issuing_personalizationdesign.go
index b8f2d1b2c1..c01e5e297b 100644
--- a/issuing_personalizationdesign.go
+++ b/issuing_personalizationdesign.go
@@ -129,6 +129,128 @@ func (p *IssuingPersonalizationDesignParams) AddMetadata(key string, value strin
p.Metadata[key] = value
}
+// Hash containing carrier text, for use with physical bundles that support carrier text.
+type IssuingPersonalizationDesignCreateCarrierTextParams struct {
+ // The footer body text of the carrier letter.
+ FooterBody *string `form:"footer_body"`
+ // The footer title text of the carrier letter.
+ FooterTitle *string `form:"footer_title"`
+ // The header body text of the carrier letter.
+ HeaderBody *string `form:"header_body"`
+ // The header title text of the carrier letter.
+ HeaderTitle *string `form:"header_title"`
+}
+
+// Information on whether this personalization design is used to create cards when one is not specified.
+type IssuingPersonalizationDesignCreatePreferencesParams struct {
+ // Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ IsDefault *bool `form:"is_default"`
+}
+
+// Creates a personalization design object.
+type IssuingPersonalizationDesignCreateParams struct {
+ Params `form:"*"`
+ // The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ CardLogo *string `form:"card_logo"`
+ // Hash containing carrier text, for use with physical bundles that support carrier text.
+ CarrierText *IssuingPersonalizationDesignCreateCarrierTextParams `form:"carrier_text"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ LookupKey *string `form:"lookup_key"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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"`
+ // Friendly display name.
+ Name *string `form:"name"`
+ // The physical bundle object belonging to this personalization design.
+ PhysicalBundle *string `form:"physical_bundle"`
+ // Information on whether this personalization design is used to create cards when one is not specified.
+ Preferences *IssuingPersonalizationDesignCreatePreferencesParams `form:"preferences"`
+ // If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
+ TransferLookupKey *bool `form:"transfer_lookup_key"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingPersonalizationDesignCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IssuingPersonalizationDesignCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves a personalization design object.
+type IssuingPersonalizationDesignRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingPersonalizationDesignRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Hash containing carrier text, for use with physical bundles that support carrier text.
+type IssuingPersonalizationDesignUpdateCarrierTextParams struct {
+ // The footer body text of the carrier letter.
+ FooterBody *string `form:"footer_body"`
+ // The footer title text of the carrier letter.
+ FooterTitle *string `form:"footer_title"`
+ // The header body text of the carrier letter.
+ HeaderBody *string `form:"header_body"`
+ // The header title text of the carrier letter.
+ HeaderTitle *string `form:"header_title"`
+}
+
+// Information on whether this personalization design is used to create cards when one is not specified.
+type IssuingPersonalizationDesignUpdatePreferencesParams struct {
+ // Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
+ IsDefault *bool `form:"is_default"`
+}
+
+// Updates a card personalization object.
+type IssuingPersonalizationDesignUpdateParams struct {
+ Params `form:"*"`
+ // The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
+ CardLogo *string `form:"card_logo"`
+ // Hash containing carrier text, for use with physical bundles that support carrier text.
+ CarrierText *IssuingPersonalizationDesignUpdateCarrierTextParams `form:"carrier_text"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
+ LookupKey *string `form:"lookup_key"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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"`
+ // Friendly display name. Providing an empty string will set the field to null.
+ Name *string `form:"name"`
+ // The physical bundle object belonging to this personalization design.
+ PhysicalBundle *string `form:"physical_bundle"`
+ // Information on whether this personalization design is used to create cards when one is not specified.
+ Preferences *IssuingPersonalizationDesignUpdatePreferencesParams `form:"preferences"`
+ // If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
+ TransferLookupKey *bool `form:"transfer_lookup_key"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingPersonalizationDesignUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IssuingPersonalizationDesignUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Hash containing carrier text, for use with physical bundles that support carrier text.
type IssuingPersonalizationDesignCarrierText struct {
// The footer body text of the carrier letter.
diff --git a/issuing_physicalbundle.go b/issuing_physicalbundle.go
index 197ec285c7..bb07787096 100644
--- a/issuing_physicalbundle.go
+++ b/issuing_physicalbundle.go
@@ -85,6 +85,18 @@ func (p *IssuingPhysicalBundleParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves a physical bundle object.
+type IssuingPhysicalBundleRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingPhysicalBundleRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type IssuingPhysicalBundleFeatures struct {
// The policy for how to use card logo images in a card design with this physical bundle.
CardLogo IssuingPhysicalBundleFeaturesCardLogo `json:"card_logo"`
diff --git a/issuing_token.go b/issuing_token.go
index 5a47bb1b45..0c013a0007 100644
--- a/issuing_token.go
+++ b/issuing_token.go
@@ -147,6 +147,32 @@ func (p *IssuingTokenParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves an Issuing Token object.
+type IssuingTokenRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingTokenRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Attempts to update the specified Issuing Token object to the status specified.
+type IssuingTokenUpdateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Specifies which status the token should be updated to.
+ Status *string `form:"status"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingTokenUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type IssuingTokenNetworkDataDevice struct {
// An obfuscated ID derived from the device ID.
DeviceFingerprint string `json:"device_fingerprint"`
diff --git a/issuing_transaction.go b/issuing_transaction.go
index 1fc122ebc8..452235c32a 100644
--- a/issuing_transaction.go
+++ b/issuing_transaction.go
@@ -101,6 +101,41 @@ func (p *IssuingTransactionParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// Retrieves an Issuing Transaction object.
+type IssuingTransactionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingTransactionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+type IssuingTransactionUpdateParams struct {
+ Params `form:"*"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *IssuingTransactionUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *IssuingTransactionUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
type IssuingTransactionAmountDetails struct {
// The fee charged by the ATM for the cash withdrawal.
diff --git a/iter.go b/iter.go
index 57a81b9256..cd8e7e3c9e 100644
--- a/iter.go
+++ b/iter.go
@@ -118,11 +118,113 @@ func GetIter(container ListParamsContainer, query Query) *Iter {
return iter
}
-func listItemID(x interface{}) string {
+// v1List provides a convenient interface for iterating over the elements
+// returned from paginated list API calls. It is meant to be an improvement
+// over the Iter type, which was written before Go introduced generics and iter.Seq2.
+// Calling the `All` allows you to iterate over all items in the list,
+// with automatic pagination.
+type v1List[T any] struct {
+ cur *T
+ err error
+ formValues *form.Values
+ listContainer ListContainer
+ listParams ListParams
+ listMeta *ListMeta
+ query v1Query[T]
+ values []*T
+}
+
+// All returns a Seq2 that will be evaluated on each item in a v1List.
+// The All function will continue to fetch pages of items as needed.
+func (it *v1List[T]) All() Seq2[*T, error] {
+ return func(yield func(*T, error) bool) {
+ for it.next() {
+ if !yield(it.cur, nil) {
+ return
+ }
+ }
+ if it.err != nil {
+ if !yield(new(T), it.err) {
+ return
+ }
+ }
+ }
+}
+
+// next advances the V1List to the next item in the list,
+// which will then be available
+// through the current method.
+// It returns false when the iterator stops
+// at the end of the list.
+func (it *v1List[T]) next() bool {
+ if len(it.values) == 0 && it.listMeta.HasMore && !it.listParams.Single {
+ // determine if we're moving forward or backwards in paging
+ if it.listParams.EndingBefore != nil {
+ it.listParams.EndingBefore = String(listItemID(it.cur))
+ it.formValues.Set(EndingBefore, *it.listParams.EndingBefore)
+ } else {
+ it.listParams.StartingAfter = String(listItemID(it.cur))
+ it.formValues.Set(StartingAfter, *it.listParams.StartingAfter)
+ }
+ it.getPage()
+ }
+ if len(it.values) == 0 {
+ return false
+ }
+ it.cur = it.values[0]
+ it.values = it.values[1:]
+ return true
+}
+
+func (it *v1List[T]) getPage() {
+ it.values, it.listContainer, it.err = it.query(it.listParams.GetParams(), it.formValues)
+ it.listMeta = it.listContainer.GetListMeta()
+
+ if it.listParams.EndingBefore != nil {
+ // We are moving backward,
+ // but items arrive in forward order.
+ reverse(it.values)
+ }
+}
+
+// Query is the function used to get a page listing.
+type v1Query[T any] func(*Params, *form.Values) ([]*T, ListContainer, error)
+
+// newV1List returns a new v1List for a given query and its options, and initializes
+// it by fetching the first page of items.
+func newV1List[T any](container ListParamsContainer, query v1Query[T]) *v1List[T] {
+ var listParams *ListParams
+ formValues := &form.Values{}
+
+ if container != nil {
+ reflectValue := reflect.ValueOf(container)
+
+ // See the comment on Call in stripe.go.
+ if reflectValue.Kind() == reflect.Ptr && !reflectValue.IsNil() {
+ listParams = container.GetListParams()
+ form.AppendTo(formValues, container)
+ }
+ }
+
+ if listParams == nil {
+ listParams = &ListParams{}
+ }
+ iter := &v1List[T]{
+ formValues: formValues,
+ listParams: *listParams,
+ query: query,
+ }
+
+ iter.getPage()
+
+ return iter
+}
+
+func listItemID[T any](x T) string {
return reflect.ValueOf(x).Elem().FieldByName("ID").String()
}
-func reverse(a []interface{}) {
+func reverse[T any](a []T) {
for i := 0; i < len(a)/2; i++ {
a[i], a[len(a)-i-1] = a[len(a)-i-1], a[i]
}
diff --git a/iter_test.go b/iter_test.go
index b8a1fd5ea5..67361fd9dd 100644
--- a/iter_test.go
+++ b/iter_test.go
@@ -143,6 +143,97 @@ func TestIterListAndMeta(t *testing.T) {
assert.Equal(t, listMeta, it.Meta())
}
+func TestV1ListEmpty(t *testing.T) {
+ tq := testV1Query[*int]{{nil, &ListMeta{}, nil}}
+ g, gerr := collectList(newV1List(nil, tq.query))
+ assert.Equal(t, 0, len(tq))
+ assert.Equal(t, 0, len(g))
+ assert.NoError(t, gerr)
+}
+
+func TestV1ListEmptyErr(t *testing.T) {
+ tq := testV1Query[*int]{{nil, &ListMeta{}, errTest}}
+ g, gerr := collectList(newV1List(nil, tq.query))
+ assert.Equal(t, 0, len(tq))
+ assert.Equal(t, 0, len(g))
+ assert.Equal(t, errTest, gerr)
+}
+
+func TestV1ListOne(t *testing.T) {
+ tq := testV1Query[*int]{{[]*int{intPtr(1)}, &ListMeta{}, nil}}
+ want := []*int{intPtr(1)}
+ g, gerr := collectList(newV1List(nil, tq.query))
+ assert.Equal(t, 0, len(tq))
+ assert.Equal(t, want, g)
+ assert.NoError(t, gerr)
+}
+
+func TestV1ListOneErr(t *testing.T) {
+ tq := testV1Query[*int]{{[]*int{intPtr(1)}, &ListMeta{}, errTest}}
+ want := []*int{intPtr(1)}
+ g, gerr := collectList(newV1List(nil, tq.query))
+ assert.Equal(t, 0, len(tq))
+ assert.Equal(t, want, g)
+ assert.Equal(t, errTest, gerr)
+}
+
+func TestV1ListPage2EmptyErr(t *testing.T) {
+ tq := testV1Query[*item]{
+ {[]*item{{"x"}}, &ListMeta{HasMore: true, TotalCount: 0, URL: ""}, nil},
+ {nil, &ListMeta{}, errTest},
+ }
+ want := []*item{{"x"}}
+ g, gerr := collectList(newV1List(nil, tq.query))
+ assert.Equal(t, 0, len(tq))
+ assert.Equal(t, want, g)
+ assert.Equal(t, errTest, gerr)
+}
+
+func TestV1ListTwoPages(t *testing.T) {
+ tq := testV1Query[*item]{
+ {[]*item{{"x"}}, &ListMeta{HasMore: true, TotalCount: 0, URL: ""}, nil},
+ {[]*item{{"y"}}, &ListMeta{}, nil},
+ }
+ want := []*item{{"x"}, {"y"}}
+ g, gerr := collectList(newV1List(nil, tq.query))
+ assert.Equal(t, 0, len(tq))
+ assert.Equal(t, want, g)
+ assert.NoError(t, gerr)
+}
+
+func TestV1ListTwoPagesErr(t *testing.T) {
+ tq := testV1Query[*item]{
+ {[]*item{{"x"}}, &ListMeta{HasMore: true, TotalCount: 0, URL: ""}, nil},
+ {[]*item{{"y"}}, &ListMeta{}, errTest},
+ }
+ want := []*item{{"x"}, {"y"}}
+ g, gerr := collectList(newV1List(nil, tq.query))
+ assert.Equal(t, 0, len(tq))
+ assert.Equal(t, want, g)
+ assert.Equal(t, errTest, gerr)
+}
+
+func TestV1ListReversed(t *testing.T) {
+ tq := testV1Query[*int]{{[]*int{intPtr(1), intPtr(2)}, &ListMeta{}, nil}}
+ want := []*int{intPtr(2), intPtr(1)}
+ g, gerr := collectList(newV1List(&ListParams{EndingBefore: String("x")}, tq.query))
+ assert.Equal(t, 0, len(tq))
+ assert.Equal(t, want, g)
+ assert.NoError(t, gerr)
+}
+
+func TestV1ListReversedTwoPages(t *testing.T) {
+ tq := testV1Query[*item]{
+ {[]*item{{"3"}, {"4"}}, &ListMeta{HasMore: true, TotalCount: 0, URL: ""}, nil},
+ {[]*item{{"1"}, {"2"}}, &ListMeta{}, nil},
+ }
+ want := []*item{{"4"}, {"3"}, {"2"}, {"1"}}
+ g, gerr := collectList(newV1List(&ListParams{EndingBefore: String("x")}, tq.query))
+ assert.Equal(t, 0, len(tq))
+ assert.Equal(t, want, g)
+ assert.NoError(t, gerr)
+}
+
//
// ---
//
@@ -165,6 +256,38 @@ func (tq *testQuery) query(*Params, *form.Values) ([]interface{}, ListContainer,
return x.v, x.m, x.e
}
+type testV1Query[T any] []struct {
+ v []T
+ m ListContainer
+ e error
+}
+
+func (tq *testV1Query[T]) query(*Params, *form.Values) ([]T, ListContainer, error) {
+ x := (*tq)[0]
+ *tq = (*tq)[1:]
+ return x.v, x.m, x.e
+}
+
+func collectList[T any](it *v1List[T]) ([]*T, error) {
+ var tt []*T
+ var err error
+ it.All()(func(t *T, e error) bool {
+ if e != nil {
+ err = e
+ return false
+ }
+ tt = append(tt, t)
+ return true
+ })
+ return tt, err
+}
+
+func intPtr(i int) *int {
+ intPtr := new(int)
+ *intPtr = i
+ return intPtr
+}
+
type collectable interface {
Next() bool
Current() interface{}
diff --git a/loginlink.go b/loginlink.go
index ba147e6eee..cb380d1ef6 100644
--- a/loginlink.go
+++ b/loginlink.go
@@ -21,6 +21,21 @@ func (p *LoginLinkParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Creates a login link for a connected account to access the Express Dashboard.
+//
+// You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform.
+type LoginLinkCreateParams struct {
+ Params `form:"*"`
+ Account *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *LoginLinkCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Login Links are single-use URLs that takes an Express account to the login page for their Stripe dashboard.
// A Login Link differs from an [Account Link](https://stripe.com/docs/api/account_links) in that it takes the user directly to their [Express dashboard for the specified account](https://stripe.com/docs/connect/integrate-express-dashboard#create-login-link)
type LoginLink struct {
diff --git a/mandate.go b/mandate.go
index 72e6d28ab2..b7c5460c15 100644
--- a/mandate.go
+++ b/mandate.go
@@ -164,6 +164,18 @@ func (p *MandateParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves a Mandate object.
+type MandateRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *MandateRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type MandateCustomerAcceptanceOffline struct{}
type MandateCustomerAcceptanceOnline struct {
// The customer accepts the mandate from this IP address.
diff --git a/margin.go b/margin.go
index 6cb0f25a4d..c96b47fefd 100644
--- a/margin.go
+++ b/margin.go
@@ -51,6 +51,74 @@ func (p *MarginParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item.
+type MarginCreateParams struct {
+ Params `form:"*"`
+ // Whether the margin can be applied to invoices, invoice items, or invoice line items or not. Defaults to `true`.
+ Active *bool `form:"active"`
+ // 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"`
+ // Name of the margin, which is displayed to customers, such as on invoices.
+ Name *string `form:"name"`
+ // Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied.
+ PercentOff *float64 `form:"percent_off"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *MarginCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *MarginCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieve a margin object with the given ID.
+type MarginRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *MarginRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Update the specified margin object. Certain fields of the margin object are not editable.
+type MarginUpdateParams struct {
+ Params `form:"*"`
+ // Whether the margin can be applied to invoices, invoice items, or invoice line items or not.
+ Active *bool `form:"active"`
+ // 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"`
+ // Name of the margin, which is displayed to customers, such as on invoices.
+ Name *string `form:"name"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *MarginUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *MarginUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// A (partner) margin represents a specific discount distributed in partner reseller programs to business partners who
// resell products and services and earn a discount (margin) for doing so.
type Margin struct {
diff --git a/order.go b/order.go
index b081c32817..926e511320 100644
--- a/order.go
+++ b/order.go
@@ -1408,6 +1408,1424 @@ func (p *OrderSubmitParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Settings for automatic tax calculation for this order.
+type OrderCreateAutomaticTaxParams struct {
+ // Enable automatic tax calculation which will automatically compute tax rates on this order.
+ Enabled *bool `form:"enabled"`
+}
+
+// Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided.
+type OrderCreateBillingDetailsParams struct {
+ // The billing address provided by the customer.
+ Address *AddressParams `form:"address"`
+ // The billing email provided by the customer.
+ Email *string `form:"email"`
+ // The billing name provided by the customer.
+ Name *string `form:"name"`
+ // The billing phone number provided by the customer.
+ Phone *string `form:"phone"`
+}
+
+// The credits to apply to the order, only `gift_card` currently supported.
+type OrderCreateCreditParams struct {
+ // The gift card to apply to the order.
+ GiftCard *string `form:"gift_card"`
+ // The type of credit to apply to the order, only `gift_card` currently supported.
+ Type *string `form:"type"`
+}
+
+// The coupons, promotion codes, and/or discounts to apply to the order.
+type OrderCreateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The discounts applied to this line item.
+type OrderCreateLineItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+}
+
+// Data used to generate a new Price object inline.
+//
+// The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item.
+//
+// Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused.
+type OrderCreateLineItemPriceDataParams 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"`
+ // ID of the [Product](https://docs.stripe.com/api/products) this [Price](https://docs.stripe.com/api/prices) belongs to.
+ //
+ // Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified.
+ Product *string `form:"product"`
+ // 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 positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// The dimensions of this product for shipping purposes.
+type OrderCreateLineItemProductDataPackageDimensionsParams struct {
+ // Height, in inches. Maximum precision is 2 decimal places.
+ Height *float64 `form:"height"`
+ // Length, in inches. Maximum precision is 2 decimal places.
+ Length *float64 `form:"length"`
+ // Weight, in ounces. Maximum precision is 2 decimal places.
+ Weight *float64 `form:"weight"`
+ // Width, in inches. Maximum precision is 2 decimal places.
+ Width *float64 `form:"width"`
+}
+
+// Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order.
+//
+// `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order.
+//
+// `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates.
+type OrderCreateLineItemProductDataParams 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 unique identifier for this product.
+ //
+ // `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products.
+ ID *string `form:"id"`
+ // A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ Images []*string `form:"images"`
+ // 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"`
+ // The dimensions of this product for shipping purposes.
+ PackageDimensions *OrderCreateLineItemProductDataPackageDimensionsParams `form:"package_dimensions"`
+ // Whether this product is shipped (i.e., physical goods).
+ Shippable *bool `form:"shippable"`
+ // A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ TaxCode *string `form:"tax_code"`
+ // A URL of a publicly-accessible webpage for this product.
+ URL *string `form:"url"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *OrderCreateLineItemProductDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.
+type OrderCreateLineItemParams struct {
+ // The description for the line item. Will default to the name of the associated product.
+ Description *string `form:"description"`
+ // The discounts applied to this line item.
+ Discounts []*OrderCreateLineItemDiscountParams `form:"discounts"`
+ // The ID of a [Price](https://docs.stripe.com/api/prices) to add to the Order.
+ //
+ // The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use.
+ Price *string `form:"price"`
+ // Data used to generate a new Price object inline.
+ //
+ // The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item.
+ //
+ // Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused.
+ PriceData *OrderCreateLineItemPriceDataParams `form:"price_data"`
+ // The ID of a [Product](https://docs.stripe.com/api/products) to add to the Order.
+ //
+ // The Product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter.
+ Product *string `form:"product"`
+ // Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order.
+ //
+ // `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order.
+ //
+ // `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates.
+ ProductData *OrderCreateLineItemProductDataParams `form:"product_data"`
+ // The quantity of the line item.
+ Quantity *int64 `form:"quantity"`
+ // The tax rates applied to this line item.
+ TaxRates []*string `form:"tax_rates"`
+}
+
+// Additional fields for Mandate creation
+type OrderCreatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams struct {
+ // A URL for custom mandate text to render during confirmation step.
+ // The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ // or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ CustomMandateURL *string `form:"custom_mandate_url"`
+ // Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ IntervalDescription *string `form:"interval_description"`
+ // Payment schedule for the mandate.
+ PaymentSchedule *string `form:"payment_schedule"`
+ // Transaction type of the mandate.
+ TransactionType *string `form:"transaction_type"`
+}
+
+// If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsACSSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *OrderCreatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams `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).
+ //
+ // 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"`
+ // 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"`
+ // Bank account verification method.
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsAfterpayClearpayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.
+ Reference *string `form:"reference"`
+ // Indicates that you intend to make future payments with the payment method.
+ //
+ // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+ //
+ // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+ //
+ // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
+ SetupFutureUsage *string `form:"setup_future_usage"`
+}
+
+// If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsAlipayParams 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).
+ //
+ // 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"`
+}
+
+// If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsBancontactParams struct {
+ // Preferred language of the Bancontact authorization page that the customer is redirected to.
+ PreferredLanguage *string `form:"preferred_language"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsCardParams 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 the payment method.
+ //
+ // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+ //
+ // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+ //
+ // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
+ SetupFutureUsage *string `form:"setup_future_usage"`
+}
+
+// Configuration for the eu_bank_transfer funding type.
+type OrderCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams 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 the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+type OrderCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams struct {
+ // Configuration for the eu_bank_transfer funding type.
+ EUBankTransfer *OrderCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
+ // List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ //
+ // Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ RequestedAddressTypes []*string `form:"requested_address_types"`
+ // The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ Type *string `form:"type"`
+}
+
+// If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct {
+ // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ BankTransfer *OrderCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams `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).
+ //
+ // 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"`
+}
+
+// If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsIDEALParams 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).
+ //
+ // 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"`
+}
+
+// If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsKlarnaParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Preferred language of the Klarna authorization page that the customer is redirected to
+ PreferredLocale *string `form:"preferred_locale"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsLinkParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // [Deprecated] This is a legacy parameter that no longer has any function.
+ // Deprecated:
+ PersistentToken *string `form:"persistent_token"`
+ // 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"`
+}
+
+// If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsOXXOParams 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).
+ //
+ // 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"`
+}
+
+// If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsP24Params 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).
+ //
+ // 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"`
+ // Confirm that the payer has accepted the P24 terms and conditions.
+ TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"`
+}
+
+// The tax information for the line item.
+type OrderCreatePaymentSettingsPaymentMethodOptionsPaypalLineItemTaxParams struct {
+ // The tax for a single unit of the line item in minor units. Cannot be a negative number.
+ Amount *int64 `form:"amount"`
+ // The tax behavior for the line item.
+ Behavior *string `form:"behavior"`
+}
+
+// The line items purchased by the customer.
+type OrderCreatePaymentSettingsPaymentMethodOptionsPaypalLineItemParams struct {
+ // Type of the line item.
+ Category *string `form:"category"`
+ // Description of the line item.
+ Description *string `form:"description"`
+ // Descriptive name of the line item.
+ Name *string `form:"name"`
+ // Quantity of the line item. Must be a positive number.
+ Quantity *int64 `form:"quantity"`
+ // Client facing stock keeping unit, article number or similar.
+ SKU *string `form:"sku"`
+ // The Stripe account ID of the connected account that sells the item.
+ SoldBy *string `form:"sold_by"`
+ // The tax information for the line item.
+ Tax *OrderCreatePaymentSettingsPaymentMethodOptionsPaypalLineItemTaxParams `form:"tax"`
+ // Price for a single unit of the line item in minor units. Cannot be a negative number.
+ UnitAmount *int64 `form:"unit_amount"`
+}
+
+// If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsPaypalParams struct {
+ // Controls when the funds will be captured from the customer's account.
+ CaptureMethod *string `form:"capture_method"`
+ // The line items purchased by the customer.
+ LineItems []*OrderCreatePaymentSettingsPaymentMethodOptionsPaypalLineItemParams `form:"line_items"`
+ // [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"`
+ // 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.
+ ReferenceID *string `form:"reference_id"`
+ // 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"`
+ // The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
+ Subsellers []*string `form:"subsellers"`
+}
+
+// Additional fields for Mandate creation
+type OrderCreatePaymentSettingsPaymentMethodOptionsSEPADebitMandateOptionsParams 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"`
+}
+
+// If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsSEPADebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *OrderCreatePaymentSettingsPaymentMethodOptionsSEPADebitMandateOptionsParams `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).
+ //
+ // 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"`
+ // 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"`
+}
+
+// If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsSofortParams struct {
+ // Language shown to the payer on redirect.
+ PreferredLanguage *string `form:"preferred_language"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsWeChatPayParams 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).
+ //
+ // 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"`
+}
+
+// PaymentMethod-specific configuration to provide to the order's PaymentIntent.
+type OrderCreatePaymentSettingsPaymentMethodOptionsParams struct {
+ // If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent.
+ ACSSDebit *OrderCreatePaymentSettingsPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
+ // If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent.
+ AfterpayClearpay *OrderCreatePaymentSettingsPaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent.
+ Alipay *OrderCreatePaymentSettingsPaymentMethodOptionsAlipayParams `form:"alipay"`
+ // If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent.
+ Bancontact *OrderCreatePaymentSettingsPaymentMethodOptionsBancontactParams `form:"bancontact"`
+ // If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent.
+ Card *OrderCreatePaymentSettingsPaymentMethodOptionsCardParams `form:"card"`
+ // If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent.
+ CustomerBalance *OrderCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
+ // If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent.
+ IDEAL *OrderCreatePaymentSettingsPaymentMethodOptionsIDEALParams `form:"ideal"`
+ // If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent.
+ Klarna *OrderCreatePaymentSettingsPaymentMethodOptionsKlarnaParams `form:"klarna"`
+ // If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent.
+ Link *OrderCreatePaymentSettingsPaymentMethodOptionsLinkParams `form:"link"`
+ // If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent.
+ OXXO *OrderCreatePaymentSettingsPaymentMethodOptionsOXXOParams `form:"oxxo"`
+ // If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent.
+ P24 *OrderCreatePaymentSettingsPaymentMethodOptionsP24Params `form:"p24"`
+ // If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent.
+ Paypal *OrderCreatePaymentSettingsPaymentMethodOptionsPaypalParams `form:"paypal"`
+ // If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent.
+ SEPADebit *OrderCreatePaymentSettingsPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
+ // If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent.
+ Sofort *OrderCreatePaymentSettingsPaymentMethodOptionsSofortParams `form:"sofort"`
+ // If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent.
+ WeChatPay *OrderCreatePaymentSettingsPaymentMethodOptionsWeChatPayParams `form:"wechat_pay"`
+}
+
+// Provides configuration for completing a transfer for the order after it is paid.
+type OrderCreatePaymentSettingsTransferDataParams struct {
+ // The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ Amount *int64 `form:"amount"`
+ // ID of the Connected account receiving the transfer.
+ Destination *string `form:"destination"`
+}
+
+// Settings describing how the order should configure generated PaymentIntents.
+type OrderCreatePaymentSettingsParams 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.
+ ApplicationFeeAmount *int64 `form:"application_fee_amount"`
+ // PaymentMethod-specific configuration to provide to the order's PaymentIntent.
+ PaymentMethodOptions *OrderCreatePaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"`
+ // The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+ // The URL to redirect the customer to after they authenticate their payment.
+ ReturnURL *string `form:"return_url"`
+ // For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters.
+ StatementDescriptor *string `form:"statement_descriptor"`
+ // Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
+ StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
+ // Provides configuration for completing a transfer for the order after it is paid.
+ TransferData *OrderCreatePaymentSettingsTransferDataParams `form:"transfer_data"`
+}
+
+// Payment information associated with the order, including payment settings.
+type OrderCreatePaymentParams struct {
+ // Settings describing how the order should configure generated PaymentIntents.
+ Settings *OrderCreatePaymentSettingsParams `form:"settings"`
+}
+
+// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+type OrderCreateShippingCostShippingRateDataDeliveryEstimateMaximumParams 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 OrderCreateShippingCostShippingRateDataDeliveryEstimateMinimumParams struct {
+ // A unit of time.
+ Unit *string `form:"unit"`
+ // Must be greater than 0.
+ Value *int64 `form:"value"`
+}
+
+// The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+type OrderCreateShippingCostShippingRateDataDeliveryEstimateParams struct {
+ // The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ Maximum *OrderCreateShippingCostShippingRateDataDeliveryEstimateMaximumParams `form:"maximum"`
+ // The lower bound of the estimated range. If empty, represents no lower bound.
+ Minimum *OrderCreateShippingCostShippingRateDataDeliveryEstimateMinimumParams `form:"minimum"`
+}
+
+// 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 OrderCreateShippingCostShippingRateDataFixedAmountCurrencyOptionsParams 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"`
+}
+
+// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+type OrderCreateShippingCostShippingRateDataFixedAmountParams 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]*OrderCreateShippingCostShippingRateDataFixedAmountCurrencyOptionsParams `form:"currency_options"`
+}
+
+// Parameters to create a new ad-hoc shipping rate for this order.
+type OrderCreateShippingCostShippingRateDataParams struct {
+ // The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ DeliveryEstimate *OrderCreateShippingCostShippingRateDataDeliveryEstimateParams `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 *OrderCreateShippingCostShippingRateDataFixedAmountParams `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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *OrderCreateShippingCostShippingRateDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Settings for the customer cost of shipping for this order.
+type OrderCreateShippingCostParams struct {
+ // The ID of the shipping rate to use for this order.
+ ShippingRate *string `form:"shipping_rate"`
+ // Parameters to create a new ad-hoc shipping rate for this order.
+ ShippingRateData *OrderCreateShippingCostShippingRateDataParams `form:"shipping_rate_data"`
+}
+
+// Shipping details for the order.
+type OrderCreateShippingDetailsParams struct {
+ // The shipping address for the order.
+ Address *AddressParams `form:"address"`
+ // The name of the recipient of the order.
+ Name *string `form:"name"`
+ // The phone number (including extension) for the recipient of the order.
+ Phone *string `form:"phone"`
+}
+
+// The purchaser's tax IDs to be used for this order.
+type OrderCreateTaxDetailsTaxIDParams 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"`
+}
+
+// Additional tax details about the purchaser to be used for this order.
+type OrderCreateTaxDetailsParams struct {
+ // The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`.
+ TaxExempt *string `form:"tax_exempt"`
+ // The purchaser's tax IDs to be used for this order.
+ TaxIDs []*OrderCreateTaxDetailsTaxIDParams `form:"tax_ids"`
+}
+
+// Creates a new open order object.
+type OrderCreateParams struct {
+ Params `form:"*"`
+ // Settings for automatic tax calculation for this order.
+ AutomaticTax *OrderCreateAutomaticTaxParams `form:"automatic_tax"`
+ // Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided.
+ BillingDetails *OrderCreateBillingDetailsParams `form:"billing_details"`
+ // The credits to apply to the order, only `gift_card` currently supported.
+ Credits []*OrderCreateCreditParams `form:"credits"`
+ // 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 customer associated with this order.
+ Customer *string `form:"customer"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // The coupons, promotion codes, and/or discounts to apply to the order.
+ Discounts []*OrderCreateDiscountParams `form:"discounts"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The IP address of the purchaser for this order.
+ IPAddress *string `form:"ip_address"`
+ // A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.
+ LineItems []*OrderCreateLineItemParams `form:"line_items"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // Payment information associated with the order, including payment settings.
+ Payment *OrderCreatePaymentParams `form:"payment"`
+ // Settings for the customer cost of shipping for this order.
+ ShippingCost *OrderCreateShippingCostParams `form:"shipping_cost"`
+ // Shipping details for the order.
+ ShippingDetails *OrderCreateShippingDetailsParams `form:"shipping_details"`
+ // Additional tax details about the purchaser to be used for this order.
+ TaxDetails *OrderCreateTaxDetailsParams `form:"tax_details"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *OrderCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *OrderCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.
+type OrderRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *OrderRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Settings for automatic tax calculation for this order.
+type OrderUpdateAutomaticTaxParams struct {
+ // Enable automatic tax calculation which will automatically compute tax rates on this order.
+ Enabled *bool `form:"enabled"`
+}
+
+// Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided.
+type OrderUpdateBillingDetailsParams struct {
+ // The billing address provided by the customer.
+ Address *AddressParams `form:"address"`
+ // The billing email provided by the customer.
+ Email *string `form:"email"`
+ // The billing name provided by the customer.
+ Name *string `form:"name"`
+ // The billing phone number provided by the customer.
+ Phone *string `form:"phone"`
+}
+
+// The credits to apply to the order, only `gift_card` currently supported. Pass the empty string `""` to unset this field.
+type OrderUpdateCreditParams struct {
+ // The gift card to apply to the order.
+ GiftCard *string `form:"gift_card"`
+ // The type of credit to apply to the order, only `gift_card` currently supported.
+ Type *string `form:"type"`
+}
+
+// The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field.
+type OrderUpdateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The discounts applied to this line item.
+type OrderUpdateLineItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+}
+
+// Data used to generate a new Price object inline.
+//
+// The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item.
+//
+// Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused.
+type OrderUpdateLineItemPriceDataParams 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"`
+ // ID of the [Product](https://docs.stripe.com/api/products) this [Price](https://docs.stripe.com/api/prices) belongs to.
+ //
+ // Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified.
+ Product *string `form:"product"`
+ // 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 positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// The dimensions of this product for shipping purposes.
+type OrderUpdateLineItemProductDataPackageDimensionsParams struct {
+ // Height, in inches. Maximum precision is 2 decimal places.
+ Height *float64 `form:"height"`
+ // Length, in inches. Maximum precision is 2 decimal places.
+ Length *float64 `form:"length"`
+ // Weight, in ounces. Maximum precision is 2 decimal places.
+ Weight *float64 `form:"weight"`
+ // Width, in inches. Maximum precision is 2 decimal places.
+ Width *float64 `form:"width"`
+}
+
+// Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order.
+//
+// `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order.
+//
+// `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates.
+type OrderUpdateLineItemProductDataParams 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 unique identifier for this product.
+ //
+ // `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products.
+ ID *string `form:"id"`
+ // A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ Images []*string `form:"images"`
+ // 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"`
+ // The dimensions of this product for shipping purposes.
+ PackageDimensions *OrderUpdateLineItemProductDataPackageDimensionsParams `form:"package_dimensions"`
+ // Whether this product is shipped (i.e., physical goods).
+ Shippable *bool `form:"shippable"`
+ // A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ TaxCode *string `form:"tax_code"`
+ // A URL of a publicly-accessible webpage for this product.
+ URL *string `form:"url"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *OrderUpdateLineItemProductDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.
+type OrderUpdateLineItemParams struct {
+ // The description for the line item. Will default to the name of the associated product.
+ Description *string `form:"description"`
+ // The discounts applied to this line item.
+ Discounts []*OrderUpdateLineItemDiscountParams `form:"discounts"`
+ // The ID of an existing line item on the order.
+ ID *string `form:"id"`
+ // The ID of a [Price](https://docs.stripe.com/api/prices) to add to the Order.
+ //
+ // The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use.
+ Price *string `form:"price"`
+ // Data used to generate a new Price object inline.
+ //
+ // The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item.
+ //
+ // Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused.
+ PriceData *OrderUpdateLineItemPriceDataParams `form:"price_data"`
+ // The ID of a [Product](https://docs.stripe.com/api/products) to add to the Order.
+ //
+ // The Product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter.
+ Product *string `form:"product"`
+ // Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order.
+ //
+ // `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order.
+ //
+ // `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates.
+ ProductData *OrderUpdateLineItemProductDataParams `form:"product_data"`
+ // The quantity of the line item.
+ Quantity *int64 `form:"quantity"`
+ // The tax rates applied to this line item.
+ TaxRates []*string `form:"tax_rates"`
+}
+
+// Additional fields for Mandate creation
+type OrderUpdatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams struct {
+ // A URL for custom mandate text to render during confirmation step.
+ // The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ // or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ CustomMandateURL *string `form:"custom_mandate_url"`
+ // Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ IntervalDescription *string `form:"interval_description"`
+ // Payment schedule for the mandate.
+ PaymentSchedule *string `form:"payment_schedule"`
+ // Transaction type of the mandate.
+ TransactionType *string `form:"transaction_type"`
+}
+
+// If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsACSSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *OrderUpdatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams `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).
+ //
+ // 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"`
+ // 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"`
+ // Bank account verification method.
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsAfterpayClearpayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.
+ Reference *string `form:"reference"`
+ // Indicates that you intend to make future payments with the payment method.
+ //
+ // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+ //
+ // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+ //
+ // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
+ SetupFutureUsage *string `form:"setup_future_usage"`
+}
+
+// If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsAlipayParams 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).
+ //
+ // 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"`
+}
+
+// If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsBancontactParams struct {
+ // Preferred language of the Bancontact authorization page that the customer is redirected to.
+ PreferredLanguage *string `form:"preferred_language"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsCardParams 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 the payment method.
+ //
+ // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+ //
+ // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+ //
+ // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
+ SetupFutureUsage *string `form:"setup_future_usage"`
+}
+
+// Configuration for the eu_bank_transfer funding type.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams 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 the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams struct {
+ // Configuration for the eu_bank_transfer funding type.
+ EUBankTransfer *OrderUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
+ // List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ //
+ // Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ RequestedAddressTypes []*string `form:"requested_address_types"`
+ // The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ Type *string `form:"type"`
+}
+
+// If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct {
+ // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ BankTransfer *OrderUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams `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).
+ //
+ // 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"`
+}
+
+// If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsIDEALParams 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).
+ //
+ // 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"`
+}
+
+// If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsKlarnaParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Preferred language of the Klarna authorization page that the customer is redirected to
+ PreferredLocale *string `form:"preferred_locale"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsLinkParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // [Deprecated] This is a legacy parameter that no longer has any function.
+ // Deprecated:
+ PersistentToken *string `form:"persistent_token"`
+ // 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"`
+}
+
+// If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsOXXOParams 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).
+ //
+ // 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"`
+}
+
+// If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsP24Params 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).
+ //
+ // 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"`
+ // Confirm that the payer has accepted the P24 terms and conditions.
+ TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"`
+}
+
+// The tax information for the line item.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsPaypalLineItemTaxParams struct {
+ // The tax for a single unit of the line item in minor units. Cannot be a negative number.
+ Amount *int64 `form:"amount"`
+ // The tax behavior for the line item.
+ Behavior *string `form:"behavior"`
+}
+
+// The line items purchased by the customer.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsPaypalLineItemParams struct {
+ // Type of the line item.
+ Category *string `form:"category"`
+ // Description of the line item.
+ Description *string `form:"description"`
+ // Descriptive name of the line item.
+ Name *string `form:"name"`
+ // Quantity of the line item. Must be a positive number.
+ Quantity *int64 `form:"quantity"`
+ // Client facing stock keeping unit, article number or similar.
+ SKU *string `form:"sku"`
+ // The Stripe account ID of the connected account that sells the item.
+ SoldBy *string `form:"sold_by"`
+ // The tax information for the line item.
+ Tax *OrderUpdatePaymentSettingsPaymentMethodOptionsPaypalLineItemTaxParams `form:"tax"`
+ // Price for a single unit of the line item in minor units. Cannot be a negative number.
+ UnitAmount *int64 `form:"unit_amount"`
+}
+
+// If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsPaypalParams struct {
+ // Controls when the funds will be captured from the customer's account.
+ CaptureMethod *string `form:"capture_method"`
+ // The line items purchased by the customer.
+ LineItems []*OrderUpdatePaymentSettingsPaymentMethodOptionsPaypalLineItemParams `form:"line_items"`
+ // [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"`
+ // 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.
+ ReferenceID *string `form:"reference_id"`
+ // 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"`
+ // The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
+ Subsellers []*string `form:"subsellers"`
+}
+
+// Additional fields for Mandate creation
+type OrderUpdatePaymentSettingsPaymentMethodOptionsSEPADebitMandateOptionsParams 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"`
+}
+
+// If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsSEPADebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *OrderUpdatePaymentSettingsPaymentMethodOptionsSEPADebitMandateOptionsParams `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).
+ //
+ // 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"`
+ // 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"`
+}
+
+// If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsSofortParams struct {
+ // Language shown to the payer on redirect.
+ PreferredLanguage *string `form:"preferred_language"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsWeChatPayParams 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).
+ //
+ // 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"`
+}
+
+// PaymentMethod-specific configuration to provide to the order's PaymentIntent.
+type OrderUpdatePaymentSettingsPaymentMethodOptionsParams struct {
+ // If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent.
+ ACSSDebit *OrderUpdatePaymentSettingsPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
+ // If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent.
+ AfterpayClearpay *OrderUpdatePaymentSettingsPaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent.
+ Alipay *OrderUpdatePaymentSettingsPaymentMethodOptionsAlipayParams `form:"alipay"`
+ // If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent.
+ Bancontact *OrderUpdatePaymentSettingsPaymentMethodOptionsBancontactParams `form:"bancontact"`
+ // If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent.
+ Card *OrderUpdatePaymentSettingsPaymentMethodOptionsCardParams `form:"card"`
+ // If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent.
+ CustomerBalance *OrderUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
+ // If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent.
+ IDEAL *OrderUpdatePaymentSettingsPaymentMethodOptionsIDEALParams `form:"ideal"`
+ // If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent.
+ Klarna *OrderUpdatePaymentSettingsPaymentMethodOptionsKlarnaParams `form:"klarna"`
+ // If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent.
+ Link *OrderUpdatePaymentSettingsPaymentMethodOptionsLinkParams `form:"link"`
+ // If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent.
+ OXXO *OrderUpdatePaymentSettingsPaymentMethodOptionsOXXOParams `form:"oxxo"`
+ // If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent.
+ P24 *OrderUpdatePaymentSettingsPaymentMethodOptionsP24Params `form:"p24"`
+ // If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent.
+ Paypal *OrderUpdatePaymentSettingsPaymentMethodOptionsPaypalParams `form:"paypal"`
+ // If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent.
+ SEPADebit *OrderUpdatePaymentSettingsPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
+ // If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent.
+ Sofort *OrderUpdatePaymentSettingsPaymentMethodOptionsSofortParams `form:"sofort"`
+ // If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent.
+ WeChatPay *OrderUpdatePaymentSettingsPaymentMethodOptionsWeChatPayParams `form:"wechat_pay"`
+}
+
+// Provides configuration for completing a transfer for the order after it is paid.
+type OrderUpdatePaymentSettingsTransferDataParams struct {
+ // The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ Amount *int64 `form:"amount"`
+ // ID of the Connected account receiving the transfer.
+ Destination *string `form:"destination"`
+}
+
+// Settings describing how the order should configure generated PaymentIntents.
+type OrderUpdatePaymentSettingsParams 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.
+ ApplicationFeeAmount *int64 `form:"application_fee_amount"`
+ // PaymentMethod-specific configuration to provide to the order's PaymentIntent.
+ PaymentMethodOptions *OrderUpdatePaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"`
+ // The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+ // The URL to redirect the customer to after they authenticate their payment.
+ ReturnURL *string `form:"return_url"`
+ // For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters.
+ StatementDescriptor *string `form:"statement_descriptor"`
+ // Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
+ StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
+ // Provides configuration for completing a transfer for the order after it is paid.
+ TransferData *OrderUpdatePaymentSettingsTransferDataParams `form:"transfer_data"`
+}
+
+// Payment information associated with the order, including payment settings.
+type OrderUpdatePaymentParams struct {
+ // Settings describing how the order should configure generated PaymentIntents.
+ Settings *OrderUpdatePaymentSettingsParams `form:"settings"`
+}
+
+// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+type OrderUpdateShippingCostShippingRateDataDeliveryEstimateMaximumParams 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 OrderUpdateShippingCostShippingRateDataDeliveryEstimateMinimumParams struct {
+ // A unit of time.
+ Unit *string `form:"unit"`
+ // Must be greater than 0.
+ Value *int64 `form:"value"`
+}
+
+// The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+type OrderUpdateShippingCostShippingRateDataDeliveryEstimateParams struct {
+ // The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ Maximum *OrderUpdateShippingCostShippingRateDataDeliveryEstimateMaximumParams `form:"maximum"`
+ // The lower bound of the estimated range. If empty, represents no lower bound.
+ Minimum *OrderUpdateShippingCostShippingRateDataDeliveryEstimateMinimumParams `form:"minimum"`
+}
+
+// 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 OrderUpdateShippingCostShippingRateDataFixedAmountCurrencyOptionsParams 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"`
+}
+
+// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+type OrderUpdateShippingCostShippingRateDataFixedAmountParams 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]*OrderUpdateShippingCostShippingRateDataFixedAmountCurrencyOptionsParams `form:"currency_options"`
+}
+
+// Parameters to create a new ad-hoc shipping rate for this order.
+type OrderUpdateShippingCostShippingRateDataParams struct {
+ // The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ DeliveryEstimate *OrderUpdateShippingCostShippingRateDataDeliveryEstimateParams `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 *OrderUpdateShippingCostShippingRateDataFixedAmountParams `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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *OrderUpdateShippingCostShippingRateDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Settings for the customer cost of shipping for this order.
+type OrderUpdateShippingCostParams struct {
+ // The ID of the shipping rate to use for this order.
+ ShippingRate *string `form:"shipping_rate"`
+ // Parameters to create a new ad-hoc shipping rate for this order.
+ ShippingRateData *OrderUpdateShippingCostShippingRateDataParams `form:"shipping_rate_data"`
+}
+
+// Shipping details for the order.
+type OrderUpdateShippingDetailsParams struct {
+ // The shipping address for the order.
+ Address *AddressParams `form:"address"`
+ // The name of the recipient of the order.
+ Name *string `form:"name"`
+ // The phone number (including extension) for the recipient of the order.
+ Phone *string `form:"phone"`
+}
+
+// The purchaser's tax IDs to be used for this order.
+type OrderUpdateTaxDetailsTaxIDParams 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"`
+}
+
+// Additional tax details about the purchaser to be used for this order.
+type OrderUpdateTaxDetailsParams struct {
+ // The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`.
+ TaxExempt *string `form:"tax_exempt"`
+ // The purchaser's tax IDs to be used for this order.
+ TaxIDs []*OrderUpdateTaxDetailsTaxIDParams `form:"tax_ids"`
+}
+
+// Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+type OrderUpdateParams struct {
+ Params `form:"*"`
+ // Settings for automatic tax calculation for this order.
+ AutomaticTax *OrderUpdateAutomaticTaxParams `form:"automatic_tax"`
+ // Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided.
+ BillingDetails *OrderUpdateBillingDetailsParams `form:"billing_details"`
+ // The credits to apply to the order, only `gift_card` currently supported. Pass the empty string `""` to unset this field.
+ Credits []*OrderUpdateCreditParams `form:"credits"`
+ // 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 customer associated with this order.
+ Customer *string `form:"customer"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field.
+ Discounts []*OrderUpdateDiscountParams `form:"discounts"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The IP address of the purchaser for this order.
+ IPAddress *string `form:"ip_address"`
+ // A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost.
+ LineItems []*OrderUpdateLineItemParams `form:"line_items"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // Payment information associated with the order, including payment settings.
+ Payment *OrderUpdatePaymentParams `form:"payment"`
+ // Settings for the customer cost of shipping for this order.
+ ShippingCost *OrderUpdateShippingCostParams `form:"shipping_cost"`
+ // Shipping details for the order.
+ ShippingDetails *OrderUpdateShippingDetailsParams `form:"shipping_details"`
+ // Additional tax details about the purchaser to be used for this order.
+ TaxDetails *OrderUpdateTaxDetailsParams `form:"tax_details"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *OrderUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *OrderUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type OrderAutomaticTax struct {
// Whether Stripe automatically computes tax on this Order.
Enabled bool `json:"enabled"`
diff --git a/paymentattemptrecord.go b/paymentattemptrecord.go
index 496c8e21be..1c4b2b3362 100644
--- a/paymentattemptrecord.go
+++ b/paymentattemptrecord.go
@@ -539,6 +539,18 @@ func (p *PaymentAttemptRecordParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves a Payment Attempt Record with the given ID
+type PaymentAttemptRecordRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentAttemptRecordRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// A representation of an amount of money, consisting of an amount and a currency.
type PaymentAttemptRecordAmountCanceled 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).
diff --git a/paymentintent.go b/paymentintent.go
index be64f80e6c..69619e4279 100644
--- a/paymentintent.go
+++ b/paymentintent.go
@@ -4423,6 +4423,3860 @@ func (p *PaymentIntentTriggerActionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Tax arguments for automations
+type PaymentIntentCreateAsyncWorkflowsInputsTaxParams struct {
+ // The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id
+ Calculation *string `form:"calculation"`
+}
+
+// Arguments passed in automations
+type PaymentIntentCreateAsyncWorkflowsInputsParams struct {
+ // Tax arguments for automations
+ Tax *PaymentIntentCreateAsyncWorkflowsInputsTaxParams `form:"tax"`
+}
+
+// Automations to be run during the PaymentIntent lifecycle
+type PaymentIntentCreateAsyncWorkflowsParams struct {
+ // Arguments passed in automations
+ Inputs *PaymentIntentCreateAsyncWorkflowsInputsParams `form:"inputs"`
+}
+
+// When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters.
+type PaymentIntentCreateAutomaticPaymentMethodsParams struct {
+ // Controls whether this PaymentIntent will accept redirect-based payment methods.
+ //
+ // Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
+ AllowRedirects *string `form:"allow_redirects"`
+ // Whether this feature is enabled.
+ Enabled *bool `form:"enabled"`
+}
+
+// If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+type PaymentIntentCreateMandateDataCustomerAcceptanceOfflineParams struct{}
+
+// If this is a Mandate accepted online, this hash contains details about the online acceptance.
+type PaymentIntentCreateMandateDataCustomerAcceptanceOnlineParams struct {
+ // The IP address from which the Mandate was accepted by the customer.
+ IPAddress *string `form:"ip_address"`
+ // The user agent of the browser from which the Mandate was accepted by the customer.
+ UserAgent *string `form:"user_agent"`
+}
+
+// This hash contains details about the customer acceptance of the Mandate.
+type PaymentIntentCreateMandateDataCustomerAcceptanceParams struct {
+ // The time at which the customer accepted the Mandate.
+ AcceptedAt *int64 `form:"accepted_at"`
+ // If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ Offline *PaymentIntentCreateMandateDataCustomerAcceptanceOfflineParams `form:"offline"`
+ // If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ Online *PaymentIntentCreateMandateDataCustomerAcceptanceOnlineParams `form:"online"`
+ // The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ Type *string `form:"type"`
+}
+
+// This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+type PaymentIntentCreateMandateDataParams struct {
+ // This hash contains details about the customer acceptance of the Mandate.
+ CustomerAcceptance *PaymentIntentCreateMandateDataCustomerAcceptanceParams `form:"customer_acceptance"`
+}
+
+// Affiliate details for this purchase.
+type PaymentIntentCreatePaymentDetailsCarRentalAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type PaymentIntentCreatePaymentDetailsCarRentalDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type PaymentIntentCreatePaymentDetailsCarRentalDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *PaymentIntentCreatePaymentDetailsCarRentalDeliveryRecipientParams `form:"recipient"`
+}
+
+// The details of the passengers in the travel reservation
+type PaymentIntentCreatePaymentDetailsCarRentalDriverParams struct {
+ // Full name of the person or entity on the car reservation.
+ Name *string `form:"name"`
+}
+
+// Car rental details for this PaymentIntent.
+type PaymentIntentCreatePaymentDetailsCarRentalParams struct {
+ // Affiliate details for this purchase.
+ Affiliate *PaymentIntentCreatePaymentDetailsCarRentalAffiliateParams `form:"affiliate"`
+ // The booking number associated with the car rental.
+ BookingNumber *string `form:"booking_number"`
+ // Class code of the car.
+ CarClassCode *string `form:"car_class_code"`
+ // Make of the car.
+ CarMake *string `form:"car_make"`
+ // Model of the car.
+ CarModel *string `form:"car_model"`
+ // The name of the rental car company.
+ Company *string `form:"company"`
+ // The customer service phone number of the car rental company.
+ CustomerServicePhoneNumber *string `form:"customer_service_phone_number"`
+ // Number of days the car is being rented.
+ DaysRented *int64 `form:"days_rented"`
+ // Delivery details for this purchase.
+ Delivery *PaymentIntentCreatePaymentDetailsCarRentalDeliveryParams `form:"delivery"`
+ // The details of the passengers in the travel reservation
+ Drivers []*PaymentIntentCreatePaymentDetailsCarRentalDriverParams `form:"drivers"`
+ // List of additional charges being billed.
+ ExtraCharges []*string `form:"extra_charges"`
+ // Indicates if the customer did not keep nor cancel their booking.
+ NoShow *bool `form:"no_show"`
+ // Car pick-up address.
+ PickupAddress *AddressParams `form:"pickup_address"`
+ // Car pick-up time. Measured in seconds since the Unix epoch.
+ PickupAt *int64 `form:"pickup_at"`
+ // Rental rate.
+ RateAmount *int64 `form:"rate_amount"`
+ // The frequency at which the rate amount is applied. One of `day`, `week` or `month`
+ RateInterval *string `form:"rate_interval"`
+ // The name of the person or entity renting the car.
+ RenterName *string `form:"renter_name"`
+ // Car return address.
+ ReturnAddress *AddressParams `form:"return_address"`
+ // Car return time. Measured in seconds since the Unix epoch.
+ ReturnAt *int64 `form:"return_at"`
+ // Indicates whether the goods or services are tax-exempt or tax is not collected.
+ TaxExempt *bool `form:"tax_exempt"`
+}
+
+// Affiliate details for this purchase.
+type PaymentIntentCreatePaymentDetailsEventDetailsAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type PaymentIntentCreatePaymentDetailsEventDetailsDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type PaymentIntentCreatePaymentDetailsEventDetailsDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *PaymentIntentCreatePaymentDetailsEventDetailsDeliveryRecipientParams `form:"recipient"`
+}
+
+// Event details for this PaymentIntent
+type PaymentIntentCreatePaymentDetailsEventDetailsParams struct {
+ // Indicates if the tickets are digitally checked when entering the venue.
+ AccessControlledVenue *bool `form:"access_controlled_venue"`
+ // The event location's address.
+ Address *AddressParams `form:"address"`
+ // Affiliate details for this purchase.
+ Affiliate *PaymentIntentCreatePaymentDetailsEventDetailsAffiliateParams `form:"affiliate"`
+ // The name of the company
+ Company *string `form:"company"`
+ // Delivery details for this purchase.
+ Delivery *PaymentIntentCreatePaymentDetailsEventDetailsDeliveryParams `form:"delivery"`
+ // Event end time. Measured in seconds since the Unix epoch.
+ EndsAt *int64 `form:"ends_at"`
+ // Type of the event entertainment (concert, sports event etc)
+ Genre *string `form:"genre"`
+ // The name of the event.
+ Name *string `form:"name"`
+ // Event start time. Measured in seconds since the Unix epoch.
+ StartsAt *int64 `form:"starts_at"`
+}
+
+// Affiliate details for this purchase.
+type PaymentIntentCreatePaymentDetailsFlightAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type PaymentIntentCreatePaymentDetailsFlightDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type PaymentIntentCreatePaymentDetailsFlightDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *PaymentIntentCreatePaymentDetailsFlightDeliveryRecipientParams `form:"recipient"`
+}
+
+// The details of the passengers in the travel reservation.
+type PaymentIntentCreatePaymentDetailsFlightPassengerParams struct {
+ // Full name of the person or entity on the flight reservation.
+ Name *string `form:"name"`
+}
+
+// The individual flight segments associated with the trip.
+type PaymentIntentCreatePaymentDetailsFlightSegmentParams struct {
+ // The flight segment amount.
+ Amount *int64 `form:"amount"`
+ // The International Air Transport Association (IATA) airport code for the arrival airport.
+ ArrivalAirport *string `form:"arrival_airport"`
+ // The arrival time for the flight segment. Measured in seconds since the Unix epoch.
+ ArrivesAt *int64 `form:"arrives_at"`
+ // The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment.
+ Carrier *string `form:"carrier"`
+ // The departure time for the flight segment. Measured in seconds since the Unix epoch.
+ DepartsAt *int64 `form:"departs_at"`
+ // The International Air Transport Association (IATA) airport code for the departure airport.
+ DepartureAirport *string `form:"departure_airport"`
+ // The flight number associated with the segment
+ FlightNumber *string `form:"flight_number"`
+ // The fare class for the segment.
+ ServiceClass *string `form:"service_class"`
+}
+
+// Flight reservation details for this PaymentIntent
+type PaymentIntentCreatePaymentDetailsFlightParams struct {
+ // Affiliate details for this purchase.
+ Affiliate *PaymentIntentCreatePaymentDetailsFlightAffiliateParams `form:"affiliate"`
+ // The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking.
+ AgencyNumber *string `form:"agency_number"`
+ // The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket.
+ Carrier *string `form:"carrier"`
+ // Delivery details for this purchase.
+ Delivery *PaymentIntentCreatePaymentDetailsFlightDeliveryParams `form:"delivery"`
+ // The name of the person or entity on the reservation.
+ PassengerName *string `form:"passenger_name"`
+ // The details of the passengers in the travel reservation.
+ Passengers []*PaymentIntentCreatePaymentDetailsFlightPassengerParams `form:"passengers"`
+ // The individual flight segments associated with the trip.
+ Segments []*PaymentIntentCreatePaymentDetailsFlightSegmentParams `form:"segments"`
+ // The ticket number associated with the travel reservation.
+ TicketNumber *string `form:"ticket_number"`
+}
+
+// Affiliate details for this purchase.
+type PaymentIntentCreatePaymentDetailsLodgingAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type PaymentIntentCreatePaymentDetailsLodgingDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type PaymentIntentCreatePaymentDetailsLodgingDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *PaymentIntentCreatePaymentDetailsLodgingDeliveryRecipientParams `form:"recipient"`
+}
+
+// The details of the passengers in the travel reservation
+type PaymentIntentCreatePaymentDetailsLodgingPassengerParams struct {
+ // Full name of the person or entity on the lodging reservation.
+ Name *string `form:"name"`
+}
+
+// Lodging reservation details for this PaymentIntent
+type PaymentIntentCreatePaymentDetailsLodgingParams struct {
+ // The lodging location's address.
+ Address *AddressParams `form:"address"`
+ // The number of adults on the booking
+ Adults *int64 `form:"adults"`
+ // Affiliate details for this purchase.
+ Affiliate *PaymentIntentCreatePaymentDetailsLodgingAffiliateParams `form:"affiliate"`
+ // The booking number associated with the lodging reservation.
+ BookingNumber *string `form:"booking_number"`
+ // The lodging category
+ Category *string `form:"category"`
+ // Loding check-in time. Measured in seconds since the Unix epoch.
+ CheckinAt *int64 `form:"checkin_at"`
+ // Lodging check-out time. Measured in seconds since the Unix epoch.
+ CheckoutAt *int64 `form:"checkout_at"`
+ // The customer service phone number of the lodging company.
+ CustomerServicePhoneNumber *string `form:"customer_service_phone_number"`
+ // The daily lodging room rate.
+ DailyRoomRateAmount *int64 `form:"daily_room_rate_amount"`
+ // Delivery details for this purchase.
+ Delivery *PaymentIntentCreatePaymentDetailsLodgingDeliveryParams `form:"delivery"`
+ // List of additional charges being billed.
+ ExtraCharges []*string `form:"extra_charges"`
+ // Indicates whether the lodging location is compliant with the Fire Safety Act.
+ FireSafetyActCompliance *bool `form:"fire_safety_act_compliance"`
+ // The name of the lodging location.
+ Name *string `form:"name"`
+ // Indicates if the customer did not keep their booking while failing to cancel the reservation.
+ NoShow *bool `form:"no_show"`
+ // The number of rooms on the booking
+ NumberOfRooms *int64 `form:"number_of_rooms"`
+ // The details of the passengers in the travel reservation
+ Passengers []*PaymentIntentCreatePaymentDetailsLodgingPassengerParams `form:"passengers"`
+ // The phone number of the lodging location.
+ PropertyPhoneNumber *string `form:"property_phone_number"`
+ // The room class for this purchase.
+ RoomClass *string `form:"room_class"`
+ // The number of room nights
+ RoomNights *int64 `form:"room_nights"`
+ // The total tax amount associating with the room reservation.
+ TotalRoomTaxAmount *int64 `form:"total_room_tax_amount"`
+ // The total tax amount
+ TotalTaxAmount *int64 `form:"total_tax_amount"`
+}
+
+// Affiliate details for this purchase.
+type PaymentIntentCreatePaymentDetailsSubscriptionAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Subscription billing details for this purchase.
+type PaymentIntentCreatePaymentDetailsSubscriptionBillingIntervalParams struct {
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ Count *int64 `form:"count"`
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+}
+
+// Subscription details for this PaymentIntent
+type PaymentIntentCreatePaymentDetailsSubscriptionParams struct {
+ // Affiliate details for this purchase.
+ Affiliate *PaymentIntentCreatePaymentDetailsSubscriptionAffiliateParams `form:"affiliate"`
+ // Info whether the subscription will be auto renewed upon expiry.
+ AutoRenewal *bool `form:"auto_renewal"`
+ // Subscription billing details for this purchase.
+ BillingInterval *PaymentIntentCreatePaymentDetailsSubscriptionBillingIntervalParams `form:"billing_interval"`
+ // Subscription end time. Measured in seconds since the Unix epoch.
+ EndsAt *int64 `form:"ends_at"`
+ // Name of the product on subscription. e.g. Apple Music Subscription
+ Name *string `form:"name"`
+ // Subscription start time. Measured in seconds since the Unix epoch.
+ StartsAt *int64 `form:"starts_at"`
+}
+
+// Provides industry-specific information about the charge.
+type PaymentIntentCreatePaymentDetailsParams struct {
+ // Car rental details for this PaymentIntent.
+ CarRental *PaymentIntentCreatePaymentDetailsCarRentalParams `form:"car_rental"`
+ // Event details for this PaymentIntent
+ EventDetails *PaymentIntentCreatePaymentDetailsEventDetailsParams `form:"event_details"`
+ // Flight reservation details for this PaymentIntent
+ Flight *PaymentIntentCreatePaymentDetailsFlightParams `form:"flight"`
+ // Lodging reservation details for this PaymentIntent
+ Lodging *PaymentIntentCreatePaymentDetailsLodgingParams `form:"lodging"`
+ // Subscription details for this PaymentIntent
+ Subscription *PaymentIntentCreatePaymentDetailsSubscriptionParams `form:"subscription"`
+}
+
+// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+type PaymentIntentCreatePaymentMethodDataBillingDetailsParams struct {
+ // Billing address.
+ Address *AddressParams `form:"address"`
+ // Email address.
+ Email *string `form:"email"`
+ // Full name.
+ Name *string `form:"name"`
+ // Billing phone number (including extension).
+ Phone *string `form:"phone"`
+}
+
+// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+type PaymentIntentCreatePaymentMethodDataRadarOptionsParams 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"`
+}
+
+// If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+// in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+// property on the PaymentIntent.
+type PaymentIntentCreatePaymentMethodDataParams struct {
+ // If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ ACSSDebit *PaymentMethodACSSDebitParams `form:"acss_debit"`
+ // If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ Affirm *PaymentMethodAffirmParams `form:"affirm"`
+ // If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ Alipay *PaymentMethodAlipayParams `form:"alipay"`
+ // This 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"`
+ // If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ Alma *PaymentMethodAlmaParams `form:"alma"`
+ // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ AmazonPay *PaymentMethodAmazonPayParams `form:"amazon_pay"`
+ // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"`
+ // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ BACSDebit *PaymentMethodBACSDebitParams `form:"bacs_debit"`
+ // If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ Bancontact *PaymentMethodBancontactParams `form:"bancontact"`
+ // If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
+ Billie *PaymentMethodBillieParams `form:"billie"`
+ // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ BillingDetails *PaymentIntentCreatePaymentMethodDataBillingDetailsParams `form:"billing_details"`
+ // If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ BLIK *PaymentMethodBLIKParams `form:"blik"`
+ // If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ Boleto *PaymentMethodBoletoParams `form:"boleto"`
+ // If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ CashApp *PaymentMethodCashAppParams `form:"cashapp"`
+ // If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ CustomerBalance *PaymentMethodCustomerBalanceParams `form:"customer_balance"`
+ // If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ EPS *PaymentMethodEPSParams `form:"eps"`
+ // If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ FPX *PaymentMethodFPXParams `form:"fpx"`
+ // If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ Giropay *PaymentMethodGiropayParams `form:"giropay"`
+ // If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method.
+ Gopay *PaymentMethodGopayParams `form:"gopay"`
+ // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ Grabpay *PaymentMethodGrabpayParams `form:"grabpay"`
+ // If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method.
+ IDBankTransfer *PaymentMethodIDBankTransferParams `form:"id_bank_transfer"`
+ // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ IDEAL *PaymentMethodIDEALParams `form:"ideal"`
+ // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ InteracPresent *PaymentMethodInteracPresentParams `form:"interac_present"`
+ // If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ KakaoPay *PaymentMethodKakaoPayParams `form:"kakao_pay"`
+ // If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ Klarna *PaymentMethodKlarnaParams `form:"klarna"`
+ // If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ Konbini *PaymentMethodKonbiniParams `form:"konbini"`
+ // If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ KrCard *PaymentMethodKrCardParams `form:"kr_card"`
+ // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ Link *PaymentMethodLinkParams `form:"link"`
+ // If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
+ MbWay *PaymentMethodMbWayParams `form:"mb_way"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ Mobilepay *PaymentMethodMobilepayParams `form:"mobilepay"`
+ // If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ Multibanco *PaymentMethodMultibancoParams `form:"multibanco"`
+ // If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ NaverPay *PaymentMethodNaverPayParams `form:"naver_pay"`
+ // If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ NzBankAccount *PaymentMethodNzBankAccountParams `form:"nz_bank_account"`
+ // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ OXXO *PaymentMethodOXXOParams `form:"oxxo"`
+ // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ P24 *PaymentMethodP24Params `form:"p24"`
+ // If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ PayByBank *PaymentMethodPayByBankParams `form:"pay_by_bank"`
+ // If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ Payco *PaymentMethodPaycoParams `form:"payco"`
+ // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ PayNow *PaymentMethodPayNowParams `form:"paynow"`
+ // If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ Paypal *PaymentMethodPaypalParams `form:"paypal"`
+ // If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+ Payto *PaymentMethodPaytoParams `form:"payto"`
+ // If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ Pix *PaymentMethodPixParams `form:"pix"`
+ // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ PromptPay *PaymentMethodPromptPayParams `form:"promptpay"`
+ // If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method.
+ Qris *PaymentMethodQrisParams `form:"qris"`
+ // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ RadarOptions *PaymentIntentCreatePaymentMethodDataRadarOptionsParams `form:"radar_options"`
+ // If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
+ Rechnung *PaymentMethodRechnungParams `form:"rechnung"`
+ // If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ RevolutPay *PaymentMethodRevolutPayParams `form:"revolut_pay"`
+ // If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ SamsungPay *PaymentMethodSamsungPayParams `form:"samsung_pay"`
+ // If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
+ Satispay *PaymentMethodSatispayParams `form:"satispay"`
+ // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ SEPADebit *PaymentMethodSEPADebitParams `form:"sepa_debit"`
+ // If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method.
+ Shopeepay *PaymentMethodShopeepayParams `form:"shopeepay"`
+ // If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ Sofort *PaymentMethodSofortParams `form:"sofort"`
+ // This hash contains details about the Stripe balance payment method.
+ StripeBalance *PaymentMethodStripeBalanceParams `form:"stripe_balance"`
+ // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ Swish *PaymentMethodSwishParams `form:"swish"`
+ // If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ TWINT *PaymentMethodTWINTParams `form:"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 *string `form:"type"`
+ // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ USBankAccount *PaymentMethodUSBankAccountParams `form:"us_bank_account"`
+ // If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ WeChatPay *PaymentMethodWeChatPayParams `form:"wechat_pay"`
+ // If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ Zip *PaymentMethodZipParams `form:"zip"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentIntentCreatePaymentMethodDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Additional fields for Mandate creation
+type PaymentIntentCreatePaymentMethodOptionsACSSDebitMandateOptionsParams struct {
+ // A URL for custom mandate text to render during confirmation step.
+ // The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ // or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ CustomMandateURL *string `form:"custom_mandate_url"`
+ // Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ IntervalDescription *string `form:"interval_description"`
+ // Payment schedule for the mandate.
+ PaymentSchedule *string `form:"payment_schedule"`
+ // Transaction type of the mandate.
+ TransactionType *string `form:"transaction_type"`
+}
+
+// If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+type PaymentIntentCreatePaymentMethodOptionsACSSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *PaymentIntentCreatePaymentMethodOptionsACSSDebitMandateOptionsParams `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).
+ //
+ // 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"`
+ // 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"`
+ // Bank account verification method.
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+type PaymentIntentCreatePaymentMethodOptionsAffirmParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Preferred language of the Affirm authorization page that the customer is redirected to.
+ PreferredLocale *string `form:"preferred_locale"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsAfterpayClearpayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ // This field differs from the statement descriptor and item name.
+ Reference *string `form:"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).
+ //
+ // 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"`
+}
+
+// If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsAlipayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+type PaymentIntentCreatePaymentMethodOptionsAlmaParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+}
+
+// If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsAmazonPayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+type PaymentIntentCreatePaymentMethodOptionsAUBECSDebitParams 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).
+ //
+ // 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"`
+ // 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"`
+}
+
+// Additional fields for Mandate creation
+type PaymentIntentCreatePaymentMethodOptionsBACSDebitMandateOptionsParams 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"`
+}
+
+// If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+type PaymentIntentCreatePaymentMethodOptionsBACSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *PaymentIntentCreatePaymentMethodOptionsBACSDebitMandateOptionsParams `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).
+ //
+ // 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"`
+ // 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"`
+}
+
+// If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+type PaymentIntentCreatePaymentMethodOptionsBancontactParams struct {
+ // Preferred language of the Bancontact authorization page that the customer is redirected to.
+ PreferredLanguage *string `form:"preferred_language"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options.
+type PaymentIntentCreatePaymentMethodOptionsBillieParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+}
+
+// If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+type PaymentIntentCreatePaymentMethodOptionsBLIKParams struct {
+ // The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ Code *string `form:"code"`
+ // 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"`
+}
+
+// If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+type PaymentIntentCreatePaymentMethodOptionsBoletoParams 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).
+ //
+ // 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"`
+}
+
+// The selected installment plan to use for this payment attempt.
+// This parameter can only be provided during confirmation.
+type PaymentIntentCreatePaymentMethodOptionsCardInstallmentsPlanParams struct {
+ // For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ Count *int64 `form:"count"`
+ // For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ // One of `month`.
+ Interval *string `form:"interval"`
+ // Type of installment plan, one of `fixed_count`.
+ Type *string `form:"type"`
+}
+
+// Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+//
+// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+type PaymentIntentCreatePaymentMethodOptionsCardInstallmentsParams struct {
+ // Setting to true enables installments for this PaymentIntent.
+ // This will cause the response to contain a list of available installment plans.
+ // Setting to false will prevent any selected plan from applying to a charge.
+ Enabled *bool `form:"enabled"`
+ // The selected installment plan to use for this payment attempt.
+ // This parameter can only be provided during confirmation.
+ Plan *PaymentIntentCreatePaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"`
+}
+
+// Configuration options for setting up an eMandate for cards issued in India.
+type PaymentIntentCreatePaymentMethodOptionsCardMandateOptionsParams struct {
+ // Amount to be charged for future payments.
+ Amount *int64 `form:"amount"`
+ // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ AmountType *string `form:"amount_type"`
+ // A description of the mandate or subscription that is meant to be displayed to the customer.
+ Description *string `form:"description"`
+ // End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ EndDate *int64 `form:"end_date"`
+ // Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ Interval *string `form:"interval"`
+ // The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ IntervalCount *int64 `form:"interval_count"`
+ // Unique identifier for the mandate or subscription.
+ Reference *string `form:"reference"`
+ // Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ StartDate *int64 `form:"start_date"`
+ // Specifies the type of mandates supported. Possible values are `india`.
+ SupportedTypes []*string `form:"supported_types"`
+}
+
+// Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements.
+type PaymentIntentCreatePaymentMethodOptionsCardStatementDetailsParams struct {
+ // Please pass in an address that is within your Stripe user account country
+ Address *AddressParams `form:"address"`
+ // Phone number (e.g., a toll-free number that customers can call)
+ Phone *string `form:"phone"`
+}
+
+// Cartes Bancaires-specific 3DS fields.
+type PaymentIntentCreatePaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesParams struct {
+ // The cryptogram calculation algorithm used by the card Issuer's ACS
+ // to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ // messageExtension: CB-AVALGO
+ CbAvalgo *string `form:"cb_avalgo"`
+ // The exemption indicator returned from Cartes Bancaires in the ARes.
+ // message extension: CB-EXEMPTION; string (4 characters)
+ // This is a 3 byte bitmap (low significant byte first and most significant
+ // bit first) that has been Base64 encoded
+ CbExemption *string `form:"cb_exemption"`
+ // The risk score returned from Cartes Bancaires in the ARes.
+ // message extension: CB-SCORE; numeric value 0-99
+ CbScore *int64 `form:"cb_score"`
+}
+
+// Network specific 3DS fields. Network specific arguments require an
+// explicit card brand choice. The parameter `payment_method_options.card.network“
+// must be populated accordingly
+type PaymentIntentCreatePaymentMethodOptionsCardThreeDSecureNetworkOptionsParams struct {
+ // Cartes Bancaires-specific 3DS fields.
+ CartesBancaires *PaymentIntentCreatePaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesParams `form:"cartes_bancaires"`
+}
+
+// If 3D Secure authentication was performed with a third-party provider,
+// the authentication details to use for this payment.
+type PaymentIntentCreatePaymentMethodOptionsCardThreeDSecureParams struct {
+ // The `transStatus` returned from the card Issuer's ACS in the ARes.
+ AresTransStatus *string `form:"ares_trans_status"`
+ // The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ // AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ // (Most 3D Secure providers will return the base64-encoded version, which
+ // is what you should specify here.)
+ Cryptogram *string `form:"cryptogram"`
+ // The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ // provider and indicates what degree of authentication was performed.
+ ElectronicCommerceIndicator *string `form:"electronic_commerce_indicator"`
+ // The exemption requested via 3DS and accepted by the issuer at authentication time.
+ ExemptionIndicator *string `form:"exemption_indicator"`
+ // Network specific 3DS fields. Network specific arguments require an
+ // explicit card brand choice. The parameter `payment_method_options.card.network``
+ // must be populated accordingly
+ NetworkOptions *PaymentIntentCreatePaymentMethodOptionsCardThreeDSecureNetworkOptionsParams `form:"network_options"`
+ // The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ // AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ RequestorChallengeIndicator *string `form:"requestor_challenge_indicator"`
+ // For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ // Transaction ID (dsTransID).
+ TransactionID *string `form:"transaction_id"`
+ // The version of 3D Secure that was performed.
+ Version *string `form:"version"`
+}
+
+// Configuration for any card payments attempted on this PaymentIntent.
+type PaymentIntentCreatePaymentMethodOptionsCardParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ CVCToken *string `form:"cvc_token"`
+ // Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ //
+ // For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ Installments *PaymentIntentCreatePaymentMethodOptionsCardInstallmentsParams `form:"installments"`
+ // Configuration options for setting up an eMandate for cards issued in India.
+ MandateOptions *PaymentIntentCreatePaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"`
+ // When specified, this parameter indicates that a transaction will be marked
+ // as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ // parameter can only be provided during confirmation.
+ MOTO *bool `form:"moto"`
+ // Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ Network *string `form:"network"`
+ // Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent.
+ RequestDecrementalAuthorization *string `form:"request_decremental_authorization"`
+ // Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ RequestExtendedAuthorization *string `form:"request_extended_authorization"`
+ // Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ RequestIncrementalAuthorization *string `form:"request_incremental_authorization"`
+ // Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ RequestMulticapture *string `form:"request_multicapture"`
+ // Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ RequestOvercapture *string `form:"request_overcapture"`
+ // Request partial authorization on this PaymentIntent.
+ RequestPartialAuthorization *string `form:"request_partial_authorization"`
+ // 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"`
+ // When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ RequireCVCRecollection *bool `form:"require_cvc_recollection"`
+ // 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"`
+ // 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"`
+ // Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements.
+ StatementDetails *PaymentIntentCreatePaymentMethodOptionsCardStatementDetailsParams `form:"statement_details"`
+ // If 3D Secure authentication was performed with a third-party provider,
+ // the authentication details to use for this payment.
+ ThreeDSecure *PaymentIntentCreatePaymentMethodOptionsCardThreeDSecureParams `form:"three_d_secure"`
+}
+
+// Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+type PaymentIntentCreatePaymentMethodOptionsCardPresentRoutingParams struct {
+ // Routing requested priority
+ RequestedPriority *string `form:"requested_priority"`
+}
+
+// If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+type PaymentIntentCreatePaymentMethodOptionsCardPresentParams struct {
+ // Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ RequestExtendedAuthorization *bool `form:"request_extended_authorization"`
+ // Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ RequestIncrementalAuthorizationSupport *bool `form:"request_incremental_authorization_support"`
+ // Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ Routing *PaymentIntentCreatePaymentMethodOptionsCardPresentRoutingParams `form:"routing"`
+}
+
+// If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsCashAppParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// Configuration for the eu_bank_transfer funding type.
+type PaymentIntentCreatePaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams 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 the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+type PaymentIntentCreatePaymentMethodOptionsCustomerBalanceBankTransferParams struct {
+ // Configuration for the eu_bank_transfer funding type.
+ EUBankTransfer *PaymentIntentCreatePaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
+ // List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ //
+ // Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ RequestedAddressTypes []*string `form:"requested_address_types"`
+ // The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ Type *string `form:"type"`
+}
+
+// If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+type PaymentIntentCreatePaymentMethodOptionsCustomerBalanceParams struct {
+ // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ BankTransfer *PaymentIntentCreatePaymentMethodOptionsCustomerBalanceBankTransferParams `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).
+ //
+ // 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"`
+}
+
+// If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+type PaymentIntentCreatePaymentMethodOptionsEPSParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+type PaymentIntentCreatePaymentMethodOptionsFPXParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsGiropayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsGopayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsGrabpayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options.
+type PaymentIntentCreatePaymentMethodOptionsIDBankTransferParams struct {
+ // The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now.
+ ExpiresAfter *int64 `form:"expires_after"`
+ // The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now.
+ ExpiresAt *int64 `form:"expires_at"`
+ // 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"`
+}
+
+// If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+type PaymentIntentCreatePaymentMethodOptionsIDEALParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+type PaymentIntentCreatePaymentMethodOptionsInteracPresentParams struct{}
+
+// If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsKakaoPayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+type PaymentIntentCreatePaymentMethodOptionsKlarnaParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Preferred language of the Klarna authorization page that the customer is redirected to
+ PreferredLocale *string `form:"preferred_locale"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+type PaymentIntentCreatePaymentMethodOptionsKonbiniParams struct {
+ // An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ ConfirmationNumber *string `form:"confirmation_number"`
+ // The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ ExpiresAfterDays *int64 `form:"expires_after_days"`
+ // The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ ExpiresAt *int64 `form:"expires_at"`
+ // A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ ProductDescription *string `form:"product_description"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+type PaymentIntentCreatePaymentMethodOptionsKrCardParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+type PaymentIntentCreatePaymentMethodOptionsLinkParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // [Deprecated] This is a legacy parameter that no longer has any function.
+ // Deprecated:
+ PersistentToken *string `form:"persistent_token"`
+ // 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"`
+}
+
+// If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options.
+type PaymentIntentCreatePaymentMethodOptionsMbWayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsMobilepayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+type PaymentIntentCreatePaymentMethodOptionsMultibancoParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsNaverPayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+type PaymentIntentCreatePaymentMethodOptionsNzBankAccountParams 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).
+ //
+ // 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"`
+ // 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"`
+}
+
+// If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+type PaymentIntentCreatePaymentMethodOptionsOXXOParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+type PaymentIntentCreatePaymentMethodOptionsP24Params 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).
+ //
+ // 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"`
+ // Confirm that the payer has accepted the P24 terms and conditions.
+ TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"`
+}
+
+// If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+type PaymentIntentCreatePaymentMethodOptionsPayByBankParams struct{}
+
+// If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+type PaymentIntentCreatePaymentMethodOptionsPaycoParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+}
+
+// If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+type PaymentIntentCreatePaymentMethodOptionsPayNowParams 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).
+ //
+ // 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"`
+}
+
+// The tax information for the line item.
+type PaymentIntentCreatePaymentMethodOptionsPaypalLineItemTaxParams struct {
+ // The tax for a single unit of the line item in minor units. Cannot be a negative number.
+ Amount *int64 `form:"amount"`
+ // The tax behavior for the line item.
+ Behavior *string `form:"behavior"`
+}
+
+// The line items purchased by the customer.
+type PaymentIntentCreatePaymentMethodOptionsPaypalLineItemParams struct {
+ // Type of the line item.
+ Category *string `form:"category"`
+ // Description of the line item.
+ Description *string `form:"description"`
+ // Descriptive name of the line item.
+ Name *string `form:"name"`
+ // Quantity of the line item. Must be a positive number.
+ Quantity *int64 `form:"quantity"`
+ // Client facing stock keeping unit, article number or similar.
+ SKU *string `form:"sku"`
+ // The Stripe account ID of the connected account that sells the item.
+ SoldBy *string `form:"sold_by"`
+ // The tax information for the line item.
+ Tax *PaymentIntentCreatePaymentMethodOptionsPaypalLineItemTaxParams `form:"tax"`
+ // Price for a single unit of the line item in minor units. Cannot be a negative number.
+ UnitAmount *int64 `form:"unit_amount"`
+}
+
+// If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+type PaymentIntentCreatePaymentMethodOptionsPaypalParams struct {
+ // Controls when the funds will be captured from the customer's account.
+ CaptureMethod *string `form:"capture_method"`
+ // The line items purchased by the customer.
+ LineItems []*PaymentIntentCreatePaymentMethodOptionsPaypalLineItemParams `form:"line_items"`
+ // [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"`
+ // 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.
+ ReferenceID *string `form:"reference_id"`
+ // 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"`
+ // The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
+ Subsellers []*string `form:"subsellers"`
+}
+
+// Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session`
+type PaymentIntentCreatePaymentMethodOptionsPaytoMandateOptionsParams struct {
+ // Amount that will be collected. It is required when `amount_type` is `fixed`.
+ Amount *int64 `form:"amount"`
+ // The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively.
+ AmountType *string `form:"amount_type"`
+ // Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
+ EndDate *string `form:"end_date"`
+ // The periodicity at which payments will be collected.
+ PaymentSchedule *string `form:"payment_schedule"`
+ // The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.
+ PaymentsPerPeriod *int64 `form:"payments_per_period"`
+ // The purpose for which payments are made. Defaults to retail.
+ Purpose *string `form:"purpose"`
+}
+
+// If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options.
+type PaymentIntentCreatePaymentMethodOptionsPaytoParams struct {
+ // Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session`
+ MandateOptions *PaymentIntentCreatePaymentMethodOptionsPaytoMandateOptionsParams `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).
+ //
+ // 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"`
+}
+
+// If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+type PaymentIntentCreatePaymentMethodOptionsPixParams 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"`
+ // The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ ExpiresAt *int64 `form:"expires_at"`
+ // 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"`
+}
+
+// If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsPromptPayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options.
+type PaymentIntentCreatePaymentMethodOptionsQrisParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options.
+type PaymentIntentCreatePaymentMethodOptionsRechnungParams struct{}
+
+// If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsRevolutPayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsSamsungPayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+}
+
+// Additional fields for Mandate creation
+type PaymentIntentCreatePaymentMethodOptionsSEPADebitMandateOptionsParams 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"`
+}
+
+// If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+type PaymentIntentCreatePaymentMethodOptionsSEPADebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *PaymentIntentCreatePaymentMethodOptionsSEPADebitMandateOptionsParams `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).
+ //
+ // 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"`
+ // 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"`
+}
+
+// If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsShopeepayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+type PaymentIntentCreatePaymentMethodOptionsSofortParams struct {
+ // Language shown to the payer on redirect.
+ PreferredLanguage *string `form:"preferred_language"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options.
+type PaymentIntentCreatePaymentMethodOptionsStripeBalanceParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+type PaymentIntentCreatePaymentMethodOptionsSwishParams struct {
+ // A reference for this payment to be displayed in the Swish app.
+ Reference *string `form:"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).
+ //
+ // 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"`
+}
+
+// If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+type PaymentIntentCreatePaymentMethodOptionsTWINTParams 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).
+ //
+ // 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"`
+}
+
+// Provide filters for the linked accounts that the customer can select for the payment method.
+type PaymentIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams struct {
+ // The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ AccountSubcategories []*string `form:"account_subcategories"`
+ // ID of the institution to use to filter for selectable accounts.
+ Institution *string `form:"institution"`
+}
+
+// Customize manual entry behavior
+type PaymentIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsManualEntryParams struct {
+ // Settings for configuring manual entry of account details.
+ Mode *string `form:"mode"`
+}
+
+// Additional fields for Financial Connections Session creation
+type PaymentIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
+ // Provide filters for the linked accounts that the customer can select for the payment method.
+ Filters *PaymentIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams `form:"filters"`
+ // Customize manual entry behavior
+ ManualEntry *PaymentIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsManualEntryParams `form:"manual_entry"`
+ // 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"`
+ // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ ReturnURL *string `form:"return_url"`
+}
+
+// Additional fields for Mandate creation
+type PaymentIntentCreatePaymentMethodOptionsUSBankAccountMandateOptionsParams struct {
+ // The method used to collect offline mandate customer acceptance.
+ CollectionMethod *string `form:"collection_method"`
+}
+
+// Additional fields for network related functions
+type PaymentIntentCreatePaymentMethodOptionsUSBankAccountNetworksParams struct {
+ // Triggers validations to run across the selected networks
+ Requested []*string `form:"requested"`
+}
+
+// If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+type PaymentIntentCreatePaymentMethodOptionsUSBankAccountParams struct {
+ // Additional fields for Financial Connections Session creation
+ FinancialConnections *PaymentIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
+ // Additional fields for Mandate creation
+ MandateOptions *PaymentIntentCreatePaymentMethodOptionsUSBankAccountMandateOptionsParams `form:"mandate_options"`
+ // Additional fields for network related functions
+ Networks *PaymentIntentCreatePaymentMethodOptionsUSBankAccountNetworksParams `form:"networks"`
+ // Preferred transaction settlement speed
+ PreferredSettlementSpeed *string `form:"preferred_settlement_speed"`
+ // 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"`
+ // 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"`
+ // Bank account verification method.
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+type PaymentIntentCreatePaymentMethodOptionsWeChatPayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+type PaymentIntentCreatePaymentMethodOptionsZipParams 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).
+ //
+ // 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"`
+}
+
+// Payment method-specific configuration for this PaymentIntent.
+type PaymentIntentCreatePaymentMethodOptionsParams struct {
+ // If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ ACSSDebit *PaymentIntentCreatePaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
+ // If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ Affirm *PaymentIntentCreatePaymentMethodOptionsAffirmParams `form:"affirm"`
+ // If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ AfterpayClearpay *PaymentIntentCreatePaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ Alipay *PaymentIntentCreatePaymentMethodOptionsAlipayParams `form:"alipay"`
+ // If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ Alma *PaymentIntentCreatePaymentMethodOptionsAlmaParams `form:"alma"`
+ // If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ AmazonPay *PaymentIntentCreatePaymentMethodOptionsAmazonPayParams `form:"amazon_pay"`
+ // If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ AUBECSDebit *PaymentIntentCreatePaymentMethodOptionsAUBECSDebitParams `form:"au_becs_debit"`
+ // If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ BACSDebit *PaymentIntentCreatePaymentMethodOptionsBACSDebitParams `form:"bacs_debit"`
+ // If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ Bancontact *PaymentIntentCreatePaymentMethodOptionsBancontactParams `form:"bancontact"`
+ // If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options.
+ Billie *PaymentIntentCreatePaymentMethodOptionsBillieParams `form:"billie"`
+ // If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ BLIK *PaymentIntentCreatePaymentMethodOptionsBLIKParams `form:"blik"`
+ // If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ Boleto *PaymentIntentCreatePaymentMethodOptionsBoletoParams `form:"boleto"`
+ // Configuration for any card payments attempted on this PaymentIntent.
+ Card *PaymentIntentCreatePaymentMethodOptionsCardParams `form:"card"`
+ // If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ CardPresent *PaymentIntentCreatePaymentMethodOptionsCardPresentParams `form:"card_present"`
+ // If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ CashApp *PaymentIntentCreatePaymentMethodOptionsCashAppParams `form:"cashapp"`
+ // If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ CustomerBalance *PaymentIntentCreatePaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
+ // If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ EPS *PaymentIntentCreatePaymentMethodOptionsEPSParams `form:"eps"`
+ // If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ FPX *PaymentIntentCreatePaymentMethodOptionsFPXParams `form:"fpx"`
+ // If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ Giropay *PaymentIntentCreatePaymentMethodOptionsGiropayParams `form:"giropay"`
+ // If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options.
+ Gopay *PaymentIntentCreatePaymentMethodOptionsGopayParams `form:"gopay"`
+ // If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ Grabpay *PaymentIntentCreatePaymentMethodOptionsGrabpayParams `form:"grabpay"`
+ // If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options.
+ IDBankTransfer *PaymentIntentCreatePaymentMethodOptionsIDBankTransferParams `form:"id_bank_transfer"`
+ // If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ IDEAL *PaymentIntentCreatePaymentMethodOptionsIDEALParams `form:"ideal"`
+ // If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ InteracPresent *PaymentIntentCreatePaymentMethodOptionsInteracPresentParams `form:"interac_present"`
+ // If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ KakaoPay *PaymentIntentCreatePaymentMethodOptionsKakaoPayParams `form:"kakao_pay"`
+ // If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ Klarna *PaymentIntentCreatePaymentMethodOptionsKlarnaParams `form:"klarna"`
+ // If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ Konbini *PaymentIntentCreatePaymentMethodOptionsKonbiniParams `form:"konbini"`
+ // If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ KrCard *PaymentIntentCreatePaymentMethodOptionsKrCardParams `form:"kr_card"`
+ // If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ Link *PaymentIntentCreatePaymentMethodOptionsLinkParams `form:"link"`
+ // If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options.
+ MbWay *PaymentIntentCreatePaymentMethodOptionsMbWayParams `form:"mb_way"`
+ // If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ Mobilepay *PaymentIntentCreatePaymentMethodOptionsMobilepayParams `form:"mobilepay"`
+ // If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ Multibanco *PaymentIntentCreatePaymentMethodOptionsMultibancoParams `form:"multibanco"`
+ // If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ NaverPay *PaymentIntentCreatePaymentMethodOptionsNaverPayParams `form:"naver_pay"`
+ // If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ NzBankAccount *PaymentIntentCreatePaymentMethodOptionsNzBankAccountParams `form:"nz_bank_account"`
+ // If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ OXXO *PaymentIntentCreatePaymentMethodOptionsOXXOParams `form:"oxxo"`
+ // If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ P24 *PaymentIntentCreatePaymentMethodOptionsP24Params `form:"p24"`
+ // If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ PayByBank *PaymentIntentCreatePaymentMethodOptionsPayByBankParams `form:"pay_by_bank"`
+ // If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ Payco *PaymentIntentCreatePaymentMethodOptionsPaycoParams `form:"payco"`
+ // If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ PayNow *PaymentIntentCreatePaymentMethodOptionsPayNowParams `form:"paynow"`
+ // If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ Paypal *PaymentIntentCreatePaymentMethodOptionsPaypalParams `form:"paypal"`
+ // If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options.
+ Payto *PaymentIntentCreatePaymentMethodOptionsPaytoParams `form:"payto"`
+ // If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ Pix *PaymentIntentCreatePaymentMethodOptionsPixParams `form:"pix"`
+ // If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ PromptPay *PaymentIntentCreatePaymentMethodOptionsPromptPayParams `form:"promptpay"`
+ // If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options.
+ Qris *PaymentIntentCreatePaymentMethodOptionsQrisParams `form:"qris"`
+ // If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options.
+ Rechnung *PaymentIntentCreatePaymentMethodOptionsRechnungParams `form:"rechnung"`
+ // If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ RevolutPay *PaymentIntentCreatePaymentMethodOptionsRevolutPayParams `form:"revolut_pay"`
+ // If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ SamsungPay *PaymentIntentCreatePaymentMethodOptionsSamsungPayParams `form:"samsung_pay"`
+ // If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ SEPADebit *PaymentIntentCreatePaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
+ // If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options.
+ Shopeepay *PaymentIntentCreatePaymentMethodOptionsShopeepayParams `form:"shopeepay"`
+ // If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ Sofort *PaymentIntentCreatePaymentMethodOptionsSofortParams `form:"sofort"`
+ // If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options.
+ StripeBalance *PaymentIntentCreatePaymentMethodOptionsStripeBalanceParams `form:"stripe_balance"`
+ // If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ Swish *PaymentIntentCreatePaymentMethodOptionsSwishParams `form:"swish"`
+ // If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ TWINT *PaymentIntentCreatePaymentMethodOptionsTWINTParams `form:"twint"`
+ // If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ USBankAccount *PaymentIntentCreatePaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
+ // If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ WeChatPay *PaymentIntentCreatePaymentMethodOptionsWeChatPayParams `form:"wechat_pay"`
+ // If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ Zip *PaymentIntentCreatePaymentMethodOptionsZipParams `form:"zip"`
+}
+
+// Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
+type PaymentIntentCreateRadarOptionsParams 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"`
+}
+
+// The parameters that you can use to automatically create a Transfer.
+// Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+type PaymentIntentCreateTransferDataParams struct {
+ // The amount that will be transferred automatically when a charge succeeds.
+ // The amount is capped at the total transaction amount and if no amount is set,
+ // the full amount is transferred.
+ //
+ // If you intend to collect a fee and you need a more robust reporting experience, using
+ // [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount)
+ // might be a better fit for your integration.
+ 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"`
+}
+
+// Creates a PaymentIntent object.
+//
+// After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm)
+// to continue the payment. Learn more about the available payment flows
+// with the Payment Intents API.
+//
+// When you use confirm=true during creation, it's equivalent to creating
+// and confirming the PaymentIntent in the same call. You can use any parameters
+// available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply
+// confirm=true.
+type PaymentIntentCreateParams struct {
+ Params `form:"*"`
+ // Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ Amount *int64 `form:"amount"`
+ // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ ApplicationFeeAmount *int64 `form:"application_fee_amount"`
+ // Automations to be run during the PaymentIntent lifecycle
+ AsyncWorkflows *PaymentIntentCreateAsyncWorkflowsParams `form:"async_workflows"`
+ // When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters.
+ AutomaticPaymentMethods *PaymentIntentCreateAutomaticPaymentMethodsParams `form:"automatic_payment_methods"`
+ // Controls when the funds will be captured from the customer's account.
+ CaptureMethod *string `form:"capture_method"`
+ // Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm).
+ Confirm *bool `form:"confirm"`
+ // Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment.
+ ConfirmationMethod *string `form:"confirmation_method"`
+ // ID of the ConfirmationToken used to confirm this PaymentIntent.
+ //
+ // If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ ConfirmationToken *string `form:"confirmation_token"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // ID of the Customer this PaymentIntent belongs to, if one exists.
+ //
+ // Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ //
+ // If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ Customer *string `form:"customer"`
+ // ID of the Account this PaymentIntent belongs to, if one exists.
+ //
+ // Payment methods attached to other Accounts cannot be used with this PaymentIntent.
+ //
+ // If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead.
+ CustomerAccount *string `form:"customer_account"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ ErrorOnRequiresAction *bool `form:"error_on_requires_action"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ Mandate *string `form:"mandate"`
+ // This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ MandateData *PaymentIntentCreateMandateDataParams `form:"mandate_data"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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"`
+ // Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ OffSession *bool `form:"off_session"`
+ // The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // Provides industry-specific information about the charge.
+ PaymentDetails *PaymentIntentCreatePaymentDetailsParams `form:"payment_details"`
+ // ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent.
+ //
+ // If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward.
+ PaymentMethod *string `form:"payment_method"`
+ // The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.
+ PaymentMethodConfiguration *string `form:"payment_method_configuration"`
+ // If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ // in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ // property on the PaymentIntent.
+ PaymentMethodData *PaymentIntentCreatePaymentMethodDataParams `form:"payment_method_data"`
+ // Payment method-specific configuration for this PaymentIntent.
+ PaymentMethodOptions *PaymentIntentCreatePaymentMethodOptionsParams `form:"payment_method_options"`
+ // The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+ // Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
+ RadarOptions *PaymentIntentCreateRadarOptionsParams `form:"radar_options"`
+ // Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails).
+ ReceiptEmail *string `form:"receipt_email"`
+ // The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
+ ReturnURL *string `form:"return_url"`
+ // Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`.
+ SecretKeyConfirmation *string `form:"secret_key_confirmation"`
+ // 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"`
+ // Shipping information for this PaymentIntent.
+ 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 that you can use to automatically create a Transfer.
+ // Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ TransferData *PaymentIntentCreateTransferDataParams `form:"transfer_data"`
+ // A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
+ TransferGroup *string `form:"transfer_group"`
+ // Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ UseStripeSDK *bool `form:"use_stripe_sdk"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentIntentCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentIntentCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of a PaymentIntent that has previously been created.
+//
+// You can retrieve a PaymentIntent client-side using a publishable key when the client_secret is in the query string.
+//
+// If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://stripe.com/docs/api#payment_intent_object) object reference for more details.
+type PaymentIntentRetrieveParams struct {
+ Params `form:"*"`
+ // The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source.
+ ClientSecret *string `form:"client_secret"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentIntentRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Tax arguments for automations
+type PaymentIntentUpdateAsyncWorkflowsInputsTaxParams struct {
+ // The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id
+ Calculation *string `form:"calculation"`
+}
+
+// Arguments passed in automations
+type PaymentIntentUpdateAsyncWorkflowsInputsParams struct {
+ // Tax arguments for automations
+ Tax *PaymentIntentUpdateAsyncWorkflowsInputsTaxParams `form:"tax"`
+}
+
+// Automations to be run during the PaymentIntent lifecycle
+type PaymentIntentUpdateAsyncWorkflowsParams struct {
+ // Arguments passed in automations
+ Inputs *PaymentIntentUpdateAsyncWorkflowsInputsParams `form:"inputs"`
+}
+
+// If this is a Mandate accepted online, this hash contains details about the online acceptance.
+type PaymentIntentUpdateMandateDataCustomerAcceptanceOnlineParams struct {
+ // The IP address from which the Mandate was accepted by the customer.
+ IPAddress *string `form:"ip_address"`
+ // The user agent of the browser from which the Mandate was accepted by the customer.
+ UserAgent *string `form:"user_agent"`
+}
+
+// This hash contains details about the customer acceptance of the Mandate.
+type PaymentIntentUpdateMandateDataCustomerAcceptanceParams struct {
+ // If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ Online *PaymentIntentUpdateMandateDataCustomerAcceptanceOnlineParams `form:"online"`
+ // The type of customer acceptance information included with the Mandate.
+ Type *string `form:"type"`
+}
+
+// This hash contains details about the Mandate to create.
+type PaymentIntentUpdateMandateDataParams struct {
+ // This hash contains details about the customer acceptance of the Mandate.
+ CustomerAcceptance *PaymentIntentUpdateMandateDataCustomerAcceptanceParams `form:"customer_acceptance"`
+}
+
+// Affiliate details for this purchase.
+type PaymentIntentUpdatePaymentDetailsCarRentalAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type PaymentIntentUpdatePaymentDetailsCarRentalDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type PaymentIntentUpdatePaymentDetailsCarRentalDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *PaymentIntentUpdatePaymentDetailsCarRentalDeliveryRecipientParams `form:"recipient"`
+}
+
+// The details of the passengers in the travel reservation
+type PaymentIntentUpdatePaymentDetailsCarRentalDriverParams struct {
+ // Full name of the person or entity on the car reservation.
+ Name *string `form:"name"`
+}
+
+// Car rental details for this PaymentIntent.
+type PaymentIntentUpdatePaymentDetailsCarRentalParams struct {
+ // Affiliate details for this purchase.
+ Affiliate *PaymentIntentUpdatePaymentDetailsCarRentalAffiliateParams `form:"affiliate"`
+ // The booking number associated with the car rental.
+ BookingNumber *string `form:"booking_number"`
+ // Class code of the car.
+ CarClassCode *string `form:"car_class_code"`
+ // Make of the car.
+ CarMake *string `form:"car_make"`
+ // Model of the car.
+ CarModel *string `form:"car_model"`
+ // The name of the rental car company.
+ Company *string `form:"company"`
+ // The customer service phone number of the car rental company.
+ CustomerServicePhoneNumber *string `form:"customer_service_phone_number"`
+ // Number of days the car is being rented.
+ DaysRented *int64 `form:"days_rented"`
+ // Delivery details for this purchase.
+ Delivery *PaymentIntentUpdatePaymentDetailsCarRentalDeliveryParams `form:"delivery"`
+ // The details of the passengers in the travel reservation
+ Drivers []*PaymentIntentUpdatePaymentDetailsCarRentalDriverParams `form:"drivers"`
+ // List of additional charges being billed.
+ ExtraCharges []*string `form:"extra_charges"`
+ // Indicates if the customer did not keep nor cancel their booking.
+ NoShow *bool `form:"no_show"`
+ // Car pick-up address.
+ PickupAddress *AddressParams `form:"pickup_address"`
+ // Car pick-up time. Measured in seconds since the Unix epoch.
+ PickupAt *int64 `form:"pickup_at"`
+ // Rental rate.
+ RateAmount *int64 `form:"rate_amount"`
+ // The frequency at which the rate amount is applied. One of `day`, `week` or `month`
+ RateInterval *string `form:"rate_interval"`
+ // The name of the person or entity renting the car.
+ RenterName *string `form:"renter_name"`
+ // Car return address.
+ ReturnAddress *AddressParams `form:"return_address"`
+ // Car return time. Measured in seconds since the Unix epoch.
+ ReturnAt *int64 `form:"return_at"`
+ // Indicates whether the goods or services are tax-exempt or tax is not collected.
+ TaxExempt *bool `form:"tax_exempt"`
+}
+
+// Affiliate details for this purchase.
+type PaymentIntentUpdatePaymentDetailsEventDetailsAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type PaymentIntentUpdatePaymentDetailsEventDetailsDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type PaymentIntentUpdatePaymentDetailsEventDetailsDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *PaymentIntentUpdatePaymentDetailsEventDetailsDeliveryRecipientParams `form:"recipient"`
+}
+
+// Event details for this PaymentIntent
+type PaymentIntentUpdatePaymentDetailsEventDetailsParams struct {
+ // Indicates if the tickets are digitally checked when entering the venue.
+ AccessControlledVenue *bool `form:"access_controlled_venue"`
+ // The event location's address.
+ Address *AddressParams `form:"address"`
+ // Affiliate details for this purchase.
+ Affiliate *PaymentIntentUpdatePaymentDetailsEventDetailsAffiliateParams `form:"affiliate"`
+ // The name of the company
+ Company *string `form:"company"`
+ // Delivery details for this purchase.
+ Delivery *PaymentIntentUpdatePaymentDetailsEventDetailsDeliveryParams `form:"delivery"`
+ // Event end time. Measured in seconds since the Unix epoch.
+ EndsAt *int64 `form:"ends_at"`
+ // Type of the event entertainment (concert, sports event etc)
+ Genre *string `form:"genre"`
+ // The name of the event.
+ Name *string `form:"name"`
+ // Event start time. Measured in seconds since the Unix epoch.
+ StartsAt *int64 `form:"starts_at"`
+}
+
+// Affiliate details for this purchase.
+type PaymentIntentUpdatePaymentDetailsFlightAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type PaymentIntentUpdatePaymentDetailsFlightDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type PaymentIntentUpdatePaymentDetailsFlightDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *PaymentIntentUpdatePaymentDetailsFlightDeliveryRecipientParams `form:"recipient"`
+}
+
+// The details of the passengers in the travel reservation.
+type PaymentIntentUpdatePaymentDetailsFlightPassengerParams struct {
+ // Full name of the person or entity on the flight reservation.
+ Name *string `form:"name"`
+}
+
+// The individual flight segments associated with the trip.
+type PaymentIntentUpdatePaymentDetailsFlightSegmentParams struct {
+ // The flight segment amount.
+ Amount *int64 `form:"amount"`
+ // The International Air Transport Association (IATA) airport code for the arrival airport.
+ ArrivalAirport *string `form:"arrival_airport"`
+ // The arrival time for the flight segment. Measured in seconds since the Unix epoch.
+ ArrivesAt *int64 `form:"arrives_at"`
+ // The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment.
+ Carrier *string `form:"carrier"`
+ // The departure time for the flight segment. Measured in seconds since the Unix epoch.
+ DepartsAt *int64 `form:"departs_at"`
+ // The International Air Transport Association (IATA) airport code for the departure airport.
+ DepartureAirport *string `form:"departure_airport"`
+ // The flight number associated with the segment
+ FlightNumber *string `form:"flight_number"`
+ // The fare class for the segment.
+ ServiceClass *string `form:"service_class"`
+}
+
+// Flight reservation details for this PaymentIntent
+type PaymentIntentUpdatePaymentDetailsFlightParams struct {
+ // Affiliate details for this purchase.
+ Affiliate *PaymentIntentUpdatePaymentDetailsFlightAffiliateParams `form:"affiliate"`
+ // The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking.
+ AgencyNumber *string `form:"agency_number"`
+ // The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket.
+ Carrier *string `form:"carrier"`
+ // Delivery details for this purchase.
+ Delivery *PaymentIntentUpdatePaymentDetailsFlightDeliveryParams `form:"delivery"`
+ // The name of the person or entity on the reservation.
+ PassengerName *string `form:"passenger_name"`
+ // The details of the passengers in the travel reservation.
+ Passengers []*PaymentIntentUpdatePaymentDetailsFlightPassengerParams `form:"passengers"`
+ // The individual flight segments associated with the trip.
+ Segments []*PaymentIntentUpdatePaymentDetailsFlightSegmentParams `form:"segments"`
+ // The ticket number associated with the travel reservation.
+ TicketNumber *string `form:"ticket_number"`
+}
+
+// Affiliate details for this purchase.
+type PaymentIntentUpdatePaymentDetailsLodgingAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Details of the recipient.
+type PaymentIntentUpdatePaymentDetailsLodgingDeliveryRecipientParams struct {
+ // The email of the recipient the ticket is delivered to.
+ Email *string `form:"email"`
+ // The name of the recipient the ticket is delivered to.
+ Name *string `form:"name"`
+ // The phone number of the recipient the ticket is delivered to.
+ Phone *string `form:"phone"`
+}
+
+// Delivery details for this purchase.
+type PaymentIntentUpdatePaymentDetailsLodgingDeliveryParams struct {
+ // The delivery method for the payment
+ Mode *string `form:"mode"`
+ // Details of the recipient.
+ Recipient *PaymentIntentUpdatePaymentDetailsLodgingDeliveryRecipientParams `form:"recipient"`
+}
+
+// The details of the passengers in the travel reservation
+type PaymentIntentUpdatePaymentDetailsLodgingPassengerParams struct {
+ // Full name of the person or entity on the lodging reservation.
+ Name *string `form:"name"`
+}
+
+// Lodging reservation details for this PaymentIntent
+type PaymentIntentUpdatePaymentDetailsLodgingParams struct {
+ // The lodging location's address.
+ Address *AddressParams `form:"address"`
+ // The number of adults on the booking
+ Adults *int64 `form:"adults"`
+ // Affiliate details for this purchase.
+ Affiliate *PaymentIntentUpdatePaymentDetailsLodgingAffiliateParams `form:"affiliate"`
+ // The booking number associated with the lodging reservation.
+ BookingNumber *string `form:"booking_number"`
+ // The lodging category
+ Category *string `form:"category"`
+ // Loding check-in time. Measured in seconds since the Unix epoch.
+ CheckinAt *int64 `form:"checkin_at"`
+ // Lodging check-out time. Measured in seconds since the Unix epoch.
+ CheckoutAt *int64 `form:"checkout_at"`
+ // The customer service phone number of the lodging company.
+ CustomerServicePhoneNumber *string `form:"customer_service_phone_number"`
+ // The daily lodging room rate.
+ DailyRoomRateAmount *int64 `form:"daily_room_rate_amount"`
+ // Delivery details for this purchase.
+ Delivery *PaymentIntentUpdatePaymentDetailsLodgingDeliveryParams `form:"delivery"`
+ // List of additional charges being billed.
+ ExtraCharges []*string `form:"extra_charges"`
+ // Indicates whether the lodging location is compliant with the Fire Safety Act.
+ FireSafetyActCompliance *bool `form:"fire_safety_act_compliance"`
+ // The name of the lodging location.
+ Name *string `form:"name"`
+ // Indicates if the customer did not keep their booking while failing to cancel the reservation.
+ NoShow *bool `form:"no_show"`
+ // The number of rooms on the booking
+ NumberOfRooms *int64 `form:"number_of_rooms"`
+ // The details of the passengers in the travel reservation
+ Passengers []*PaymentIntentUpdatePaymentDetailsLodgingPassengerParams `form:"passengers"`
+ // The phone number of the lodging location.
+ PropertyPhoneNumber *string `form:"property_phone_number"`
+ // The room class for this purchase.
+ RoomClass *string `form:"room_class"`
+ // The number of room nights
+ RoomNights *int64 `form:"room_nights"`
+ // The total tax amount associating with the room reservation.
+ TotalRoomTaxAmount *int64 `form:"total_room_tax_amount"`
+ // The total tax amount
+ TotalTaxAmount *int64 `form:"total_tax_amount"`
+}
+
+// Affiliate details for this purchase.
+type PaymentIntentUpdatePaymentDetailsSubscriptionAffiliateParams struct {
+ // The name of the affiliate that originated the purchase.
+ Name *string `form:"name"`
+}
+
+// Subscription billing details for this purchase.
+type PaymentIntentUpdatePaymentDetailsSubscriptionBillingIntervalParams struct {
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ Count *int64 `form:"count"`
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+}
+
+// Subscription details for this PaymentIntent
+type PaymentIntentUpdatePaymentDetailsSubscriptionParams struct {
+ // Affiliate details for this purchase.
+ Affiliate *PaymentIntentUpdatePaymentDetailsSubscriptionAffiliateParams `form:"affiliate"`
+ // Info whether the subscription will be auto renewed upon expiry.
+ AutoRenewal *bool `form:"auto_renewal"`
+ // Subscription billing details for this purchase.
+ BillingInterval *PaymentIntentUpdatePaymentDetailsSubscriptionBillingIntervalParams `form:"billing_interval"`
+ // Subscription end time. Measured in seconds since the Unix epoch.
+ EndsAt *int64 `form:"ends_at"`
+ // Name of the product on subscription. e.g. Apple Music Subscription
+ Name *string `form:"name"`
+ // Subscription start time. Measured in seconds since the Unix epoch.
+ StartsAt *int64 `form:"starts_at"`
+}
+
+// Provides industry-specific information about the charge.
+type PaymentIntentUpdatePaymentDetailsParams struct {
+ // Car rental details for this PaymentIntent.
+ CarRental *PaymentIntentUpdatePaymentDetailsCarRentalParams `form:"car_rental"`
+ // Event details for this PaymentIntent
+ EventDetails *PaymentIntentUpdatePaymentDetailsEventDetailsParams `form:"event_details"`
+ // Flight reservation details for this PaymentIntent
+ Flight *PaymentIntentUpdatePaymentDetailsFlightParams `form:"flight"`
+ // Lodging reservation details for this PaymentIntent
+ Lodging *PaymentIntentUpdatePaymentDetailsLodgingParams `form:"lodging"`
+ // Subscription details for this PaymentIntent
+ Subscription *PaymentIntentUpdatePaymentDetailsSubscriptionParams `form:"subscription"`
+}
+
+// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+type PaymentIntentUpdatePaymentMethodDataBillingDetailsParams struct {
+ // Billing address.
+ Address *AddressParams `form:"address"`
+ // Email address.
+ Email *string `form:"email"`
+ // Full name.
+ Name *string `form:"name"`
+ // Billing phone number (including extension).
+ Phone *string `form:"phone"`
+}
+
+// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+type PaymentIntentUpdatePaymentMethodDataRadarOptionsParams 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"`
+}
+
+// If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+// in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+// property on the PaymentIntent.
+type PaymentIntentUpdatePaymentMethodDataParams struct {
+ // If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ ACSSDebit *PaymentMethodACSSDebitParams `form:"acss_debit"`
+ // If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ Affirm *PaymentMethodAffirmParams `form:"affirm"`
+ // If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ Alipay *PaymentMethodAlipayParams `form:"alipay"`
+ // This 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"`
+ // If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ Alma *PaymentMethodAlmaParams `form:"alma"`
+ // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ AmazonPay *PaymentMethodAmazonPayParams `form:"amazon_pay"`
+ // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"`
+ // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ BACSDebit *PaymentMethodBACSDebitParams `form:"bacs_debit"`
+ // If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ Bancontact *PaymentMethodBancontactParams `form:"bancontact"`
+ // If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
+ Billie *PaymentMethodBillieParams `form:"billie"`
+ // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ BillingDetails *PaymentIntentUpdatePaymentMethodDataBillingDetailsParams `form:"billing_details"`
+ // If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ BLIK *PaymentMethodBLIKParams `form:"blik"`
+ // If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ Boleto *PaymentMethodBoletoParams `form:"boleto"`
+ // If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ CashApp *PaymentMethodCashAppParams `form:"cashapp"`
+ // If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ CustomerBalance *PaymentMethodCustomerBalanceParams `form:"customer_balance"`
+ // If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ EPS *PaymentMethodEPSParams `form:"eps"`
+ // If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ FPX *PaymentMethodFPXParams `form:"fpx"`
+ // If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ Giropay *PaymentMethodGiropayParams `form:"giropay"`
+ // If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method.
+ Gopay *PaymentMethodGopayParams `form:"gopay"`
+ // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ Grabpay *PaymentMethodGrabpayParams `form:"grabpay"`
+ // If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method.
+ IDBankTransfer *PaymentMethodIDBankTransferParams `form:"id_bank_transfer"`
+ // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ IDEAL *PaymentMethodIDEALParams `form:"ideal"`
+ // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ InteracPresent *PaymentMethodInteracPresentParams `form:"interac_present"`
+ // If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ KakaoPay *PaymentMethodKakaoPayParams `form:"kakao_pay"`
+ // If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ Klarna *PaymentMethodKlarnaParams `form:"klarna"`
+ // If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ Konbini *PaymentMethodKonbiniParams `form:"konbini"`
+ // If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ KrCard *PaymentMethodKrCardParams `form:"kr_card"`
+ // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ Link *PaymentMethodLinkParams `form:"link"`
+ // If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
+ MbWay *PaymentMethodMbWayParams `form:"mb_way"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ Mobilepay *PaymentMethodMobilepayParams `form:"mobilepay"`
+ // If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ Multibanco *PaymentMethodMultibancoParams `form:"multibanco"`
+ // If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ NaverPay *PaymentMethodNaverPayParams `form:"naver_pay"`
+ // If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ NzBankAccount *PaymentMethodNzBankAccountParams `form:"nz_bank_account"`
+ // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ OXXO *PaymentMethodOXXOParams `form:"oxxo"`
+ // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ P24 *PaymentMethodP24Params `form:"p24"`
+ // If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ PayByBank *PaymentMethodPayByBankParams `form:"pay_by_bank"`
+ // If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ Payco *PaymentMethodPaycoParams `form:"payco"`
+ // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ PayNow *PaymentMethodPayNowParams `form:"paynow"`
+ // If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ Paypal *PaymentMethodPaypalParams `form:"paypal"`
+ // If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+ Payto *PaymentMethodPaytoParams `form:"payto"`
+ // If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ Pix *PaymentMethodPixParams `form:"pix"`
+ // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ PromptPay *PaymentMethodPromptPayParams `form:"promptpay"`
+ // If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method.
+ Qris *PaymentMethodQrisParams `form:"qris"`
+ // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ RadarOptions *PaymentIntentUpdatePaymentMethodDataRadarOptionsParams `form:"radar_options"`
+ // If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
+ Rechnung *PaymentMethodRechnungParams `form:"rechnung"`
+ // If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ RevolutPay *PaymentMethodRevolutPayParams `form:"revolut_pay"`
+ // If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ SamsungPay *PaymentMethodSamsungPayParams `form:"samsung_pay"`
+ // If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
+ Satispay *PaymentMethodSatispayParams `form:"satispay"`
+ // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ SEPADebit *PaymentMethodSEPADebitParams `form:"sepa_debit"`
+ // If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method.
+ Shopeepay *PaymentMethodShopeepayParams `form:"shopeepay"`
+ // If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ Sofort *PaymentMethodSofortParams `form:"sofort"`
+ // This hash contains details about the Stripe balance payment method.
+ StripeBalance *PaymentMethodStripeBalanceParams `form:"stripe_balance"`
+ // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ Swish *PaymentMethodSwishParams `form:"swish"`
+ // If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ TWINT *PaymentMethodTWINTParams `form:"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 *string `form:"type"`
+ // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ USBankAccount *PaymentMethodUSBankAccountParams `form:"us_bank_account"`
+ // If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ WeChatPay *PaymentMethodWeChatPayParams `form:"wechat_pay"`
+ // If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ Zip *PaymentMethodZipParams `form:"zip"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentIntentUpdatePaymentMethodDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Additional fields for Mandate creation
+type PaymentIntentUpdatePaymentMethodOptionsACSSDebitMandateOptionsParams struct {
+ // A URL for custom mandate text to render during confirmation step.
+ // The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ // or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ CustomMandateURL *string `form:"custom_mandate_url"`
+ // Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ IntervalDescription *string `form:"interval_description"`
+ // Payment schedule for the mandate.
+ PaymentSchedule *string `form:"payment_schedule"`
+ // Transaction type of the mandate.
+ TransactionType *string `form:"transaction_type"`
+}
+
+// If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsACSSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *PaymentIntentUpdatePaymentMethodOptionsACSSDebitMandateOptionsParams `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).
+ //
+ // 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"`
+ // 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"`
+ // Bank account verification method.
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsAffirmParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Preferred language of the Affirm authorization page that the customer is redirected to.
+ PreferredLocale *string `form:"preferred_locale"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsAfterpayClearpayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes.
+ // This field differs from the statement descriptor and item name.
+ Reference *string `form:"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).
+ //
+ // 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"`
+}
+
+// If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsAlipayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsAlmaParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+}
+
+// If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsAmazonPayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsAUBECSDebitParams 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).
+ //
+ // 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"`
+ // 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"`
+}
+
+// Additional fields for Mandate creation
+type PaymentIntentUpdatePaymentMethodOptionsBACSDebitMandateOptionsParams 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"`
+}
+
+// If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsBACSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *PaymentIntentUpdatePaymentMethodOptionsBACSDebitMandateOptionsParams `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).
+ //
+ // 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"`
+ // 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"`
+}
+
+// If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsBancontactParams struct {
+ // Preferred language of the Bancontact authorization page that the customer is redirected to.
+ PreferredLanguage *string `form:"preferred_language"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsBillieParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+}
+
+// If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsBLIKParams struct {
+ // The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
+ Code *string `form:"code"`
+ // 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"`
+}
+
+// If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsBoletoParams 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).
+ //
+ // 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"`
+}
+
+// The selected installment plan to use for this payment attempt.
+// This parameter can only be provided during confirmation.
+type PaymentIntentUpdatePaymentMethodOptionsCardInstallmentsPlanParams struct {
+ // For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ Count *int64 `form:"count"`
+ // For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ // One of `month`.
+ Interval *string `form:"interval"`
+ // Type of installment plan, one of `fixed_count`.
+ Type *string `form:"type"`
+}
+
+// Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+//
+// For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+type PaymentIntentUpdatePaymentMethodOptionsCardInstallmentsParams struct {
+ // Setting to true enables installments for this PaymentIntent.
+ // This will cause the response to contain a list of available installment plans.
+ // Setting to false will prevent any selected plan from applying to a charge.
+ Enabled *bool `form:"enabled"`
+ // The selected installment plan to use for this payment attempt.
+ // This parameter can only be provided during confirmation.
+ Plan *PaymentIntentUpdatePaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"`
+}
+
+// Configuration options for setting up an eMandate for cards issued in India.
+type PaymentIntentUpdatePaymentMethodOptionsCardMandateOptionsParams struct {
+ // Amount to be charged for future payments.
+ Amount *int64 `form:"amount"`
+ // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ AmountType *string `form:"amount_type"`
+ // A description of the mandate or subscription that is meant to be displayed to the customer.
+ Description *string `form:"description"`
+ // End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ EndDate *int64 `form:"end_date"`
+ // Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ Interval *string `form:"interval"`
+ // The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ IntervalCount *int64 `form:"interval_count"`
+ // Unique identifier for the mandate or subscription.
+ Reference *string `form:"reference"`
+ // Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ StartDate *int64 `form:"start_date"`
+ // Specifies the type of mandates supported. Possible values are `india`.
+ SupportedTypes []*string `form:"supported_types"`
+}
+
+// Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements.
+type PaymentIntentUpdatePaymentMethodOptionsCardStatementDetailsParams struct {
+ // Please pass in an address that is within your Stripe user account country
+ Address *AddressParams `form:"address"`
+ // Phone number (e.g., a toll-free number that customers can call)
+ Phone *string `form:"phone"`
+}
+
+// Cartes Bancaires-specific 3DS fields.
+type PaymentIntentUpdatePaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesParams struct {
+ // The cryptogram calculation algorithm used by the card Issuer's ACS
+ // to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ // messageExtension: CB-AVALGO
+ CbAvalgo *string `form:"cb_avalgo"`
+ // The exemption indicator returned from Cartes Bancaires in the ARes.
+ // message extension: CB-EXEMPTION; string (4 characters)
+ // This is a 3 byte bitmap (low significant byte first and most significant
+ // bit first) that has been Base64 encoded
+ CbExemption *string `form:"cb_exemption"`
+ // The risk score returned from Cartes Bancaires in the ARes.
+ // message extension: CB-SCORE; numeric value 0-99
+ CbScore *int64 `form:"cb_score"`
+}
+
+// Network specific 3DS fields. Network specific arguments require an
+// explicit card brand choice. The parameter `payment_method_options.card.network“
+// must be populated accordingly
+type PaymentIntentUpdatePaymentMethodOptionsCardThreeDSecureNetworkOptionsParams struct {
+ // Cartes Bancaires-specific 3DS fields.
+ CartesBancaires *PaymentIntentUpdatePaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesParams `form:"cartes_bancaires"`
+}
+
+// If 3D Secure authentication was performed with a third-party provider,
+// the authentication details to use for this payment.
+type PaymentIntentUpdatePaymentMethodOptionsCardThreeDSecureParams struct {
+ // The `transStatus` returned from the card Issuer's ACS in the ARes.
+ AresTransStatus *string `form:"ares_trans_status"`
+ // The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ // AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ // (Most 3D Secure providers will return the base64-encoded version, which
+ // is what you should specify here.)
+ Cryptogram *string `form:"cryptogram"`
+ // The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ // provider and indicates what degree of authentication was performed.
+ ElectronicCommerceIndicator *string `form:"electronic_commerce_indicator"`
+ // The exemption requested via 3DS and accepted by the issuer at authentication time.
+ ExemptionIndicator *string `form:"exemption_indicator"`
+ // Network specific 3DS fields. Network specific arguments require an
+ // explicit card brand choice. The parameter `payment_method_options.card.network``
+ // must be populated accordingly
+ NetworkOptions *PaymentIntentUpdatePaymentMethodOptionsCardThreeDSecureNetworkOptionsParams `form:"network_options"`
+ // The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ // AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ RequestorChallengeIndicator *string `form:"requestor_challenge_indicator"`
+ // For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ // Transaction ID (dsTransID).
+ TransactionID *string `form:"transaction_id"`
+ // The version of 3D Secure that was performed.
+ Version *string `form:"version"`
+}
+
+// Configuration for any card payments attempted on this PaymentIntent.
+type PaymentIntentUpdatePaymentMethodOptionsCardParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation.
+ CVCToken *string `form:"cvc_token"`
+ // Installment configuration for payments attempted on this PaymentIntent (Mexico Only).
+ //
+ // For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
+ Installments *PaymentIntentUpdatePaymentMethodOptionsCardInstallmentsParams `form:"installments"`
+ // Configuration options for setting up an eMandate for cards issued in India.
+ MandateOptions *PaymentIntentUpdatePaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"`
+ // When specified, this parameter indicates that a transaction will be marked
+ // as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ // parameter can only be provided during confirmation.
+ MOTO *bool `form:"moto"`
+ // Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time.
+ Network *string `form:"network"`
+ // Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent.
+ RequestDecrementalAuthorization *string `form:"request_decremental_authorization"`
+ // Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent.
+ RequestExtendedAuthorization *string `form:"request_extended_authorization"`
+ // Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent.
+ RequestIncrementalAuthorization *string `form:"request_incremental_authorization"`
+ // Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent.
+ RequestMulticapture *string `form:"request_multicapture"`
+ // Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent.
+ RequestOvercapture *string `form:"request_overcapture"`
+ // Request partial authorization on this PaymentIntent.
+ RequestPartialAuthorization *string `form:"request_partial_authorization"`
+ // 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"`
+ // When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter).
+ RequireCVCRecollection *bool `form:"require_cvc_recollection"`
+ // 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"`
+ // 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"`
+ // Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements.
+ StatementDetails *PaymentIntentUpdatePaymentMethodOptionsCardStatementDetailsParams `form:"statement_details"`
+ // If 3D Secure authentication was performed with a third-party provider,
+ // the authentication details to use for this payment.
+ ThreeDSecure *PaymentIntentUpdatePaymentMethodOptionsCardThreeDSecureParams `form:"three_d_secure"`
+}
+
+// Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+type PaymentIntentUpdatePaymentMethodOptionsCardPresentRoutingParams struct {
+ // Routing requested priority
+ RequestedPriority *string `form:"requested_priority"`
+}
+
+// If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsCardPresentParams struct {
+ // Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity)
+ RequestExtendedAuthorization *bool `form:"request_extended_authorization"`
+ // Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support.
+ RequestIncrementalAuthorizationSupport *bool `form:"request_incremental_authorization_support"`
+ // Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes.
+ Routing *PaymentIntentUpdatePaymentMethodOptionsCardPresentRoutingParams `form:"routing"`
+}
+
+// If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsCashAppParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// Configuration for the eu_bank_transfer funding type.
+type PaymentIntentUpdatePaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams 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 the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+type PaymentIntentUpdatePaymentMethodOptionsCustomerBalanceBankTransferParams struct {
+ // Configuration for the eu_bank_transfer funding type.
+ EUBankTransfer *PaymentIntentUpdatePaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
+ // List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
+ //
+ // Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
+ RequestedAddressTypes []*string `form:"requested_address_types"`
+ // The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ Type *string `form:"type"`
+}
+
+// If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsCustomerBalanceParams struct {
+ // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ BankTransfer *PaymentIntentUpdatePaymentMethodOptionsCustomerBalanceBankTransferParams `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).
+ //
+ // 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"`
+}
+
+// If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsEPSParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsFPXParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsGiropayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsGopayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsGrabpayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsIDBankTransferParams struct {
+ // The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now.
+ ExpiresAfter *int64 `form:"expires_after"`
+ // The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now.
+ ExpiresAt *int64 `form:"expires_at"`
+ // 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"`
+}
+
+// If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsIDEALParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsInteracPresentParams struct{}
+
+// If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsKakaoPayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsKlarnaParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Preferred language of the Klarna authorization page that the customer is redirected to
+ PreferredLocale *string `form:"preferred_locale"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsKonbiniParams struct {
+ // An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number.
+ ConfirmationNumber *string `form:"confirmation_number"`
+ // The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days.
+ ExpiresAfterDays *int64 `form:"expires_after_days"`
+ // The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set.
+ ExpiresAt *int64 `form:"expires_at"`
+ // A product descriptor of up to 22 characters, which will appear to customers at the convenience store.
+ ProductDescription *string `form:"product_description"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsKrCardParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsLinkParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // [Deprecated] This is a legacy parameter that no longer has any function.
+ // Deprecated:
+ PersistentToken *string `form:"persistent_token"`
+ // 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"`
+}
+
+// If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsMbWayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsMobilepayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsMultibancoParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsNaverPayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsNzBankAccountParams 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).
+ //
+ // 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"`
+ // 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"`
+}
+
+// If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsOXXOParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsP24Params 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).
+ //
+ // 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"`
+ // Confirm that the payer has accepted the P24 terms and conditions.
+ TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"`
+}
+
+// If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsPayByBankParams struct{}
+
+// If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsPaycoParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+}
+
+// If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsPayNowParams 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).
+ //
+ // 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"`
+}
+
+// The tax information for the line item.
+type PaymentIntentUpdatePaymentMethodOptionsPaypalLineItemTaxParams struct {
+ // The tax for a single unit of the line item in minor units. Cannot be a negative number.
+ Amount *int64 `form:"amount"`
+ // The tax behavior for the line item.
+ Behavior *string `form:"behavior"`
+}
+
+// The line items purchased by the customer.
+type PaymentIntentUpdatePaymentMethodOptionsPaypalLineItemParams struct {
+ // Type of the line item.
+ Category *string `form:"category"`
+ // Description of the line item.
+ Description *string `form:"description"`
+ // Descriptive name of the line item.
+ Name *string `form:"name"`
+ // Quantity of the line item. Must be a positive number.
+ Quantity *int64 `form:"quantity"`
+ // Client facing stock keeping unit, article number or similar.
+ SKU *string `form:"sku"`
+ // The Stripe account ID of the connected account that sells the item.
+ SoldBy *string `form:"sold_by"`
+ // The tax information for the line item.
+ Tax *PaymentIntentUpdatePaymentMethodOptionsPaypalLineItemTaxParams `form:"tax"`
+ // Price for a single unit of the line item in minor units. Cannot be a negative number.
+ UnitAmount *int64 `form:"unit_amount"`
+}
+
+// If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsPaypalParams struct {
+ // Controls when the funds will be captured from the customer's account.
+ CaptureMethod *string `form:"capture_method"`
+ // The line items purchased by the customer.
+ LineItems []*PaymentIntentUpdatePaymentMethodOptionsPaypalLineItemParams `form:"line_items"`
+ // [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"`
+ // 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.
+ ReferenceID *string `form:"reference_id"`
+ // 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"`
+ // The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
+ Subsellers []*string `form:"subsellers"`
+}
+
+// Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session`
+type PaymentIntentUpdatePaymentMethodOptionsPaytoMandateOptionsParams struct {
+ // Amount that will be collected. It is required when `amount_type` is `fixed`.
+ Amount *int64 `form:"amount"`
+ // The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively.
+ AmountType *string `form:"amount_type"`
+ // Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
+ EndDate *string `form:"end_date"`
+ // The periodicity at which payments will be collected.
+ PaymentSchedule *string `form:"payment_schedule"`
+ // The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.
+ PaymentsPerPeriod *int64 `form:"payments_per_period"`
+ // The purpose for which payments are made. Defaults to retail.
+ Purpose *string `form:"purpose"`
+}
+
+// If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsPaytoParams struct {
+ // Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session`
+ MandateOptions *PaymentIntentUpdatePaymentMethodOptionsPaytoMandateOptionsParams `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).
+ //
+ // 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"`
+}
+
+// If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsPixParams 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"`
+ // The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
+ ExpiresAt *int64 `form:"expires_at"`
+ // 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"`
+}
+
+// If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsPromptPayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsQrisParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsRechnungParams struct{}
+
+// If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsRevolutPayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsSamsungPayParams struct {
+ // Controls when the funds are captured from the customer's account.
+ //
+ // If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
+ //
+ // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
+ CaptureMethod *string `form:"capture_method"`
+}
+
+// Additional fields for Mandate creation
+type PaymentIntentUpdatePaymentMethodOptionsSEPADebitMandateOptionsParams 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"`
+}
+
+// If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsSEPADebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *PaymentIntentUpdatePaymentMethodOptionsSEPADebitMandateOptionsParams `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).
+ //
+ // 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"`
+ // 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"`
+}
+
+// If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsShopeepayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsSofortParams struct {
+ // Language shown to the payer on redirect.
+ PreferredLanguage *string `form:"preferred_language"`
+ // Indicates that you intend to make future payments with this PaymentIntent's payment method.
+ //
+ // 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"`
+}
+
+// If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsStripeBalanceParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsSwishParams struct {
+ // A reference for this payment to be displayed in the Swish app.
+ Reference *string `form:"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).
+ //
+ // 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"`
+}
+
+// If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsTWINTParams 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).
+ //
+ // 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"`
+}
+
+// Provide filters for the linked accounts that the customer can select for the payment method.
+type PaymentIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams struct {
+ // The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ AccountSubcategories []*string `form:"account_subcategories"`
+ // ID of the institution to use to filter for selectable accounts.
+ Institution *string `form:"institution"`
+}
+
+// Customize manual entry behavior
+type PaymentIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsManualEntryParams struct {
+ // Settings for configuring manual entry of account details.
+ Mode *string `form:"mode"`
+}
+
+// Additional fields for Financial Connections Session creation
+type PaymentIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
+ // Provide filters for the linked accounts that the customer can select for the payment method.
+ Filters *PaymentIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams `form:"filters"`
+ // Customize manual entry behavior
+ ManualEntry *PaymentIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsManualEntryParams `form:"manual_entry"`
+ // 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"`
+ // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ ReturnURL *string `form:"return_url"`
+}
+
+// Additional fields for Mandate creation
+type PaymentIntentUpdatePaymentMethodOptionsUSBankAccountMandateOptionsParams struct {
+ // The method used to collect offline mandate customer acceptance.
+ CollectionMethod *string `form:"collection_method"`
+}
+
+// Additional fields for network related functions
+type PaymentIntentUpdatePaymentMethodOptionsUSBankAccountNetworksParams struct {
+ // Triggers validations to run across the selected networks
+ Requested []*string `form:"requested"`
+}
+
+// If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsUSBankAccountParams struct {
+ // Additional fields for Financial Connections Session creation
+ FinancialConnections *PaymentIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
+ // Additional fields for Mandate creation
+ MandateOptions *PaymentIntentUpdatePaymentMethodOptionsUSBankAccountMandateOptionsParams `form:"mandate_options"`
+ // Additional fields for network related functions
+ Networks *PaymentIntentUpdatePaymentMethodOptionsUSBankAccountNetworksParams `form:"networks"`
+ // Preferred transaction settlement speed
+ PreferredSettlementSpeed *string `form:"preferred_settlement_speed"`
+ // 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"`
+ // 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"`
+ // Bank account verification method.
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsWeChatPayParams 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).
+ //
+ // 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"`
+}
+
+// If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+type PaymentIntentUpdatePaymentMethodOptionsZipParams 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).
+ //
+ // 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"`
+}
+
+// Payment-method-specific configuration for this PaymentIntent.
+type PaymentIntentUpdatePaymentMethodOptionsParams struct {
+ // If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options.
+ ACSSDebit *PaymentIntentUpdatePaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
+ // If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options.
+ Affirm *PaymentIntentUpdatePaymentMethodOptionsAffirmParams `form:"affirm"`
+ // If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options.
+ AfterpayClearpay *PaymentIntentUpdatePaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options.
+ Alipay *PaymentIntentUpdatePaymentMethodOptionsAlipayParams `form:"alipay"`
+ // If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options.
+ Alma *PaymentIntentUpdatePaymentMethodOptionsAlmaParams `form:"alma"`
+ // If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options.
+ AmazonPay *PaymentIntentUpdatePaymentMethodOptionsAmazonPayParams `form:"amazon_pay"`
+ // If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options.
+ AUBECSDebit *PaymentIntentUpdatePaymentMethodOptionsAUBECSDebitParams `form:"au_becs_debit"`
+ // If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options.
+ BACSDebit *PaymentIntentUpdatePaymentMethodOptionsBACSDebitParams `form:"bacs_debit"`
+ // If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options.
+ Bancontact *PaymentIntentUpdatePaymentMethodOptionsBancontactParams `form:"bancontact"`
+ // If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options.
+ Billie *PaymentIntentUpdatePaymentMethodOptionsBillieParams `form:"billie"`
+ // If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
+ BLIK *PaymentIntentUpdatePaymentMethodOptionsBLIKParams `form:"blik"`
+ // If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
+ Boleto *PaymentIntentUpdatePaymentMethodOptionsBoletoParams `form:"boleto"`
+ // Configuration for any card payments attempted on this PaymentIntent.
+ Card *PaymentIntentUpdatePaymentMethodOptionsCardParams `form:"card"`
+ // If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ CardPresent *PaymentIntentUpdatePaymentMethodOptionsCardPresentParams `form:"card_present"`
+ // If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
+ CashApp *PaymentIntentUpdatePaymentMethodOptionsCashAppParams `form:"cashapp"`
+ // If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
+ CustomerBalance *PaymentIntentUpdatePaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
+ // If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
+ EPS *PaymentIntentUpdatePaymentMethodOptionsEPSParams `form:"eps"`
+ // If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options.
+ FPX *PaymentIntentUpdatePaymentMethodOptionsFPXParams `form:"fpx"`
+ // If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options.
+ Giropay *PaymentIntentUpdatePaymentMethodOptionsGiropayParams `form:"giropay"`
+ // If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options.
+ Gopay *PaymentIntentUpdatePaymentMethodOptionsGopayParams `form:"gopay"`
+ // If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options.
+ Grabpay *PaymentIntentUpdatePaymentMethodOptionsGrabpayParams `form:"grabpay"`
+ // If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options.
+ IDBankTransfer *PaymentIntentUpdatePaymentMethodOptionsIDBankTransferParams `form:"id_bank_transfer"`
+ // If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options.
+ IDEAL *PaymentIntentUpdatePaymentMethodOptionsIDEALParams `form:"ideal"`
+ // If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options.
+ InteracPresent *PaymentIntentUpdatePaymentMethodOptionsInteracPresentParams `form:"interac_present"`
+ // If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options.
+ KakaoPay *PaymentIntentUpdatePaymentMethodOptionsKakaoPayParams `form:"kakao_pay"`
+ // If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options.
+ Klarna *PaymentIntentUpdatePaymentMethodOptionsKlarnaParams `form:"klarna"`
+ // If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options.
+ Konbini *PaymentIntentUpdatePaymentMethodOptionsKonbiniParams `form:"konbini"`
+ // If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
+ KrCard *PaymentIntentUpdatePaymentMethodOptionsKrCardParams `form:"kr_card"`
+ // If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ Link *PaymentIntentUpdatePaymentMethodOptionsLinkParams `form:"link"`
+ // If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options.
+ MbWay *PaymentIntentUpdatePaymentMethodOptionsMbWayParams `form:"mb_way"`
+ // If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options.
+ Mobilepay *PaymentIntentUpdatePaymentMethodOptionsMobilepayParams `form:"mobilepay"`
+ // If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options.
+ Multibanco *PaymentIntentUpdatePaymentMethodOptionsMultibancoParams `form:"multibanco"`
+ // If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options.
+ NaverPay *PaymentIntentUpdatePaymentMethodOptionsNaverPayParams `form:"naver_pay"`
+ // If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options.
+ NzBankAccount *PaymentIntentUpdatePaymentMethodOptionsNzBankAccountParams `form:"nz_bank_account"`
+ // If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options.
+ OXXO *PaymentIntentUpdatePaymentMethodOptionsOXXOParams `form:"oxxo"`
+ // If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options.
+ P24 *PaymentIntentUpdatePaymentMethodOptionsP24Params `form:"p24"`
+ // If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options.
+ PayByBank *PaymentIntentUpdatePaymentMethodOptionsPayByBankParams `form:"pay_by_bank"`
+ // If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options.
+ Payco *PaymentIntentUpdatePaymentMethodOptionsPaycoParams `form:"payco"`
+ // If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options.
+ PayNow *PaymentIntentUpdatePaymentMethodOptionsPayNowParams `form:"paynow"`
+ // If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ Paypal *PaymentIntentUpdatePaymentMethodOptionsPaypalParams `form:"paypal"`
+ // If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options.
+ Payto *PaymentIntentUpdatePaymentMethodOptionsPaytoParams `form:"payto"`
+ // If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options.
+ Pix *PaymentIntentUpdatePaymentMethodOptionsPixParams `form:"pix"`
+ // If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options.
+ PromptPay *PaymentIntentUpdatePaymentMethodOptionsPromptPayParams `form:"promptpay"`
+ // If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options.
+ Qris *PaymentIntentUpdatePaymentMethodOptionsQrisParams `form:"qris"`
+ // If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options.
+ Rechnung *PaymentIntentUpdatePaymentMethodOptionsRechnungParams `form:"rechnung"`
+ // If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options.
+ RevolutPay *PaymentIntentUpdatePaymentMethodOptionsRevolutPayParams `form:"revolut_pay"`
+ // If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options.
+ SamsungPay *PaymentIntentUpdatePaymentMethodOptionsSamsungPayParams `form:"samsung_pay"`
+ // If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ SEPADebit *PaymentIntentUpdatePaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
+ // If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options.
+ Shopeepay *PaymentIntentUpdatePaymentMethodOptionsShopeepayParams `form:"shopeepay"`
+ // If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
+ Sofort *PaymentIntentUpdatePaymentMethodOptionsSofortParams `form:"sofort"`
+ // If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options.
+ StripeBalance *PaymentIntentUpdatePaymentMethodOptionsStripeBalanceParams `form:"stripe_balance"`
+ // If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options.
+ Swish *PaymentIntentUpdatePaymentMethodOptionsSwishParams `form:"swish"`
+ // If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options.
+ TWINT *PaymentIntentUpdatePaymentMethodOptionsTWINTParams `form:"twint"`
+ // If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options.
+ USBankAccount *PaymentIntentUpdatePaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
+ // If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options.
+ WeChatPay *PaymentIntentUpdatePaymentMethodOptionsWeChatPayParams `form:"wechat_pay"`
+ // If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options.
+ Zip *PaymentIntentUpdatePaymentMethodOptionsZipParams `form:"zip"`
+}
+
+// Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+type PaymentIntentUpdateTransferDataParams struct {
+ // The amount that will be transferred automatically when a charge succeeds.
+ Amount *int64 `form:"amount"`
+}
+
+// Updates properties on a PaymentIntent object without confirming.
+//
+// Depending on which properties you update, you might need to confirm the
+// PaymentIntent again. For example, updating the payment_method
+// always requires you to confirm the PaymentIntent again. If you prefer to
+// update and confirm at the same time, we recommend updating properties through
+// the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) instead.
+type PaymentIntentUpdateParams struct {
+ Params `form:"*"`
+ // Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ Amount *int64 `form:"amount"`
+ // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ ApplicationFeeAmount *int64 `form:"application_fee_amount"`
+ // Automations to be run during the PaymentIntent lifecycle
+ AsyncWorkflows *PaymentIntentUpdateAsyncWorkflowsParams `form:"async_workflows"`
+ // Controls when the funds will be captured from the customer's account.
+ CaptureMethod *string `form:"capture_method"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // ID of the Customer this PaymentIntent belongs to, if one exists.
+ //
+ // Payment methods attached to other Customers cannot be used with this PaymentIntent.
+ //
+ // If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead.
+ Customer *string `form:"customer"`
+ // ID of the Account this PaymentIntent belongs to, if one exists.
+ //
+ // Payment methods attached to other Accounts cannot be used with this PaymentIntent.
+ //
+ // If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead.
+ CustomerAccount *string `form:"customer_account"`
+ // 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"`
+ // This hash contains details about the Mandate to create.
+ MandateData *PaymentIntentUpdateMandateDataParams `form:"mandate_data"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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"`
+ // Provides industry-specific information about the charge.
+ PaymentDetails *PaymentIntentUpdatePaymentDetailsParams `form:"payment_details"`
+ PaymentMethod *string `form:"payment_method"`
+ // The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent.
+ PaymentMethodConfiguration *string `form:"payment_method_configuration"`
+ // If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear
+ // in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method)
+ // property on the PaymentIntent.
+ PaymentMethodData *PaymentIntentUpdatePaymentMethodDataParams `form:"payment_method_data"`
+ // Payment-method-specific configuration for this PaymentIntent.
+ PaymentMethodOptions *PaymentIntentUpdatePaymentMethodOptionsParams `form:"payment_method_options"`
+ // The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+ // 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 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"`
+ // Shipping information for this PaymentIntent.
+ 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"`
+ // Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ TransferData *PaymentIntentUpdateTransferDataParams `form:"transfer_data"`
+ // A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).
+ TransferGroup *string `form:"transfer_group"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentIntentUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentIntentUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type PaymentIntentAmountDetailsTip struct {
// Portion of the amount that corresponds to a tip.
Amount int64 `json:"amount"`
diff --git a/paymentlink.go b/paymentlink.go
index 681ef0a223..7ea15a818f 100644
--- a/paymentlink.go
+++ b/paymentlink.go
@@ -730,6 +730,891 @@ func (p *PaymentLinkListLineItemsParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Configuration when `type=hosted_confirmation`.
+type PaymentLinkCreateAfterCompletionHostedConfirmationParams struct {
+ // A custom message to display to the customer after the purchase is complete.
+ CustomMessage *string `form:"custom_message"`
+}
+
+// Configuration when `type=redirect`.
+type PaymentLinkCreateAfterCompletionRedirectParams struct {
+ // The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included.
+ URL *string `form:"url"`
+}
+
+// Behavior after the purchase is complete.
+type PaymentLinkCreateAfterCompletionParams struct {
+ // Configuration when `type=hosted_confirmation`.
+ HostedConfirmation *PaymentLinkCreateAfterCompletionHostedConfirmationParams `form:"hosted_confirmation"`
+ // Configuration when `type=redirect`.
+ Redirect *PaymentLinkCreateAfterCompletionRedirectParams `form:"redirect"`
+ // The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
+ 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 PaymentLinkCreateAutomaticTaxLiabilityParams 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"`
+}
+
+// Configuration for automatic tax collection.
+type PaymentLinkCreateAutomaticTaxParams struct {
+ // Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ //
+ // Enabling this parameter causes the payment link 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 *PaymentLinkCreateAutomaticTaxLiabilityParams `form:"liability"`
+}
+
+// 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 PaymentLinkCreateConsentCollectionPaymentMethodReuseAgreementParams 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"`
+}
+
+// Configure fields to gather active consent from customers.
+type PaymentLinkCreateConsentCollectionParams 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 *PaymentLinkCreateConsentCollectionPaymentMethodReuseAgreementParams `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"`
+}
+
+// The options available for the customer to select. Up to 200 options allowed.
+type PaymentLinkCreateCustomFieldDropdownOptionParams 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"`
+}
+
+// Configuration for `type=dropdown` fields.
+type PaymentLinkCreateCustomFieldDropdownParams 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 []*PaymentLinkCreateCustomFieldDropdownOptionParams `form:"options"`
+}
+
+// The label for the field, displayed to the customer.
+type PaymentLinkCreateCustomFieldLabelParams 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"`
+}
+
+// Configuration for `type=numeric` fields.
+type PaymentLinkCreateCustomFieldNumericParams 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 PaymentLinkCreateCustomFieldTextParams 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"`
+}
+
+// Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+type PaymentLinkCreateCustomFieldParams struct {
+ // Configuration for `type=dropdown` fields.
+ Dropdown *PaymentLinkCreateCustomFieldDropdownParams `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 *PaymentLinkCreateCustomFieldLabelParams `form:"label"`
+ // Configuration for `type=numeric` fields.
+ Numeric *PaymentLinkCreateCustomFieldNumericParams `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 *PaymentLinkCreateCustomFieldTextParams `form:"text"`
+ // The type of the field.
+ Type *string `form:"type"`
+}
+
+// Custom text that should be displayed after the payment confirmation button.
+type PaymentLinkCreateCustomTextAfterSubmitParams 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 PaymentLinkCreateCustomTextShippingAddressParams 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 PaymentLinkCreateCustomTextSubmitParams 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 PaymentLinkCreateCustomTextTermsOfServiceAcceptanceParams struct {
+ // Text may be up to 1200 characters in length.
+ Message *string `form:"message"`
+}
+
+// Display additional text for your customers using custom text.
+type PaymentLinkCreateCustomTextParams struct {
+ // Custom text that should be displayed after the payment confirmation button.
+ AfterSubmit *PaymentLinkCreateCustomTextAfterSubmitParams `form:"after_submit"`
+ // Custom text that should be displayed alongside shipping address collection.
+ ShippingAddress *PaymentLinkCreateCustomTextShippingAddressParams `form:"shipping_address"`
+ // Custom text that should be displayed alongside the payment confirmation button.
+ Submit *PaymentLinkCreateCustomTextSubmitParams `form:"submit"`
+ // Custom text that should be displayed in place of the default terms of service agreement text.
+ TermsOfServiceAcceptance *PaymentLinkCreateCustomTextTermsOfServiceAcceptanceParams `form:"terms_of_service_acceptance"`
+}
+
+// Default custom fields to be displayed on invoices for this customer.
+type PaymentLinkCreateInvoiceCreationInvoiceDataCustomFieldParams 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 connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type PaymentLinkCreateInvoiceCreationInvoiceDataIssuerParams 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"`
+}
+
+// Default options for invoice PDF rendering for this customer.
+type PaymentLinkCreateInvoiceCreationInvoiceDataRenderingOptionsParams 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"`
+}
+
+// Invoice PDF configuration.
+type PaymentLinkCreateInvoiceCreationInvoiceDataParams 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 []*PaymentLinkCreateInvoiceCreationInvoiceDataCustomFieldParams `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 *PaymentLinkCreateInvoiceCreationInvoiceDataIssuerParams `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 *PaymentLinkCreateInvoiceCreationInvoiceDataRenderingOptionsParams `form:"rendering_options"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentLinkCreateInvoiceCreationInvoiceDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Generate a post-purchase Invoice for one-time payments.
+type PaymentLinkCreateInvoiceCreationParams struct {
+ // Whether the feature is enabled
+ Enabled *bool `form:"enabled"`
+ // Invoice PDF configuration.
+ InvoiceData *PaymentLinkCreateInvoiceCreationInvoiceDataParams `form:"invoice_data"`
+}
+
+// When set, provides configuration for this item's quantity to be adjusted by the customer during checkout.
+type PaymentLinkCreateLineItemAdjustableQuantityParams struct {
+ // Set to true if the quantity can be adjusted to any non-negative Integer.
+ Enabled *bool `form:"enabled"`
+ // The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999.
+ Maximum *int64 `form:"maximum"`
+ // The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0.
+ Minimum *int64 `form:"minimum"`
+}
+
+// The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+type PaymentLinkCreateLineItemParams struct {
+ // When set, provides configuration for this item's quantity to be adjusted by the customer during checkout.
+ AdjustableQuantity *PaymentLinkCreateLineItemAdjustableQuantityParams `form:"adjustable_quantity"`
+ // The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ Price *string `form:"price"`
+ // The quantity of the line item being purchased.
+ Quantity *int64 `form:"quantity"`
+}
+
+// When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order.
+type PaymentLinkCreateOptionalItemAdjustableQuantityParams struct {
+ // Set to true if the quantity can be adjusted to any non-negative integer.
+ Enabled *bool `form:"enabled"`
+ // The maximum quantity of this item the customer can purchase. By default this value is 99.
+ Maximum *int64 `form:"maximum"`
+ // The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0.
+ Minimum *int64 `form:"minimum"`
+}
+
+// A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
+// There is a maximum of 10 optional items allowed on a payment link, and the existing limits on the number of line items allowed on a payment link apply to the combined number of line items and optional items.
+// There is a maximum of 20 combined line items and optional items.
+type PaymentLinkCreateOptionalItemParams struct {
+ // When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order.
+ AdjustableQuantity *PaymentLinkCreateOptionalItemAdjustableQuantityParams `form:"adjustable_quantity"`
+ // The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
+ Price *string `form:"price"`
+ // The initial quantity of the line item created when a customer chooses to add this optional item to their order.
+ Quantity *int64 `form:"quantity"`
+}
+
+// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+type PaymentLinkCreatePaymentIntentDataParams struct {
+ // 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 will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ Metadata map[string]string `form:"metadata"`
+ // 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"`
+ // 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"`
+ // 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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentLinkCreatePaymentIntentDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Controls phone number collection settings during checkout.
+//
+// We recommend that you review your privacy policy and check with your legal contacts.
+type PaymentLinkCreatePhoneNumberCollectionParams struct {
+ // Set to `true` to enable phone number collection.
+ Enabled *bool `form:"enabled"`
+}
+
+// Configuration for the `completed_sessions` restriction type.
+type PaymentLinkCreateRestrictionsCompletedSessionsParams struct {
+ // The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ Limit *int64 `form:"limit"`
+}
+
+// Settings that restrict the usage of a payment link.
+type PaymentLinkCreateRestrictionsParams struct {
+ // Configuration for the `completed_sessions` restriction type.
+ CompletedSessions *PaymentLinkCreateRestrictionsCompletedSessionsParams `form:"completed_sessions"`
+}
+
+// Configuration for collecting the customer's shipping address.
+type PaymentLinkCreateShippingAddressCollectionParams 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"`
+}
+
+// The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
+type PaymentLinkCreateShippingOptionParams struct {
+ // The ID of the Shipping Rate to use for this shipping option.
+ ShippingRate *string `form:"shipping_rate"`
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type PaymentLinkCreateSubscriptionDataInvoiceSettingsIssuerParams 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"`
+}
+
+// All invoices will be billed using the specified settings.
+type PaymentLinkCreateSubscriptionDataInvoiceSettingsParams struct {
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *PaymentLinkCreateSubscriptionDataInvoiceSettingsIssuerParams `form:"issuer"`
+}
+
+// Defines how the subscription should behave when the user's free trial ends.
+type PaymentLinkCreateSubscriptionDataTrialSettingsEndBehaviorParams 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"`
+}
+
+// Settings related to subscription trials.
+type PaymentLinkCreateSubscriptionDataTrialSettingsParams struct {
+ // Defines how the subscription should behave when the user's free trial ends.
+ EndBehavior *PaymentLinkCreateSubscriptionDataTrialSettingsEndBehaviorParams `form:"end_behavior"`
+}
+
+// When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
+type PaymentLinkCreateSubscriptionDataParams struct {
+ // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ Description *string `form:"description"`
+ // All invoices will be billed using the specified settings.
+ InvoiceSettings *PaymentLinkCreateSubscriptionDataInvoiceSettingsParams `form:"invoice_settings"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ Metadata map[string]string `form:"metadata"`
+ // 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 *PaymentLinkCreateSubscriptionDataTrialSettingsParams `form:"trial_settings"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentLinkCreateSubscriptionDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Controls tax ID collection during checkout.
+type PaymentLinkCreateTaxIDCollectionParams 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"`
+}
+
+// The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
+type PaymentLinkCreateTransferDataParams 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"`
+}
+
+// Creates a payment link.
+type PaymentLinkCreateParams struct {
+ Params `form:"*"`
+ // Behavior after the purchase is complete.
+ AfterCompletion *PaymentLinkCreateAfterCompletionParams `form:"after_completion"`
+ // Enables user redeemable promotion codes.
+ AllowPromotionCodes *bool `form:"allow_promotion_codes"`
+ // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices.
+ ApplicationFeeAmount *int64 `form:"application_fee_amount"`
+ // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
+ ApplicationFeePercent *float64 `form:"application_fee_percent"`
+ // Configuration for automatic tax collection.
+ AutomaticTax *PaymentLinkCreateAutomaticTaxParams `form:"automatic_tax"`
+ // Configuration for collecting the customer's billing address. Defaults to `auto`.
+ BillingAddressCollection *string `form:"billing_address_collection"`
+ // Configure fields to gather active consent from customers.
+ ConsentCollection *PaymentLinkCreateConsentCollectionParams `form:"consent_collection"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price.
+ Currency *string `form:"currency"`
+ // Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).
+ CustomerCreation *string `form:"customer_creation"`
+ // Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ CustomFields []*PaymentLinkCreateCustomFieldParams `form:"custom_fields"`
+ // Display additional text for your customers using custom text.
+ CustomText *PaymentLinkCreateCustomTextParams `form:"custom_text"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The custom message to be displayed to a customer when a payment link is no longer active.
+ InactiveMessage *string `form:"inactive_message"`
+ // Generate a post-purchase Invoice for one-time payments.
+ InvoiceCreation *PaymentLinkCreateInvoiceCreationParams `form:"invoice_creation"`
+ // The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+ LineItems []*PaymentLinkCreateLineItemParams `form:"line_items"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
+ Metadata map[string]string `form:"metadata"`
+ // The account on behalf of which to charge.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
+ // There is a maximum of 10 optional items allowed on a payment link, and the existing limits on the number of line items allowed on a payment link apply to the combined number of line items and optional items.
+ // There is a maximum of 20 combined line items and optional items.
+ OptionalItems []*PaymentLinkCreateOptionalItemParams `form:"optional_items"`
+ // A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ PaymentIntentData *PaymentLinkCreatePaymentIntentDataParams `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 list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)).
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+ // Controls phone number collection settings during checkout.
+ //
+ // We recommend that you review your privacy policy and check with your legal contacts.
+ PhoneNumberCollection *PaymentLinkCreatePhoneNumberCollectionParams `form:"phone_number_collection"`
+ // Settings that restrict the usage of a payment link.
+ Restrictions *PaymentLinkCreateRestrictionsParams `form:"restrictions"`
+ // Configuration for collecting the customer's shipping address.
+ ShippingAddressCollection *PaymentLinkCreateShippingAddressCollectionParams `form:"shipping_address_collection"`
+ // The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
+ ShippingOptions []*PaymentLinkCreateShippingOptionParams `form:"shipping_options"`
+ // Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`).
+ SubmitType *string `form:"submit_type"`
+ // When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
+ SubscriptionData *PaymentLinkCreateSubscriptionDataParams `form:"subscription_data"`
+ // Controls tax ID collection during checkout.
+ TaxIDCollection *PaymentLinkCreateTaxIDCollectionParams `form:"tax_id_collection"`
+ // The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
+ TransferData *PaymentLinkCreateTransferDataParams `form:"transfer_data"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentLinkCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentLinkCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieve a payment link.
+type PaymentLinkRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentLinkRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Configuration when `type=hosted_confirmation`.
+type PaymentLinkUpdateAfterCompletionHostedConfirmationParams struct {
+ // A custom message to display to the customer after the purchase is complete.
+ CustomMessage *string `form:"custom_message"`
+}
+
+// Configuration when `type=redirect`.
+type PaymentLinkUpdateAfterCompletionRedirectParams struct {
+ // The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included.
+ URL *string `form:"url"`
+}
+
+// Behavior after the purchase is complete.
+type PaymentLinkUpdateAfterCompletionParams struct {
+ // Configuration when `type=hosted_confirmation`.
+ HostedConfirmation *PaymentLinkUpdateAfterCompletionHostedConfirmationParams `form:"hosted_confirmation"`
+ // Configuration when `type=redirect`.
+ Redirect *PaymentLinkUpdateAfterCompletionRedirectParams `form:"redirect"`
+ // The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`.
+ 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 PaymentLinkUpdateAutomaticTaxLiabilityParams 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"`
+}
+
+// Configuration for automatic tax collection.
+type PaymentLinkUpdateAutomaticTaxParams struct {
+ // Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
+ //
+ // Enabling this parameter causes the payment link 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 *PaymentLinkUpdateAutomaticTaxLiabilityParams `form:"liability"`
+}
+
+// The options available for the customer to select. Up to 200 options allowed.
+type PaymentLinkUpdateCustomFieldDropdownOptionParams 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"`
+}
+
+// Configuration for `type=dropdown` fields.
+type PaymentLinkUpdateCustomFieldDropdownParams 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 []*PaymentLinkUpdateCustomFieldDropdownOptionParams `form:"options"`
+}
+
+// The label for the field, displayed to the customer.
+type PaymentLinkUpdateCustomFieldLabelParams 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"`
+}
+
+// Configuration for `type=numeric` fields.
+type PaymentLinkUpdateCustomFieldNumericParams 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 PaymentLinkUpdateCustomFieldTextParams 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"`
+}
+
+// Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+type PaymentLinkUpdateCustomFieldParams struct {
+ // Configuration for `type=dropdown` fields.
+ Dropdown *PaymentLinkUpdateCustomFieldDropdownParams `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 *PaymentLinkUpdateCustomFieldLabelParams `form:"label"`
+ // Configuration for `type=numeric` fields.
+ Numeric *PaymentLinkUpdateCustomFieldNumericParams `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 *PaymentLinkUpdateCustomFieldTextParams `form:"text"`
+ // The type of the field.
+ Type *string `form:"type"`
+}
+
+// Custom text that should be displayed after the payment confirmation button.
+type PaymentLinkUpdateCustomTextAfterSubmitParams 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 PaymentLinkUpdateCustomTextShippingAddressParams 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 PaymentLinkUpdateCustomTextSubmitParams 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 PaymentLinkUpdateCustomTextTermsOfServiceAcceptanceParams struct {
+ // Text may be up to 1200 characters in length.
+ Message *string `form:"message"`
+}
+
+// Display additional text for your customers using custom text.
+type PaymentLinkUpdateCustomTextParams struct {
+ // Custom text that should be displayed after the payment confirmation button.
+ AfterSubmit *PaymentLinkUpdateCustomTextAfterSubmitParams `form:"after_submit"`
+ // Custom text that should be displayed alongside shipping address collection.
+ ShippingAddress *PaymentLinkUpdateCustomTextShippingAddressParams `form:"shipping_address"`
+ // Custom text that should be displayed alongside the payment confirmation button.
+ Submit *PaymentLinkUpdateCustomTextSubmitParams `form:"submit"`
+ // Custom text that should be displayed in place of the default terms of service agreement text.
+ TermsOfServiceAcceptance *PaymentLinkUpdateCustomTextTermsOfServiceAcceptanceParams `form:"terms_of_service_acceptance"`
+}
+
+// Default custom fields to be displayed on invoices for this customer.
+type PaymentLinkUpdateInvoiceCreationInvoiceDataCustomFieldParams 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 connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type PaymentLinkUpdateInvoiceCreationInvoiceDataIssuerParams 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"`
+}
+
+// Default options for invoice PDF rendering for this customer.
+type PaymentLinkUpdateInvoiceCreationInvoiceDataRenderingOptionsParams 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"`
+}
+
+// Invoice PDF configuration.
+type PaymentLinkUpdateInvoiceCreationInvoiceDataParams 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 []*PaymentLinkUpdateInvoiceCreationInvoiceDataCustomFieldParams `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 *PaymentLinkUpdateInvoiceCreationInvoiceDataIssuerParams `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 *PaymentLinkUpdateInvoiceCreationInvoiceDataRenderingOptionsParams `form:"rendering_options"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentLinkUpdateInvoiceCreationInvoiceDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Generate a post-purchase Invoice for one-time payments.
+type PaymentLinkUpdateInvoiceCreationParams struct {
+ // Whether the feature is enabled
+ Enabled *bool `form:"enabled"`
+ // Invoice PDF configuration.
+ InvoiceData *PaymentLinkUpdateInvoiceCreationInvoiceDataParams `form:"invoice_data"`
+}
+
+// When set, provides configuration for this item's quantity to be adjusted by the customer during checkout.
+type PaymentLinkUpdateLineItemAdjustableQuantityParams struct {
+ // Set to true if the quantity can be adjusted to any non-negative Integer.
+ Enabled *bool `form:"enabled"`
+ // The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999.
+ Maximum *int64 `form:"maximum"`
+ // The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0.
+ Minimum *int64 `form:"minimum"`
+}
+
+// The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+type PaymentLinkUpdateLineItemParams struct {
+ // When set, provides configuration for this item's quantity to be adjusted by the customer during checkout.
+ AdjustableQuantity *PaymentLinkUpdateLineItemAdjustableQuantityParams `form:"adjustable_quantity"`
+ // The ID of an existing line item on the payment link.
+ ID *string `form:"id"`
+ // The quantity of the line item being purchased.
+ Quantity *int64 `form:"quantity"`
+}
+
+// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+type PaymentLinkUpdatePaymentIntentDataParams 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 will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ Metadata map[string]string `form:"metadata"`
+ // 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"`
+ // 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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentLinkUpdatePaymentIntentDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Controls phone number collection settings during checkout.
+//
+// We recommend that you review your privacy policy and check with your legal contacts.
+type PaymentLinkUpdatePhoneNumberCollectionParams struct {
+ // Set to `true` to enable phone number collection.
+ Enabled *bool `form:"enabled"`
+}
+
+// Configuration for the `completed_sessions` restriction type.
+type PaymentLinkUpdateRestrictionsCompletedSessionsParams struct {
+ // The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
+ Limit *int64 `form:"limit"`
+}
+
+// Settings that restrict the usage of a payment link.
+type PaymentLinkUpdateRestrictionsParams struct {
+ // Configuration for the `completed_sessions` restriction type.
+ CompletedSessions *PaymentLinkUpdateRestrictionsCompletedSessionsParams `form:"completed_sessions"`
+}
+
+// Configuration for collecting the customer's shipping address.
+type PaymentLinkUpdateShippingAddressCollectionParams 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"`
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type PaymentLinkUpdateSubscriptionDataInvoiceSettingsIssuerParams 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"`
+}
+
+// All invoices will be billed using the specified settings.
+type PaymentLinkUpdateSubscriptionDataInvoiceSettingsParams struct {
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *PaymentLinkUpdateSubscriptionDataInvoiceSettingsIssuerParams `form:"issuer"`
+}
+
+// Defines how the subscription should behave when the user's free trial ends.
+type PaymentLinkUpdateSubscriptionDataTrialSettingsEndBehaviorParams 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"`
+}
+
+// Settings related to subscription trials.
+type PaymentLinkUpdateSubscriptionDataTrialSettingsParams struct {
+ // Defines how the subscription should behave when the user's free trial ends.
+ EndBehavior *PaymentLinkUpdateSubscriptionDataTrialSettingsEndBehaviorParams `form:"end_behavior"`
+}
+
+// When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
+type PaymentLinkUpdateSubscriptionDataParams struct {
+ // All invoices will be billed using the specified settings.
+ InvoiceSettings *PaymentLinkUpdateSubscriptionDataInvoiceSettingsParams `form:"invoice_settings"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ Metadata map[string]string `form:"metadata"`
+ // 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 *PaymentLinkUpdateSubscriptionDataTrialSettingsParams `form:"trial_settings"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentLinkUpdateSubscriptionDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Controls tax ID collection during checkout.
+type PaymentLinkUpdateTaxIDCollectionParams 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"`
+}
+
+// Updates a payment link.
+type PaymentLinkUpdateParams struct {
+ Params `form:"*"`
+ // Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
+ Active *bool `form:"active"`
+ // Behavior after the purchase is complete.
+ AfterCompletion *PaymentLinkUpdateAfterCompletionParams `form:"after_completion"`
+ // Enables user redeemable promotion codes.
+ AllowPromotionCodes *bool `form:"allow_promotion_codes"`
+ // Configuration for automatic tax collection.
+ AutomaticTax *PaymentLinkUpdateAutomaticTaxParams `form:"automatic_tax"`
+ // Configuration for collecting the customer's billing address. Defaults to `auto`.
+ BillingAddressCollection *string `form:"billing_address_collection"`
+ // Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).
+ CustomerCreation *string `form:"customer_creation"`
+ // Collect additional information from your customer using custom fields. Up to 3 fields are supported.
+ CustomFields []*PaymentLinkUpdateCustomFieldParams `form:"custom_fields"`
+ // Display additional text for your customers using custom text.
+ CustomText *PaymentLinkUpdateCustomTextParams `form:"custom_text"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The custom message to be displayed to a customer when a payment link is no longer active.
+ InactiveMessage *string `form:"inactive_message"`
+ // Generate a post-purchase Invoice for one-time payments.
+ InvoiceCreation *PaymentLinkUpdateInvoiceCreationParams `form:"invoice_creation"`
+ // The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
+ LineItems []*PaymentLinkUpdateLineItemParams `form:"line_items"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
+ Metadata map[string]string `form:"metadata"`
+ // A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
+ PaymentIntentData *PaymentLinkUpdatePaymentIntentDataParams `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 list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+ // Controls phone number collection settings during checkout.
+ //
+ // We recommend that you review your privacy policy and check with your legal contacts.
+ PhoneNumberCollection *PaymentLinkUpdatePhoneNumberCollectionParams `form:"phone_number_collection"`
+ // Settings that restrict the usage of a payment link.
+ Restrictions *PaymentLinkUpdateRestrictionsParams `form:"restrictions"`
+ // Configuration for collecting the customer's shipping address.
+ ShippingAddressCollection *PaymentLinkUpdateShippingAddressCollectionParams `form:"shipping_address_collection"`
+ // Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`).
+ SubmitType *string `form:"submit_type"`
+ // When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`.
+ SubscriptionData *PaymentLinkUpdateSubscriptionDataParams `form:"subscription_data"`
+ // Controls tax ID collection during checkout.
+ TaxIDCollection *PaymentLinkUpdateTaxIDCollectionParams `form:"tax_id_collection"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentLinkUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentLinkUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type PaymentLinkAfterCompletionHostedConfirmation struct {
// The custom message that is displayed to the customer after the purchase is complete.
CustomMessage string `json:"custom_message"`
diff --git a/paymentmethod.go b/paymentmethod.go
index 2a5de30251..849d913084 100644
--- a/paymentmethod.go
+++ b/paymentmethod.go
@@ -917,6 +917,568 @@ func (p *PaymentMethodDetachParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+type PaymentMethodCreateACSSDebitParams struct {
+ // Customer's bank account number.
+ AccountNumber *string `form:"account_number"`
+ // Institution number of the customer's bank.
+ InstitutionNumber *string `form:"institution_number"`
+ // Transit number of the customer's bank.
+ TransitNumber *string `form:"transit_number"`
+}
+
+// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+type PaymentMethodCreateAffirmParams struct{}
+
+// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+type PaymentMethodCreateAfterpayClearpayParams struct{}
+
+// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+type PaymentMethodCreateAlipayParams struct{}
+
+// If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+type PaymentMethodCreateAlmaParams struct{}
+
+// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+type PaymentMethodCreateAmazonPayParams struct{}
+
+// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+type PaymentMethodCreateAUBECSDebitParams struct {
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Bank-State-Branch number of the bank account.
+ BSBNumber *string `form:"bsb_number"`
+}
+
+// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+type PaymentMethodCreateBACSDebitParams struct {
+ // Account number of the bank account that the funds will be debited from.
+ AccountNumber *string `form:"account_number"`
+ // Sort code of the bank account. (e.g., `10-20-30`)
+ SortCode *string `form:"sort_code"`
+}
+
+// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+type PaymentMethodCreateBancontactParams struct{}
+
+// If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
+type PaymentMethodCreateBillieParams struct{}
+
+// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+type PaymentMethodCreateBillingDetailsParams struct {
+ // Billing address.
+ Address *AddressParams `form:"address"`
+ // Email address.
+ Email *string `form:"email"`
+ // Full name.
+ Name *string `form:"name"`
+ // Billing phone number (including extension).
+ Phone *string `form:"phone"`
+}
+
+// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+type PaymentMethodCreateBLIKParams struct{}
+
+// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+type PaymentMethodCreateBoletoParams struct {
+ // The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ TaxID *string `form:"tax_id"`
+}
+
+// Contains information about card networks used to process the payment.
+type PaymentMethodCreateCardNetworksParams struct {
+ // The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ Preferred *string `form:"preferred"`
+}
+
+// If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
+type PaymentMethodCreateCardParams struct {
+ // The card's CVC. It is highly recommended to always include this value.
+ CVC *string `form:"cvc"`
+ // Two-digit number representing the card's expiration month.
+ ExpMonth *int64 `form:"exp_month"`
+ // Four-digit number representing the card's expiration year.
+ ExpYear *int64 `form:"exp_year"`
+ // Contains information about card networks used to process the payment.
+ Networks *PaymentMethodCreateCardNetworksParams `form:"networks"`
+ // The card number, as a string without any separators.
+ Number *string `form:"number"`
+ // For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}.
+ Token *string `form:"token"`
+}
+
+// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+type PaymentMethodCreateCashAppParams struct{}
+
+// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+type PaymentMethodCreateCustomerBalanceParams struct{}
+
+// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+type PaymentMethodCreateEPSParams struct {
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+type PaymentMethodCreateFPXParams struct {
+ // Account holder type for FPX transaction
+ AccountHolderType *string `form:"account_holder_type"`
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+type PaymentMethodCreateGiropayParams struct{}
+
+// If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method.
+type PaymentMethodCreateGopayParams struct{}
+
+// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+type PaymentMethodCreateGrabpayParams struct{}
+
+// If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method.
+type PaymentMethodCreateIDBankTransferParams struct {
+ // Bank where the account is held.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+type PaymentMethodCreateIDEALParams struct {
+ // The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+type PaymentMethodCreateInteracPresentParams struct{}
+
+// If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+type PaymentMethodCreateKakaoPayParams struct{}
+
+// Customer's date of birth
+type PaymentMethodCreateKlarnaDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+type PaymentMethodCreateKlarnaParams struct {
+ // Customer's date of birth
+ DOB *PaymentMethodCreateKlarnaDOBParams `form:"dob"`
+}
+
+// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+type PaymentMethodCreateKonbiniParams struct{}
+
+// If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+type PaymentMethodCreateKrCardParams struct{}
+
+// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+type PaymentMethodCreateLinkParams struct{}
+
+// If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
+type PaymentMethodCreateMbWayParams struct{}
+
+// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+type PaymentMethodCreateMobilepayParams struct{}
+
+// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+type PaymentMethodCreateMultibancoParams struct{}
+
+// If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+type PaymentMethodCreateNaverPayParams struct {
+ // Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ Funding *string `form:"funding"`
+}
+
+// If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+type PaymentMethodCreateNzBankAccountParams struct {
+ // The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details.
+ AccountHolderName *string `form:"account_holder_name"`
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // The numeric code for the bank account's bank.
+ BankCode *string `form:"bank_code"`
+ // The numeric code for the bank account's bank branch.
+ BranchCode *string `form:"branch_code"`
+ Reference *string `form:"reference"`
+ // The suffix of the bank account number.
+ Suffix *string `form:"suffix"`
+}
+
+// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+type PaymentMethodCreateOXXOParams struct{}
+
+// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+type PaymentMethodCreateP24Params struct {
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+type PaymentMethodCreatePayByBankParams struct{}
+
+// If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+type PaymentMethodCreatePaycoParams struct{}
+
+// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+type PaymentMethodCreatePayNowParams struct{}
+
+// If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+type PaymentMethodCreatePaypalParams struct{}
+
+// If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+type PaymentMethodCreatePaytoParams struct {
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Bank-State-Branch number of the bank account.
+ BSBNumber *string `form:"bsb_number"`
+ // The PayID alias for the bank account.
+ PayID *string `form:"pay_id"`
+}
+
+// If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+type PaymentMethodCreatePixParams struct{}
+
+// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+type PaymentMethodCreatePromptPayParams struct{}
+
+// If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method.
+type PaymentMethodCreateQrisParams struct{}
+
+// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+type PaymentMethodCreateRadarOptionsParams 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"`
+}
+
+// Customer's date of birth
+type PaymentMethodCreateRechnungDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
+type PaymentMethodCreateRechnungParams struct {
+ // Customer's date of birth
+ DOB *PaymentMethodCreateRechnungDOBParams `form:"dob"`
+}
+
+// If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+type PaymentMethodCreateRevolutPayParams struct{}
+
+// If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+type PaymentMethodCreateSamsungPayParams struct{}
+
+// If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
+type PaymentMethodCreateSatispayParams struct{}
+
+// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+type PaymentMethodCreateSEPADebitParams struct {
+ // IBAN of the bank account.
+ IBAN *string `form:"iban"`
+}
+
+// If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method.
+type PaymentMethodCreateShopeepayParams struct{}
+
+// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+type PaymentMethodCreateSofortParams struct {
+ // Two-letter ISO code representing the country the bank account is located in.
+ Country *string `form:"country"`
+}
+
+// This hash contains details about the Stripe balance payment method.
+type PaymentMethodCreateStripeBalanceParams struct {
+ // The connected account ID whose Stripe balance to use as the source of payment
+ Account *string `form:"account"`
+ // The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance
+ SourceType *string `form:"source_type"`
+}
+
+// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+type PaymentMethodCreateSwishParams struct{}
+
+// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+type PaymentMethodCreateTWINTParams struct{}
+
+// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+type PaymentMethodCreateUSBankAccountParams struct {
+ // Account holder type: individual or company.
+ AccountHolderType *string `form:"account_holder_type"`
+ // Account number of the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Account type: checkings or savings. Defaults to checking if omitted.
+ AccountType *string `form:"account_type"`
+ // The ID of a Financial Connections Account to use as a payment method.
+ FinancialConnectionsAccount *string `form:"financial_connections_account"`
+ // Routing number of the bank account.
+ RoutingNumber *string `form:"routing_number"`
+}
+
+// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+type PaymentMethodCreateWeChatPayParams struct{}
+
+// If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+type PaymentMethodCreateZipParams struct{}
+
+// Creates a PaymentMethod object. Read the [Stripe.js reference](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.
+//
+// Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the SetupIntent](https://stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.
+type PaymentMethodCreateParams struct {
+ Params `form:"*"`
+ // If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ ACSSDebit *PaymentMethodCreateACSSDebitParams `form:"acss_debit"`
+ // If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ Affirm *PaymentMethodCreateAffirmParams `form:"affirm"`
+ // If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ AfterpayClearpay *PaymentMethodCreateAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ Alipay *PaymentMethodCreateAlipayParams `form:"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 *string `form:"allow_redisplay"`
+ // If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ Alma *PaymentMethodCreateAlmaParams `form:"alma"`
+ // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ AmazonPay *PaymentMethodCreateAmazonPayParams `form:"amazon_pay"`
+ // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ AUBECSDebit *PaymentMethodCreateAUBECSDebitParams `form:"au_becs_debit"`
+ // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ BACSDebit *PaymentMethodCreateBACSDebitParams `form:"bacs_debit"`
+ // If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ Bancontact *PaymentMethodCreateBancontactParams `form:"bancontact"`
+ // If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
+ Billie *PaymentMethodCreateBillieParams `form:"billie"`
+ // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ BillingDetails *PaymentMethodCreateBillingDetailsParams `form:"billing_details"`
+ // If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ BLIK *PaymentMethodCreateBLIKParams `form:"blik"`
+ // If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ Boleto *PaymentMethodCreateBoletoParams `form:"boleto"`
+ // If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
+ Card *PaymentMethodCreateCardParams `form:"card"`
+ // If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ CashApp *PaymentMethodCreateCashAppParams `form:"cashapp"`
+ // The `Customer` to whom the original PaymentMethod is attached.
+ Customer *string `form:"customer"`
+ // If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ CustomerBalance *PaymentMethodCreateCustomerBalanceParams `form:"customer_balance"`
+ // If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ EPS *PaymentMethodCreateEPSParams `form:"eps"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ FPX *PaymentMethodCreateFPXParams `form:"fpx"`
+ // If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ Giropay *PaymentMethodCreateGiropayParams `form:"giropay"`
+ // If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method.
+ Gopay *PaymentMethodCreateGopayParams `form:"gopay"`
+ // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ Grabpay *PaymentMethodCreateGrabpayParams `form:"grabpay"`
+ // If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method.
+ IDBankTransfer *PaymentMethodCreateIDBankTransferParams `form:"id_bank_transfer"`
+ // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ IDEAL *PaymentMethodCreateIDEALParams `form:"ideal"`
+ // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ InteracPresent *PaymentMethodCreateInteracPresentParams `form:"interac_present"`
+ // If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ KakaoPay *PaymentMethodCreateKakaoPayParams `form:"kakao_pay"`
+ // If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ Klarna *PaymentMethodCreateKlarnaParams `form:"klarna"`
+ // If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ Konbini *PaymentMethodCreateKonbiniParams `form:"konbini"`
+ // If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ KrCard *PaymentMethodCreateKrCardParams `form:"kr_card"`
+ // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ Link *PaymentMethodCreateLinkParams `form:"link"`
+ // If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
+ MbWay *PaymentMethodCreateMbWayParams `form:"mb_way"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ Mobilepay *PaymentMethodCreateMobilepayParams `form:"mobilepay"`
+ // If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ Multibanco *PaymentMethodCreateMultibancoParams `form:"multibanco"`
+ // If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ NaverPay *PaymentMethodCreateNaverPayParams `form:"naver_pay"`
+ // If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ NzBankAccount *PaymentMethodCreateNzBankAccountParams `form:"nz_bank_account"`
+ // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ OXXO *PaymentMethodCreateOXXOParams `form:"oxxo"`
+ // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ P24 *PaymentMethodCreateP24Params `form:"p24"`
+ // If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ PayByBank *PaymentMethodCreatePayByBankParams `form:"pay_by_bank"`
+ // If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ Payco *PaymentMethodCreatePaycoParams `form:"payco"`
+ // The PaymentMethod to share.
+ PaymentMethod *string `form:"payment_method"`
+ // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ PayNow *PaymentMethodCreatePayNowParams `form:"paynow"`
+ // If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ Paypal *PaymentMethodCreatePaypalParams `form:"paypal"`
+ // If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+ Payto *PaymentMethodCreatePaytoParams `form:"payto"`
+ // If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ Pix *PaymentMethodCreatePixParams `form:"pix"`
+ // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ PromptPay *PaymentMethodCreatePromptPayParams `form:"promptpay"`
+ // If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method.
+ Qris *PaymentMethodCreateQrisParams `form:"qris"`
+ // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ RadarOptions *PaymentMethodCreateRadarOptionsParams `form:"radar_options"`
+ // If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
+ Rechnung *PaymentMethodCreateRechnungParams `form:"rechnung"`
+ // If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ RevolutPay *PaymentMethodCreateRevolutPayParams `form:"revolut_pay"`
+ // If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ SamsungPay *PaymentMethodCreateSamsungPayParams `form:"samsung_pay"`
+ // If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
+ Satispay *PaymentMethodCreateSatispayParams `form:"satispay"`
+ // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ SEPADebit *PaymentMethodCreateSEPADebitParams `form:"sepa_debit"`
+ // If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method.
+ Shopeepay *PaymentMethodCreateShopeepayParams `form:"shopeepay"`
+ // If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ Sofort *PaymentMethodCreateSofortParams `form:"sofort"`
+ // This hash contains details about the Stripe balance payment method.
+ StripeBalance *PaymentMethodCreateStripeBalanceParams `form:"stripe_balance"`
+ // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ Swish *PaymentMethodCreateSwishParams `form:"swish"`
+ // If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ TWINT *PaymentMethodCreateTWINTParams `form:"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 *string `form:"type"`
+ // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ USBankAccount *PaymentMethodCreateUSBankAccountParams `form:"us_bank_account"`
+ // If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ WeChatPay *PaymentMethodCreateWeChatPayParams `form:"wechat_pay"`
+ // If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ Zip *PaymentMethodCreateZipParams `form:"zip"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentMethodCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentMethodCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer)
+type PaymentMethodRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentMethodRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+type PaymentMethodUpdateBillingDetailsParams struct {
+ // Billing address.
+ Address *AddressParams `form:"address"`
+ // Email address.
+ Email *string `form:"email"`
+ // Full name.
+ Name *string `form:"name"`
+ // Billing phone number (including extension).
+ Phone *string `form:"phone"`
+}
+
+// Contains information about card networks used to process the payment.
+type PaymentMethodUpdateCardNetworksParams struct {
+ // The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card.
+ Preferred *string `form:"preferred"`
+}
+
+// If this is a `card` PaymentMethod, this hash contains the user's card details.
+type PaymentMethodUpdateCardParams struct {
+ // Two-digit number representing the card's expiration month.
+ ExpMonth *int64 `form:"exp_month"`
+ // Four-digit number representing the card's expiration year.
+ ExpYear *int64 `form:"exp_year"`
+ // Contains information about card networks used to process the payment.
+ Networks *PaymentMethodUpdateCardNetworksParams `form:"networks"`
+}
+
+// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+type PaymentMethodUpdateLinkParams struct{}
+
+// If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+type PaymentMethodUpdatePayByBankParams struct{}
+
+// If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+type PaymentMethodUpdatePaytoParams struct {
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Bank-State-Branch number of the bank account.
+ BSBNumber *string `form:"bsb_number"`
+ // The PayID alias for the bank account.
+ PayID *string `form:"pay_id"`
+}
+
+// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+type PaymentMethodUpdateUSBankAccountParams struct {
+ // Bank account holder type.
+ AccountHolderType *string `form:"account_holder_type"`
+ // Bank account type.
+ AccountType *string `form:"account_type"`
+}
+
+// Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
+type PaymentMethodUpdateParams struct {
+ Params `form:"*"`
+ // 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"`
+ // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ BillingDetails *PaymentMethodUpdateBillingDetailsParams `form:"billing_details"`
+ // If this is a `card` PaymentMethod, this hash contains the user's card details.
+ Card *PaymentMethodUpdateCardParams `form:"card"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ Link *PaymentMethodUpdateLinkParams `form:"link"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ PayByBank *PaymentMethodUpdatePayByBankParams `form:"pay_by_bank"`
+ // If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+ Payto *PaymentMethodUpdatePaytoParams `form:"payto"`
+ // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ USBankAccount *PaymentMethodUpdateUSBankAccountParams `form:"us_bank_account"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentMethodUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentMethodUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type PaymentMethodACSSDebit struct {
// Name of the bank associated with the bank account.
BankName string `json:"bank_name"`
diff --git a/paymentmethodconfiguration.go b/paymentmethodconfiguration.go
index 013e6b67b0..47aca97727 100644
--- a/paymentmethodconfiguration.go
+++ b/paymentmethodconfiguration.go
@@ -1702,6 +1702,1478 @@ func (p *PaymentMethodConfigurationParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateACSSDebitDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+type PaymentMethodConfigurationCreateACSSDebitParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateACSSDebitDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateAffirmDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+type PaymentMethodConfigurationCreateAffirmParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateAffirmDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateAfterpayClearpayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+type PaymentMethodConfigurationCreateAfterpayClearpayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateAfterpayClearpayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateAlipayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+type PaymentMethodConfigurationCreateAlipayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateAlipayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateAlmaDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+type PaymentMethodConfigurationCreateAlmaParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateAlmaDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateAmazonPayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+type PaymentMethodConfigurationCreateAmazonPayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateAmazonPayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateApplePayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+type PaymentMethodConfigurationCreateApplePayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateApplePayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateApplePayLaterDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+type PaymentMethodConfigurationCreateApplePayLaterParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateApplePayLaterDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateAUBECSDebitDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+type PaymentMethodConfigurationCreateAUBECSDebitParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateAUBECSDebitDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateBACSDebitDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+type PaymentMethodConfigurationCreateBACSDebitParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateBACSDebitDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateBancontactDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+type PaymentMethodConfigurationCreateBancontactParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateBancontactDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateBillieDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](https://stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+type PaymentMethodConfigurationCreateBillieParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateBillieDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateBLIKDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+type PaymentMethodConfigurationCreateBLIKParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateBLIKDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateBoletoDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+type PaymentMethodConfigurationCreateBoletoParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateBoletoDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateCardDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+type PaymentMethodConfigurationCreateCardParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateCardDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateCartesBancairesDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+type PaymentMethodConfigurationCreateCartesBancairesParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateCartesBancairesDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateCashAppDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+type PaymentMethodConfigurationCreateCashAppParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateCashAppDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateCustomerBalanceDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Uses a customer's [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+type PaymentMethodConfigurationCreateCustomerBalanceParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateCustomerBalanceDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateEPSDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+type PaymentMethodConfigurationCreateEPSParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateEPSDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateFPXDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+type PaymentMethodConfigurationCreateFPXParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateFPXDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateGiropayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+type PaymentMethodConfigurationCreateGiropayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateGiropayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateGooglePayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+type PaymentMethodConfigurationCreateGooglePayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateGooglePayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateGopayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment.
+type PaymentMethodConfigurationCreateGopayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateGopayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateGrabpayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+type PaymentMethodConfigurationCreateGrabpayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateGrabpayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateIDBankTransferDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia.
+type PaymentMethodConfigurationCreateIDBankTransferParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateIDBankTransferDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateIDEALDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+type PaymentMethodConfigurationCreateIDEALParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateIDEALDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateJCBDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+type PaymentMethodConfigurationCreateJCBParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateJCBDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateKlarnaDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+type PaymentMethodConfigurationCreateKlarnaParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateKlarnaDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateKonbiniDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+type PaymentMethodConfigurationCreateKonbiniParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateKonbiniDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateLinkDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+type PaymentMethodConfigurationCreateLinkParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateLinkDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateMobilepayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+type PaymentMethodConfigurationCreateMobilepayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateMobilepayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateMultibancoDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+type PaymentMethodConfigurationCreateMultibancoParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateMultibancoDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateNzBankAccountDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+type PaymentMethodConfigurationCreateNzBankAccountParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateNzBankAccountDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateOXXODisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+type PaymentMethodConfigurationCreateOXXOParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateOXXODisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateP24DisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+type PaymentMethodConfigurationCreateP24Params struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateP24DisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreatePayByBankDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+type PaymentMethodConfigurationCreatePayByBankParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreatePayByBankDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreatePayNowDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+type PaymentMethodConfigurationCreatePayNowParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreatePayNowDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreatePaypalDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+type PaymentMethodConfigurationCreatePaypalParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreatePaypalDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreatePaytoDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details.
+type PaymentMethodConfigurationCreatePaytoParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreatePaytoDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreatePromptPayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+type PaymentMethodConfigurationCreatePromptPayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreatePromptPayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateQrisDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app.
+type PaymentMethodConfigurationCreateQrisParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateQrisDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateRevolutPayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+type PaymentMethodConfigurationCreateRevolutPayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateRevolutPayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateSatispayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](https://stripe.com/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](https://stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+type PaymentMethodConfigurationCreateSatispayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateSatispayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateSEPADebitDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+type PaymentMethodConfigurationCreateSEPADebitParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateSEPADebitDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateShopeepayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment.
+type PaymentMethodConfigurationCreateShopeepayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateShopeepayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateSofortDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+type PaymentMethodConfigurationCreateSofortParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateSofortDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateSwishDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+type PaymentMethodConfigurationCreateSwishParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateSwishDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateTWINTDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+type PaymentMethodConfigurationCreateTWINTParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateTWINTDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateUSBankAccountDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+type PaymentMethodConfigurationCreateUSBankAccountParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateUSBankAccountDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateWeChatPayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+type PaymentMethodConfigurationCreateWeChatPayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateWeChatPayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationCreateZipDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+type PaymentMethodConfigurationCreateZipParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationCreateZipDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Creates a payment method configuration
+type PaymentMethodConfigurationCreateParams struct {
+ Params `form:"*"`
+ // Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+ ACSSDebit *PaymentMethodConfigurationCreateACSSDebitParams `form:"acss_debit"`
+ // [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+ Affirm *PaymentMethodConfigurationCreateAffirmParams `form:"affirm"`
+ // Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+ AfterpayClearpay *PaymentMethodConfigurationCreateAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+ Alipay *PaymentMethodConfigurationCreateAlipayParams `form:"alipay"`
+ // Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+ Alma *PaymentMethodConfigurationCreateAlmaParams `form:"alma"`
+ // Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+ AmazonPay *PaymentMethodConfigurationCreateAmazonPayParams `form:"amazon_pay"`
+ // Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+ ApplePay *PaymentMethodConfigurationCreateApplePayParams `form:"apple_pay"`
+ // Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+ ApplePayLater *PaymentMethodConfigurationCreateApplePayLaterParams `form:"apple_pay_later"`
+ // Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+ AUBECSDebit *PaymentMethodConfigurationCreateAUBECSDebitParams `form:"au_becs_debit"`
+ // Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+ BACSDebit *PaymentMethodConfigurationCreateBACSDebitParams `form:"bacs_debit"`
+ // Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+ Bancontact *PaymentMethodConfigurationCreateBancontactParams `form:"bancontact"`
+ // Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](https://stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ Billie *PaymentMethodConfigurationCreateBillieParams `form:"billie"`
+ // BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+ BLIK *PaymentMethodConfigurationCreateBLIKParams `form:"blik"`
+ // Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+ Boleto *PaymentMethodConfigurationCreateBoletoParams `form:"boleto"`
+ // Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+ Card *PaymentMethodConfigurationCreateCardParams `form:"card"`
+ // Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+ CartesBancaires *PaymentMethodConfigurationCreateCartesBancairesParams `form:"cartes_bancaires"`
+ // Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+ CashApp *PaymentMethodConfigurationCreateCashAppParams `form:"cashapp"`
+ // Uses a customer's [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+ CustomerBalance *PaymentMethodConfigurationCreateCustomerBalanceParams `form:"customer_balance"`
+ // EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+ EPS *PaymentMethodConfigurationCreateEPSParams `form:"eps"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+ FPX *PaymentMethodConfigurationCreateFPXParams `form:"fpx"`
+ // giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+ Giropay *PaymentMethodConfigurationCreateGiropayParams `form:"giropay"`
+ // Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+ GooglePay *PaymentMethodConfigurationCreateGooglePayParams `form:"google_pay"`
+ // GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment.
+ Gopay *PaymentMethodConfigurationCreateGopayParams `form:"gopay"`
+ // GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+ Grabpay *PaymentMethodConfigurationCreateGrabpayParams `form:"grabpay"`
+ // Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia.
+ IDBankTransfer *PaymentMethodConfigurationCreateIDBankTransferParams `form:"id_bank_transfer"`
+ // iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+ IDEAL *PaymentMethodConfigurationCreateIDEALParams `form:"ideal"`
+ // JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+ JCB *PaymentMethodConfigurationCreateJCBParams `form:"jcb"`
+ // Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+ Klarna *PaymentMethodConfigurationCreateKlarnaParams `form:"klarna"`
+ // Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+ Konbini *PaymentMethodConfigurationCreateKonbiniParams `form:"konbini"`
+ // [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+ Link *PaymentMethodConfigurationCreateLinkParams `form:"link"`
+ // MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ Mobilepay *PaymentMethodConfigurationCreateMobilepayParams `form:"mobilepay"`
+ // Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+ Multibanco *PaymentMethodConfigurationCreateMultibancoParams `form:"multibanco"`
+ // Configuration name.
+ Name *string `form:"name"`
+ // Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+ NzBankAccount *PaymentMethodConfigurationCreateNzBankAccountParams `form:"nz_bank_account"`
+ // OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+ OXXO *PaymentMethodConfigurationCreateOXXOParams `form:"oxxo"`
+ // Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+ P24 *PaymentMethodConfigurationCreateP24Params `form:"p24"`
+ // Configuration's parent configuration. Specify to create a child configuration.
+ Parent *string `form:"parent"`
+ // Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+ PayByBank *PaymentMethodConfigurationCreatePayByBankParams `form:"pay_by_bank"`
+ // PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+ PayNow *PaymentMethodConfigurationCreatePayNowParams `form:"paynow"`
+ // PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+ Paypal *PaymentMethodConfigurationCreatePaypalParams `form:"paypal"`
+ // PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details.
+ Payto *PaymentMethodConfigurationCreatePaytoParams `form:"payto"`
+ // PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+ PromptPay *PaymentMethodConfigurationCreatePromptPayParams `form:"promptpay"`
+ // QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app.
+ Qris *PaymentMethodConfigurationCreateQrisParams `form:"qris"`
+ // Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+ RevolutPay *PaymentMethodConfigurationCreateRevolutPayParams `form:"revolut_pay"`
+ // Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](https://stripe.com/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](https://stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ Satispay *PaymentMethodConfigurationCreateSatispayParams `form:"satispay"`
+ // The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+ SEPADebit *PaymentMethodConfigurationCreateSEPADebitParams `form:"sepa_debit"`
+ // ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment.
+ Shopeepay *PaymentMethodConfigurationCreateShopeepayParams `form:"shopeepay"`
+ // Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+ Sofort *PaymentMethodConfigurationCreateSofortParams `form:"sofort"`
+ // Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+ Swish *PaymentMethodConfigurationCreateSwishParams `form:"swish"`
+ // Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+ TWINT *PaymentMethodConfigurationCreateTWINTParams `form:"twint"`
+ // Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+ USBankAccount *PaymentMethodConfigurationCreateUSBankAccountParams `form:"us_bank_account"`
+ // WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+ WeChatPay *PaymentMethodConfigurationCreateWeChatPayParams `form:"wechat_pay"`
+ // Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+ Zip *PaymentMethodConfigurationCreateZipParams `form:"zip"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentMethodConfigurationCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Retrieve payment method configuration
+type PaymentMethodConfigurationRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentMethodConfigurationRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateACSSDebitDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+type PaymentMethodConfigurationUpdateACSSDebitParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateACSSDebitDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateAffirmDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+type PaymentMethodConfigurationUpdateAffirmParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateAffirmDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateAfterpayClearpayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+type PaymentMethodConfigurationUpdateAfterpayClearpayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateAfterpayClearpayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateAlipayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+type PaymentMethodConfigurationUpdateAlipayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateAlipayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateAlmaDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+type PaymentMethodConfigurationUpdateAlmaParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateAlmaDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateAmazonPayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+type PaymentMethodConfigurationUpdateAmazonPayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateAmazonPayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateApplePayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+type PaymentMethodConfigurationUpdateApplePayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateApplePayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateApplePayLaterDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+type PaymentMethodConfigurationUpdateApplePayLaterParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateApplePayLaterDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateAUBECSDebitDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+type PaymentMethodConfigurationUpdateAUBECSDebitParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateAUBECSDebitDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateBACSDebitDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+type PaymentMethodConfigurationUpdateBACSDebitParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateBACSDebitDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateBancontactDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+type PaymentMethodConfigurationUpdateBancontactParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateBancontactDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateBillieDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](https://stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+type PaymentMethodConfigurationUpdateBillieParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateBillieDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateBLIKDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+type PaymentMethodConfigurationUpdateBLIKParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateBLIKDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateBoletoDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+type PaymentMethodConfigurationUpdateBoletoParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateBoletoDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateCardDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+type PaymentMethodConfigurationUpdateCardParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateCardDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateCartesBancairesDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+type PaymentMethodConfigurationUpdateCartesBancairesParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateCartesBancairesDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateCashAppDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+type PaymentMethodConfigurationUpdateCashAppParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateCashAppDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateCustomerBalanceDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Uses a customer's [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+type PaymentMethodConfigurationUpdateCustomerBalanceParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateCustomerBalanceDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateEPSDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+type PaymentMethodConfigurationUpdateEPSParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateEPSDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateFPXDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+type PaymentMethodConfigurationUpdateFPXParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateFPXDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateGiropayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+type PaymentMethodConfigurationUpdateGiropayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateGiropayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateGooglePayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+type PaymentMethodConfigurationUpdateGooglePayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateGooglePayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateGopayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment.
+type PaymentMethodConfigurationUpdateGopayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateGopayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateGrabpayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+type PaymentMethodConfigurationUpdateGrabpayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateGrabpayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateIDBankTransferDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia.
+type PaymentMethodConfigurationUpdateIDBankTransferParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateIDBankTransferDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateIDEALDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+type PaymentMethodConfigurationUpdateIDEALParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateIDEALDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateJCBDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+type PaymentMethodConfigurationUpdateJCBParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateJCBDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateKlarnaDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+type PaymentMethodConfigurationUpdateKlarnaParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateKlarnaDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateKonbiniDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+type PaymentMethodConfigurationUpdateKonbiniParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateKonbiniDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateLinkDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+type PaymentMethodConfigurationUpdateLinkParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateLinkDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateMobilepayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+type PaymentMethodConfigurationUpdateMobilepayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateMobilepayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateMultibancoDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+type PaymentMethodConfigurationUpdateMultibancoParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateMultibancoDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateNzBankAccountDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+type PaymentMethodConfigurationUpdateNzBankAccountParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateNzBankAccountDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateOXXODisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+type PaymentMethodConfigurationUpdateOXXOParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateOXXODisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateP24DisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+type PaymentMethodConfigurationUpdateP24Params struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateP24DisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdatePayByBankDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+type PaymentMethodConfigurationUpdatePayByBankParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdatePayByBankDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdatePayNowDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+type PaymentMethodConfigurationUpdatePayNowParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdatePayNowDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdatePaypalDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+type PaymentMethodConfigurationUpdatePaypalParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdatePaypalDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdatePaytoDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details.
+type PaymentMethodConfigurationUpdatePaytoParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdatePaytoDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdatePromptPayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+type PaymentMethodConfigurationUpdatePromptPayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdatePromptPayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateQrisDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app.
+type PaymentMethodConfigurationUpdateQrisParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateQrisDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateRevolutPayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+type PaymentMethodConfigurationUpdateRevolutPayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateRevolutPayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateSatispayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](https://stripe.com/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](https://stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+type PaymentMethodConfigurationUpdateSatispayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateSatispayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateSEPADebitDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+type PaymentMethodConfigurationUpdateSEPADebitParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateSEPADebitDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateShopeepayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment.
+type PaymentMethodConfigurationUpdateShopeepayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateShopeepayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateSofortDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+type PaymentMethodConfigurationUpdateSofortParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateSofortDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateSwishDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+type PaymentMethodConfigurationUpdateSwishParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateSwishDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateTWINTDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+type PaymentMethodConfigurationUpdateTWINTParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateTWINTDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateUSBankAccountDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+type PaymentMethodConfigurationUpdateUSBankAccountParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateUSBankAccountDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateWeChatPayDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+type PaymentMethodConfigurationUpdateWeChatPayParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateWeChatPayDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Whether or not the payment method should be displayed.
+type PaymentMethodConfigurationUpdateZipDisplayPreferenceParams struct {
+ // The account's preference for whether or not to display this payment method.
+ Preference *string `form:"preference"`
+}
+
+// Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+type PaymentMethodConfigurationUpdateZipParams struct {
+ // Whether or not the payment method should be displayed.
+ DisplayPreference *PaymentMethodConfigurationUpdateZipDisplayPreferenceParams `form:"display_preference"`
+}
+
+// Update payment method configuration
+type PaymentMethodConfigurationUpdateParams struct {
+ Params `form:"*"`
+ // Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability.
+ ACSSDebit *PaymentMethodConfigurationUpdateACSSDebitParams `form:"acss_debit"`
+ // Whether the configuration can be used for new payments.
+ Active *bool `form:"active"`
+ // [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability.
+ Affirm *PaymentMethodConfigurationUpdateAffirmParams `form:"affirm"`
+ // Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products.
+ AfterpayClearpay *PaymentMethodConfigurationUpdateAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details.
+ Alipay *PaymentMethodConfigurationUpdateAlipayParams `form:"alipay"`
+ // Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments.
+ Alma *PaymentMethodConfigurationUpdateAlmaParams `form:"alma"`
+ // Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon.
+ AmazonPay *PaymentMethodConfigurationUpdateAmazonPayParams `form:"amazon_pay"`
+ // Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details.
+ ApplePay *PaymentMethodConfigurationUpdateApplePayParams `form:"apple_pay"`
+ // Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks.
+ ApplePayLater *PaymentMethodConfigurationUpdateApplePayLaterParams `form:"apple_pay_later"`
+ // Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details.
+ AUBECSDebit *PaymentMethodConfigurationUpdateAUBECSDebitParams `form:"au_becs_debit"`
+ // Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details.
+ BACSDebit *PaymentMethodConfigurationUpdateBACSDebitParams `form:"bacs_debit"`
+ // Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details.
+ Bancontact *PaymentMethodConfigurationUpdateBancontactParams `form:"bancontact"`
+ // Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](https://stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ Billie *PaymentMethodConfigurationUpdateBillieParams `form:"billie"`
+ // BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details.
+ BLIK *PaymentMethodConfigurationUpdateBLIKParams `form:"blik"`
+ // Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details.
+ Boleto *PaymentMethodConfigurationUpdateBoletoParams `form:"boleto"`
+ // Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks.
+ Card *PaymentMethodConfigurationUpdateCardParams `form:"card"`
+ // Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details.
+ CartesBancaires *PaymentMethodConfigurationUpdateCartesBancairesParams `form:"cartes_bancaires"`
+ // Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details.
+ CashApp *PaymentMethodConfigurationUpdateCashAppParams `form:"cashapp"`
+ // Uses a customer's [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details.
+ CustomerBalance *PaymentMethodConfigurationUpdateCustomerBalanceParams `form:"customer_balance"`
+ // EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details.
+ EPS *PaymentMethodConfigurationUpdateEPSParams `form:"eps"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details.
+ FPX *PaymentMethodConfigurationUpdateFPXParams `form:"fpx"`
+ // giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details.
+ Giropay *PaymentMethodConfigurationUpdateGiropayParams `form:"giropay"`
+ // Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details.
+ GooglePay *PaymentMethodConfigurationUpdateGooglePayParams `form:"google_pay"`
+ // GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment.
+ Gopay *PaymentMethodConfigurationUpdateGopayParams `form:"gopay"`
+ // GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details.
+ Grabpay *PaymentMethodConfigurationUpdateGrabpayParams `form:"grabpay"`
+ // Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia.
+ IDBankTransfer *PaymentMethodConfigurationUpdateIDBankTransferParams `form:"id_bank_transfer"`
+ // iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details.
+ IDEAL *PaymentMethodConfigurationUpdateIDEALParams `form:"ideal"`
+ // JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details.
+ JCB *PaymentMethodConfigurationUpdateJCBParams `form:"jcb"`
+ // Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details.
+ Klarna *PaymentMethodConfigurationUpdateKlarnaParams `form:"klarna"`
+ // Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details.
+ Konbini *PaymentMethodConfigurationUpdateKonbiniParams `form:"konbini"`
+ // [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
+ Link *PaymentMethodConfigurationUpdateLinkParams `form:"link"`
+ // MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ Mobilepay *PaymentMethodConfigurationUpdateMobilepayParams `form:"mobilepay"`
+ // Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method.
+ Multibanco *PaymentMethodConfigurationUpdateMultibancoParams `form:"multibanco"`
+ // Configuration name.
+ Name *string `form:"name"`
+ // Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details.
+ NzBankAccount *PaymentMethodConfigurationUpdateNzBankAccountParams `form:"nz_bank_account"`
+ // OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details.
+ OXXO *PaymentMethodConfigurationUpdateOXXOParams `form:"oxxo"`
+ // Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details.
+ P24 *PaymentMethodConfigurationUpdateP24Params `form:"p24"`
+ // Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments.
+ PayByBank *PaymentMethodConfigurationUpdatePayByBankParams `form:"pay_by_bank"`
+ // PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details.
+ PayNow *PaymentMethodConfigurationUpdatePayNowParams `form:"paynow"`
+ // PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details.
+ Paypal *PaymentMethodConfigurationUpdatePaypalParams `form:"paypal"`
+ // PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details.
+ Payto *PaymentMethodConfigurationUpdatePaytoParams `form:"payto"`
+ // PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details.
+ PromptPay *PaymentMethodConfigurationUpdatePromptPayParams `form:"promptpay"`
+ // QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app.
+ Qris *PaymentMethodConfigurationUpdateQrisParams `form:"qris"`
+ // Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase.
+ RevolutPay *PaymentMethodConfigurationUpdateRevolutPayParams `form:"revolut_pay"`
+ // Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](https://stripe.com/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](https://stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
+ Satispay *PaymentMethodConfigurationUpdateSatispayParams `form:"satispay"`
+ // The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details.
+ SEPADebit *PaymentMethodConfigurationUpdateSEPADebitParams `form:"sepa_debit"`
+ // ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment.
+ Shopeepay *PaymentMethodConfigurationUpdateShopeepayParams `form:"shopeepay"`
+ // Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details.
+ Sofort *PaymentMethodConfigurationUpdateSofortParams `form:"sofort"`
+ // Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details.
+ Swish *PaymentMethodConfigurationUpdateSwishParams `form:"swish"`
+ // Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details.
+ TWINT *PaymentMethodConfigurationUpdateTWINTParams `form:"twint"`
+ // Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details.
+ USBankAccount *PaymentMethodConfigurationUpdateUSBankAccountParams `form:"us_bank_account"`
+ // WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details.
+ WeChatPay *PaymentMethodConfigurationUpdateWeChatPayParams `form:"wechat_pay"`
+ // Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability.
+ Zip *PaymentMethodConfigurationUpdateZipParams `form:"zip"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentMethodConfigurationUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type PaymentMethodConfigurationACSSDebitDisplayPreference struct {
// For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
Overridable bool `json:"overridable"`
diff --git a/paymentmethoddomain.go b/paymentmethoddomain.go
index b038532670..878ca22bb6 100644
--- a/paymentmethoddomain.go
+++ b/paymentmethoddomain.go
@@ -109,6 +109,48 @@ func (p *PaymentMethodDomainValidateParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Creates a payment method domain.
+type PaymentMethodDomainCreateParams struct {
+ Params `form:"*"`
+ // The domain name that this payment method domain object represents.
+ DomainName *string `form:"domain_name"`
+ // Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout.
+ Enabled *bool `form:"enabled"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentMethodDomainCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Retrieves the details of an existing payment method domain.
+type PaymentMethodDomainRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentMethodDomainRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates an existing payment method domain.
+type PaymentMethodDomainUpdateParams struct {
+ Params `form:"*"`
+ // Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout.
+ Enabled *bool `form:"enabled"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentMethodDomainUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Contains additional details about the status of a payment method for a specific payment method domain.
type PaymentMethodDomainAmazonPayStatusDetails struct {
// The error message associated with the status of the payment method on the domain.
diff --git a/paymentrecord.go b/paymentrecord.go
index 19faa1656c..fc00faa0f8 100644
--- a/paymentrecord.go
+++ b/paymentrecord.go
@@ -795,6 +795,18 @@ func (p *PaymentRecordReportPaymentParams) AddMetadata(key string, value string)
p.Metadata[key] = value
}
+// Retrieves a Payment Record with the given ID
+type PaymentRecordRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentRecordRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// A representation of an amount of money, consisting of an amount and a currency.
type PaymentRecordAmountCanceled 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).
diff --git a/paymentsource.go b/paymentsource.go
index b0982712c4..c458e4801a 100644
--- a/paymentsource.go
+++ b/paymentsource.go
@@ -156,6 +156,121 @@ func (p *PaymentSourceVerifyParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// When you create a new credit card, you must specify a customer or recipient on which to create it.
+//
+// If the card's owner has no default card, then the new card will become the default.
+// However, if the owner already has a default, then it will not change.
+// To change the default, you should [update the customer](https://stripe.com/docs/api#update_customer) to have a new default_source.
+type PaymentSourceCreateParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+ // 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"`
+ // Please refer to full [documentation](https://stripe.com/docs/api) instead.
+ Source *string `form:"source"`
+ Validate *bool `form:"validate"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentSourceCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentSourceCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieve a specified source for a given customer.
+type PaymentSourceRetrieveParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentSourceRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+type PaymentSourceUpdateOwnerParams 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"`
+}
+
+// Update a specified source for a given customer.
+type PaymentSourceUpdateParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+ // The name of the person or business that owns the bank account.
+ AccountHolderName *string `form:"account_holder_name"`
+ // The type of entity that holds the account. This can be either `individual` or `company`.
+ AccountHolderType *string `form:"account_holder_type"`
+ // City/District/Suburb/Town/Village.
+ AddressCity *string `form:"address_city"`
+ // Billing address country, if provided when creating card.
+ AddressCountry *string `form:"address_country"`
+ // Address line 1 (Street address/PO Box/Company name).
+ AddressLine1 *string `form:"address_line1"`
+ // Address line 2 (Apartment/Suite/Unit/Building).
+ AddressLine2 *string `form:"address_line2"`
+ // State/County/Province/Region.
+ AddressState *string `form:"address_state"`
+ // ZIP or postal code.
+ AddressZip *string `form:"address_zip"`
+ // 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"`
+ Owner *PaymentSourceUpdateOwnerParams `form:"owner"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentSourceUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PaymentSourceUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Delete a specified source for a given customer.
+type PaymentSourceDeleteParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PaymentSourceDeleteParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type PaymentSource struct {
APIResource
BankAccount *BankAccount `json:"-"`
diff --git a/payout.go b/payout.go
index c59e198435..cdbd83f326 100644
--- a/payout.go
+++ b/payout.go
@@ -180,6 +180,84 @@ func (p *PayoutReverseParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://stripe.com/docs/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error.
+//
+// If your API key is in test mode, money won't actually be sent, though every other action occurs as if you're in live mode.
+//
+// If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type.
+type PayoutCreateParams struct {
+ Params `form:"*"`
+ // A positive integer in cents representing how much to payout.
+ Amount *int64 `form:"amount"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency.
+ Destination *string `form:"destination"`
+ // 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"`
+ // The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks).
+ Method *string `form:"method"`
+ // The ID of a v2 FinancialAccount to send funds to.
+ PayoutMethod *string `form:"payout_method"`
+ // The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`.
+ SourceType *string `form:"source_type"`
+ // A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all.
+ StatementDescriptor *string `form:"statement_descriptor"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PayoutCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PayoutCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information.
+type PayoutRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PayoutRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates the specified payout by setting the values of the parameters you pass. We don't change parameters that you don't provide. This request only accepts the metadata as arguments.
+type PayoutUpdateParams struct {
+ Params `form:"*"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PayoutUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PayoutUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar.
type PayoutTraceID struct {
// Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`.
diff --git a/person.go b/person.go
index e900ed8572..f8cbf4cdfe 100644
--- a/person.go
+++ b/person.go
@@ -301,6 +301,445 @@ func (p *PersonListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Deletes an existing person's relationship to the account's legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file.
+type PersonDeleteParams struct {
+ Params `form:"*"`
+ Account *string `form:"-"` // Included in URL
+}
+
+// Retrieves an existing person.
+type PersonRetrieveParams struct {
+ Params `form:"*"`
+ Account *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PersonRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Details on the legal guardian's acceptance of the main Stripe service agreement.
+type PersonUpdateAdditionalTOSAcceptancesAccountParams 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 legal guardian's or authorizer's acceptance of the required Stripe agreements.
+type PersonUpdateAdditionalTOSAcceptancesParams struct {
+ // Details on the legal guardian's acceptance of the main Stripe service agreement.
+ Account *PersonUpdateAdditionalTOSAcceptancesAccountParams `form:"account"`
+}
+
+// The Kana variation of the person's address (Japan only).
+type PersonUpdateAddressKanaParams struct {
+ // City or ward.
+ City *string `form:"city"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country"`
+ // Block or building number.
+ Line1 *string `form:"line1"`
+ // Building details.
+ Line2 *string `form:"line2"`
+ // Postal code.
+ PostalCode *string `form:"postal_code"`
+ // Prefecture.
+ State *string `form:"state"`
+ // Town or cho-me.
+ Town *string `form:"town"`
+}
+
+// The Kanji variation of the person's address (Japan only).
+type PersonUpdateAddressKanjiParams 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 person's date of birth.
+type PersonUpdateDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// One or more documents that demonstrate proof that this person is authorized to represent the company.
+type PersonUpdateDocumentsCompanyAuthorizationParams struct {
+ // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ Files []*string `form:"files"`
+}
+
+// One or more documents showing the person's passport page with photo and personal data.
+type PersonUpdateDocumentsPassportParams struct {
+ // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ Files []*string `form:"files"`
+}
+
+// One or more documents showing the person's visa required for living in the country where they are residing.
+type PersonUpdateDocumentsVisaParams 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"`
+}
+
+// Documents that may be submitted to satisfy various informational requests.
+type PersonUpdateDocumentsParams struct {
+ // One or more documents that demonstrate proof that this person is authorized to represent the company.
+ CompanyAuthorization *PersonUpdateDocumentsCompanyAuthorizationParams `form:"company_authorization"`
+ // One or more documents showing the person's passport page with photo and personal data.
+ Passport *PersonUpdateDocumentsPassportParams `form:"passport"`
+ // One or more documents showing the person's visa required for living in the country where they are residing.
+ Visa *PersonUpdateDocumentsVisaParams `form:"visa"`
+}
+
+// The relationship that this person has with the account's legal entity.
+type PersonUpdateRelationshipParams struct {
+ // Whether the person is the authorizer of the account's representative.
+ Authorizer *bool `form:"authorizer"`
+ // Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ Director *bool `form:"director"`
+ // Whether the person has significant responsibility to control, manage, or direct the organization.
+ Executive *bool `form:"executive"`
+ // Whether the person is the legal guardian of the account's representative.
+ LegalGuardian *bool `form:"legal_guardian"`
+ // Whether the person is an owner of the account's legal entity.
+ Owner *bool `form:"owner"`
+ // The percent owned by the person of the account's legal entity.
+ PercentOwnership *float64 `form:"percent_ownership"`
+ // Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ Representative *bool `form:"representative"`
+ // The person's title (e.g., CEO, Support Engineer).
+ Title *string `form:"title"`
+}
+
+// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+type PersonUpdateVerificationAdditionalDocumentParams struct {
+ // The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back"`
+ // The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front"`
+}
+
+// An identifying document, either a passport or local ID card.
+type PersonUpdateVerificationDocumentParams struct {
+ // The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back"`
+ // The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front"`
+}
+
+// The person's verification status.
+type PersonUpdateVerificationParams struct {
+ // A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ AdditionalDocument *PersonUpdateVerificationAdditionalDocumentParams `form:"additional_document"`
+ // An identifying document, either a passport or local ID card.
+ Document *PersonUpdateVerificationDocumentParams `form:"document"`
+}
+
+// Updates an existing person.
+type PersonUpdateParams struct {
+ Params `form:"*"`
+ Account *string `form:"-"` // Included in URL
+ // Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ AdditionalTOSAcceptances *PersonUpdateAdditionalTOSAcceptancesParams `form:"additional_tos_acceptances"`
+ // The person's address.
+ Address *AddressParams `form:"address"`
+ // The Kana variation of the person's address (Japan only).
+ AddressKana *PersonUpdateAddressKanaParams `form:"address_kana"`
+ // The Kanji variation of the person's address (Japan only).
+ AddressKanji *PersonUpdateAddressKanjiParams `form:"address_kanji"`
+ // The person's date of birth.
+ DOB *PersonUpdateDOBParams `form:"dob"`
+ // Documents that may be submitted to satisfy various informational requests.
+ Documents *PersonUpdateDocumentsParams `form:"documents"`
+ // The person's email address.
+ Email *string `form:"email"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The person's first name.
+ FirstName *string `form:"first_name"`
+ // The Kana variation of the person's first name (Japan only).
+ FirstNameKana *string `form:"first_name_kana"`
+ // The Kanji variation of the person's first name (Japan only).
+ FirstNameKanji *string `form:"first_name_kanji"`
+ // A list of alternate names or aliases that the person is known by.
+ FullNameAliases []*string `form:"full_name_aliases"`
+ // The person's gender (International regulations require either "male" or "female").
+ Gender *string `form:"gender"`
+ // The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ IDNumber *string `form:"id_number"`
+ // The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ IDNumberSecondary *string `form:"id_number_secondary"`
+ // The person's last name.
+ LastName *string `form:"last_name"`
+ // The Kana variation of the person's last name (Japan only).
+ LastNameKana *string `form:"last_name_kana"`
+ // The Kanji variation of the person's last name (Japan only).
+ LastNameKanji *string `form:"last_name_kanji"`
+ // The person's maiden name.
+ MaidenName *string `form:"maiden_name"`
+ // 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 country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
+ Nationality *string `form:"nationality"`
+ // A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person.
+ PersonToken *string `form:"person_token"`
+ // The person's phone number.
+ Phone *string `form:"phone"`
+ // Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ PoliticalExposure *string `form:"political_exposure"`
+ // The person's registered address.
+ RegisteredAddress *AddressParams `form:"registered_address"`
+ // The relationship that this person has with the account's legal entity.
+ Relationship *PersonUpdateRelationshipParams `form:"relationship"`
+ // The last four digits of the person's Social Security number (U.S. only).
+ SSNLast4 *string `form:"ssn_last_4"`
+ // The person's verification status.
+ Verification *PersonUpdateVerificationParams `form:"verification"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PersonUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PersonUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Details on the legal guardian's acceptance of the main Stripe service agreement.
+type PersonCreateAdditionalTOSAcceptancesAccountParams 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 legal guardian's or authorizer's acceptance of the required Stripe agreements.
+type PersonCreateAdditionalTOSAcceptancesParams struct {
+ // Details on the legal guardian's acceptance of the main Stripe service agreement.
+ Account *PersonCreateAdditionalTOSAcceptancesAccountParams `form:"account"`
+}
+
+// The Kana variation of the person's address (Japan only).
+type PersonCreateAddressKanaParams struct {
+ // City or ward.
+ City *string `form:"city"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country"`
+ // Block or building number.
+ Line1 *string `form:"line1"`
+ // Building details.
+ Line2 *string `form:"line2"`
+ // Postal code.
+ PostalCode *string `form:"postal_code"`
+ // Prefecture.
+ State *string `form:"state"`
+ // Town or cho-me.
+ Town *string `form:"town"`
+}
+
+// The Kanji variation of the person's address (Japan only).
+type PersonCreateAddressKanjiParams 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 person's date of birth.
+type PersonCreateDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// One or more documents that demonstrate proof that this person is authorized to represent the company.
+type PersonCreateDocumentsCompanyAuthorizationParams struct {
+ // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ Files []*string `form:"files"`
+}
+
+// One or more documents showing the person's passport page with photo and personal data.
+type PersonCreateDocumentsPassportParams struct {
+ // One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
+ Files []*string `form:"files"`
+}
+
+// One or more documents showing the person's visa required for living in the country where they are residing.
+type PersonCreateDocumentsVisaParams 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"`
+}
+
+// Documents that may be submitted to satisfy various informational requests.
+type PersonCreateDocumentsParams struct {
+ // One or more documents that demonstrate proof that this person is authorized to represent the company.
+ CompanyAuthorization *PersonCreateDocumentsCompanyAuthorizationParams `form:"company_authorization"`
+ // One or more documents showing the person's passport page with photo and personal data.
+ Passport *PersonCreateDocumentsPassportParams `form:"passport"`
+ // One or more documents showing the person's visa required for living in the country where they are residing.
+ Visa *PersonCreateDocumentsVisaParams `form:"visa"`
+}
+
+// The relationship that this person has with the account's legal entity.
+type PersonCreateRelationshipParams struct {
+ // Whether the person is the authorizer of the account's representative.
+ Authorizer *bool `form:"authorizer"`
+ // Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ Director *bool `form:"director"`
+ // Whether the person has significant responsibility to control, manage, or direct the organization.
+ Executive *bool `form:"executive"`
+ // Whether the person is the legal guardian of the account's representative.
+ LegalGuardian *bool `form:"legal_guardian"`
+ // Whether the person is an owner of the account's legal entity.
+ Owner *bool `form:"owner"`
+ // The percent owned by the person of the account's legal entity.
+ PercentOwnership *float64 `form:"percent_ownership"`
+ // Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account.
+ Representative *bool `form:"representative"`
+ // The person's title (e.g., CEO, Support Engineer).
+ Title *string `form:"title"`
+}
+
+// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+type PersonCreateVerificationAdditionalDocumentParams struct {
+ // The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back"`
+ // The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front"`
+}
+
+// An identifying document, either a passport or local ID card.
+type PersonCreateVerificationDocumentParams struct {
+ // The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back"`
+ // The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front"`
+}
+
+// The person's verification status.
+type PersonCreateVerificationParams struct {
+ // A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ AdditionalDocument *PersonCreateVerificationAdditionalDocumentParams `form:"additional_document"`
+ // An identifying document, either a passport or local ID card.
+ Document *PersonCreateVerificationDocumentParams `form:"document"`
+}
+
+// Creates a new person.
+type PersonCreateParams struct {
+ Params `form:"*"`
+ Account *string `form:"-"` // Included in URL
+ // Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements.
+ AdditionalTOSAcceptances *PersonCreateAdditionalTOSAcceptancesParams `form:"additional_tos_acceptances"`
+ // The person's address.
+ Address *AddressParams `form:"address"`
+ // The Kana variation of the person's address (Japan only).
+ AddressKana *PersonCreateAddressKanaParams `form:"address_kana"`
+ // The Kanji variation of the person's address (Japan only).
+ AddressKanji *PersonCreateAddressKanjiParams `form:"address_kanji"`
+ // The person's date of birth.
+ DOB *PersonCreateDOBParams `form:"dob"`
+ // Documents that may be submitted to satisfy various informational requests.
+ Documents *PersonCreateDocumentsParams `form:"documents"`
+ // The person's email address.
+ Email *string `form:"email"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The person's first name.
+ FirstName *string `form:"first_name"`
+ // The Kana variation of the person's first name (Japan only).
+ FirstNameKana *string `form:"first_name_kana"`
+ // The Kanji variation of the person's first name (Japan only).
+ FirstNameKanji *string `form:"first_name_kanji"`
+ // A list of alternate names or aliases that the person is known by.
+ FullNameAliases []*string `form:"full_name_aliases"`
+ // The person's gender (International regulations require either "male" or "female").
+ Gender *string `form:"gender"`
+ // The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ IDNumber *string `form:"id_number"`
+ // The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
+ IDNumberSecondary *string `form:"id_number_secondary"`
+ // The person's last name.
+ LastName *string `form:"last_name"`
+ // The Kana variation of the person's last name (Japan only).
+ LastNameKana *string `form:"last_name_kana"`
+ // The Kanji variation of the person's last name (Japan only).
+ LastNameKanji *string `form:"last_name_kanji"`
+ // The person's maiden name.
+ MaidenName *string `form:"maiden_name"`
+ // 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 country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable.
+ Nationality *string `form:"nationality"`
+ // A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person.
+ PersonToken *string `form:"person_token"`
+ // The person's phone number.
+ Phone *string `form:"phone"`
+ // Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
+ PoliticalExposure *string `form:"political_exposure"`
+ // The person's registered address.
+ RegisteredAddress *AddressParams `form:"registered_address"`
+ // The relationship that this person has with the account's legal entity.
+ Relationship *PersonCreateRelationshipParams `form:"relationship"`
+ // The last four digits of the person's Social Security number (U.S. only).
+ SSNLast4 *string `form:"ssn_last_4"`
+ // The person's verification status.
+ Verification *PersonCreateVerificationParams `form:"verification"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PersonCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PersonCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Details on the legal guardian's acceptance of the main Stripe service agreement.
type PersonAdditionalTOSAcceptancesAccount struct {
// The Unix timestamp marking when the legal guardian accepted the service agreement.
diff --git a/plan.go b/plan.go
index 28ce621275..26947595c5 100644
--- a/plan.go
+++ b/plan.go
@@ -199,6 +199,167 @@ type PlanTransformUsageParams struct {
Round *string `form:"round"`
}
+// Deleting plans means new subscribers can't be added. Existing subscribers aren't affected.
+type PlanDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves the plan with the given ID.
+type PlanRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PlanRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle.
+type PlanUpdateParams struct {
+ Params `form:"*"`
+ // Whether the plan is currently available for new subscriptions.
+ Active *bool `form:"active"`
+ // 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"`
+ // A brief description of the plan, hidden from customers.
+ Nickname *string `form:"nickname"`
+ // The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule.
+ Product *string `form:"product"`
+ // Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ TrialPeriodDays *int64 `form:"trial_period_days"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PlanUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PlanUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+type PlanCreateProductParams struct {
+ // Whether the product is currently available for purchase. Defaults to `true`.
+ Active *bool `form:"active"`
+ // The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
+ ID *string `form:"id"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The product's name, meant to be displayable to the customer.
+ Name *string `form:"name"`
+ // An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ //
+ // This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ StatementDescriptor *string `form:"statement_descriptor"`
+ // A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ TaxCode *string `form:"tax_code"`
+ // A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ UnitLabel *string `form:"unit_label"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PlanCreateProductParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+type PlanCreateTierParams struct {
+ // The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ FlatAmount *int64 `form:"flat_amount"`
+ // Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"`
+ // The per unit billing amount for each individual unit for which this tier applies.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+ // Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ UpTo *int64 `form:"up_to"`
+ UpToInf *bool `form:"-"` // See custom AppendTo
+}
+
+// AppendTo implements custom encoding logic for PlanCreateTierParams.
+func (p *PlanCreateTierParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.UpToInf) {
+ body.Add(form.FormatKey(append(keyParts, "up_to")), "inf")
+ }
+}
+
+// Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+type PlanCreateTransformUsageParams struct {
+ // Divide usage by this number.
+ DivideBy *int64 `form:"divide_by"`
+ // After division, either round the result `up` or `down`.
+ Round *string `form:"round"`
+}
+
+// You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
+type PlanCreateParams struct {
+ Params `form:"*"`
+ // Whether the plan is currently available for new subscriptions. Defaults to `true`.
+ Active *bool `form:"active"`
+ // A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis.
+ Amount *int64 `form:"amount"`
+ // Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set.
+ AmountDecimal *float64 `form:"amount_decimal,high_precision"`
+ // Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ BillingScheme *string `form:"billing_scheme"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes.
+ ID *string `form:"id"`
+ // Specifies billing frequency. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
+ IntervalCount *int64 `form:"interval_count"`
+ // 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 meter tracking the usage of a metered price
+ Meter *string `form:"meter"`
+ // A brief description of the plan, hidden from customers.
+ Nickname *string `form:"nickname"`
+ Product *PlanCreateProductParams `form:"product"`
+ ProductID *string `form:"product"`
+ // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ Tiers []*PlanCreateTierParams `form:"tiers"`
+ // Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
+ TiersMode *string `form:"tiers_mode"`
+ // Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+ TransformUsage *PlanCreateTransformUsageParams `form:"transform_usage"`
+ // Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ TrialPeriodDays *int64 `form:"trial_period_days"`
+ // Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ UsageType *string `form:"usage_type"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PlanCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PlanCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
type PlanTier struct {
// Price for the entire tier.
diff --git a/price.go b/price.go
index ce6d936b12..34dfd6c171 100644
--- a/price.go
+++ b/price.go
@@ -352,6 +352,303 @@ func (p *PriceSearchParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+type PriceCreateCurrencyOptionsCustomUnitAmountParams struct {
+ // Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ Enabled *bool `form:"enabled"`
+ // The maximum unit amount the customer can specify for this item.
+ Maximum *int64 `form:"maximum"`
+ // The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ Minimum *int64 `form:"minimum"`
+ // The starting unit amount which can be updated by the customer.
+ Preset *int64 `form:"preset"`
+}
+
+// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+type PriceCreateCurrencyOptionsTierParams struct {
+ // The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ FlatAmount *int64 `form:"flat_amount"`
+ // Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"`
+ // The per unit billing amount for each individual unit for which this tier applies.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+ // Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ UpTo *int64 `form:"up_to"`
+ UpToInf *bool `form:"-"` // See custom AppendTo
+}
+
+// AppendTo implements custom encoding logic for PriceCreateCurrencyOptionsTierParams.
+func (p *PriceCreateCurrencyOptionsTierParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.UpToInf) {
+ body.Add(form.FormatKey(append(keyParts, "up_to")), "inf")
+ }
+}
+
+// Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+type PriceCreateCurrencyOptionsParams struct {
+ // When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ CustomUnitAmount *PriceCreateCurrencyOptionsCustomUnitAmountParams `form:"custom_unit_amount"`
+ // 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"`
+ // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ Tiers []*PriceCreateCurrencyOptionsTierParams `form:"tiers"`
+ // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+type PriceCreateCustomUnitAmountParams struct {
+ // Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ Enabled *bool `form:"enabled"`
+ // The maximum unit amount the customer can specify for this item.
+ Maximum *int64 `form:"maximum"`
+ // The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ Minimum *int64 `form:"minimum"`
+ // The starting unit amount which can be updated by the customer.
+ Preset *int64 `form:"preset"`
+}
+
+// These fields can be used to create a new product that this price will belong to.
+type PriceCreateProductDataParams struct {
+ // Whether the product is currently available for purchase. Defaults to `true`.
+ Active *bool `form:"active"`
+ // The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated.
+ ID *string `form:"id"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The product's name, meant to be displayable to the customer.
+ Name *string `form:"name"`
+ // An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ //
+ // This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ StatementDescriptor *string `form:"statement_descriptor"`
+ // A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ TaxCode *string `form:"tax_code"`
+ // A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ UnitLabel *string `form:"unit_label"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PriceCreateProductDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// The recurring components of a price such as `interval` and `usage_type`.
+type PriceCreateRecurringParams 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 meter tracking the usage of a metered price
+ Meter *string `form:"meter"`
+ // Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
+ TrialPeriodDays *int64 `form:"trial_period_days"`
+ // Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
+ UsageType *string `form:"usage_type"`
+}
+
+// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+type PriceCreateTierParams struct {
+ // The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ FlatAmount *int64 `form:"flat_amount"`
+ // Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"`
+ // The per unit billing amount for each individual unit for which this tier applies.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+ // Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ UpTo *int64 `form:"up_to"`
+ UpToInf *bool `form:"-"` // See custom AppendTo
+}
+
+// AppendTo implements custom encoding logic for PriceCreateTierParams.
+func (p *PriceCreateTierParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.UpToInf) {
+ body.Add(form.FormatKey(append(keyParts, "up_to")), "inf")
+ }
+}
+
+// Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+type PriceCreateTransformQuantityParams struct {
+ // Divide usage by this number.
+ DivideBy *int64 `form:"divide_by"`
+ // After division, either round the result `up` or `down`.
+ Round *string `form:"round"`
+}
+
+// Creates a new [Price for an existing Product](https://docs.stripe.com/api/prices). The Price can be recurring or one-time.
+type PriceCreateParams struct {
+ Params `form:"*"`
+ // Whether the price can be used for new purchases. Defaults to `true`.
+ Active *bool `form:"active"`
+ // Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
+ BillingScheme *string `form:"billing_scheme"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ CurrencyOptions map[string]*PriceCreateCurrencyOptionsParams `form:"currency_options"`
+ // When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ CustomUnitAmount *PriceCreateCustomUnitAmountParams `form:"custom_unit_amount"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ LookupKey *string `form:"lookup_key"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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"`
+ // A brief description of the price, hidden from customers.
+ Nickname *string `form:"nickname"`
+ // The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ Product *string `form:"product"`
+ // These fields can be used to create a new product that this price will belong to.
+ ProductData *PriceCreateProductDataParams `form:"product_data"`
+ // The recurring components of a price such as `interval` and `usage_type`.
+ Recurring *PriceCreateRecurringParams `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"`
+ // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ Tiers []*PriceCreateTierParams `form:"tiers"`
+ // Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows.
+ TiersMode *string `form:"tiers_mode"`
+ // If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
+ TransferLookupKey *bool `form:"transfer_lookup_key"`
+ // Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`.
+ TransformQuantity *PriceCreateTransformQuantityParams `form:"transform_quantity"`
+ // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PriceCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PriceCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the price with the given ID.
+type PriceRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PriceRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+type PriceUpdateCurrencyOptionsCustomUnitAmountParams struct {
+ // Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ Enabled *bool `form:"enabled"`
+ // The maximum unit amount the customer can specify for this item.
+ Maximum *int64 `form:"maximum"`
+ // The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ Minimum *int64 `form:"minimum"`
+ // The starting unit amount which can be updated by the customer.
+ Preset *int64 `form:"preset"`
+}
+
+// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+type PriceUpdateCurrencyOptionsTierParams struct {
+ // The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ FlatAmount *int64 `form:"flat_amount"`
+ // Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"`
+ // The per unit billing amount for each individual unit for which this tier applies.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+ // Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ UpTo *int64 `form:"up_to"`
+ UpToInf *bool `form:"-"` // See custom AppendTo
+}
+
+// AppendTo implements custom encoding logic for PriceUpdateCurrencyOptionsTierParams.
+func (p *PriceUpdateCurrencyOptionsTierParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.UpToInf) {
+ body.Add(form.FormatKey(append(keyParts, "up_to")), "inf")
+ }
+}
+
+// Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+type PriceUpdateCurrencyOptionsParams struct {
+ // When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ CustomUnitAmount *PriceUpdateCurrencyOptionsCustomUnitAmountParams `form:"custom_unit_amount"`
+ // 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"`
+ // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ Tiers []*PriceUpdateCurrencyOptionsTierParams `form:"tiers"`
+ // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// If specified, subscriptions using this price will be updated to use the new referenced price.
+type PriceUpdateMigrateToParams struct {
+ // The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`.
+ Behavior *string `form:"behavior"`
+ // The time after which subscriptions should start using the new price.
+ EffectiveAfter *int64 `form:"effective_after"`
+ // The ID of the price object.
+ Price *string `form:"price"`
+}
+
+// Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.
+type PriceUpdateParams struct {
+ Params `form:"*"`
+ // Whether the price can be used for new purchases. Defaults to `true`.
+ Active *bool `form:"active"`
+ // Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ CurrencyOptions map[string]*PriceUpdateCurrencyOptionsParams `form:"currency_options"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
+ LookupKey *string `form:"lookup_key"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // If specified, subscriptions using this price will be updated to use the new referenced price.
+ MigrateTo *PriceUpdateMigrateToParams `form:"migrate_to"`
+ // A brief description of the price, hidden from customers.
+ Nickname *string `form:"nickname"`
+ // 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"`
+ // If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
+ TransferLookupKey *bool `form:"transfer_lookup_key"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PriceUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PriceUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
type PriceCurrencyOptionsCustomUnitAmount struct {
// The maximum unit amount the customer can specify for this item.
diff --git a/privacy_redactionjob.go b/privacy_redactionjob.go
index 67d2c6b345..770f9338c1 100644
--- a/privacy_redactionjob.go
+++ b/privacy_redactionjob.go
@@ -88,6 +88,64 @@ func (p *PrivacyRedactionJobValidateParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// The objects at the root level that are subject to redaction.
+type PrivacyRedactionJobCreateObjectsParams struct {
+ Charges []*string `form:"charges"`
+ CheckoutSessions []*string `form:"checkout_sessions"`
+ Customers []*string `form:"customers"`
+ IdentityVerificationSessions []*string `form:"identity_verification_sessions"`
+ Invoices []*string `form:"invoices"`
+ IssuingCardholders []*string `form:"issuing_cardholders"`
+ IssuingCards []*string `form:"issuing_cards"`
+ PaymentIntents []*string `form:"payment_intents"`
+ RadarValueListItems []*string `form:"radar_value_list_items"`
+ SetupIntents []*string `form:"setup_intents"`
+}
+
+// Create redaction job method
+type PrivacyRedactionJobCreateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The objects at the root level that are subject to redaction.
+ Objects *PrivacyRedactionJobCreateObjectsParams `form:"objects"`
+ // Default is "error". If "error", we will make sure all objects in the graph are
+ // redactable in the 1st traversal, otherwise error. If "fix", where possible, we will
+ // auto-fix any validation errors (e.g. by auto-transitioning objects to a terminal
+ // state, etc.) in the 2nd traversal before redacting
+ ValidationBehavior *string `form:"validation_behavior"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PrivacyRedactionJobCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Retrieve redaction job method
+type PrivacyRedactionJobRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PrivacyRedactionJobRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Update redaction job method
+type PrivacyRedactionJobUpdateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ ValidationBehavior *string `form:"validation_behavior"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PrivacyRedactionJobUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Redaction Jobs store the status of a redaction request. They are created
// when a redaction request is made and track the redaction validation and execution.
type PrivacyRedactionJob struct {
diff --git a/privacy_redactionjobvalidationerror.go b/privacy_redactionjobvalidationerror.go
index ec2d61d321..708fb6b240 100644
--- a/privacy_redactionjobvalidationerror.go
+++ b/privacy_redactionjobvalidationerror.go
@@ -32,6 +32,19 @@ func (p *PrivacyRedactionJobValidationErrorParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieve validation error method
+type PrivacyRedactionJobValidationErrorRetrieveParams struct {
+ Params `form:"*"`
+ Job *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PrivacyRedactionJobValidationErrorRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Validation errors
type PrivacyRedactionJobValidationError struct {
APIResource
diff --git a/product.go b/product.go
index 204525d090..cefb7c97ed 100644
--- a/product.go
+++ b/product.go
@@ -270,6 +270,279 @@ func (p *ProductSearchParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
+type ProductDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
+type ProductRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ProductRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+type ProductUpdateMarketingFeatureParams struct {
+ // The marketing feature name. Up to 80 characters long.
+ Name *string `form:"name"`
+}
+
+// The dimensions of this product for shipping purposes.
+type ProductUpdatePackageDimensionsParams struct {
+ // Height, in inches. Maximum precision is 2 decimal places.
+ Height *float64 `form:"height"`
+ // Length, in inches. Maximum precision is 2 decimal places.
+ Length *float64 `form:"length"`
+ // Weight, in ounces. Maximum precision is 2 decimal places.
+ Weight *float64 `form:"weight"`
+ // Width, in inches. Maximum precision is 2 decimal places.
+ Width *float64 `form:"width"`
+}
+
+// Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+type ProductUpdateParams struct {
+ Params `form:"*"`
+ // Whether the product is available for purchase.
+ Active *bool `form:"active"`
+ // The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
+ DefaultPrice *string `form:"default_price"`
+ // 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"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ Images []*string `form:"images"`
+ // A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ MarketingFeatures []*ProductUpdateMarketingFeatureParams `form:"marketing_features"`
+ // 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"`
+ // The dimensions of this product for shipping purposes.
+ PackageDimensions *ProductUpdatePackageDimensionsParams `form:"package_dimensions"`
+ // Whether this product is shipped (i.e., physical goods).
+ Shippable *bool `form:"shippable"`
+ // An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ //
+ // This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ // It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments.
+ StatementDescriptor *string `form:"statement_descriptor"`
+ // A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ TaxCode *string `form:"tax_code"`
+ // A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`.
+ UnitLabel *string `form:"unit_label"`
+ // A URL of a publicly-accessible webpage for this product.
+ URL *string `form:"url"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ProductUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *ProductUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+type ProductCreateDefaultPriceDataCurrencyOptionsCustomUnitAmountParams struct {
+ // Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ Enabled *bool `form:"enabled"`
+ // The maximum unit amount the customer can specify for this item.
+ Maximum *int64 `form:"maximum"`
+ // The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ Minimum *int64 `form:"minimum"`
+ // The starting unit amount which can be updated by the customer.
+ Preset *int64 `form:"preset"`
+}
+
+// Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+type ProductCreateDefaultPriceDataCurrencyOptionsTierParams struct {
+ // The flat billing amount for an entire tier, regardless of the number of units in the tier.
+ FlatAmount *int64 `form:"flat_amount"`
+ // Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set.
+ FlatAmountDecimal *float64 `form:"flat_amount_decimal,high_precision"`
+ // The per unit billing amount for each individual unit for which this tier applies.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+ // Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier.
+ UpTo *int64 `form:"up_to"`
+ UpToInf *bool `form:"-"` // See custom AppendTo
+}
+
+// AppendTo implements custom encoding logic for ProductCreateDefaultPriceDataCurrencyOptionsTierParams.
+func (p *ProductCreateDefaultPriceDataCurrencyOptionsTierParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.UpToInf) {
+ body.Add(form.FormatKey(append(keyParts, "up_to")), "inf")
+ }
+}
+
+// Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+type ProductCreateDefaultPriceDataCurrencyOptionsParams struct {
+ // When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ CustomUnitAmount *ProductCreateDefaultPriceDataCurrencyOptionsCustomUnitAmountParams `form:"custom_unit_amount"`
+ // 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"`
+ // Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
+ Tiers []*ProductCreateDefaultPriceDataCurrencyOptionsTierParams `form:"tiers"`
+ // A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+type ProductCreateDefaultPriceDataCustomUnitAmountParams struct {
+ // Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.
+ Enabled *bool `form:"enabled"`
+ // The maximum unit amount the customer can specify for this item.
+ Maximum *int64 `form:"maximum"`
+ // The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
+ Minimum *int64 `form:"minimum"`
+ // The starting unit amount which can be updated by the customer.
+ Preset *int64 `form:"preset"`
+}
+
+// The recurring components of a price such as `interval` and `interval_count`.
+type ProductCreateDefaultPriceDataRecurringParams 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"`
+}
+
+// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.
+type ProductCreateDefaultPriceDataParams struct {
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ CurrencyOptions map[string]*ProductCreateDefaultPriceDataCurrencyOptionsParams `form:"currency_options"`
+ // When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
+ CustomUnitAmount *ProductCreateDefaultPriceDataCustomUnitAmountParams `form:"custom_unit_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"`
+ // The recurring components of a price such as `interval` and `interval_count`.
+ Recurring *ProductCreateDefaultPriceDataRecurringParams `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 positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` 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"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *ProductCreateDefaultPriceDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+type ProductCreateMarketingFeatureParams struct {
+ // The marketing feature name. Up to 80 characters long.
+ Name *string `form:"name"`
+}
+
+// The dimensions of this product for shipping purposes.
+type ProductCreatePackageDimensionsParams struct {
+ // Height, in inches. Maximum precision is 2 decimal places.
+ Height *float64 `form:"height"`
+ // Length, in inches. Maximum precision is 2 decimal places.
+ Length *float64 `form:"length"`
+ // Weight, in ounces. Maximum precision is 2 decimal places.
+ Weight *float64 `form:"weight"`
+ // Width, in inches. Maximum precision is 2 decimal places.
+ Width *float64 `form:"width"`
+}
+type ProductCreateProvisioningGiftCardFixedAmountParams struct {
+ // The initial amount with which the provisioned gift card will be created.
+ Amount *int64 `form:"amount"`
+ Currency *string `form:"currency"`
+}
+type ProductCreateProvisioningGiftCardParams struct {
+ FixedAmount *ProductCreateProvisioningGiftCardFixedAmountParams `form:"fixed_amount"`
+ // The specific type of gift_card provisioning, only `fixed_amount` currently supported.
+ Type *string `form:"type"`
+}
+
+// Provisioning configuration for this product.
+type ProductCreateProvisioningParams struct {
+ GiftCard *ProductCreateProvisioningGiftCardParams `form:"gift_card"`
+ // The type of provisioning, only `gift_card` currently supported.
+ Type *string `form:"type"`
+}
+
+// Creates a new product object.
+type ProductCreateParams struct {
+ Params `form:"*"`
+ // Whether the product is currently available for purchase. Defaults to `true`.
+ Active *bool `form:"active"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.
+ DefaultPriceData *ProductCreateDefaultPriceDataParams `form:"default_price_data"`
+ // The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
+ Description *string `form:"description"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.
+ ID *string `form:"id"`
+ // A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
+ Images []*string `form:"images"`
+ // A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
+ MarketingFeatures []*ProductCreateMarketingFeatureParams `form:"marketing_features"`
+ // 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"`
+ // The dimensions of this product for shipping purposes.
+ PackageDimensions *ProductCreatePackageDimensionsParams `form:"package_dimensions"`
+ // Provisioning configuration for this product.
+ Provisioning *ProductCreateProvisioningParams `form:"provisioning"`
+ // Whether this product is shipped (i.e., physical goods).
+ Shippable *bool `form:"shippable"`
+ // An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
+ //
+ // This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
+ // It must contain at least one letter. Only used for subscription payments.
+ StatementDescriptor *string `form:"statement_descriptor"`
+ // A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ TaxCode *string `form:"tax_code"`
+ // The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons.
+ Type *string `form:"type"`
+ // A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
+ UnitLabel *string `form:"unit_label"`
+ // A URL of a publicly-accessible webpage for this product.
+ URL *string `form:"url"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ProductCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *ProductCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
type ProductMarketingFeature struct {
// The marketing feature name. Up to 80 characters long.
diff --git a/productfeature.go b/productfeature.go
index b69f75e9e1..f0fe00528a 100644
--- a/productfeature.go
+++ b/productfeature.go
@@ -34,6 +34,40 @@ func (p *ProductFeatureListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Deletes the feature attachment to a product
+type ProductFeatureDeleteParams struct {
+ Params `form:"*"`
+ Product *string `form:"-"` // Included in URL
+}
+
+// Retrieves a product_feature, which represents a feature attachment to a product
+type ProductFeatureRetrieveParams struct {
+ Params `form:"*"`
+ Product *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ProductFeatureRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Creates a product_feature, which represents a feature attachment to a product
+type ProductFeatureCreateParams struct {
+ Params `form:"*"`
+ Product *string `form:"-"` // Included in URL
+ // The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product.
+ EntitlementFeature *string `form:"entitlement_feature"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ProductFeatureCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// A product_feature represents an attachment between a feature and a product.
// When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer.
type ProductFeature struct {
diff --git a/promotioncode.go b/promotioncode.go
index 2eeedf70a6..bd6dd11882 100644
--- a/promotioncode.go
+++ b/promotioncode.go
@@ -93,6 +93,116 @@ func (p *PromotionCodeParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+type PromotionCodeCreateRestrictionsCurrencyOptionsParams struct {
+ // Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ MinimumAmount *int64 `form:"minimum_amount"`
+}
+
+// Settings that restrict the redemption of the promotion code.
+type PromotionCodeCreateRestrictionsParams struct {
+ // Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ CurrencyOptions map[string]*PromotionCodeCreateRestrictionsCurrencyOptionsParams `form:"currency_options"`
+ // A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices
+ FirstTimeTransaction *bool `form:"first_time_transaction"`
+ // Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ MinimumAmount *int64 `form:"minimum_amount"`
+ // Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount
+ MinimumAmountCurrency *string `form:"minimum_amount_currency"`
+}
+
+// A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
+type PromotionCodeCreateParams struct {
+ Params `form:"*"`
+ // Whether the promotion code is currently active.
+ Active *bool `form:"active"`
+ // The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).
+ //
+ // If left blank, we will generate one automatically.
+ Code *string `form:"code"`
+ // The coupon for this promotion code.
+ Coupon *string `form:"coupon"`
+ // The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers.
+ Customer *string `form:"customer"`
+ // The account that this promotion code can be used by. If not set, the promotion code can be used by all accounts.
+ CustomerAccount *string `form:"customer_account"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`.
+ ExpiresAt *int64 `form:"expires_at"`
+ // A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`.
+ MaxRedemptions *int64 `form:"max_redemptions"`
+ // 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"`
+ // Settings that restrict the redemption of the promotion code.
+ Restrictions *PromotionCodeCreateRestrictionsParams `form:"restrictions"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PromotionCodeCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PromotionCodeCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired code.
+type PromotionCodeRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PromotionCodeRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+type PromotionCodeUpdateRestrictionsCurrencyOptionsParams struct {
+ // Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
+ MinimumAmount *int64 `form:"minimum_amount"`
+}
+
+// Settings that restrict the redemption of the promotion code.
+type PromotionCodeUpdateRestrictionsParams struct {
+ // Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
+ CurrencyOptions map[string]*PromotionCodeUpdateRestrictionsCurrencyOptionsParams `form:"currency_options"`
+}
+
+// Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
+type PromotionCodeUpdateParams struct {
+ Params `form:"*"`
+ // Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable.
+ Active *bool `form:"active"`
+ // 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"`
+ // Settings that restrict the redemption of the promotion code.
+ Restrictions *PromotionCodeUpdateRestrictionsParams `form:"restrictions"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *PromotionCodeUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *PromotionCodeUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
type PromotionCodeRestrictionsCurrencyOptions struct {
// Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work).
diff --git a/quote.go b/quote.go
index 8f458020e7..a2f69f402e 100644
--- a/quote.go
+++ b/quote.go
@@ -1236,6 +1236,1466 @@ func (p *QuoteListPreviewInvoiceLinesParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// 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 QuoteCreateAutomaticTaxLiabilityParams 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"`
+}
+
+// Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+type QuoteCreateAutomaticTaxParams struct {
+ // Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
+ 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 *QuoteCreateAutomaticTaxLiabilityParams `form:"liability"`
+}
+
+// Time span for the redeemed discount.
+type QuoteCreateDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type QuoteCreateDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *QuoteCreateDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The discounts applied to the quote.
+type QuoteCreateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *QuoteCreateDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.
+type QuoteCreateFromQuoteParams struct {
+ // Whether this quote is a revision of the previous quote.
+ IsRevision *bool `form:"is_revision"`
+ // The `id` of the quote that will be cloned.
+ Quote *string `form:"quote"`
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type QuoteCreateInvoiceSettingsIssuerParams 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"`
+}
+
+// All invoices will be billed using the specified settings.
+type QuoteCreateInvoiceSettingsParams struct {
+ // Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *QuoteCreateInvoiceSettingsIssuerParams `form:"issuer"`
+}
+
+// Time span for the redeemed discount.
+type QuoteCreateLineItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type QuoteCreateLineItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *QuoteCreateLineItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The discounts applied to this line item.
+type QuoteCreateLineItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *QuoteCreateLineItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The recurring components of a price such as `interval` and `interval_count`.
+type QuoteCreateLineItemPriceDataRecurringParams 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"`
+}
+
+// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+type QuoteCreateLineItemPriceDataParams 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](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ Product *string `form:"product"`
+ // The recurring components of a price such as `interval` and `interval_count`.
+ Recurring *QuoteCreateLineItemPriceDataRecurringParams `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 positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+type QuoteCreateLineItemParams struct {
+ // The discounts applied to this line item.
+ Discounts []*QuoteCreateLineItemDiscountParams `form:"discounts"`
+ // The ID of the price object. One of `price` or `price_data` is required.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ PriceData *QuoteCreateLineItemPriceDataParams `form:"price_data"`
+ // The quantity of the line item.
+ Quantity *int64 `form:"quantity"`
+ // The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
+ TaxRates []*string `form:"tax_rates"`
+}
+
+// Details to determine how long the discount should be applied for.
+type QuoteCreateLineActionAddDiscountDiscountEndParams struct {
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// Details for the `add_discount` type.
+type QuoteCreateLineActionAddDiscountParams struct {
+ // The coupon code to redeem.
+ Coupon *string `form:"coupon"`
+ // An ID of an existing discount for a coupon that was already redeemed.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *QuoteCreateLineActionAddDiscountDiscountEndParams `form:"discount_end"`
+ // The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
+ Index *int64 `form:"index"`
+ // The promotion code to redeem.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Time span for the redeemed discount.
+type QuoteCreateLineActionAddItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type QuoteCreateLineActionAddItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *QuoteCreateLineActionAddItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
+type QuoteCreateLineActionAddItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *QuoteCreateLineActionAddItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Options that configure the trial on the subscription item.
+type QuoteCreateLineActionAddItemTrialParams struct {
+ // List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
+ ConvertsTo []*string `form:"converts_to"`
+ // Determines the type of trial for this item.
+ Type *string `form:"type"`
+}
+
+// Details for the `add_item` type.
+type QuoteCreateLineActionAddItemParams struct {
+ // The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
+ Discounts []*QuoteCreateLineActionAddItemDiscountParams `form:"discounts"`
+ // 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 ID of the price object.
+ Price *string `form:"price"`
+ // Quantity for this item.
+ Quantity *int64 `form:"quantity"`
+ // The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
+ TaxRates []*string `form:"tax_rates"`
+ // Options that configure the trial on the subscription item.
+ Trial *QuoteCreateLineActionAddItemTrialParams `form:"trial"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *QuoteCreateLineActionAddItemParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Details for the `remove_discount` type.
+type QuoteCreateLineActionRemoveDiscountParams struct {
+ // The coupon code to remove from the `discounts` array.
+ Coupon *string `form:"coupon"`
+ // The ID of a discount to remove from the `discounts` array.
+ Discount *string `form:"discount"`
+ // The ID of a promotion code to remove from the `discounts` array.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Details for the `remove_item` type.
+type QuoteCreateLineActionRemoveItemParams struct {
+ // ID of a price to remove.
+ Price *string `form:"price"`
+}
+
+// Details for the `set_discounts` type.
+type QuoteCreateLineActionSetDiscountParams struct {
+ // The coupon code to replace the `discounts` array with.
+ Coupon *string `form:"coupon"`
+ // An ID of an existing discount to replace the `discounts` array with.
+ Discount *string `form:"discount"`
+ // An ID of an existing promotion code to replace the `discounts` array with.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Time span for the redeemed discount.
+type QuoteCreateLineActionSetItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type QuoteCreateLineActionSetItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *QuoteCreateLineActionSetItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
+type QuoteCreateLineActionSetItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *QuoteCreateLineActionSetItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
+type QuoteCreateLineActionSetItemTrialParams struct {
+ // List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
+ ConvertsTo []*string `form:"converts_to"`
+ // Determines the type of trial for this item.
+ Type *string `form:"type"`
+}
+
+// Details for the `set_items` type.
+type QuoteCreateLineActionSetItemParams struct {
+ // If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
+ Discounts []*QuoteCreateLineActionSetItemDiscountParams `form:"discounts"`
+ // If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The ID of the price object.
+ Price *string `form:"price"`
+ // If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
+ Quantity *int64 `form:"quantity"`
+ // If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
+ TaxRates []*string `form:"tax_rates"`
+ // If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
+ Trial *QuoteCreateLineActionSetItemTrialParams `form:"trial"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *QuoteCreateLineActionSetItemParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// An array of operations the quote line performs.
+type QuoteCreateLineActionParams struct {
+ // Details for the `add_discount` type.
+ AddDiscount *QuoteCreateLineActionAddDiscountParams `form:"add_discount"`
+ // Details for the `add_item` type.
+ AddItem *QuoteCreateLineActionAddItemParams `form:"add_item"`
+ // Details for the `add_metadata` type: specify a hash of key-value pairs.
+ AddMetadata map[string]string `form:"add_metadata"`
+ // Details for the `remove_discount` type.
+ RemoveDiscount *QuoteCreateLineActionRemoveDiscountParams `form:"remove_discount"`
+ // Details for the `remove_item` type.
+ RemoveItem *QuoteCreateLineActionRemoveItemParams `form:"remove_item"`
+ // Details for the `remove_metadata` type: specify an array of metadata keys.
+ RemoveMetadata []*string `form:"remove_metadata"`
+ // Details for the `set_discounts` type.
+ SetDiscounts []*QuoteCreateLineActionSetDiscountParams `form:"set_discounts"`
+ // Details for the `set_items` type.
+ SetItems []*QuoteCreateLineActionSetItemParams `form:"set_items"`
+ // Details for the `set_metadata` type: specify an array of key-value pairs.
+ SetMetadata map[string]string `form:"set_metadata"`
+ // The type of action the quote line performs.
+ Type *string `form:"type"`
+}
+
+// Details to identify the subscription schedule the quote line applies to.
+type QuoteCreateLineAppliesToParams struct {
+ // A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
+ NewReference *string `form:"new_reference"`
+ // The ID of the schedule the line applies to.
+ SubscriptionSchedule *string `form:"subscription_schedule"`
+ // Describes whether the quote line is affecting a new schedule or an existing schedule.
+ Type *string `form:"type"`
+}
+
+// A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
+type QuoteCreateLineCancelSubscriptionScheduleParams struct {
+ // Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
+ CancelAt *string `form:"cancel_at"`
+ // If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
+ InvoiceNow *bool `form:"invoice_now"`
+ // If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
+ Prorate *bool `form:"prorate"`
+}
+
+// Use the `end` time of a given discount.
+type QuoteCreateLineEndsAtDiscountEndParams struct {
+ // The ID of a specific discount.
+ Discount *string `form:"discount"`
+}
+
+// Time span for the quote line starting from the `starts_at` date.
+type QuoteCreateLineEndsAtDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
+type QuoteCreateLineEndsAtParams struct {
+ // Use the `end` time of a given discount.
+ DiscountEnd *QuoteCreateLineEndsAtDiscountEndParams `form:"discount_end"`
+ // Time span for the quote line starting from the `starts_at` date.
+ Duration *QuoteCreateLineEndsAtDurationParams `form:"duration"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // Select a way to pass in `ends_at`.
+ Type *string `form:"type"`
+}
+
+// Details of the pause_collection behavior to apply to the amendment.
+type QuoteCreateLineSetPauseCollectionSetParams struct {
+ // The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
+ Behavior *string `form:"behavior"`
+}
+
+// Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
+type QuoteCreateLineSetPauseCollectionParams struct {
+ // Details of the pause_collection behavior to apply to the amendment.
+ Set *QuoteCreateLineSetPauseCollectionSetParams `form:"set"`
+ // Determines the type of the pause_collection amendment.
+ Type *string `form:"type"`
+}
+
+// Use the `end` time of a given discount.
+type QuoteCreateLineStartsAtDiscountEndParams struct {
+ // The ID of a specific discount.
+ Discount *string `form:"discount"`
+}
+
+// The timestamp the given line ends at.
+type QuoteCreateLineStartsAtLineEndsAtParams struct {
+ // The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
+ Index *int64 `form:"index"`
+}
+
+// Details to identify the earliest timestamp where the proposed change should take effect.
+type QuoteCreateLineStartsAtParams struct {
+ // Use the `end` time of a given discount.
+ DiscountEnd *QuoteCreateLineStartsAtDiscountEndParams `form:"discount_end"`
+ // The timestamp the given line ends at.
+ LineEndsAt *QuoteCreateLineStartsAtLineEndsAtParams `form:"line_ends_at"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // Select a way to pass in `starts_at`.
+ Type *string `form:"type"`
+}
+
+// Defines how the subscription should behave when a trial ends.
+type QuoteCreateLineTrialSettingsEndBehaviorParams struct {
+ // Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
+ ProrateUpFront *string `form:"prorate_up_front"`
+}
+
+// Settings related to subscription trials.
+type QuoteCreateLineTrialSettingsParams struct {
+ // Defines how the subscription should behave when a trial ends.
+ EndBehavior *QuoteCreateLineTrialSettingsEndBehaviorParams `form:"end_behavior"`
+}
+
+// A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
+type QuoteCreateLineParams struct {
+ // An array of operations the quote line performs.
+ Actions []*QuoteCreateLineActionParams `form:"actions"`
+ // Details to identify the subscription schedule the quote line applies to.
+ AppliesTo *QuoteCreateLineAppliesToParams `form:"applies_to"`
+ // For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
+ BillingCycleAnchor *string `form:"billing_cycle_anchor"`
+ // A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
+ CancelSubscriptionSchedule *QuoteCreateLineCancelSubscriptionScheduleParams `form:"cancel_subscription_schedule"`
+ // Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
+ EndsAt *QuoteCreateLineEndsAtParams `form:"ends_at"`
+ // Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
+ ProrationBehavior *string `form:"proration_behavior"`
+ // Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
+ SetPauseCollection *QuoteCreateLineSetPauseCollectionParams `form:"set_pause_collection"`
+ // Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
+ SetScheduleEnd *string `form:"set_schedule_end"`
+ // Details to identify the earliest timestamp where the proposed change should take effect.
+ StartsAt *QuoteCreateLineStartsAtParams `form:"starts_at"`
+ // Settings related to subscription trials.
+ TrialSettings *QuoteCreateLineTrialSettingsParams `form:"trial_settings"`
+}
+
+// Details of a Quote line to start the bill period from.
+type QuoteCreateSubscriptionDataBillOnAcceptanceBillFromLineStartsAtParams struct {
+ // The ID of a quote line.
+ ID *string `form:"id"`
+ // The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
+ Index *int64 `form:"index"`
+}
+
+// The start of the period to bill from when the Quote is accepted.
+type QuoteCreateSubscriptionDataBillOnAcceptanceBillFromParams struct {
+ // Details of a Quote line to start the bill period from.
+ LineStartsAt *QuoteCreateSubscriptionDataBillOnAcceptanceBillFromLineStartsAtParams `form:"line_starts_at"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of method to specify the `bill_from` time.
+ Type *string `form:"type"`
+}
+
+// Details of the duration over which to bill.
+type QuoteCreateSubscriptionDataBillOnAcceptanceBillUntilDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details of a Quote line item from which to bill until.
+type QuoteCreateSubscriptionDataBillOnAcceptanceBillUntilLineEndsAtParams struct {
+ // The ID of a quote line.
+ ID *string `form:"id"`
+ // The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
+ Index *int64 `form:"index"`
+}
+
+// The end of the period to bill until when the Quote is accepted.
+type QuoteCreateSubscriptionDataBillOnAcceptanceBillUntilParams struct {
+ // Details of the duration over which to bill.
+ Duration *QuoteCreateSubscriptionDataBillOnAcceptanceBillUntilDurationParams `form:"duration"`
+ // Details of a Quote line item from which to bill until.
+ LineEndsAt *QuoteCreateSubscriptionDataBillOnAcceptanceBillUntilLineEndsAtParams `form:"line_ends_at"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of method to specify the `bill_until` time.
+ Type *string `form:"type"`
+}
+
+// Describes the period to bill for upon accepting the quote.
+type QuoteCreateSubscriptionDataBillOnAcceptanceParams struct {
+ // The start of the period to bill from when the Quote is accepted.
+ BillFrom *QuoteCreateSubscriptionDataBillOnAcceptanceBillFromParams `form:"bill_from"`
+ // The end of the period to bill until when the Quote is accepted.
+ BillUntil *QuoteCreateSubscriptionDataBillOnAcceptanceBillUntilParams `form:"bill_until"`
+}
+
+// If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
+type QuoteCreateSubscriptionDataPrebillingParams struct {
+ // This is used to determine the number of billing cycles to prebill.
+ Iterations *int64 `form:"iterations"`
+}
+
+// When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+type QuoteCreateSubscriptionDataParams struct {
+ // Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
+ BillingBehavior *string `form:"billing_behavior"`
+ // When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
+ BillingCycleAnchor *string `form:"billing_cycle_anchor"`
+ // Describes the period to bill for upon accepting the quote.
+ BillOnAcceptance *QuoteCreateSubscriptionDataBillOnAcceptanceParams `form:"bill_on_acceptance"`
+ // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ Description *string `form:"description"`
+ // When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
+ EffectiveDate *int64 `form:"effective_date"`
+ EffectiveDateCurrentPeriodEnd *bool `form:"-"` // See custom AppendTo
+ // Behavior of the subscription schedule and underlying subscription when it ends.
+ EndBehavior *string `form:"end_behavior"`
+ // The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden.
+ FromSubscription *string `form:"from_subscription"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ Metadata map[string]string `form:"metadata"`
+ // If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
+ Prebilling *QuoteCreateSubscriptionDataPrebillingParams `form:"prebilling"`
+ // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
+ //
+ // When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
+ //
+ // Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
+ //
+ // Prorations can be disabled by passing `none`.
+ ProrationBehavior *string `form:"proration_behavior"`
+ // Integer representing the number of trial period days before the customer is charged for the first time.
+ TrialPeriodDays *int64 `form:"trial_period_days"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *QuoteCreateSubscriptionDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// AppendTo implements custom encoding logic for QuoteCreateSubscriptionDataParams.
+func (p *QuoteCreateSubscriptionDataParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.EffectiveDateCurrentPeriodEnd) {
+ body.Add(form.FormatKey(append(keyParts, "effective_date")), "current_period_end")
+ }
+}
+
+// Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
+type QuoteCreateSubscriptionDataOverrideAppliesToParams struct {
+ // A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
+ NewReference *string `form:"new_reference"`
+ // The ID of the schedule the line applies to.
+ SubscriptionSchedule *string `form:"subscription_schedule"`
+ // Describes whether the quote line is affecting a new schedule or an existing schedule.
+ Type *string `form:"type"`
+}
+
+// Details of a Quote line to start the bill period from.
+type QuoteCreateSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAtParams struct {
+ // The ID of a quote line.
+ ID *string `form:"id"`
+ // The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
+ Index *int64 `form:"index"`
+}
+
+// The start of the period to bill from when the Quote is accepted.
+type QuoteCreateSubscriptionDataOverrideBillOnAcceptanceBillFromParams struct {
+ // Details of a Quote line to start the bill period from.
+ LineStartsAt *QuoteCreateSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAtParams `form:"line_starts_at"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of method to specify the `bill_from` time.
+ Type *string `form:"type"`
+}
+
+// Details of the duration over which to bill.
+type QuoteCreateSubscriptionDataOverrideBillOnAcceptanceBillUntilDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details of a Quote line item from which to bill until.
+type QuoteCreateSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAtParams struct {
+ // The ID of a quote line.
+ ID *string `form:"id"`
+ // The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
+ Index *int64 `form:"index"`
+}
+
+// The end of the period to bill until when the Quote is accepted.
+type QuoteCreateSubscriptionDataOverrideBillOnAcceptanceBillUntilParams struct {
+ // Details of the duration over which to bill.
+ Duration *QuoteCreateSubscriptionDataOverrideBillOnAcceptanceBillUntilDurationParams `form:"duration"`
+ // Details of a Quote line item from which to bill until.
+ LineEndsAt *QuoteCreateSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAtParams `form:"line_ends_at"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of method to specify the `bill_until` time.
+ Type *string `form:"type"`
+}
+
+// Describes the period to bill for upon accepting the quote.
+type QuoteCreateSubscriptionDataOverrideBillOnAcceptanceParams struct {
+ // The start of the period to bill from when the Quote is accepted.
+ BillFrom *QuoteCreateSubscriptionDataOverrideBillOnAcceptanceBillFromParams `form:"bill_from"`
+ // The end of the period to bill until when the Quote is accepted.
+ BillUntil *QuoteCreateSubscriptionDataOverrideBillOnAcceptanceBillUntilParams `form:"bill_until"`
+}
+
+// List representing overrides for `subscription_data` configurations for specific subscription schedules.
+type QuoteCreateSubscriptionDataOverrideParams struct {
+ // Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
+ AppliesTo *QuoteCreateSubscriptionDataOverrideAppliesToParams `form:"applies_to"`
+ // Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
+ BillingBehavior *string `form:"billing_behavior"`
+ // Describes the period to bill for upon accepting the quote.
+ BillOnAcceptance *QuoteCreateSubscriptionDataOverrideBillOnAcceptanceParams `form:"bill_on_acceptance"`
+ // The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
+ Customer *string `form:"customer"`
+ // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ Description *string `form:"description"`
+ // Behavior of the subscription schedule and underlying subscription when it ends.
+ EndBehavior *string `form:"end_behavior"`
+ // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
+ //
+ // When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
+ //
+ // Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
+ //
+ // Prorations can be disabled by passing `none`.
+ ProrationBehavior *string `form:"proration_behavior"`
+}
+
+// The data with which to automatically create a Transfer for each of the invoices.
+type QuoteCreateTransferDataParams struct {
+ // The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ Amount *int64 `form:"amount"`
+ // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
+ AmountPercent *float64 `form:"amount_percent"`
+ // ID of an existing, connected Stripe account.
+ Destination *string `form:"destination"`
+}
+
+// A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
+type QuoteCreateParams struct {
+ Params `form:"*"`
+ // Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
+ AllowBackdatedLines *bool `form:"allow_backdated_lines"`
+ // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
+ ApplicationFeeAmount *int64 `form:"application_fee_amount"`
+ // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
+ ApplicationFeePercent *float64 `form:"application_fee_percent"`
+ // Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+ AutomaticTax *QuoteCreateAutomaticTaxParams `form:"automatic_tax"`
+ // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ CollectionMethod *string `form:"collection_method"`
+ // The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ Customer *string `form:"customer"`
+ // The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
+ CustomerAccount *string `form:"customer_account"`
+ // The tax rates that will apply to any line item that does not have `tax_rates` set.
+ DefaultTaxRates []*string `form:"default_tax_rates"`
+ // A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ Description *string `form:"description"`
+ // The discounts applied to the quote.
+ Discounts []*QuoteCreateDiscountParams `form:"discounts"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ ExpiresAt *int64 `form:"expires_at"`
+ // A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ Footer *string `form:"footer"`
+ // Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`.
+ FromQuote *QuoteCreateFromQuoteParams `form:"from_quote"`
+ // A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used.
+ Header *string `form:"header"`
+ // All invoices will be billed using the specified settings.
+ InvoiceSettings *QuoteCreateInvoiceSettingsParams `form:"invoice_settings"`
+ // A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+ LineItems []*QuoteCreateLineItemParams `form:"line_items"`
+ // A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
+ Lines []*QuoteCreateLineParams `form:"lines"`
+ // 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.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+ SubscriptionData *QuoteCreateSubscriptionDataParams `form:"subscription_data"`
+ // List representing overrides for `subscription_data` configurations for specific subscription schedules.
+ SubscriptionDataOverrides []*QuoteCreateSubscriptionDataOverrideParams `form:"subscription_data_overrides"`
+ // ID of the test clock to attach to the quote.
+ TestClock *string `form:"test_clock"`
+ // The data with which to automatically create a Transfer for each of the invoices.
+ TransferData *QuoteCreateTransferDataParams `form:"transfer_data"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *QuoteCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *QuoteCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the quote with the given ID.
+type QuoteRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *QuoteRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// 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 QuoteUpdateAutomaticTaxLiabilityParams 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"`
+}
+
+// Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+type QuoteUpdateAutomaticTaxParams struct {
+ // Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
+ 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 *QuoteUpdateAutomaticTaxLiabilityParams `form:"liability"`
+}
+
+// Time span for the redeemed discount.
+type QuoteUpdateDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type QuoteUpdateDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *QuoteUpdateDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The discounts applied to the quote.
+type QuoteUpdateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *QuoteUpdateDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type QuoteUpdateInvoiceSettingsIssuerParams 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"`
+}
+
+// All invoices will be billed using the specified settings.
+type QuoteUpdateInvoiceSettingsParams struct {
+ // Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *QuoteUpdateInvoiceSettingsIssuerParams `form:"issuer"`
+}
+
+// Time span for the redeemed discount.
+type QuoteUpdateLineItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type QuoteUpdateLineItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *QuoteUpdateLineItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The discounts applied to this line item.
+type QuoteUpdateLineItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *QuoteUpdateLineItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The recurring components of a price such as `interval` and `interval_count`.
+type QuoteUpdateLineItemPriceDataRecurringParams 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"`
+}
+
+// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+type QuoteUpdateLineItemPriceDataParams 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](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ Product *string `form:"product"`
+ // The recurring components of a price such as `interval` and `interval_count`.
+ Recurring *QuoteUpdateLineItemPriceDataRecurringParams `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 positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+type QuoteUpdateLineItemParams struct {
+ // The discounts applied to this line item.
+ Discounts []*QuoteUpdateLineItemDiscountParams `form:"discounts"`
+ // The ID of an existing line item on the quote.
+ ID *string `form:"id"`
+ // The ID of the price object. One of `price` or `price_data` is required.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ PriceData *QuoteUpdateLineItemPriceDataParams `form:"price_data"`
+ // The quantity of the line item.
+ Quantity *int64 `form:"quantity"`
+ // The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
+ TaxRates []*string `form:"tax_rates"`
+}
+
+// Details to determine how long the discount should be applied for.
+type QuoteUpdateLineActionAddDiscountDiscountEndParams struct {
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// Details for the `add_discount` type.
+type QuoteUpdateLineActionAddDiscountParams struct {
+ // The coupon code to redeem.
+ Coupon *string `form:"coupon"`
+ // An ID of an existing discount for a coupon that was already redeemed.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *QuoteUpdateLineActionAddDiscountDiscountEndParams `form:"discount_end"`
+ // The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
+ Index *int64 `form:"index"`
+ // The promotion code to redeem.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Time span for the redeemed discount.
+type QuoteUpdateLineActionAddItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type QuoteUpdateLineActionAddItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *QuoteUpdateLineActionAddItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
+type QuoteUpdateLineActionAddItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *QuoteUpdateLineActionAddItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Options that configure the trial on the subscription item.
+type QuoteUpdateLineActionAddItemTrialParams struct {
+ // List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
+ ConvertsTo []*string `form:"converts_to"`
+ // Determines the type of trial for this item.
+ Type *string `form:"type"`
+}
+
+// Details for the `add_item` type.
+type QuoteUpdateLineActionAddItemParams struct {
+ // The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
+ Discounts []*QuoteUpdateLineActionAddItemDiscountParams `form:"discounts"`
+ // 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 ID of the price object.
+ Price *string `form:"price"`
+ // Quantity for this item.
+ Quantity *int64 `form:"quantity"`
+ // The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
+ TaxRates []*string `form:"tax_rates"`
+ // Options that configure the trial on the subscription item.
+ Trial *QuoteUpdateLineActionAddItemTrialParams `form:"trial"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *QuoteUpdateLineActionAddItemParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Details for the `remove_discount` type.
+type QuoteUpdateLineActionRemoveDiscountParams struct {
+ // The coupon code to remove from the `discounts` array.
+ Coupon *string `form:"coupon"`
+ // The ID of a discount to remove from the `discounts` array.
+ Discount *string `form:"discount"`
+ // The ID of a promotion code to remove from the `discounts` array.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Details for the `remove_item` type.
+type QuoteUpdateLineActionRemoveItemParams struct {
+ // ID of a price to remove.
+ Price *string `form:"price"`
+}
+
+// Details for the `set_discounts` type.
+type QuoteUpdateLineActionSetDiscountParams struct {
+ // The coupon code to replace the `discounts` array with.
+ Coupon *string `form:"coupon"`
+ // An ID of an existing discount to replace the `discounts` array with.
+ Discount *string `form:"discount"`
+ // An ID of an existing promotion code to replace the `discounts` array with.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Time span for the redeemed discount.
+type QuoteUpdateLineActionSetItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type QuoteUpdateLineActionSetItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *QuoteUpdateLineActionSetItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
+type QuoteUpdateLineActionSetItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *QuoteUpdateLineActionSetItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
+type QuoteUpdateLineActionSetItemTrialParams struct {
+ // List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
+ ConvertsTo []*string `form:"converts_to"`
+ // Determines the type of trial for this item.
+ Type *string `form:"type"`
+}
+
+// Details for the `set_items` type.
+type QuoteUpdateLineActionSetItemParams struct {
+ // If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
+ Discounts []*QuoteUpdateLineActionSetItemDiscountParams `form:"discounts"`
+ // If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The ID of the price object.
+ Price *string `form:"price"`
+ // If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
+ Quantity *int64 `form:"quantity"`
+ // If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
+ TaxRates []*string `form:"tax_rates"`
+ // If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
+ Trial *QuoteUpdateLineActionSetItemTrialParams `form:"trial"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *QuoteUpdateLineActionSetItemParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// An array of operations the quote line performs.
+type QuoteUpdateLineActionParams struct {
+ // Details for the `add_discount` type.
+ AddDiscount *QuoteUpdateLineActionAddDiscountParams `form:"add_discount"`
+ // Details for the `add_item` type.
+ AddItem *QuoteUpdateLineActionAddItemParams `form:"add_item"`
+ // Details for the `add_metadata` type: specify a hash of key-value pairs.
+ AddMetadata map[string]string `form:"add_metadata"`
+ // Details for the `remove_discount` type.
+ RemoveDiscount *QuoteUpdateLineActionRemoveDiscountParams `form:"remove_discount"`
+ // Details for the `remove_item` type.
+ RemoveItem *QuoteUpdateLineActionRemoveItemParams `form:"remove_item"`
+ // Details for the `remove_metadata` type: specify an array of metadata keys.
+ RemoveMetadata []*string `form:"remove_metadata"`
+ // Details for the `set_discounts` type.
+ SetDiscounts []*QuoteUpdateLineActionSetDiscountParams `form:"set_discounts"`
+ // Details for the `set_items` type.
+ SetItems []*QuoteUpdateLineActionSetItemParams `form:"set_items"`
+ // Details for the `set_metadata` type: specify an array of key-value pairs.
+ SetMetadata map[string]string `form:"set_metadata"`
+ // The type of action the quote line performs.
+ Type *string `form:"type"`
+}
+
+// Details to identify the subscription schedule the quote line applies to.
+type QuoteUpdateLineAppliesToParams struct {
+ // A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
+ NewReference *string `form:"new_reference"`
+ // The ID of the schedule the line applies to.
+ SubscriptionSchedule *string `form:"subscription_schedule"`
+ // Describes whether the quote line is affecting a new schedule or an existing schedule.
+ Type *string `form:"type"`
+}
+
+// A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
+type QuoteUpdateLineCancelSubscriptionScheduleParams struct {
+ // Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
+ CancelAt *string `form:"cancel_at"`
+ // If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
+ InvoiceNow *bool `form:"invoice_now"`
+ // If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
+ Prorate *bool `form:"prorate"`
+}
+
+// Use the `end` time of a given discount.
+type QuoteUpdateLineEndsAtDiscountEndParams struct {
+ // The ID of a specific discount.
+ Discount *string `form:"discount"`
+}
+
+// Time span for the quote line starting from the `starts_at` date.
+type QuoteUpdateLineEndsAtDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
+type QuoteUpdateLineEndsAtParams struct {
+ // Use the `end` time of a given discount.
+ DiscountEnd *QuoteUpdateLineEndsAtDiscountEndParams `form:"discount_end"`
+ // Time span for the quote line starting from the `starts_at` date.
+ Duration *QuoteUpdateLineEndsAtDurationParams `form:"duration"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // Select a way to pass in `ends_at`.
+ Type *string `form:"type"`
+}
+
+// Details of the pause_collection behavior to apply to the amendment.
+type QuoteUpdateLineSetPauseCollectionSetParams struct {
+ // The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
+ Behavior *string `form:"behavior"`
+}
+
+// Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
+type QuoteUpdateLineSetPauseCollectionParams struct {
+ // Details of the pause_collection behavior to apply to the amendment.
+ Set *QuoteUpdateLineSetPauseCollectionSetParams `form:"set"`
+ // Determines the type of the pause_collection amendment.
+ Type *string `form:"type"`
+}
+
+// Use the `end` time of a given discount.
+type QuoteUpdateLineStartsAtDiscountEndParams struct {
+ // The ID of a specific discount.
+ Discount *string `form:"discount"`
+}
+
+// The timestamp the given line ends at.
+type QuoteUpdateLineStartsAtLineEndsAtParams struct {
+ // The ID of a quote line.
+ ID *string `form:"id"`
+ // The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
+ Index *int64 `form:"index"`
+}
+
+// Details to identify the earliest timestamp where the proposed change should take effect.
+type QuoteUpdateLineStartsAtParams struct {
+ // Use the `end` time of a given discount.
+ DiscountEnd *QuoteUpdateLineStartsAtDiscountEndParams `form:"discount_end"`
+ // The timestamp the given line ends at.
+ LineEndsAt *QuoteUpdateLineStartsAtLineEndsAtParams `form:"line_ends_at"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // Select a way to pass in `starts_at`.
+ Type *string `form:"type"`
+}
+
+// Defines how the subscription should behave when a trial ends.
+type QuoteUpdateLineTrialSettingsEndBehaviorParams struct {
+ // Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
+ ProrateUpFront *string `form:"prorate_up_front"`
+}
+
+// Settings related to subscription trials.
+type QuoteUpdateLineTrialSettingsParams struct {
+ // Defines how the subscription should behave when a trial ends.
+ EndBehavior *QuoteUpdateLineTrialSettingsEndBehaviorParams `form:"end_behavior"`
+}
+
+// A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
+type QuoteUpdateLineParams struct {
+ // An array of operations the quote line performs.
+ Actions []*QuoteUpdateLineActionParams `form:"actions"`
+ // Details to identify the subscription schedule the quote line applies to.
+ AppliesTo *QuoteUpdateLineAppliesToParams `form:"applies_to"`
+ // For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
+ BillingCycleAnchor *string `form:"billing_cycle_anchor"`
+ // A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
+ CancelSubscriptionSchedule *QuoteUpdateLineCancelSubscriptionScheduleParams `form:"cancel_subscription_schedule"`
+ // Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
+ EndsAt *QuoteUpdateLineEndsAtParams `form:"ends_at"`
+ // The ID of an existing line on the quote.
+ ID *string `form:"id"`
+ // Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
+ ProrationBehavior *string `form:"proration_behavior"`
+ // Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
+ SetPauseCollection *QuoteUpdateLineSetPauseCollectionParams `form:"set_pause_collection"`
+ // Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
+ SetScheduleEnd *string `form:"set_schedule_end"`
+ // Details to identify the earliest timestamp where the proposed change should take effect.
+ StartsAt *QuoteUpdateLineStartsAtParams `form:"starts_at"`
+ // Settings related to subscription trials.
+ TrialSettings *QuoteUpdateLineTrialSettingsParams `form:"trial_settings"`
+}
+
+// Details of a Quote line to start the bill period from.
+type QuoteUpdateSubscriptionDataBillOnAcceptanceBillFromLineStartsAtParams struct {
+ // The ID of a quote line.
+ ID *string `form:"id"`
+ // The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
+ Index *int64 `form:"index"`
+}
+
+// The start of the period to bill from when the Quote is accepted.
+type QuoteUpdateSubscriptionDataBillOnAcceptanceBillFromParams struct {
+ // Details of a Quote line to start the bill period from.
+ LineStartsAt *QuoteUpdateSubscriptionDataBillOnAcceptanceBillFromLineStartsAtParams `form:"line_starts_at"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of method to specify the `bill_from` time.
+ Type *string `form:"type"`
+}
+
+// Details of the duration over which to bill.
+type QuoteUpdateSubscriptionDataBillOnAcceptanceBillUntilDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details of a Quote line item from which to bill until.
+type QuoteUpdateSubscriptionDataBillOnAcceptanceBillUntilLineEndsAtParams struct {
+ // The ID of a quote line.
+ ID *string `form:"id"`
+ // The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
+ Index *int64 `form:"index"`
+}
+
+// The end of the period to bill until when the Quote is accepted.
+type QuoteUpdateSubscriptionDataBillOnAcceptanceBillUntilParams struct {
+ // Details of the duration over which to bill.
+ Duration *QuoteUpdateSubscriptionDataBillOnAcceptanceBillUntilDurationParams `form:"duration"`
+ // Details of a Quote line item from which to bill until.
+ LineEndsAt *QuoteUpdateSubscriptionDataBillOnAcceptanceBillUntilLineEndsAtParams `form:"line_ends_at"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of method to specify the `bill_until` time.
+ Type *string `form:"type"`
+}
+
+// Describes the period to bill for upon accepting the quote.
+type QuoteUpdateSubscriptionDataBillOnAcceptanceParams struct {
+ // The start of the period to bill from when the Quote is accepted.
+ BillFrom *QuoteUpdateSubscriptionDataBillOnAcceptanceBillFromParams `form:"bill_from"`
+ // The end of the period to bill until when the Quote is accepted.
+ BillUntil *QuoteUpdateSubscriptionDataBillOnAcceptanceBillUntilParams `form:"bill_until"`
+}
+
+// If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
+type QuoteUpdateSubscriptionDataPrebillingParams struct {
+ // This is used to determine the number of billing cycles to prebill.
+ Iterations *int64 `form:"iterations"`
+}
+
+// When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+type QuoteUpdateSubscriptionDataParams struct {
+ // Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
+ BillingBehavior *string `form:"billing_behavior"`
+ // When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
+ BillingCycleAnchor *string `form:"billing_cycle_anchor"`
+ // Describes the period to bill for upon accepting the quote.
+ BillOnAcceptance *QuoteUpdateSubscriptionDataBillOnAcceptanceParams `form:"bill_on_acceptance"`
+ // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ Description *string `form:"description"`
+ // When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
+ EffectiveDate *int64 `form:"effective_date"`
+ EffectiveDateCurrentPeriodEnd *bool `form:"-"` // See custom AppendTo
+ // Behavior of the subscription schedule and underlying subscription when it ends.
+ EndBehavior *string `form:"end_behavior"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
+ Metadata map[string]string `form:"metadata"`
+ // If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
+ Prebilling *QuoteUpdateSubscriptionDataPrebillingParams `form:"prebilling"`
+ // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
+ //
+ // When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
+ //
+ // Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
+ //
+ // Prorations can be disabled by passing `none`.
+ ProrationBehavior *string `form:"proration_behavior"`
+ // Integer representing the number of trial period days before the customer is charged for the first time.
+ TrialPeriodDays *int64 `form:"trial_period_days"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *QuoteUpdateSubscriptionDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// AppendTo implements custom encoding logic for QuoteUpdateSubscriptionDataParams.
+func (p *QuoteUpdateSubscriptionDataParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.EffectiveDateCurrentPeriodEnd) {
+ body.Add(form.FormatKey(append(keyParts, "effective_date")), "current_period_end")
+ }
+}
+
+// Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
+type QuoteUpdateSubscriptionDataOverrideAppliesToParams struct {
+ // A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
+ NewReference *string `form:"new_reference"`
+ // The ID of the schedule the line applies to.
+ SubscriptionSchedule *string `form:"subscription_schedule"`
+ // Describes whether the quote line is affecting a new schedule or an existing schedule.
+ Type *string `form:"type"`
+}
+
+// Details of a Quote line to start the bill period from.
+type QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAtParams struct {
+ // The ID of a quote line.
+ ID *string `form:"id"`
+ // The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
+ Index *int64 `form:"index"`
+}
+
+// The start of the period to bill from when the Quote is accepted.
+type QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceBillFromParams struct {
+ // Details of a Quote line to start the bill period from.
+ LineStartsAt *QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAtParams `form:"line_starts_at"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of method to specify the `bill_from` time.
+ Type *string `form:"type"`
+}
+
+// Details of the duration over which to bill.
+type QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceBillUntilDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details of a Quote line item from which to bill until.
+type QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAtParams struct {
+ // The ID of a quote line.
+ ID *string `form:"id"`
+ // The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
+ Index *int64 `form:"index"`
+}
+
+// The end of the period to bill until when the Quote is accepted.
+type QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceBillUntilParams struct {
+ // Details of the duration over which to bill.
+ Duration *QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceBillUntilDurationParams `form:"duration"`
+ // Details of a Quote line item from which to bill until.
+ LineEndsAt *QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAtParams `form:"line_ends_at"`
+ // A precise Unix timestamp.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of method to specify the `bill_until` time.
+ Type *string `form:"type"`
+}
+
+// Describes the period to bill for upon accepting the quote.
+type QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceParams struct {
+ // The start of the period to bill from when the Quote is accepted.
+ BillFrom *QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceBillFromParams `form:"bill_from"`
+ // The end of the period to bill until when the Quote is accepted.
+ BillUntil *QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceBillUntilParams `form:"bill_until"`
+}
+
+// List representing overrides for `subscription_data` configurations for specific subscription schedules.
+type QuoteUpdateSubscriptionDataOverrideParams struct {
+ // Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
+ AppliesTo *QuoteUpdateSubscriptionDataOverrideAppliesToParams `form:"applies_to"`
+ // Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
+ BillingBehavior *string `form:"billing_behavior"`
+ // Describes the period to bill for upon accepting the quote.
+ BillOnAcceptance *QuoteUpdateSubscriptionDataOverrideBillOnAcceptanceParams `form:"bill_on_acceptance"`
+ // The customer the Subscription Data override applies to.
+ Customer *string `form:"customer"`
+ // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ Description *string `form:"description"`
+ // Behavior of the subscription schedule and underlying subscription when it ends.
+ EndBehavior *string `form:"end_behavior"`
+ // Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
+ //
+ // When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
+ //
+ // Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
+ //
+ // Prorations can be disabled by passing `none`.
+ ProrationBehavior *string `form:"proration_behavior"`
+}
+
+// The data with which to automatically create a Transfer for each of the invoices.
+type QuoteUpdateTransferDataParams struct {
+ // The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
+ Amount *int64 `form:"amount"`
+ // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
+ AmountPercent *float64 `form:"amount_percent"`
+ // ID of an existing, connected Stripe account.
+ Destination *string `form:"destination"`
+}
+
+// A quote models prices and services for a customer.
+type QuoteUpdateParams struct {
+ Params `form:"*"`
+ // Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
+ AllowBackdatedLines *bool `form:"allow_backdated_lines"`
+ // The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
+ ApplicationFeeAmount *int64 `form:"application_fee_amount"`
+ // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
+ ApplicationFeePercent *float64 `form:"application_fee_percent"`
+ // Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
+ AutomaticTax *QuoteUpdateAutomaticTaxParams `form:"automatic_tax"`
+ // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ CollectionMethod *string `form:"collection_method"`
+ // The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
+ Customer *string `form:"customer"`
+ // The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
+ CustomerAccount *string `form:"customer_account"`
+ // The tax rates that will apply to any line item that does not have `tax_rates` set.
+ DefaultTaxRates []*string `form:"default_tax_rates"`
+ // A description that will be displayed on the quote PDF.
+ Description *string `form:"description"`
+ // The discounts applied to the quote.
+ Discounts []*QuoteUpdateDiscountParams `form:"discounts"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
+ ExpiresAt *int64 `form:"expires_at"`
+ // A footer that will be displayed on the quote PDF.
+ Footer *string `form:"footer"`
+ // A header that will be displayed on the quote PDF.
+ Header *string `form:"header"`
+ // All invoices will be billed using the specified settings.
+ InvoiceSettings *QuoteUpdateInvoiceSettingsParams `form:"invoice_settings"`
+ // A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
+ LineItems []*QuoteUpdateLineItemParams `form:"line_items"`
+ // A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
+ Lines []*QuoteUpdateLineParams `form:"lines"`
+ // 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.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
+ SubscriptionData *QuoteUpdateSubscriptionDataParams `form:"subscription_data"`
+ // List representing overrides for `subscription_data` configurations for specific subscription schedules.
+ SubscriptionDataOverrides []*QuoteUpdateSubscriptionDataOverrideParams `form:"subscription_data_overrides"`
+ // The data with which to automatically create a Transfer for each of the invoices.
+ TransferData *QuoteUpdateTransferDataParams `form:"transfer_data"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *QuoteUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *QuoteUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// 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 QuoteAutomaticTaxLiability struct {
// The connected account being referenced when `type` is `account`.
diff --git a/radar_earlyfraudwarning.go b/radar_earlyfraudwarning.go
index dffebc1c11..487809feca 100644
--- a/radar_earlyfraudwarning.go
+++ b/radar_earlyfraudwarning.go
@@ -54,6 +54,20 @@ func (p *RadarEarlyFraudWarningParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of an early fraud warning that has previously been created.
+//
+// Please refer to the [early fraud warning](https://stripe.com/docs/api#early_fraud_warning_object) object reference for more details.
+type RadarEarlyFraudWarningRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *RadarEarlyFraudWarningRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// An early fraud warning indicates that the card issuer has notified us that a
// charge may be fraudulent.
//
diff --git a/radar_valuelist.go b/radar_valuelist.go
index e3f232237d..37c0f4634e 100644
--- a/radar_valuelist.go
+++ b/radar_valuelist.go
@@ -72,6 +72,79 @@ func (p *RadarValueListListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.
+type RadarValueListDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves a ValueList object.
+type RadarValueListRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *RadarValueListRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.
+type RadarValueListUpdateParams struct {
+ Params `form:"*"`
+ // The name of the value list for use in rules.
+ Alias *string `form:"alias"`
+ // 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"`
+ // The human-readable name of the value list.
+ Name *string `form:"name"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *RadarValueListUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *RadarValueListUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Creates a new ValueList object, which can then be referenced in rules.
+type RadarValueListCreateParams struct {
+ Params `form:"*"`
+ // The name of the value list for use in rules.
+ Alias *string `form:"alias"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed.
+ ItemType *string `form:"item_type"`
+ // 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 human-readable name of the value list.
+ Name *string `form:"name"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *RadarValueListCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *RadarValueListCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Value lists allow you to group values together which can then be referenced in rules.
//
// Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items)
diff --git a/radar_valuelistitem.go b/radar_valuelistitem.go
index 9a4a09d1c4..d74e3b569b 100644
--- a/radar_valuelistitem.go
+++ b/radar_valuelistitem.go
@@ -42,6 +42,39 @@ func (p *RadarValueListItemListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Deletes a ValueListItem object, removing it from its parent value list.
+type RadarValueListItemDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves a ValueListItem object.
+type RadarValueListItemRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *RadarValueListItemRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Creates a new ValueListItem object, which is added to the specified parent value list.
+type RadarValueListItemCreateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The value of the item (whose type must match the type of the parent value list).
+ Value *string `form:"value"`
+ // The identifier of the value list which the created item will be added to.
+ ValueList *string `form:"value_list"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *RadarValueListItemCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.
//
// Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items)
diff --git a/refund.go b/refund.go
index aa468298b9..b1d63e287e 100644
--- a/refund.go
+++ b/refund.go
@@ -139,6 +139,97 @@ func (p *RefundCancelParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.
+//
+// Creating a new refund will refund a charge that has previously been created but not yet refunded.
+// Funds will be refunded to the credit or debit card that was originally charged.
+//
+// You can optionally refund only part of a charge.
+// You can do so multiple times, until the entire charge has been refunded.
+//
+// Once entirely refunded, a charge can't be refunded again.
+// This method will raise an error when called on an already-refunded charge,
+// or when trying to refund more money than is left on a charge.
+type RefundCreateParams struct {
+ Params `form:"*"`
+ Amount *int64 `form:"amount"`
+ // The identifier of the charge to refund.
+ Charge *string `form:"charge"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // Customer whose customer balance to refund from.
+ Customer *string `form:"customer"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.
+ InstructionsEmail *string `form:"instructions_email"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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"`
+ // Origin of the refund
+ Origin *string `form:"origin"`
+ // The identifier of the PaymentIntent to refund.
+ PaymentIntent *string `form:"payment_intent"`
+ // String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms.
+ Reason *string `form:"reason"`
+ // Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
+ RefundApplicationFee *bool `form:"refund_application_fee"`
+ // Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).
+ //
+ // A transfer can be reversed only by the application that created the charge.
+ ReverseTransfer *bool `form:"reverse_transfer"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *RefundCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *RefundCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of an existing refund.
+type RefundRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *RefundRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged.
+//
+// This request only accepts metadata as an argument.
+type RefundUpdateParams struct {
+ Params `form:"*"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *RefundUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *RefundUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type RefundDestinationDetailsAffirm struct{}
type RefundDestinationDetailsAfterpayClearpay struct{}
type RefundDestinationDetailsAlipay struct{}
diff --git a/reporting_reportrun.go b/reporting_reportrun.go
index 7df5ad998f..7daf6699e8 100644
--- a/reporting_reportrun.go
+++ b/reporting_reportrun.go
@@ -71,6 +71,54 @@ func (p *ReportingReportRunParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.
+type ReportingReportRunCreateParametersParams struct {
+ // The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set.
+ Columns []*string `form:"columns"`
+ // Connected account ID to filter for in the report run.
+ ConnectedAccount *string `form:"connected_account"`
+ // Currency of objects to be included in the report run.
+ Currency *string `form:"currency"`
+ // Ending timestamp of data to be included in the report run (exclusive).
+ IntervalEnd *int64 `form:"interval_end"`
+ // Starting timestamp of data to be included in the report run.
+ IntervalStart *int64 `form:"interval_start"`
+ // Payout ID by which to filter the report run.
+ Payout *string `form:"payout"`
+ // Category of balance transactions to be included in the report run.
+ ReportingCategory *string `form:"reporting_category"`
+ // Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
+ Timezone *string `form:"timezone"`
+}
+
+// Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
+type ReportingReportRunCreateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation.
+ Parameters *ReportingReportRunCreateParametersParams `form:"parameters"`
+ // The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`.
+ ReportType *string `form:"report_type"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ReportingReportRunCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Retrieves the details of an existing Report Run.
+type ReportingReportRunRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ReportingReportRunRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type ReportingReportRunParameters struct {
// The set of output columns requested for inclusion in the report run.
Columns []string `json:"columns"`
diff --git a/reporting_reporttype.go b/reporting_reporttype.go
index 7073e50a70..d181a7b600 100644
--- a/reporting_reporttype.go
+++ b/reporting_reporttype.go
@@ -30,6 +30,18 @@ func (p *ReportingReportTypeParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of a Report Type. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
+type ReportingReportTypeRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ReportingReportTypeRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The Report Type resource corresponds to a particular type of report, such as
// the "Activity summary" or "Itemized payouts" reports. These objects are
// identified by an ID belonging to a set of enumerated values. See
diff --git a/review.go b/review.go
index 4743a57bbe..6903027b55 100644
--- a/review.go
+++ b/review.go
@@ -85,6 +85,18 @@ func (p *ReviewApproveParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves a Review object.
+type ReviewRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ReviewRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address.
type ReviewIPAddressLocation struct {
// The city where the payment originated.
diff --git a/setupintent.go b/setupintent.go
index 40ffb316ab..1eca5fb487 100644
--- a/setupintent.go
+++ b/setupintent.go
@@ -1632,6 +1632,1578 @@ func (p *SetupIntentVerifyMicrodepositsParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.
+type SetupIntentCreateAutomaticPaymentMethodsParams struct {
+ // Controls whether this SetupIntent will accept redirect-based payment methods.
+ //
+ // Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup.
+ AllowRedirects *string `form:"allow_redirects"`
+ // Whether this feature is enabled.
+ Enabled *bool `form:"enabled"`
+}
+
+// If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+type SetupIntentCreateMandateDataCustomerAcceptanceOfflineParams struct{}
+
+// If this is a Mandate accepted online, this hash contains details about the online acceptance.
+type SetupIntentCreateMandateDataCustomerAcceptanceOnlineParams struct {
+ // The IP address from which the Mandate was accepted by the customer.
+ IPAddress *string `form:"ip_address"`
+ // The user agent of the browser from which the Mandate was accepted by the customer.
+ UserAgent *string `form:"user_agent"`
+}
+
+// This hash contains details about the customer acceptance of the Mandate.
+type SetupIntentCreateMandateDataCustomerAcceptanceParams struct {
+ // The time at which the customer accepted the Mandate.
+ AcceptedAt *int64 `form:"accepted_at"`
+ // If this is a Mandate accepted offline, this hash contains details about the offline acceptance.
+ Offline *SetupIntentCreateMandateDataCustomerAcceptanceOfflineParams `form:"offline"`
+ // If this is a Mandate accepted online, this hash contains details about the online acceptance.
+ Online *SetupIntentCreateMandateDataCustomerAcceptanceOnlineParams `form:"online"`
+ // The type of customer acceptance information included with the Mandate. One of `online` or `offline`.
+ Type *string `form:"type"`
+}
+
+// This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
+type SetupIntentCreateMandateDataParams struct {
+ // This hash contains details about the customer acceptance of the Mandate.
+ CustomerAcceptance *SetupIntentCreateMandateDataCustomerAcceptanceParams `form:"customer_acceptance"`
+}
+
+// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+type SetupIntentCreatePaymentMethodDataACSSDebitParams struct {
+ // Customer's bank account number.
+ AccountNumber *string `form:"account_number"`
+ // Institution number of the customer's bank.
+ InstitutionNumber *string `form:"institution_number"`
+ // Transit number of the customer's bank.
+ TransitNumber *string `form:"transit_number"`
+}
+
+// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+type SetupIntentCreatePaymentMethodDataAffirmParams struct{}
+
+// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+type SetupIntentCreatePaymentMethodDataAfterpayClearpayParams struct{}
+
+// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+type SetupIntentCreatePaymentMethodDataAlipayParams struct{}
+
+// If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+type SetupIntentCreatePaymentMethodDataAlmaParams struct{}
+
+// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+type SetupIntentCreatePaymentMethodDataAmazonPayParams struct{}
+
+// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+type SetupIntentCreatePaymentMethodDataAUBECSDebitParams struct {
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Bank-State-Branch number of the bank account.
+ BSBNumber *string `form:"bsb_number"`
+}
+
+// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+type SetupIntentCreatePaymentMethodDataBACSDebitParams struct {
+ // Account number of the bank account that the funds will be debited from.
+ AccountNumber *string `form:"account_number"`
+ // Sort code of the bank account. (e.g., `10-20-30`)
+ SortCode *string `form:"sort_code"`
+}
+
+// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+type SetupIntentCreatePaymentMethodDataBancontactParams struct{}
+
+// If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
+type SetupIntentCreatePaymentMethodDataBillieParams struct{}
+
+// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+type SetupIntentCreatePaymentMethodDataBillingDetailsParams struct {
+ // Billing address.
+ Address *AddressParams `form:"address"`
+ // Email address.
+ Email *string `form:"email"`
+ // Full name.
+ Name *string `form:"name"`
+ // Billing phone number (including extension).
+ Phone *string `form:"phone"`
+}
+
+// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+type SetupIntentCreatePaymentMethodDataBLIKParams struct{}
+
+// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+type SetupIntentCreatePaymentMethodDataBoletoParams struct {
+ // The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ TaxID *string `form:"tax_id"`
+}
+
+// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+type SetupIntentCreatePaymentMethodDataCashAppParams struct{}
+
+// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+type SetupIntentCreatePaymentMethodDataCustomerBalanceParams struct{}
+
+// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+type SetupIntentCreatePaymentMethodDataEPSParams struct {
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+type SetupIntentCreatePaymentMethodDataFPXParams struct {
+ // Account holder type for FPX transaction
+ AccountHolderType *string `form:"account_holder_type"`
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+type SetupIntentCreatePaymentMethodDataGiropayParams struct{}
+
+// If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method.
+type SetupIntentCreatePaymentMethodDataGopayParams struct{}
+
+// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+type SetupIntentCreatePaymentMethodDataGrabpayParams struct{}
+
+// If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method.
+type SetupIntentCreatePaymentMethodDataIDBankTransferParams struct {
+ // Bank where the account is held.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+type SetupIntentCreatePaymentMethodDataIDEALParams struct {
+ // The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+type SetupIntentCreatePaymentMethodDataInteracPresentParams struct{}
+
+// If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+type SetupIntentCreatePaymentMethodDataKakaoPayParams struct{}
+
+// Customer's date of birth
+type SetupIntentCreatePaymentMethodDataKlarnaDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+type SetupIntentCreatePaymentMethodDataKlarnaParams struct {
+ // Customer's date of birth
+ DOB *SetupIntentCreatePaymentMethodDataKlarnaDOBParams `form:"dob"`
+}
+
+// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+type SetupIntentCreatePaymentMethodDataKonbiniParams struct{}
+
+// If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+type SetupIntentCreatePaymentMethodDataKrCardParams struct{}
+
+// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+type SetupIntentCreatePaymentMethodDataLinkParams struct{}
+
+// If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
+type SetupIntentCreatePaymentMethodDataMbWayParams struct{}
+
+// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+type SetupIntentCreatePaymentMethodDataMobilepayParams struct{}
+
+// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+type SetupIntentCreatePaymentMethodDataMultibancoParams struct{}
+
+// If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+type SetupIntentCreatePaymentMethodDataNaverPayParams struct {
+ // Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ Funding *string `form:"funding"`
+}
+
+// If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+type SetupIntentCreatePaymentMethodDataNzBankAccountParams struct {
+ // The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details.
+ AccountHolderName *string `form:"account_holder_name"`
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // The numeric code for the bank account's bank.
+ BankCode *string `form:"bank_code"`
+ // The numeric code for the bank account's bank branch.
+ BranchCode *string `form:"branch_code"`
+ Reference *string `form:"reference"`
+ // The suffix of the bank account number.
+ Suffix *string `form:"suffix"`
+}
+
+// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+type SetupIntentCreatePaymentMethodDataOXXOParams struct{}
+
+// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+type SetupIntentCreatePaymentMethodDataP24Params struct {
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+type SetupIntentCreatePaymentMethodDataPayByBankParams struct{}
+
+// If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+type SetupIntentCreatePaymentMethodDataPaycoParams struct{}
+
+// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+type SetupIntentCreatePaymentMethodDataPayNowParams struct{}
+
+// If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+type SetupIntentCreatePaymentMethodDataPaypalParams struct{}
+
+// If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+type SetupIntentCreatePaymentMethodDataPaytoParams struct {
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Bank-State-Branch number of the bank account.
+ BSBNumber *string `form:"bsb_number"`
+ // The PayID alias for the bank account.
+ PayID *string `form:"pay_id"`
+}
+
+// If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+type SetupIntentCreatePaymentMethodDataPixParams struct{}
+
+// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+type SetupIntentCreatePaymentMethodDataPromptPayParams struct{}
+
+// If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method.
+type SetupIntentCreatePaymentMethodDataQrisParams struct{}
+
+// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+type SetupIntentCreatePaymentMethodDataRadarOptionsParams 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"`
+}
+
+// Customer's date of birth
+type SetupIntentCreatePaymentMethodDataRechnungDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
+type SetupIntentCreatePaymentMethodDataRechnungParams struct {
+ // Customer's date of birth
+ DOB *SetupIntentCreatePaymentMethodDataRechnungDOBParams `form:"dob"`
+}
+
+// If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+type SetupIntentCreatePaymentMethodDataRevolutPayParams struct{}
+
+// If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+type SetupIntentCreatePaymentMethodDataSamsungPayParams struct{}
+
+// If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
+type SetupIntentCreatePaymentMethodDataSatispayParams struct{}
+
+// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+type SetupIntentCreatePaymentMethodDataSEPADebitParams struct {
+ // IBAN of the bank account.
+ IBAN *string `form:"iban"`
+}
+
+// If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method.
+type SetupIntentCreatePaymentMethodDataShopeepayParams struct{}
+
+// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+type SetupIntentCreatePaymentMethodDataSofortParams struct {
+ // Two-letter ISO code representing the country the bank account is located in.
+ Country *string `form:"country"`
+}
+
+// This hash contains details about the Stripe balance payment method.
+type SetupIntentCreatePaymentMethodDataStripeBalanceParams struct {
+ // The connected account ID whose Stripe balance to use as the source of payment
+ Account *string `form:"account"`
+ // The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance
+ SourceType *string `form:"source_type"`
+}
+
+// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+type SetupIntentCreatePaymentMethodDataSwishParams struct{}
+
+// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+type SetupIntentCreatePaymentMethodDataTWINTParams struct{}
+
+// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+type SetupIntentCreatePaymentMethodDataUSBankAccountParams struct {
+ // Account holder type: individual or company.
+ AccountHolderType *string `form:"account_holder_type"`
+ // Account number of the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Account type: checkings or savings. Defaults to checking if omitted.
+ AccountType *string `form:"account_type"`
+ // The ID of a Financial Connections Account to use as a payment method.
+ FinancialConnectionsAccount *string `form:"financial_connections_account"`
+ // Routing number of the bank account.
+ RoutingNumber *string `form:"routing_number"`
+}
+
+// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+type SetupIntentCreatePaymentMethodDataWeChatPayParams struct{}
+
+// If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+type SetupIntentCreatePaymentMethodDataZipParams struct{}
+
+// When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+// value in the SetupIntent.
+type SetupIntentCreatePaymentMethodDataParams struct {
+ // If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ ACSSDebit *SetupIntentCreatePaymentMethodDataACSSDebitParams `form:"acss_debit"`
+ // If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ Affirm *SetupIntentCreatePaymentMethodDataAffirmParams `form:"affirm"`
+ // If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ AfterpayClearpay *SetupIntentCreatePaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ Alipay *SetupIntentCreatePaymentMethodDataAlipayParams `form:"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 *string `form:"allow_redisplay"`
+ // If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ Alma *SetupIntentCreatePaymentMethodDataAlmaParams `form:"alma"`
+ // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ AmazonPay *SetupIntentCreatePaymentMethodDataAmazonPayParams `form:"amazon_pay"`
+ // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ AUBECSDebit *SetupIntentCreatePaymentMethodDataAUBECSDebitParams `form:"au_becs_debit"`
+ // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ BACSDebit *SetupIntentCreatePaymentMethodDataBACSDebitParams `form:"bacs_debit"`
+ // If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ Bancontact *SetupIntentCreatePaymentMethodDataBancontactParams `form:"bancontact"`
+ // If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
+ Billie *SetupIntentCreatePaymentMethodDataBillieParams `form:"billie"`
+ // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ BillingDetails *SetupIntentCreatePaymentMethodDataBillingDetailsParams `form:"billing_details"`
+ // If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ BLIK *SetupIntentCreatePaymentMethodDataBLIKParams `form:"blik"`
+ // If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ Boleto *SetupIntentCreatePaymentMethodDataBoletoParams `form:"boleto"`
+ // If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ CashApp *SetupIntentCreatePaymentMethodDataCashAppParams `form:"cashapp"`
+ // If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ CustomerBalance *SetupIntentCreatePaymentMethodDataCustomerBalanceParams `form:"customer_balance"`
+ // If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ EPS *SetupIntentCreatePaymentMethodDataEPSParams `form:"eps"`
+ // If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ FPX *SetupIntentCreatePaymentMethodDataFPXParams `form:"fpx"`
+ // If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ Giropay *SetupIntentCreatePaymentMethodDataGiropayParams `form:"giropay"`
+ // If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method.
+ Gopay *SetupIntentCreatePaymentMethodDataGopayParams `form:"gopay"`
+ // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ Grabpay *SetupIntentCreatePaymentMethodDataGrabpayParams `form:"grabpay"`
+ // If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method.
+ IDBankTransfer *SetupIntentCreatePaymentMethodDataIDBankTransferParams `form:"id_bank_transfer"`
+ // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ IDEAL *SetupIntentCreatePaymentMethodDataIDEALParams `form:"ideal"`
+ // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ InteracPresent *SetupIntentCreatePaymentMethodDataInteracPresentParams `form:"interac_present"`
+ // If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ KakaoPay *SetupIntentCreatePaymentMethodDataKakaoPayParams `form:"kakao_pay"`
+ // If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ Klarna *SetupIntentCreatePaymentMethodDataKlarnaParams `form:"klarna"`
+ // If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ Konbini *SetupIntentCreatePaymentMethodDataKonbiniParams `form:"konbini"`
+ // If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ KrCard *SetupIntentCreatePaymentMethodDataKrCardParams `form:"kr_card"`
+ // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ Link *SetupIntentCreatePaymentMethodDataLinkParams `form:"link"`
+ // If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
+ MbWay *SetupIntentCreatePaymentMethodDataMbWayParams `form:"mb_way"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ Mobilepay *SetupIntentCreatePaymentMethodDataMobilepayParams `form:"mobilepay"`
+ // If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ Multibanco *SetupIntentCreatePaymentMethodDataMultibancoParams `form:"multibanco"`
+ // If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ NaverPay *SetupIntentCreatePaymentMethodDataNaverPayParams `form:"naver_pay"`
+ // If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ NzBankAccount *SetupIntentCreatePaymentMethodDataNzBankAccountParams `form:"nz_bank_account"`
+ // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ OXXO *SetupIntentCreatePaymentMethodDataOXXOParams `form:"oxxo"`
+ // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ P24 *SetupIntentCreatePaymentMethodDataP24Params `form:"p24"`
+ // If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ PayByBank *SetupIntentCreatePaymentMethodDataPayByBankParams `form:"pay_by_bank"`
+ // If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ Payco *SetupIntentCreatePaymentMethodDataPaycoParams `form:"payco"`
+ // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ PayNow *SetupIntentCreatePaymentMethodDataPayNowParams `form:"paynow"`
+ // If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ Paypal *SetupIntentCreatePaymentMethodDataPaypalParams `form:"paypal"`
+ // If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+ Payto *SetupIntentCreatePaymentMethodDataPaytoParams `form:"payto"`
+ // If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ Pix *SetupIntentCreatePaymentMethodDataPixParams `form:"pix"`
+ // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ PromptPay *SetupIntentCreatePaymentMethodDataPromptPayParams `form:"promptpay"`
+ // If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method.
+ Qris *SetupIntentCreatePaymentMethodDataQrisParams `form:"qris"`
+ // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ RadarOptions *SetupIntentCreatePaymentMethodDataRadarOptionsParams `form:"radar_options"`
+ // If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
+ Rechnung *SetupIntentCreatePaymentMethodDataRechnungParams `form:"rechnung"`
+ // If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ RevolutPay *SetupIntentCreatePaymentMethodDataRevolutPayParams `form:"revolut_pay"`
+ // If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ SamsungPay *SetupIntentCreatePaymentMethodDataSamsungPayParams `form:"samsung_pay"`
+ // If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
+ Satispay *SetupIntentCreatePaymentMethodDataSatispayParams `form:"satispay"`
+ // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ SEPADebit *SetupIntentCreatePaymentMethodDataSEPADebitParams `form:"sepa_debit"`
+ // If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method.
+ Shopeepay *SetupIntentCreatePaymentMethodDataShopeepayParams `form:"shopeepay"`
+ // If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ Sofort *SetupIntentCreatePaymentMethodDataSofortParams `form:"sofort"`
+ // This hash contains details about the Stripe balance payment method.
+ StripeBalance *SetupIntentCreatePaymentMethodDataStripeBalanceParams `form:"stripe_balance"`
+ // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ Swish *SetupIntentCreatePaymentMethodDataSwishParams `form:"swish"`
+ // If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ TWINT *SetupIntentCreatePaymentMethodDataTWINTParams `form:"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 *string `form:"type"`
+ // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ USBankAccount *SetupIntentCreatePaymentMethodDataUSBankAccountParams `form:"us_bank_account"`
+ // If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ WeChatPay *SetupIntentCreatePaymentMethodDataWeChatPayParams `form:"wechat_pay"`
+ // If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ Zip *SetupIntentCreatePaymentMethodDataZipParams `form:"zip"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SetupIntentCreatePaymentMethodDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Additional fields for Mandate creation
+type SetupIntentCreatePaymentMethodOptionsACSSDebitMandateOptionsParams struct {
+ // A URL for custom mandate text to render during confirmation step.
+ // The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ // or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ CustomMandateURL *string `form:"custom_mandate_url"`
+ // List of Stripe products where this mandate can be selected automatically.
+ DefaultFor []*string `form:"default_for"`
+ // Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ IntervalDescription *string `form:"interval_description"`
+ // Payment schedule for the mandate.
+ PaymentSchedule *string `form:"payment_schedule"`
+ // Transaction type of the mandate.
+ TransactionType *string `form:"transaction_type"`
+}
+
+// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+type SetupIntentCreatePaymentMethodOptionsACSSDebitParams struct {
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // Additional fields for Mandate creation
+ MandateOptions *SetupIntentCreatePaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"`
+ // Bank account verification method.
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+type SetupIntentCreatePaymentMethodOptionsAmazonPayParams struct{}
+
+// Additional fields for Mandate creation
+type SetupIntentCreatePaymentMethodOptionsBACSDebitMandateOptionsParams 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"`
+}
+
+// If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+type SetupIntentCreatePaymentMethodOptionsBACSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *SetupIntentCreatePaymentMethodOptionsBACSDebitMandateOptionsParams `form:"mandate_options"`
+}
+
+// Configuration options for setting up an eMandate for cards issued in India.
+type SetupIntentCreatePaymentMethodOptionsCardMandateOptionsParams struct {
+ // Amount to be charged for future payments.
+ Amount *int64 `form:"amount"`
+ // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ AmountType *string `form:"amount_type"`
+ // Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // A description of the mandate or subscription that is meant to be displayed to the customer.
+ Description *string `form:"description"`
+ // End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ EndDate *int64 `form:"end_date"`
+ // Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ Interval *string `form:"interval"`
+ // The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ IntervalCount *int64 `form:"interval_count"`
+ // Unique identifier for the mandate or subscription.
+ Reference *string `form:"reference"`
+ // Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ StartDate *int64 `form:"start_date"`
+ // Specifies the type of mandates supported. Possible values are `india`.
+ SupportedTypes []*string `form:"supported_types"`
+}
+
+// Cartes Bancaires-specific 3DS fields.
+type SetupIntentCreatePaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesParams struct {
+ // The cryptogram calculation algorithm used by the card Issuer's ACS
+ // to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ // messageExtension: CB-AVALGO
+ CbAvalgo *string `form:"cb_avalgo"`
+ // The exemption indicator returned from Cartes Bancaires in the ARes.
+ // message extension: CB-EXEMPTION; string (4 characters)
+ // This is a 3 byte bitmap (low significant byte first and most significant
+ // bit first) that has been Base64 encoded
+ CbExemption *string `form:"cb_exemption"`
+ // The risk score returned from Cartes Bancaires in the ARes.
+ // message extension: CB-SCORE; numeric value 0-99
+ CbScore *int64 `form:"cb_score"`
+}
+
+// Network specific 3DS fields. Network specific arguments require an
+// explicit card brand choice. The parameter `payment_method_options.card.network“
+// must be populated accordingly
+type SetupIntentCreatePaymentMethodOptionsCardThreeDSecureNetworkOptionsParams struct {
+ // Cartes Bancaires-specific 3DS fields.
+ CartesBancaires *SetupIntentCreatePaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesParams `form:"cartes_bancaires"`
+}
+
+// If 3D Secure authentication was performed with a third-party provider,
+// the authentication details to use for this setup.
+type SetupIntentCreatePaymentMethodOptionsCardThreeDSecureParams struct {
+ // The `transStatus` returned from the card Issuer's ACS in the ARes.
+ AresTransStatus *string `form:"ares_trans_status"`
+ // The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ // AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ // (Most 3D Secure providers will return the base64-encoded version, which
+ // is what you should specify here.)
+ Cryptogram *string `form:"cryptogram"`
+ // The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ // provider and indicates what degree of authentication was performed.
+ ElectronicCommerceIndicator *string `form:"electronic_commerce_indicator"`
+ // Network specific 3DS fields. Network specific arguments require an
+ // explicit card brand choice. The parameter `payment_method_options.card.network``
+ // must be populated accordingly
+ NetworkOptions *SetupIntentCreatePaymentMethodOptionsCardThreeDSecureNetworkOptionsParams `form:"network_options"`
+ // The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ // AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ RequestorChallengeIndicator *string `form:"requestor_challenge_indicator"`
+ // For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ // Transaction ID (dsTransID).
+ TransactionID *string `form:"transaction_id"`
+ // The version of 3D Secure that was performed.
+ Version *string `form:"version"`
+}
+
+// Configuration for any card setup attempted on this SetupIntent.
+type SetupIntentCreatePaymentMethodOptionsCardParams struct {
+ // Configuration options for setting up an eMandate for cards issued in India.
+ MandateOptions *SetupIntentCreatePaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"`
+ // When specified, this parameter signals that a card has been collected
+ // as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ // parameter can only be provided during confirmation.
+ MOTO *bool `form:"moto"`
+ // Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ Network *string `form:"network"`
+ // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. 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"`
+ // If 3D Secure authentication was performed with a third-party provider,
+ // the authentication details to use for this setup.
+ ThreeDSecure *SetupIntentCreatePaymentMethodOptionsCardThreeDSecureParams `form:"three_d_secure"`
+}
+
+// If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+type SetupIntentCreatePaymentMethodOptionsCardPresentParams struct{}
+
+// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+type SetupIntentCreatePaymentMethodOptionsLinkParams struct {
+ // [Deprecated] This is a legacy parameter that no longer has any function.
+ // Deprecated:
+ PersistentToken *string `form:"persistent_token"`
+}
+
+// If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+type SetupIntentCreatePaymentMethodOptionsPaypalParams struct {
+ // The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ BillingAgreementID *string `form:"billing_agreement_id"`
+ Currency *string `form:"currency"`
+ // The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
+ Subsellers []*string `form:"subsellers"`
+}
+
+// Additional fields for Mandate creation.
+type SetupIntentCreatePaymentMethodOptionsPaytoMandateOptionsParams struct {
+ // Amount that will be collected. It is required when `amount_type` is `fixed`.
+ Amount *int64 `form:"amount"`
+ // The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively.
+ AmountType *string `form:"amount_type"`
+ // Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
+ EndDate *string `form:"end_date"`
+ // The periodicity at which payments will be collected.
+ PaymentSchedule *string `form:"payment_schedule"`
+ // The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.
+ PaymentsPerPeriod *int64 `form:"payments_per_period"`
+ // The purpose for which payments are made. Defaults to retail.
+ Purpose *string `form:"purpose"`
+ // Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
+ StartDate *string `form:"start_date"`
+}
+
+// If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options.
+type SetupIntentCreatePaymentMethodOptionsPaytoParams struct {
+ // Additional fields for Mandate creation.
+ MandateOptions *SetupIntentCreatePaymentMethodOptionsPaytoMandateOptionsParams `form:"mandate_options"`
+}
+
+// Additional fields for Mandate creation
+type SetupIntentCreatePaymentMethodOptionsSEPADebitMandateOptionsParams 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"`
+}
+
+// If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+type SetupIntentCreatePaymentMethodOptionsSEPADebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *SetupIntentCreatePaymentMethodOptionsSEPADebitMandateOptionsParams `form:"mandate_options"`
+}
+
+// Provide filters for the linked accounts that the customer can select for the payment method.
+type SetupIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams struct {
+ // The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ AccountSubcategories []*string `form:"account_subcategories"`
+ // ID of the institution to use to filter for selectable accounts.
+ Institution *string `form:"institution"`
+}
+
+// Customize manual entry behavior
+type SetupIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsManualEntryParams struct {
+ // Settings for configuring manual entry of account details.
+ Mode *string `form:"mode"`
+}
+
+// Additional fields for Financial Connections Session creation
+type SetupIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
+ // Provide filters for the linked accounts that the customer can select for the payment method.
+ Filters *SetupIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams `form:"filters"`
+ // Customize manual entry behavior
+ ManualEntry *SetupIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsManualEntryParams `form:"manual_entry"`
+ // 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"`
+ // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ ReturnURL *string `form:"return_url"`
+}
+
+// Additional fields for Mandate creation
+type SetupIntentCreatePaymentMethodOptionsUSBankAccountMandateOptionsParams struct {
+ // The method used to collect offline mandate customer acceptance.
+ CollectionMethod *string `form:"collection_method"`
+}
+
+// Additional fields for network related functions
+type SetupIntentCreatePaymentMethodOptionsUSBankAccountNetworksParams struct {
+ // Triggers validations to run across the selected networks
+ Requested []*string `form:"requested"`
+}
+
+// If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+type SetupIntentCreatePaymentMethodOptionsUSBankAccountParams struct {
+ // Additional fields for Financial Connections Session creation
+ FinancialConnections *SetupIntentCreatePaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
+ // Additional fields for Mandate creation
+ MandateOptions *SetupIntentCreatePaymentMethodOptionsUSBankAccountMandateOptionsParams `form:"mandate_options"`
+ // Additional fields for network related functions
+ Networks *SetupIntentCreatePaymentMethodOptionsUSBankAccountNetworksParams `form:"networks"`
+ // Bank account verification method.
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// Payment method-specific configuration for this SetupIntent.
+type SetupIntentCreatePaymentMethodOptionsParams struct {
+ // If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ ACSSDebit *SetupIntentCreatePaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
+ // If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ AmazonPay *SetupIntentCreatePaymentMethodOptionsAmazonPayParams `form:"amazon_pay"`
+ // If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ BACSDebit *SetupIntentCreatePaymentMethodOptionsBACSDebitParams `form:"bacs_debit"`
+ // Configuration for any card setup attempted on this SetupIntent.
+ Card *SetupIntentCreatePaymentMethodOptionsCardParams `form:"card"`
+ // If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ CardPresent *SetupIntentCreatePaymentMethodOptionsCardPresentParams `form:"card_present"`
+ // If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ Link *SetupIntentCreatePaymentMethodOptionsLinkParams `form:"link"`
+ // If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ Paypal *SetupIntentCreatePaymentMethodOptionsPaypalParams `form:"paypal"`
+ // If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options.
+ Payto *SetupIntentCreatePaymentMethodOptionsPaytoParams `form:"payto"`
+ // If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ SEPADebit *SetupIntentCreatePaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
+ // If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ USBankAccount *SetupIntentCreatePaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
+}
+
+// If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion.
+//
+// Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`.
+type SetupIntentCreateSingleUseParams struct {
+ // Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
+ Amount *int64 `form:"amount"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+}
+
+// Creates a SetupIntent object.
+//
+// After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm)
+// it to collect any required permissions to charge the payment method later.
+type SetupIntentCreateParams struct {
+ Params `form:"*"`
+ // If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ //
+ // It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ AttachToSelf *bool `form:"attach_to_self"`
+ // When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters.
+ AutomaticPaymentMethods *SetupIntentCreateAutomaticPaymentMethodsParams `form:"automatic_payment_methods"`
+ // Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary.
+ Confirm *bool `form:"confirm"`
+ // ID of the ConfirmationToken used to confirm this SetupIntent.
+ //
+ // If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
+ ConfirmationToken *string `form:"confirmation_token"`
+ // ID of the Customer this SetupIntent belongs to, if one exists.
+ //
+ // If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ Customer *string `form:"customer"`
+ // ID of the Account this SetupIntent belongs to, if one exists.
+ //
+ // If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent.
+ CustomerAccount *string `form:"customer_account"`
+ // 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"`
+ // Indicates the directions of money movement for which this payment method is intended to be used.
+ //
+ // Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ FlowDirections []*string `form:"flow_directions"`
+ // This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
+ MandateData *SetupIntentCreateMandateDataParams `form:"mandate_data"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 created for this SetupIntent.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
+ PaymentMethod *string `form:"payment_method"`
+ // The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
+ PaymentMethodConfiguration *string `form:"payment_method_configuration"`
+ // When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ // value in the SetupIntent.
+ PaymentMethodData *SetupIntentCreatePaymentMethodDataParams `form:"payment_method_data"`
+ // Payment method-specific configuration for this SetupIntent.
+ PaymentMethodOptions *SetupIntentCreatePaymentMethodOptionsParams `form:"payment_method_options"`
+ // The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+ // The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
+ ReturnURL *string `form:"return_url"`
+ // If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion.
+ //
+ // Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`.
+ SingleUse *SetupIntentCreateSingleUseParams `form:"single_use"`
+ // Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`.
+ Usage *string `form:"usage"`
+ // Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.
+ UseStripeSDK *bool `form:"use_stripe_sdk"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SetupIntentCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SetupIntentCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of a SetupIntent that has previously been created.
+//
+// Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.
+//
+// When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the [SetupIntent](https://stripe.com/docs/api#setup_intent_object) object reference for more details.
+type SetupIntentRetrieveParams struct {
+ Params `form:"*"`
+ // The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent.
+ ClientSecret *string `form:"client_secret"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SetupIntentRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+type SetupIntentUpdatePaymentMethodDataACSSDebitParams struct {
+ // Customer's bank account number.
+ AccountNumber *string `form:"account_number"`
+ // Institution number of the customer's bank.
+ InstitutionNumber *string `form:"institution_number"`
+ // Transit number of the customer's bank.
+ TransitNumber *string `form:"transit_number"`
+}
+
+// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+type SetupIntentUpdatePaymentMethodDataAffirmParams struct{}
+
+// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+type SetupIntentUpdatePaymentMethodDataAfterpayClearpayParams struct{}
+
+// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+type SetupIntentUpdatePaymentMethodDataAlipayParams struct{}
+
+// If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+type SetupIntentUpdatePaymentMethodDataAlmaParams struct{}
+
+// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+type SetupIntentUpdatePaymentMethodDataAmazonPayParams struct{}
+
+// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+type SetupIntentUpdatePaymentMethodDataAUBECSDebitParams struct {
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Bank-State-Branch number of the bank account.
+ BSBNumber *string `form:"bsb_number"`
+}
+
+// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+type SetupIntentUpdatePaymentMethodDataBACSDebitParams struct {
+ // Account number of the bank account that the funds will be debited from.
+ AccountNumber *string `form:"account_number"`
+ // Sort code of the bank account. (e.g., `10-20-30`)
+ SortCode *string `form:"sort_code"`
+}
+
+// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+type SetupIntentUpdatePaymentMethodDataBancontactParams struct{}
+
+// If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
+type SetupIntentUpdatePaymentMethodDataBillieParams struct{}
+
+// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+type SetupIntentUpdatePaymentMethodDataBillingDetailsParams struct {
+ // Billing address.
+ Address *AddressParams `form:"address"`
+ // Email address.
+ Email *string `form:"email"`
+ // Full name.
+ Name *string `form:"name"`
+ // Billing phone number (including extension).
+ Phone *string `form:"phone"`
+}
+
+// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+type SetupIntentUpdatePaymentMethodDataBLIKParams struct{}
+
+// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+type SetupIntentUpdatePaymentMethodDataBoletoParams struct {
+ // The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ TaxID *string `form:"tax_id"`
+}
+
+// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+type SetupIntentUpdatePaymentMethodDataCashAppParams struct{}
+
+// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+type SetupIntentUpdatePaymentMethodDataCustomerBalanceParams struct{}
+
+// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+type SetupIntentUpdatePaymentMethodDataEPSParams struct {
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+type SetupIntentUpdatePaymentMethodDataFPXParams struct {
+ // Account holder type for FPX transaction
+ AccountHolderType *string `form:"account_holder_type"`
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+type SetupIntentUpdatePaymentMethodDataGiropayParams struct{}
+
+// If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method.
+type SetupIntentUpdatePaymentMethodDataGopayParams struct{}
+
+// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+type SetupIntentUpdatePaymentMethodDataGrabpayParams struct{}
+
+// If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method.
+type SetupIntentUpdatePaymentMethodDataIDBankTransferParams struct {
+ // Bank where the account is held.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+type SetupIntentUpdatePaymentMethodDataIDEALParams struct {
+ // The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+type SetupIntentUpdatePaymentMethodDataInteracPresentParams struct{}
+
+// If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+type SetupIntentUpdatePaymentMethodDataKakaoPayParams struct{}
+
+// Customer's date of birth
+type SetupIntentUpdatePaymentMethodDataKlarnaDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+type SetupIntentUpdatePaymentMethodDataKlarnaParams struct {
+ // Customer's date of birth
+ DOB *SetupIntentUpdatePaymentMethodDataKlarnaDOBParams `form:"dob"`
+}
+
+// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+type SetupIntentUpdatePaymentMethodDataKonbiniParams struct{}
+
+// If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+type SetupIntentUpdatePaymentMethodDataKrCardParams struct{}
+
+// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+type SetupIntentUpdatePaymentMethodDataLinkParams struct{}
+
+// If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
+type SetupIntentUpdatePaymentMethodDataMbWayParams struct{}
+
+// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+type SetupIntentUpdatePaymentMethodDataMobilepayParams struct{}
+
+// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+type SetupIntentUpdatePaymentMethodDataMultibancoParams struct{}
+
+// If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+type SetupIntentUpdatePaymentMethodDataNaverPayParams struct {
+ // Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ Funding *string `form:"funding"`
+}
+
+// If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+type SetupIntentUpdatePaymentMethodDataNzBankAccountParams struct {
+ // The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details.
+ AccountHolderName *string `form:"account_holder_name"`
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // The numeric code for the bank account's bank.
+ BankCode *string `form:"bank_code"`
+ // The numeric code for the bank account's bank branch.
+ BranchCode *string `form:"branch_code"`
+ Reference *string `form:"reference"`
+ // The suffix of the bank account number.
+ Suffix *string `form:"suffix"`
+}
+
+// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+type SetupIntentUpdatePaymentMethodDataOXXOParams struct{}
+
+// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+type SetupIntentUpdatePaymentMethodDataP24Params struct {
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+type SetupIntentUpdatePaymentMethodDataPayByBankParams struct{}
+
+// If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+type SetupIntentUpdatePaymentMethodDataPaycoParams struct{}
+
+// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+type SetupIntentUpdatePaymentMethodDataPayNowParams struct{}
+
+// If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+type SetupIntentUpdatePaymentMethodDataPaypalParams struct{}
+
+// If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+type SetupIntentUpdatePaymentMethodDataPaytoParams struct {
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Bank-State-Branch number of the bank account.
+ BSBNumber *string `form:"bsb_number"`
+ // The PayID alias for the bank account.
+ PayID *string `form:"pay_id"`
+}
+
+// If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+type SetupIntentUpdatePaymentMethodDataPixParams struct{}
+
+// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+type SetupIntentUpdatePaymentMethodDataPromptPayParams struct{}
+
+// If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method.
+type SetupIntentUpdatePaymentMethodDataQrisParams struct{}
+
+// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+type SetupIntentUpdatePaymentMethodDataRadarOptionsParams 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"`
+}
+
+// Customer's date of birth
+type SetupIntentUpdatePaymentMethodDataRechnungDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
+type SetupIntentUpdatePaymentMethodDataRechnungParams struct {
+ // Customer's date of birth
+ DOB *SetupIntentUpdatePaymentMethodDataRechnungDOBParams `form:"dob"`
+}
+
+// If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+type SetupIntentUpdatePaymentMethodDataRevolutPayParams struct{}
+
+// If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+type SetupIntentUpdatePaymentMethodDataSamsungPayParams struct{}
+
+// If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
+type SetupIntentUpdatePaymentMethodDataSatispayParams struct{}
+
+// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+type SetupIntentUpdatePaymentMethodDataSEPADebitParams struct {
+ // IBAN of the bank account.
+ IBAN *string `form:"iban"`
+}
+
+// If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method.
+type SetupIntentUpdatePaymentMethodDataShopeepayParams struct{}
+
+// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+type SetupIntentUpdatePaymentMethodDataSofortParams struct {
+ // Two-letter ISO code representing the country the bank account is located in.
+ Country *string `form:"country"`
+}
+
+// This hash contains details about the Stripe balance payment method.
+type SetupIntentUpdatePaymentMethodDataStripeBalanceParams struct {
+ // The connected account ID whose Stripe balance to use as the source of payment
+ Account *string `form:"account"`
+ // The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance
+ SourceType *string `form:"source_type"`
+}
+
+// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+type SetupIntentUpdatePaymentMethodDataSwishParams struct{}
+
+// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+type SetupIntentUpdatePaymentMethodDataTWINTParams struct{}
+
+// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+type SetupIntentUpdatePaymentMethodDataUSBankAccountParams struct {
+ // Account holder type: individual or company.
+ AccountHolderType *string `form:"account_holder_type"`
+ // Account number of the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Account type: checkings or savings. Defaults to checking if omitted.
+ AccountType *string `form:"account_type"`
+ // The ID of a Financial Connections Account to use as a payment method.
+ FinancialConnectionsAccount *string `form:"financial_connections_account"`
+ // Routing number of the bank account.
+ RoutingNumber *string `form:"routing_number"`
+}
+
+// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+type SetupIntentUpdatePaymentMethodDataWeChatPayParams struct{}
+
+// If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+type SetupIntentUpdatePaymentMethodDataZipParams struct{}
+
+// When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+// value in the SetupIntent.
+type SetupIntentUpdatePaymentMethodDataParams struct {
+ // If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ ACSSDebit *SetupIntentUpdatePaymentMethodDataACSSDebitParams `form:"acss_debit"`
+ // If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ Affirm *SetupIntentUpdatePaymentMethodDataAffirmParams `form:"affirm"`
+ // If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ AfterpayClearpay *SetupIntentUpdatePaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ Alipay *SetupIntentUpdatePaymentMethodDataAlipayParams `form:"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 *string `form:"allow_redisplay"`
+ // If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ Alma *SetupIntentUpdatePaymentMethodDataAlmaParams `form:"alma"`
+ // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ AmazonPay *SetupIntentUpdatePaymentMethodDataAmazonPayParams `form:"amazon_pay"`
+ // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ AUBECSDebit *SetupIntentUpdatePaymentMethodDataAUBECSDebitParams `form:"au_becs_debit"`
+ // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ BACSDebit *SetupIntentUpdatePaymentMethodDataBACSDebitParams `form:"bacs_debit"`
+ // If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ Bancontact *SetupIntentUpdatePaymentMethodDataBancontactParams `form:"bancontact"`
+ // If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
+ Billie *SetupIntentUpdatePaymentMethodDataBillieParams `form:"billie"`
+ // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ BillingDetails *SetupIntentUpdatePaymentMethodDataBillingDetailsParams `form:"billing_details"`
+ // If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ BLIK *SetupIntentUpdatePaymentMethodDataBLIKParams `form:"blik"`
+ // If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ Boleto *SetupIntentUpdatePaymentMethodDataBoletoParams `form:"boleto"`
+ // If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ CashApp *SetupIntentUpdatePaymentMethodDataCashAppParams `form:"cashapp"`
+ // If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ CustomerBalance *SetupIntentUpdatePaymentMethodDataCustomerBalanceParams `form:"customer_balance"`
+ // If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ EPS *SetupIntentUpdatePaymentMethodDataEPSParams `form:"eps"`
+ // If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ FPX *SetupIntentUpdatePaymentMethodDataFPXParams `form:"fpx"`
+ // If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ Giropay *SetupIntentUpdatePaymentMethodDataGiropayParams `form:"giropay"`
+ // If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method.
+ Gopay *SetupIntentUpdatePaymentMethodDataGopayParams `form:"gopay"`
+ // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ Grabpay *SetupIntentUpdatePaymentMethodDataGrabpayParams `form:"grabpay"`
+ // If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method.
+ IDBankTransfer *SetupIntentUpdatePaymentMethodDataIDBankTransferParams `form:"id_bank_transfer"`
+ // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ IDEAL *SetupIntentUpdatePaymentMethodDataIDEALParams `form:"ideal"`
+ // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ InteracPresent *SetupIntentUpdatePaymentMethodDataInteracPresentParams `form:"interac_present"`
+ // If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ KakaoPay *SetupIntentUpdatePaymentMethodDataKakaoPayParams `form:"kakao_pay"`
+ // If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ Klarna *SetupIntentUpdatePaymentMethodDataKlarnaParams `form:"klarna"`
+ // If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ Konbini *SetupIntentUpdatePaymentMethodDataKonbiniParams `form:"konbini"`
+ // If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ KrCard *SetupIntentUpdatePaymentMethodDataKrCardParams `form:"kr_card"`
+ // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ Link *SetupIntentUpdatePaymentMethodDataLinkParams `form:"link"`
+ // If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
+ MbWay *SetupIntentUpdatePaymentMethodDataMbWayParams `form:"mb_way"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ Mobilepay *SetupIntentUpdatePaymentMethodDataMobilepayParams `form:"mobilepay"`
+ // If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ Multibanco *SetupIntentUpdatePaymentMethodDataMultibancoParams `form:"multibanco"`
+ // If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ NaverPay *SetupIntentUpdatePaymentMethodDataNaverPayParams `form:"naver_pay"`
+ // If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ NzBankAccount *SetupIntentUpdatePaymentMethodDataNzBankAccountParams `form:"nz_bank_account"`
+ // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ OXXO *SetupIntentUpdatePaymentMethodDataOXXOParams `form:"oxxo"`
+ // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ P24 *SetupIntentUpdatePaymentMethodDataP24Params `form:"p24"`
+ // If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ PayByBank *SetupIntentUpdatePaymentMethodDataPayByBankParams `form:"pay_by_bank"`
+ // If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ Payco *SetupIntentUpdatePaymentMethodDataPaycoParams `form:"payco"`
+ // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ PayNow *SetupIntentUpdatePaymentMethodDataPayNowParams `form:"paynow"`
+ // If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ Paypal *SetupIntentUpdatePaymentMethodDataPaypalParams `form:"paypal"`
+ // If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+ Payto *SetupIntentUpdatePaymentMethodDataPaytoParams `form:"payto"`
+ // If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ Pix *SetupIntentUpdatePaymentMethodDataPixParams `form:"pix"`
+ // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ PromptPay *SetupIntentUpdatePaymentMethodDataPromptPayParams `form:"promptpay"`
+ // If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method.
+ Qris *SetupIntentUpdatePaymentMethodDataQrisParams `form:"qris"`
+ // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ RadarOptions *SetupIntentUpdatePaymentMethodDataRadarOptionsParams `form:"radar_options"`
+ // If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
+ Rechnung *SetupIntentUpdatePaymentMethodDataRechnungParams `form:"rechnung"`
+ // If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ RevolutPay *SetupIntentUpdatePaymentMethodDataRevolutPayParams `form:"revolut_pay"`
+ // If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ SamsungPay *SetupIntentUpdatePaymentMethodDataSamsungPayParams `form:"samsung_pay"`
+ // If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
+ Satispay *SetupIntentUpdatePaymentMethodDataSatispayParams `form:"satispay"`
+ // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ SEPADebit *SetupIntentUpdatePaymentMethodDataSEPADebitParams `form:"sepa_debit"`
+ // If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method.
+ Shopeepay *SetupIntentUpdatePaymentMethodDataShopeepayParams `form:"shopeepay"`
+ // If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ Sofort *SetupIntentUpdatePaymentMethodDataSofortParams `form:"sofort"`
+ // This hash contains details about the Stripe balance payment method.
+ StripeBalance *SetupIntentUpdatePaymentMethodDataStripeBalanceParams `form:"stripe_balance"`
+ // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ Swish *SetupIntentUpdatePaymentMethodDataSwishParams `form:"swish"`
+ // If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ TWINT *SetupIntentUpdatePaymentMethodDataTWINTParams `form:"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 *string `form:"type"`
+ // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ USBankAccount *SetupIntentUpdatePaymentMethodDataUSBankAccountParams `form:"us_bank_account"`
+ // If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ WeChatPay *SetupIntentUpdatePaymentMethodDataWeChatPayParams `form:"wechat_pay"`
+ // If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ Zip *SetupIntentUpdatePaymentMethodDataZipParams `form:"zip"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SetupIntentUpdatePaymentMethodDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Additional fields for Mandate creation
+type SetupIntentUpdatePaymentMethodOptionsACSSDebitMandateOptionsParams struct {
+ // A URL for custom mandate text to render during confirmation step.
+ // The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent,
+ // or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent.
+ CustomMandateURL *string `form:"custom_mandate_url"`
+ // List of Stripe products where this mandate can be selected automatically.
+ DefaultFor []*string `form:"default_for"`
+ // Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'.
+ IntervalDescription *string `form:"interval_description"`
+ // Payment schedule for the mandate.
+ PaymentSchedule *string `form:"payment_schedule"`
+ // Transaction type of the mandate.
+ TransactionType *string `form:"transaction_type"`
+}
+
+// If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+type SetupIntentUpdatePaymentMethodOptionsACSSDebitParams struct {
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // Additional fields for Mandate creation
+ MandateOptions *SetupIntentUpdatePaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"`
+ // Bank account verification method.
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+type SetupIntentUpdatePaymentMethodOptionsAmazonPayParams struct{}
+
+// Additional fields for Mandate creation
+type SetupIntentUpdatePaymentMethodOptionsBACSDebitMandateOptionsParams 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"`
+}
+
+// If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+type SetupIntentUpdatePaymentMethodOptionsBACSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *SetupIntentUpdatePaymentMethodOptionsBACSDebitMandateOptionsParams `form:"mandate_options"`
+}
+
+// Configuration options for setting up an eMandate for cards issued in India.
+type SetupIntentUpdatePaymentMethodOptionsCardMandateOptionsParams struct {
+ // Amount to be charged for future payments.
+ Amount *int64 `form:"amount"`
+ // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ AmountType *string `form:"amount_type"`
+ // Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // A description of the mandate or subscription that is meant to be displayed to the customer.
+ Description *string `form:"description"`
+ // End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
+ EndDate *int64 `form:"end_date"`
+ // Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
+ Interval *string `form:"interval"`
+ // The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
+ IntervalCount *int64 `form:"interval_count"`
+ // Unique identifier for the mandate or subscription.
+ Reference *string `form:"reference"`
+ // Start date of the mandate or subscription. Start date should not be lesser than yesterday.
+ StartDate *int64 `form:"start_date"`
+ // Specifies the type of mandates supported. Possible values are `india`.
+ SupportedTypes []*string `form:"supported_types"`
+}
+
+// Cartes Bancaires-specific 3DS fields.
+type SetupIntentUpdatePaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesParams struct {
+ // The cryptogram calculation algorithm used by the card Issuer's ACS
+ // to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`.
+ // messageExtension: CB-AVALGO
+ CbAvalgo *string `form:"cb_avalgo"`
+ // The exemption indicator returned from Cartes Bancaires in the ARes.
+ // message extension: CB-EXEMPTION; string (4 characters)
+ // This is a 3 byte bitmap (low significant byte first and most significant
+ // bit first) that has been Base64 encoded
+ CbExemption *string `form:"cb_exemption"`
+ // The risk score returned from Cartes Bancaires in the ARes.
+ // message extension: CB-SCORE; numeric value 0-99
+ CbScore *int64 `form:"cb_score"`
+}
+
+// Network specific 3DS fields. Network specific arguments require an
+// explicit card brand choice. The parameter `payment_method_options.card.network“
+// must be populated accordingly
+type SetupIntentUpdatePaymentMethodOptionsCardThreeDSecureNetworkOptionsParams struct {
+ // Cartes Bancaires-specific 3DS fields.
+ CartesBancaires *SetupIntentUpdatePaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancairesParams `form:"cartes_bancaires"`
+}
+
+// If 3D Secure authentication was performed with a third-party provider,
+// the authentication details to use for this setup.
+type SetupIntentUpdatePaymentMethodOptionsCardThreeDSecureParams struct {
+ // The `transStatus` returned from the card Issuer's ACS in the ARes.
+ AresTransStatus *string `form:"ares_trans_status"`
+ // The cryptogram, also known as the "authentication value" (AAV, CAVV or
+ // AEVV). This value is 20 bytes, base64-encoded into a 28-character string.
+ // (Most 3D Secure providers will return the base64-encoded version, which
+ // is what you should specify here.)
+ Cryptogram *string `form:"cryptogram"`
+ // The Electronic Commerce Indicator (ECI) is returned by your 3D Secure
+ // provider and indicates what degree of authentication was performed.
+ ElectronicCommerceIndicator *string `form:"electronic_commerce_indicator"`
+ // Network specific 3DS fields. Network specific arguments require an
+ // explicit card brand choice. The parameter `payment_method_options.card.network``
+ // must be populated accordingly
+ NetworkOptions *SetupIntentUpdatePaymentMethodOptionsCardThreeDSecureNetworkOptionsParams `form:"network_options"`
+ // The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the
+ // AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99.
+ RequestorChallengeIndicator *string `form:"requestor_challenge_indicator"`
+ // For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server
+ // Transaction ID (dsTransID).
+ TransactionID *string `form:"transaction_id"`
+ // The version of 3D Secure that was performed.
+ Version *string `form:"version"`
+}
+
+// Configuration for any card setup attempted on this SetupIntent.
+type SetupIntentUpdatePaymentMethodOptionsCardParams struct {
+ // Configuration options for setting up an eMandate for cards issued in India.
+ MandateOptions *SetupIntentUpdatePaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"`
+ // When specified, this parameter signals that a card has been collected
+ // as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
+ // parameter can only be provided during confirmation.
+ MOTO *bool `form:"moto"`
+ // Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time.
+ Network *string `form:"network"`
+ // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. 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"`
+ // If 3D Secure authentication was performed with a third-party provider,
+ // the authentication details to use for this setup.
+ ThreeDSecure *SetupIntentUpdatePaymentMethodOptionsCardThreeDSecureParams `form:"three_d_secure"`
+}
+
+// If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+type SetupIntentUpdatePaymentMethodOptionsCardPresentParams struct{}
+
+// If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+type SetupIntentUpdatePaymentMethodOptionsLinkParams struct {
+ // [Deprecated] This is a legacy parameter that no longer has any function.
+ // Deprecated:
+ PersistentToken *string `form:"persistent_token"`
+}
+
+// If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+type SetupIntentUpdatePaymentMethodOptionsPaypalParams struct {
+ // The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer.
+ BillingAgreementID *string `form:"billing_agreement_id"`
+ Currency *string `form:"currency"`
+ // The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
+ Subsellers []*string `form:"subsellers"`
+}
+
+// Additional fields for Mandate creation.
+type SetupIntentUpdatePaymentMethodOptionsPaytoMandateOptionsParams struct {
+ // Amount that will be collected. It is required when `amount_type` is `fixed`.
+ Amount *int64 `form:"amount"`
+ // The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively.
+ AmountType *string `form:"amount_type"`
+ // Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
+ EndDate *string `form:"end_date"`
+ // The periodicity at which payments will be collected.
+ PaymentSchedule *string `form:"payment_schedule"`
+ // The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.
+ PaymentsPerPeriod *int64 `form:"payments_per_period"`
+ // The purpose for which payments are made. Defaults to retail.
+ Purpose *string `form:"purpose"`
+ // Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
+ StartDate *string `form:"start_date"`
+}
+
+// If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options.
+type SetupIntentUpdatePaymentMethodOptionsPaytoParams struct {
+ // Additional fields for Mandate creation.
+ MandateOptions *SetupIntentUpdatePaymentMethodOptionsPaytoMandateOptionsParams `form:"mandate_options"`
+}
+
+// Additional fields for Mandate creation
+type SetupIntentUpdatePaymentMethodOptionsSEPADebitMandateOptionsParams 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"`
+}
+
+// If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+type SetupIntentUpdatePaymentMethodOptionsSEPADebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *SetupIntentUpdatePaymentMethodOptionsSEPADebitMandateOptionsParams `form:"mandate_options"`
+}
+
+// Provide filters for the linked accounts that the customer can select for the payment method.
+type SetupIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams struct {
+ // The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ AccountSubcategories []*string `form:"account_subcategories"`
+ // ID of the institution to use to filter for selectable accounts.
+ Institution *string `form:"institution"`
+}
+
+// Customize manual entry behavior
+type SetupIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsManualEntryParams struct {
+ // Settings for configuring manual entry of account details.
+ Mode *string `form:"mode"`
+}
+
+// Additional fields for Financial Connections Session creation
+type SetupIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
+ // Provide filters for the linked accounts that the customer can select for the payment method.
+ Filters *SetupIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams `form:"filters"`
+ // Customize manual entry behavior
+ ManualEntry *SetupIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsManualEntryParams `form:"manual_entry"`
+ // 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"`
+ // For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
+ ReturnURL *string `form:"return_url"`
+}
+
+// Additional fields for Mandate creation
+type SetupIntentUpdatePaymentMethodOptionsUSBankAccountMandateOptionsParams struct {
+ // The method used to collect offline mandate customer acceptance.
+ CollectionMethod *string `form:"collection_method"`
+}
+
+// Additional fields for network related functions
+type SetupIntentUpdatePaymentMethodOptionsUSBankAccountNetworksParams struct {
+ // Triggers validations to run across the selected networks
+ Requested []*string `form:"requested"`
+}
+
+// If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+type SetupIntentUpdatePaymentMethodOptionsUSBankAccountParams struct {
+ // Additional fields for Financial Connections Session creation
+ FinancialConnections *SetupIntentUpdatePaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
+ // Additional fields for Mandate creation
+ MandateOptions *SetupIntentUpdatePaymentMethodOptionsUSBankAccountMandateOptionsParams `form:"mandate_options"`
+ // Additional fields for network related functions
+ Networks *SetupIntentUpdatePaymentMethodOptionsUSBankAccountNetworksParams `form:"networks"`
+ // Bank account verification method.
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// Payment method-specific configuration for this SetupIntent.
+type SetupIntentUpdatePaymentMethodOptionsParams struct {
+ // If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options.
+ ACSSDebit *SetupIntentUpdatePaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
+ // If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options.
+ AmazonPay *SetupIntentUpdatePaymentMethodOptionsAmazonPayParams `form:"amazon_pay"`
+ // If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
+ BACSDebit *SetupIntentUpdatePaymentMethodOptionsBACSDebitParams `form:"bacs_debit"`
+ // Configuration for any card setup attempted on this SetupIntent.
+ Card *SetupIntentUpdatePaymentMethodOptionsCardParams `form:"card"`
+ // If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
+ CardPresent *SetupIntentUpdatePaymentMethodOptionsCardPresentParams `form:"card_present"`
+ // If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
+ Link *SetupIntentUpdatePaymentMethodOptionsLinkParams `form:"link"`
+ // If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
+ Paypal *SetupIntentUpdatePaymentMethodOptionsPaypalParams `form:"paypal"`
+ // If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options.
+ Payto *SetupIntentUpdatePaymentMethodOptionsPaytoParams `form:"payto"`
+ // If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
+ SEPADebit *SetupIntentUpdatePaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
+ // If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options.
+ USBankAccount *SetupIntentUpdatePaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
+}
+
+// Updates a SetupIntent object.
+type SetupIntentUpdateParams struct {
+ Params `form:"*"`
+ // If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
+ //
+ // It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
+ AttachToSelf *bool `form:"attach_to_self"`
+ // ID of the Customer this SetupIntent belongs to, if one exists.
+ //
+ // If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
+ Customer *string `form:"customer"`
+ // ID of the Account this SetupIntent belongs to, if one exists.
+ //
+ // If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent.
+ CustomerAccount *string `form:"customer_account"`
+ // 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"`
+ // Indicates the directions of money movement for which this payment method is intended to be used.
+ //
+ // Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
+ FlowDirections []*string `form:"flow_directions"`
+ // 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"`
+ // ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string.
+ PaymentMethod *string `form:"payment_method"`
+ // The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent.
+ PaymentMethodConfiguration *string `form:"payment_method_configuration"`
+ // When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method)
+ // value in the SetupIntent.
+ PaymentMethodData *SetupIntentUpdatePaymentMethodDataParams `form:"payment_method_data"`
+ // Payment method-specific configuration for this SetupIntent.
+ PaymentMethodOptions *SetupIntentUpdatePaymentMethodOptionsParams `form:"payment_method_options"`
+ // The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SetupIntentUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SetupIntentUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Settings for dynamic payment methods compatible with this Setup Intent
type SetupIntentAutomaticPaymentMethods struct {
// Controls whether this SetupIntent will accept redirect-based payment methods.
diff --git a/shippingrate.go b/shippingrate.go
index 0ae5ca22ed..226ddbf1e0 100644
--- a/shippingrate.go
+++ b/shippingrate.go
@@ -159,6 +159,138 @@ func (p *ShippingRateParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+type ShippingRateCreateDeliveryEstimateMaximumParams 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 ShippingRateCreateDeliveryEstimateMinimumParams struct {
+ // A unit of time.
+ Unit *string `form:"unit"`
+ // Must be greater than 0.
+ Value *int64 `form:"value"`
+}
+
+// The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+type ShippingRateCreateDeliveryEstimateParams struct {
+ // The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
+ Maximum *ShippingRateCreateDeliveryEstimateMaximumParams `form:"maximum"`
+ // The lower bound of the estimated range. If empty, represents no lower bound.
+ Minimum *ShippingRateCreateDeliveryEstimateMinimumParams `form:"minimum"`
+}
+
+// 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 ShippingRateCreateFixedAmountCurrencyOptionsParams 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"`
+}
+
+// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+type ShippingRateCreateFixedAmountParams 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]*ShippingRateCreateFixedAmountCurrencyOptionsParams `form:"currency_options"`
+}
+
+// Creates a new shipping rate object.
+type ShippingRateCreateParams struct {
+ Params `form:"*"`
+ // The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
+ DeliveryEstimate *ShippingRateCreateDeliveryEstimateParams `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"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ FixedAmount *ShippingRateCreateFixedAmountParams `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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ShippingRateCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *ShippingRateCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Returns the shipping rate object with the given ID.
+type ShippingRateRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ShippingRateRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// 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 ShippingRateUpdateFixedAmountCurrencyOptionsParams 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"`
+}
+
+// Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+type ShippingRateUpdateFixedAmountParams struct {
+ // 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]*ShippingRateUpdateFixedAmountCurrencyOptionsParams `form:"currency_options"`
+}
+
+// Updates an existing shipping rate object.
+type ShippingRateUpdateParams struct {
+ Params `form:"*"`
+ // Whether the shipping rate can be used for new purchases. Defaults to `true`.
+ Active *bool `form:"active"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
+ FixedAmount *ShippingRateUpdateFixedAmountParams `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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *ShippingRateUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *ShippingRateUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
type ShippingRateDeliveryEstimateMaximum struct {
// A unit of time.
diff --git a/sigma_scheduledqueryrun.go b/sigma_scheduledqueryrun.go
index 4fdd86d99b..362ee87ec6 100644
--- a/sigma_scheduledqueryrun.go
+++ b/sigma_scheduledqueryrun.go
@@ -41,6 +41,18 @@ func (p *SigmaScheduledQueryRunParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of an scheduled query run.
+type SigmaScheduledQueryRunRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SigmaScheduledQueryRunRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type SigmaScheduledQueryRunError struct {
// Information about the run failure.
Message string `json:"message"`
diff --git a/source.go b/source.go
index 787d5a42be..c2815e844d 100644
--- a/source.go
+++ b/source.go
@@ -266,6 +266,275 @@ type SourceRedirectParams struct {
// The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application.
ReturnURL *string `form:"return_url"`
}
+
+// Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.
+type SourceRetrieveParams struct {
+ Params `form:"*"`
+ // The client secret of the source. Required if a publishable key is used to retrieve the source.
+ ClientSecret *string `form:"client_secret"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SourceRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+type SourceUpdateMandateAcceptanceOfflineParams struct {
+ // An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
+ ContactEmail *string `form:"contact_email"`
+}
+
+// The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+type SourceUpdateMandateAcceptanceOnlineParams struct {
+ // The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ Date *int64 `form:"date"`
+ // The IP address from which the mandate was accepted or refused by the customer.
+ IP *string `form:"ip"`
+ // The user agent of the browser from which the mandate was accepted or refused by the customer.
+ UserAgent *string `form:"user_agent"`
+}
+
+// The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+type SourceUpdateMandateAcceptanceParams struct {
+ // The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ Date *int64 `form:"date"`
+ // The IP address from which the mandate was accepted or refused by the customer.
+ IP *string `form:"ip"`
+ // The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+ Offline *SourceUpdateMandateAcceptanceOfflineParams `form:"offline"`
+ // The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+ Online *SourceUpdateMandateAcceptanceOnlineParams `form:"online"`
+ // The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
+ Status *string `form:"status"`
+ // The type of acceptance information included with the mandate. Either `online` or `offline`
+ Type *string `form:"type"`
+ // The user agent of the browser from which the mandate was accepted or refused by the customer.
+ UserAgent *string `form:"user_agent"`
+}
+
+// Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+type SourceUpdateMandateParams struct {
+ // The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+ Acceptance *SourceUpdateMandateAcceptanceParams `form:"acceptance"`
+ // The amount specified by the mandate. (Leave null for a mandate covering all amounts)
+ Amount *int64 `form:"amount"`
+ // The currency specified by the mandate. (Must match `currency` of the source)
+ Currency *string `form:"currency"`
+ // The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
+ Interval *string `form:"interval"`
+ // The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
+ NotificationMethod *string `form:"notification_method"`
+}
+
+// Information about the owner of the payment instrument that may be used or required by particular source types.
+type SourceUpdateOwnerParams 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"`
+}
+
+// List of items constituting the order.
+type SourceUpdateSourceOrderItemParams struct {
+ Amount *int64 `form:"amount"`
+ Currency *string `form:"currency"`
+ Description *string `form:"description"`
+ // The ID of the SKU being ordered.
+ Parent *string `form:"parent"`
+ // The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ Quantity *int64 `form:"quantity"`
+ Type *string `form:"type"`
+}
+
+// Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+type SourceUpdateSourceOrderParams struct {
+ // List of items constituting the order.
+ Items []*SourceUpdateSourceOrderItemParams `form:"items"`
+ // Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
+ Shipping *ShippingDetailsParams `form:"shipping"`
+}
+
+// Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+//
+// This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](https://stripe.com/docs/sources) for more detail.
+type SourceUpdateParams struct {
+ Params `form:"*"`
+ // Amount associated with the source.
+ Amount *int64 `form:"amount"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+ Mandate *SourceUpdateMandateParams `form:"mandate"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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"`
+ // Information about the owner of the payment instrument that may be used or required by particular source types.
+ Owner *SourceUpdateOwnerParams `form:"owner"`
+ // Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+ SourceOrder *SourceUpdateSourceOrderParams `form:"source_order"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SourceUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SourceUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+type SourceCreateMandateAcceptanceOfflineParams struct {
+ // An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
+ ContactEmail *string `form:"contact_email"`
+}
+
+// The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+type SourceCreateMandateAcceptanceOnlineParams struct {
+ // The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ Date *int64 `form:"date"`
+ // The IP address from which the mandate was accepted or refused by the customer.
+ IP *string `form:"ip"`
+ // The user agent of the browser from which the mandate was accepted or refused by the customer.
+ UserAgent *string `form:"user_agent"`
+}
+
+// The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+type SourceCreateMandateAcceptanceParams struct {
+ // The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
+ Date *int64 `form:"date"`
+ // The IP address from which the mandate was accepted or refused by the customer.
+ IP *string `form:"ip"`
+ // The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
+ Offline *SourceCreateMandateAcceptanceOfflineParams `form:"offline"`
+ // The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
+ Online *SourceCreateMandateAcceptanceOnlineParams `form:"online"`
+ // The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
+ Status *string `form:"status"`
+ // The type of acceptance information included with the mandate. Either `online` or `offline`
+ Type *string `form:"type"`
+ // The user agent of the browser from which the mandate was accepted or refused by the customer.
+ UserAgent *string `form:"user_agent"`
+}
+
+// Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+type SourceCreateMandateParams struct {
+ // The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
+ Acceptance *SourceCreateMandateAcceptanceParams `form:"acceptance"`
+ // The amount specified by the mandate. (Leave null for a mandate covering all amounts)
+ Amount *int64 `form:"amount"`
+ // The currency specified by the mandate. (Must match `currency` of the source)
+ Currency *string `form:"currency"`
+ // The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
+ Interval *string `form:"interval"`
+ // The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
+ NotificationMethod *string `form:"notification_method"`
+}
+
+// Information about the owner of the payment instrument that may be used or required by particular source types.
+type SourceCreateOwnerParams 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"`
+}
+
+// Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).
+type SourceCreateReceiverParams struct {
+ // The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required.
+ RefundAttributesMethod *string `form:"refund_attributes_method"`
+}
+
+// Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).
+type SourceCreateRedirectParams struct {
+ // The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application.
+ ReturnURL *string `form:"return_url"`
+}
+
+// List of items constituting the order.
+type SourceCreateSourceOrderItemParams struct {
+ Amount *int64 `form:"amount"`
+ Currency *string `form:"currency"`
+ Description *string `form:"description"`
+ // The ID of the SKU being ordered.
+ Parent *string `form:"parent"`
+ // The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
+ Quantity *int64 `form:"quantity"`
+ Type *string `form:"type"`
+}
+
+// Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+type SourceCreateSourceOrderParams struct {
+ // List of items constituting the order.
+ Items []*SourceCreateSourceOrderItemParams `form:"items"`
+ // Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
+ Shipping *ShippingDetailsParams `form:"shipping"`
+}
+
+// Creates a new source object.
+type SourceCreateParams struct {
+ Params `form:"*"`
+ // Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.
+ Amount *int64 `form:"amount"`
+ // Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.
+ Currency *string `form:"currency"`
+ // The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).
+ Customer *string `form:"customer"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.
+ Flow *string `form:"flow"`
+ // Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
+ Mandate *SourceCreateMandateParams `form:"mandate"`
+ Metadata map[string]string `form:"metadata"`
+ // The source to share.
+ OriginalSource *string `form:"original_source"`
+ // Information about the owner of the payment instrument that may be used or required by particular source types.
+ Owner *SourceCreateOwnerParams `form:"owner"`
+ // Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).
+ Receiver *SourceCreateReceiverParams `form:"receiver"`
+ // Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).
+ Redirect *SourceCreateRedirectParams `form:"redirect"`
+ // Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
+ SourceOrder *SourceCreateSourceOrderParams `form:"source_order"`
+ // An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.
+ StatementDescriptor *string `form:"statement_descriptor"`
+ // An optional token used to create the source. When passed, token properties will override source parameters.
+ Token *string `form:"token"`
+ // The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide)
+ Type *string `form:"type"`
+ Usage *string `form:"usage"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SourceCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SourceCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
type SourceACHCreditTransfer struct {
AccountNumber string `json:"account_number"`
BankName string `json:"bank_name"`
diff --git a/subscription.go b/subscription.go
index 1163629d25..a00921fc4e 100644
--- a/subscription.go
+++ b/subscription.go
@@ -877,6 +877,1004 @@ func (p *SubscriptionResumeParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the subscription with the given ID.
+type SubscriptionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SubscriptionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Time span for the redeemed discount.
+type SubscriptionUpdateAddInvoiceItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionUpdateAddInvoiceItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionUpdateAddInvoiceItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the item.
+type SubscriptionUpdateAddInvoiceItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionUpdateAddInvoiceItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+type SubscriptionUpdateAddInvoiceItemParams struct {
+ // The coupons to redeem into discounts for the item.
+ Discounts []*SubscriptionUpdateAddInvoiceItemDiscountParams `form:"discounts"`
+ // The ID of the price object. One of `price` or `price_data` is required.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ PriceData *InvoiceItemPriceDataParams `form:"price_data"`
+ // Quantity for this item. Defaults to 1.
+ Quantity *int64 `form:"quantity"`
+ // The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ TaxRates []*string `form:"tax_rates"`
+}
+
+// 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 SubscriptionUpdateAutomaticTaxLiabilityParams 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"`
+}
+
+// Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+type SubscriptionUpdateAutomaticTaxParams struct {
+ // Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ 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 *SubscriptionUpdateAutomaticTaxLiabilityParams `form:"liability"`
+}
+
+// Details about why this subscription was cancelled
+type SubscriptionUpdateCancellationDetailsParams struct {
+ // Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
+ Comment *string `form:"comment"`
+ // The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
+ Feedback *string `form:"feedback"`
+}
+
+// Time span for the redeemed discount.
+type SubscriptionUpdateDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionUpdateDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionUpdateDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+type SubscriptionUpdateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionUpdateDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type SubscriptionUpdateInvoiceSettingsIssuerParams 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"`
+}
+
+// All invoices will be billed using the specified settings.
+type SubscriptionUpdateInvoiceSettingsParams struct {
+ // The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ AccountTaxIDs []*string `form:"account_tax_ids"`
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *SubscriptionUpdateInvoiceSettingsIssuerParams `form:"issuer"`
+}
+
+// Time span for the redeemed discount.
+type SubscriptionUpdateItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionUpdateItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionUpdateItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the subscription item.
+type SubscriptionUpdateItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionUpdateItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The recurring components of a price such as `interval` and `interval_count`.
+type SubscriptionUpdateItemPriceDataRecurringParams 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"`
+}
+
+// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+type SubscriptionUpdateItemPriceDataParams 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](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ Product *string `form:"product"`
+ // The recurring components of a price such as `interval` and `interval_count`.
+ Recurring *SubscriptionUpdateItemPriceDataRecurringParams `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 positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// A list of up to 20 subscription items, each with an attached price.
+type SubscriptionUpdateItemParams struct {
+ // Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
+ ClearUsage *bool `form:"clear_usage"`
+ // A flag that, if set to `true`, will delete the specified item.
+ Deleted *bool `form:"deleted"`
+ // The coupons to redeem into discounts for the subscription item.
+ Discounts []*SubscriptionUpdateItemDiscountParams `form:"discounts"`
+ // Subscription item to update.
+ ID *string `form:"id"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // Plan ID for this item, as a string.
+ Plan *string `form:"plan"`
+ // The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ PriceData *SubscriptionUpdateItemPriceDataParams `form:"price_data"`
+ // Quantity for this item.
+ Quantity *int64 `form:"quantity"`
+ // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ TaxRates []*string `form:"tax_rates"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionUpdateItemParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+type SubscriptionUpdatePauseCollectionParams struct {
+ // The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
+ Behavior *string `form:"behavior"`
+ // The time after which the subscription will resume collecting payments.
+ ResumesAt *int64 `form:"resumes_at"`
+}
+
+// Additional fields for Mandate creation
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams struct {
+ // Transaction type of the mandate.
+ TransactionType *string `form:"transaction_type"`
+}
+
+// This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsACSSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"`
+ // Verification method for the intent
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsBancontactParams struct {
+ // Preferred language of the Bancontact authorization page that the customer is redirected to.
+ PreferredLanguage *string `form:"preferred_language"`
+}
+
+// Configuration options for setting up an eMandate for cards issued in India.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsCardMandateOptionsParams struct {
+ // Amount to be charged for future payments.
+ Amount *int64 `form:"amount"`
+ // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ AmountType *string `form:"amount_type"`
+ // A description of the mandate or subscription that is meant to be displayed to the customer.
+ Description *string `form:"description"`
+}
+
+// This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsCardParams struct {
+ // Configuration options for setting up an eMandate for cards issued in India.
+ MandateOptions *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"`
+ // Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ Network *string `form:"network"`
+ // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/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"`
+}
+
+// Configuration for eu_bank_transfer funding type.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams 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 the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams struct {
+ // Configuration for eu_bank_transfer funding type.
+ EUBankTransfer *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
+ // The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ Type *string `form:"type"`
+}
+
+// This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct {
+ // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ BankTransfer *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"`
+ // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ FundingType *string `form:"funding_type"`
+}
+
+// This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsIDBankTransferParams struct{}
+
+// This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsKonbiniParams struct{}
+
+// This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsSEPADebitParams struct{}
+
+// Provide filters for the linked accounts that the customer can select for the payment method.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams struct {
+ // The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ AccountSubcategories []*string `form:"account_subcategories"`
+ // ID of the institution to use to filter for selectable accounts.
+ Institution *string `form:"institution"`
+}
+
+// Additional fields for Financial Connections Session creation
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
+ // Provide filters for the linked accounts that the customer can select for the payment method.
+ Filters *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams `form:"filters"`
+ // 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"`
+}
+
+// This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountParams struct {
+ // Additional fields for Financial Connections Session creation
+ FinancialConnections *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
+ // Verification method for the intent
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// Payment-method-specific configuration to provide to invoices created by the subscription.
+type SubscriptionUpdatePaymentSettingsPaymentMethodOptionsParams struct {
+ // This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
+ ACSSDebit *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
+ // This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
+ Bancontact *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsBancontactParams `form:"bancontact"`
+ // This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
+ Card *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsCardParams `form:"card"`
+ // This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
+ CustomerBalance *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
+ // This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
+ IDBankTransfer *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsIDBankTransferParams `form:"id_bank_transfer"`
+ // This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
+ Konbini *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsKonbiniParams `form:"konbini"`
+ // This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
+ SEPADebit *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
+ // This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
+ USBankAccount *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
+}
+
+// Payment settings to pass to invoices created by the subscription.
+type SubscriptionUpdatePaymentSettingsParams struct {
+ // Payment-method-specific configuration to provide to invoices created by the subscription.
+ PaymentMethodOptions *SubscriptionUpdatePaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"`
+ // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+ // Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
+ SaveDefaultPaymentMethod *string `form:"save_default_payment_method"`
+}
+
+// Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+type SubscriptionUpdatePendingInvoiceItemIntervalParams struct {
+ // Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// If specified, the invoicing for the given billing cycle iterations will be processed now.
+type SubscriptionUpdatePrebillingParams struct {
+ // This is used to determine the number of billing cycles to prebill.
+ Iterations *int64 `form:"iterations"`
+ // Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
+ UpdateBehavior *string `form:"update_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. This will be unset if you POST an empty value.
+type SubscriptionUpdateTransferDataParams 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"`
+}
+
+// Defines how the subscription should behave when the user's free trial ends.
+type SubscriptionUpdateTrialSettingsEndBehaviorParams 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"`
+}
+
+// Settings related to subscription trials.
+type SubscriptionUpdateTrialSettingsParams struct {
+ // Defines how the subscription should behave when the user's free trial ends.
+ EndBehavior *SubscriptionUpdateTrialSettingsEndBehaviorParams `form:"end_behavior"`
+}
+
+// Updates an existing subscription to match the specified parameters.
+// When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
+// To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
+//
+// By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.
+//
+// Switching prices does not normally change the billing date or generate an immediate charge unless:
+//
+// The billing interval is changed (for example, from monthly to yearly).
+// The subscription moves from free to paid.
+// A trial starts or ends.
+//
+// In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment).
+//
+// If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
+//
+// If you don't want to prorate, set the proration_behavior option to none. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (for example, from monthly to yearly), we don't generate any credits for the old subscription's unused time. We still reset the billing date and bill immediately for the new subscription.
+//
+// Updating the quantity on a subscription many times in an hour may result in [rate limiting. If you need to bill for a frequently changing quantity, consider integrating usage-based billing](https://stripe.com/docs/rate-limits) instead.
+type SubscriptionUpdateParams struct {
+ Params `form:"*"`
+ // A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+ AddInvoiceItems []*SubscriptionUpdateAddInvoiceItemParams `form:"add_invoice_items"`
+ // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ ApplicationFeePercent *float64 `form:"application_fee_percent"`
+ // Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+ AutomaticTax *SubscriptionUpdateAutomaticTaxParams `form:"automatic_tax"`
+ // Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ BillingCycleAnchor *int64 `form:"billing_cycle_anchor"`
+ BillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo
+ BillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo
+ // A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ CancelAt *int64 `form:"cancel_at"`
+ // Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ CancelAtPeriodEnd *bool `form:"cancel_at_period_end"`
+ // Details about why this subscription was cancelled
+ CancellationDetails *SubscriptionUpdateCancellationDetailsParams `form:"cancellation_details"`
+ // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ CollectionMethod *string `form:"collection_method"`
+ // Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ DefaultPaymentMethod *string `form:"default_payment_method"`
+ // ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ DefaultSource *string `form:"default_source"`
+ // The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates.
+ DefaultTaxRates []*string `form:"default_tax_rates"`
+ // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ Description *string `form:"description"`
+ // The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+ Discounts []*SubscriptionUpdateDiscountParams `form:"discounts"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // All invoices will be billed using the specified settings.
+ InvoiceSettings *SubscriptionUpdateInvoiceSettingsParams `form:"invoice_settings"`
+ // A list of up to 20 subscription items, each with an attached price.
+ Items []*SubscriptionUpdateItemParams `form:"items"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ OffSession *bool `form:"off_session"`
+ // The account on behalf of which to charge, for each of the subscription's invoices.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+ PauseCollection *SubscriptionUpdatePauseCollectionParams `form:"pause_collection"`
+ // Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ //
+ // Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ //
+ // Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ //
+ // Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ PaymentBehavior *string `form:"payment_behavior"`
+ // Payment settings to pass to invoices created by the subscription.
+ PaymentSettings *SubscriptionUpdatePaymentSettingsParams `form:"payment_settings"`
+ // Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ PendingInvoiceItemInterval *SubscriptionUpdatePendingInvoiceItemIntervalParams `form:"pending_invoice_item_interval"`
+ // If specified, the invoicing for the given billing cycle iterations will be processed now.
+ Prebilling *SubscriptionUpdatePrebillingParams `form:"prebilling"`
+ // Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ ProrationBehavior *string `form:"proration_behavior"`
+ // If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.
+ ProrationDate *int64 `form:"proration_date"`
+ // If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value.
+ TransferData *SubscriptionUpdateTransferDataParams `form:"transfer_data"`
+ // Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`.
+ TrialEnd *int64 `form:"trial_end"`
+ TrialEndNow *bool `form:"-"` // See custom AppendTo
+ // Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ TrialFromPlan *bool `form:"trial_from_plan"`
+ // Settings related to subscription trials.
+ TrialSettings *SubscriptionUpdateTrialSettingsParams `form:"trial_settings"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SubscriptionUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// AppendTo implements custom encoding logic for SubscriptionUpdateParams.
+func (p *SubscriptionUpdateParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.BillingCycleAnchorNow) {
+ body.Add(form.FormatKey(append(keyParts, "billing_cycle_anchor")), "now")
+ }
+ if BoolValue(p.BillingCycleAnchorUnchanged) {
+ body.Add(form.FormatKey(append(keyParts, "billing_cycle_anchor")), "unchanged")
+ }
+ if BoolValue(p.TrialEndNow) {
+ body.Add(form.FormatKey(append(keyParts, "trial_end")), "now")
+ }
+}
+
+// Time span for the redeemed discount.
+type SubscriptionCreateAddInvoiceItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionCreateAddInvoiceItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionCreateAddInvoiceItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the item.
+type SubscriptionCreateAddInvoiceItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionCreateAddInvoiceItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+type SubscriptionCreateAddInvoiceItemParams struct {
+ // The coupons to redeem into discounts for the item.
+ Discounts []*SubscriptionCreateAddInvoiceItemDiscountParams `form:"discounts"`
+ // The ID of the price object. One of `price` or `price_data` is required.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ PriceData *InvoiceItemPriceDataParams `form:"price_data"`
+ // Quantity for this item. Defaults to 1.
+ Quantity *int64 `form:"quantity"`
+ // The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ TaxRates []*string `form:"tax_rates"`
+}
+
+// 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 SubscriptionCreateAutomaticTaxLiabilityParams 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"`
+}
+
+// Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+type SubscriptionCreateAutomaticTaxParams struct {
+ // Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ 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 *SubscriptionCreateAutomaticTaxLiabilityParams `form:"liability"`
+}
+
+// Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC.
+type SubscriptionCreateBillingCycleAnchorConfigParams struct {
+ // The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31.
+ DayOfMonth *int64 `form:"day_of_month"`
+ // The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23.
+ Hour *int64 `form:"hour"`
+ // The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59.
+ Minute *int64 `form:"minute"`
+ // The month to start full cycle billing periods. Ranges from 1 to 12.
+ Month *int64 `form:"month"`
+ // The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59.
+ Second *int64 `form:"second"`
+}
+
+// Time span for the redeemed discount.
+type SubscriptionCreateDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionCreateDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionCreateDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+type SubscriptionCreateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionCreateDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type SubscriptionCreateInvoiceSettingsIssuerParams 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"`
+}
+
+// All invoices will be billed using the specified settings.
+type SubscriptionCreateInvoiceSettingsParams struct {
+ // The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
+ AccountTaxIDs []*string `form:"account_tax_ids"`
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *SubscriptionCreateInvoiceSettingsIssuerParams `form:"issuer"`
+}
+
+// Time span for the redeemed discount.
+type SubscriptionCreateItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionCreateItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionCreateItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the subscription item.
+type SubscriptionCreateItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionCreateItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The recurring components of a price such as `interval` and `interval_count`.
+type SubscriptionCreateItemPriceDataRecurringParams 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"`
+}
+
+// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+type SubscriptionCreateItemPriceDataParams 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](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ Product *string `form:"product"`
+ // The recurring components of a price such as `interval` and `interval_count`.
+ Recurring *SubscriptionCreateItemPriceDataRecurringParams `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 positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// Define options to configure the trial on the subscription item.
+type SubscriptionCreateItemTrialParams struct {
+ // List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
+ ConvertsTo []*string `form:"converts_to"`
+ // Determines the type of trial for this item.
+ Type *string `form:"type"`
+}
+
+// A list of up to 20 subscription items, each with an attached price.
+type SubscriptionCreateItemParams struct {
+ // The coupons to redeem into discounts for the subscription item.
+ Discounts []*SubscriptionCreateItemDiscountParams `form:"discounts"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // Plan ID for this item, as a string.
+ Plan *string `form:"plan"`
+ // The ID of the price object.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ PriceData *SubscriptionCreateItemPriceDataParams `form:"price_data"`
+ // Quantity for this item.
+ Quantity *int64 `form:"quantity"`
+ // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ TaxRates []*string `form:"tax_rates"`
+ // Define options to configure the trial on the subscription item.
+ Trial *SubscriptionCreateItemTrialParams `form:"trial"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionCreateItemParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Additional fields for Mandate creation
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams struct {
+ // Transaction type of the mandate.
+ TransactionType *string `form:"transaction_type"`
+}
+
+// This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsACSSDebitParams struct {
+ // Additional fields for Mandate creation
+ MandateOptions *SubscriptionCreatePaymentSettingsPaymentMethodOptionsACSSDebitMandateOptionsParams `form:"mandate_options"`
+ // Verification method for the intent
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsBancontactParams struct {
+ // Preferred language of the Bancontact authorization page that the customer is redirected to.
+ PreferredLanguage *string `form:"preferred_language"`
+}
+
+// Configuration options for setting up an eMandate for cards issued in India.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsCardMandateOptionsParams struct {
+ // Amount to be charged for future payments.
+ Amount *int64 `form:"amount"`
+ // One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
+ AmountType *string `form:"amount_type"`
+ // A description of the mandate or subscription that is meant to be displayed to the customer.
+ Description *string `form:"description"`
+}
+
+// This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsCardParams struct {
+ // Configuration options for setting up an eMandate for cards issued in India.
+ MandateOptions *SubscriptionCreatePaymentSettingsPaymentMethodOptionsCardMandateOptionsParams `form:"mandate_options"`
+ // Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
+ Network *string `form:"network"`
+ // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/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"`
+}
+
+// Configuration for eu_bank_transfer funding type.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams 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 the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams struct {
+ // Configuration for eu_bank_transfer funding type.
+ EUBankTransfer *SubscriptionCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEUBankTransferParams `form:"eu_bank_transfer"`
+ // The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
+ Type *string `form:"type"`
+}
+
+// This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams struct {
+ // Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
+ BankTransfer *SubscriptionCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferParams `form:"bank_transfer"`
+ // The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
+ FundingType *string `form:"funding_type"`
+}
+
+// This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsIDBankTransferParams struct{}
+
+// This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsKonbiniParams struct{}
+
+// This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsSEPADebitParams struct{}
+
+// Provide filters for the linked accounts that the customer can select for the payment method.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams struct {
+ // The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
+ AccountSubcategories []*string `form:"account_subcategories"`
+ // ID of the institution to use to filter for selectable accounts.
+ Institution *string `form:"institution"`
+}
+
+// Additional fields for Financial Connections Session creation
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct {
+ // Provide filters for the linked accounts that the customer can select for the payment method.
+ Filters *SubscriptionCreatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsFiltersParams `form:"filters"`
+ // 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"`
+}
+
+// This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsUSBankAccountParams struct {
+ // Additional fields for Financial Connections Session creation
+ FinancialConnections *SubscriptionCreatePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsParams `form:"financial_connections"`
+ // Verification method for the intent
+ VerificationMethod *string `form:"verification_method"`
+}
+
+// Payment-method-specific configuration to provide to invoices created by the subscription.
+type SubscriptionCreatePaymentSettingsPaymentMethodOptionsParams struct {
+ // This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
+ ACSSDebit *SubscriptionCreatePaymentSettingsPaymentMethodOptionsACSSDebitParams `form:"acss_debit"`
+ // This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
+ Bancontact *SubscriptionCreatePaymentSettingsPaymentMethodOptionsBancontactParams `form:"bancontact"`
+ // This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
+ Card *SubscriptionCreatePaymentSettingsPaymentMethodOptionsCardParams `form:"card"`
+ // This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
+ CustomerBalance *SubscriptionCreatePaymentSettingsPaymentMethodOptionsCustomerBalanceParams `form:"customer_balance"`
+ // This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
+ IDBankTransfer *SubscriptionCreatePaymentSettingsPaymentMethodOptionsIDBankTransferParams `form:"id_bank_transfer"`
+ // This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
+ Konbini *SubscriptionCreatePaymentSettingsPaymentMethodOptionsKonbiniParams `form:"konbini"`
+ // This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
+ SEPADebit *SubscriptionCreatePaymentSettingsPaymentMethodOptionsSEPADebitParams `form:"sepa_debit"`
+ // This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
+ USBankAccount *SubscriptionCreatePaymentSettingsPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
+}
+
+// Payment settings to pass to invoices created by the subscription.
+type SubscriptionCreatePaymentSettingsParams struct {
+ // Payment-method-specific configuration to provide to invoices created by the subscription.
+ PaymentMethodOptions *SubscriptionCreatePaymentSettingsPaymentMethodOptionsParams `form:"payment_method_options"`
+ // The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
+ PaymentMethodTypes []*string `form:"payment_method_types"`
+ // Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
+ SaveDefaultPaymentMethod *string `form:"save_default_payment_method"`
+}
+
+// Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+type SubscriptionCreatePendingInvoiceItemIntervalParams struct {
+ // Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// If specified, the invoicing for the given billing cycle iterations will be processed now.
+type SubscriptionCreatePrebillingParams struct {
+ // This is used to determine the number of billing cycles to prebill.
+ Iterations *int64 `form:"iterations"`
+ // Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
+ UpdateBehavior *string `form:"update_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.
+type SubscriptionCreateTransferDataParams 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"`
+}
+
+// Defines how the subscription should behave when the user's free trial ends.
+type SubscriptionCreateTrialSettingsEndBehaviorParams 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"`
+}
+
+// Settings related to subscription trials.
+type SubscriptionCreateTrialSettingsParams struct {
+ // Defines how the subscription should behave when the user's free trial ends.
+ EndBehavior *SubscriptionCreateTrialSettingsEndBehaviorParams `form:"end_behavior"`
+}
+
+// Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.
+//
+// When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request.
+// The payment_behavior parameter determines the exact behavior of the initial payment.
+//
+// To start subscriptions where the first invoice always begins in a draft status, use [subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead.
+// Schedules provide the flexibility to model more complex billing configurations that change over time.
+type SubscriptionCreateParams struct {
+ Params `form:"*"`
+ // A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
+ AddInvoiceItems []*SubscriptionCreateAddInvoiceItemParams `form:"add_invoice_items"`
+ // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ ApplicationFeePercent *float64 `form:"application_fee_percent"`
+ // Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
+ AutomaticTax *SubscriptionCreateAutomaticTaxParams `form:"automatic_tax"`
+ // For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
+ BackdateStartDate *int64 `form:"backdate_start_date"`
+ // A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals.
+ BillingCycleAnchor *int64 `form:"billing_cycle_anchor"`
+ // Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC.
+ BillingCycleAnchorConfig *SubscriptionCreateBillingCycleAnchorConfigParams `form:"billing_cycle_anchor_config"`
+ BillingCycleAnchorNow *bool `form:"-"` // See custom AppendTo
+ BillingCycleAnchorUnchanged *bool `form:"-"` // See custom AppendTo
+ // A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
+ CancelAt *int64 `form:"cancel_at"`
+ // Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
+ CancelAtPeriodEnd *bool `form:"cancel_at_period_end"`
+ // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
+ CollectionMethod *string `form:"collection_method"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // The identifier of the customer to subscribe.
+ Customer *string `form:"customer"`
+ // The identifier of the account to subscribe.
+ CustomerAccount *string `form:"customer_account"`
+ // Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ DefaultPaymentMethod *string `form:"default_payment_method"`
+ // ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
+ DefaultSource *string `form:"default_source"`
+ // The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
+ DefaultTaxRates []*string `form:"default_tax_rates"`
+ // The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ Description *string `form:"description"`
+ // The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
+ Discounts []*SubscriptionCreateDiscountParams `form:"discounts"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // All invoices will be billed using the specified settings.
+ InvoiceSettings *SubscriptionCreateInvoiceSettingsParams `form:"invoice_settings"`
+ // A list of up to 20 subscription items, each with an attached price.
+ Items []*SubscriptionCreateItemParams `form:"items"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ OffSession *bool `form:"off_session"`
+ // The account on behalf of which to charge, for each of the subscription's invoices.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // Only applies to subscriptions with `collection_method=charge_automatically`.
+ //
+ // Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ //
+ // Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription's invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state.
+ //
+ // Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ //
+ // `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
+ //
+ // Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
+ PaymentBehavior *string `form:"payment_behavior"`
+ // Payment settings to pass to invoices created by the subscription.
+ PaymentSettings *SubscriptionCreatePaymentSettingsParams `form:"payment_settings"`
+ // Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
+ PendingInvoiceItemInterval *SubscriptionCreatePendingInvoiceItemIntervalParams `form:"pending_invoice_item_interval"`
+ // If specified, the invoicing for the given billing cycle iterations will be processed now.
+ Prebilling *SubscriptionCreatePrebillingParams `form:"prebilling"`
+ // Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/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 *SubscriptionCreateTransferDataParams `form:"transfer_data"`
+ // Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ TrialEnd *int64 `form:"trial_end"`
+ TrialEndNow *bool `form:"-"` // See custom AppendTo
+ // Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ TrialFromPlan *bool `form:"trial_from_plan"`
+ // Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
+ TrialPeriodDays *int64 `form:"trial_period_days"`
+ // Settings related to subscription trials.
+ TrialSettings *SubscriptionCreateTrialSettingsParams `form:"trial_settings"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SubscriptionCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// AppendTo implements custom encoding logic for SubscriptionCreateParams.
+func (p *SubscriptionCreateParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.BillingCycleAnchorNow) {
+ body.Add(form.FormatKey(append(keyParts, "billing_cycle_anchor")), "now")
+ }
+ if BoolValue(p.BillingCycleAnchorUnchanged) {
+ body.Add(form.FormatKey(append(keyParts, "billing_cycle_anchor")), "unchanged")
+ }
+ if BoolValue(p.TrialEndNow) {
+ body.Add(form.FormatKey(append(keyParts, "trial_end")), "now")
+ }
+}
+
// 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 SubscriptionAutomaticTaxLiability struct {
// The connected account being referenced when `type` is `account`.
diff --git a/subscriptionitem.go b/subscriptionitem.go
index 29455c08fa..b5b59c4867 100644
--- a/subscriptionitem.go
+++ b/subscriptionitem.go
@@ -147,6 +147,245 @@ type SubscriptionItemTrialParams struct {
Type *string `form:"type"`
}
+// Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.
+type SubscriptionItemDeleteParams struct {
+ Params `form:"*"`
+ // Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`.
+ ClearUsage *bool `form:"clear_usage"`
+ // Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ ProrationBehavior *string `form:"proration_behavior"`
+ // If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ ProrationDate *int64 `form:"proration_date"`
+}
+
+// Retrieves the subscription item with the given ID.
+type SubscriptionItemRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SubscriptionItemRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Time span for the redeemed discount.
+type SubscriptionItemUpdateDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionItemUpdateDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionItemUpdateDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the subscription item.
+type SubscriptionItemUpdateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionItemUpdateDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The recurring components of a price such as `interval` and `interval_count`.
+type SubscriptionItemUpdatePriceDataRecurringParams 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"`
+}
+
+// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+type SubscriptionItemUpdatePriceDataParams 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](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ Product *string `form:"product"`
+ // The recurring components of a price such as `interval` and `interval_count`.
+ Recurring *SubscriptionItemUpdatePriceDataRecurringParams `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 positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// Updates the plan or quantity of an item on a current subscription.
+type SubscriptionItemUpdateParams struct {
+ Params `form:"*"`
+ // The coupons to redeem into discounts for the subscription item.
+ Discounts []*SubscriptionItemUpdateDiscountParams `form:"discounts"`
+ // 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"`
+ // Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
+ OffSession *bool `form:"off_session"`
+ // Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ //
+ // Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ //
+ // Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ //
+ // Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ PaymentBehavior *string `form:"payment_behavior"`
+ // The identifier of the new plan for this subscription item.
+ Plan *string `form:"plan"`
+ // The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ PriceData *SubscriptionItemUpdatePriceDataParams `form:"price_data"`
+ // Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ ProrationBehavior *string `form:"proration_behavior"`
+ // If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ ProrationDate *int64 `form:"proration_date"`
+ // The quantity you'd like to apply to the subscription item you're creating.
+ Quantity *int64 `form:"quantity"`
+ // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ TaxRates []*string `form:"tax_rates"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SubscriptionItemUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionItemUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Time span for the redeemed discount.
+type SubscriptionItemCreateDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionItemCreateDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionItemCreateDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the subscription item.
+type SubscriptionItemCreateDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionItemCreateDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The recurring components of a price such as `interval` and `interval_count`.
+type SubscriptionItemCreatePriceDataRecurringParams 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"`
+}
+
+// Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+type SubscriptionItemCreatePriceDataParams 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](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
+ Product *string `form:"product"`
+ // The recurring components of a price such as `interval` and `interval_count`.
+ Recurring *SubscriptionItemCreatePriceDataRecurringParams `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 positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
+ UnitAmount *int64 `form:"unit_amount"`
+ // Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+ UnitAmountDecimal *float64 `form:"unit_amount_decimal,high_precision"`
+}
+
+// Options that configure the trial on the subscription item.
+type SubscriptionItemCreateTrialParams struct {
+ // List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
+ ConvertsTo []*string `form:"converts_to"`
+ // Determines the type of trial for this item.
+ Type *string `form:"type"`
+}
+
+// Adds a new item to an existing subscription. No existing items will be changed or replaced.
+type SubscriptionItemCreateParams struct {
+ Params `form:"*"`
+ // The coupons to redeem into discounts for the subscription item.
+ Discounts []*SubscriptionItemCreateDiscountParams `form:"discounts"`
+ // 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"`
+ // Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
+ //
+ // Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
+ //
+ // Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
+ //
+ // Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
+ PaymentBehavior *string `form:"payment_behavior"`
+ // The identifier of the plan to add to the subscription.
+ Plan *string `form:"plan"`
+ // The ID of the price object.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ PriceData *SubscriptionItemCreatePriceDataParams `form:"price_data"`
+ // Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
+ ProrationBehavior *string `form:"proration_behavior"`
+ // If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
+ ProrationDate *int64 `form:"proration_date"`
+ // The quantity you'd like to apply to the subscription item you're creating.
+ Quantity *int64 `form:"quantity"`
+ // The identifier of the subscription to modify.
+ Subscription *string `form:"subscription"`
+ // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ TaxRates []*string `form:"tax_rates"`
+ // Options that configure the trial on the subscription item.
+ Trial *SubscriptionItemCreateTrialParams `form:"trial"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SubscriptionItemCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionItemCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Options that configure the trial on the subscription item.
type SubscriptionItemTrial struct {
// List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
diff --git a/subscriptionschedule.go b/subscriptionschedule.go
index 603d572f5f..1d35891728 100644
--- a/subscriptionschedule.go
+++ b/subscriptionschedule.go
@@ -990,6 +990,720 @@ func (p *SubscriptionScheduleReleaseParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type SubscriptionScheduleCreateDefaultSettingsInvoiceSettingsIssuerParams 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"`
+}
+
+// All invoices will be billed using the specified settings.
+type SubscriptionScheduleCreateDefaultSettingsInvoiceSettingsParams struct {
+ // The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ AccountTaxIDs []*string `form:"account_tax_ids"`
+ // Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *SubscriptionScheduleCreateDefaultSettingsInvoiceSettingsIssuerParams `form:"issuer"`
+}
+
+// Object representing the subscription schedule's default settings.
+type SubscriptionScheduleCreateDefaultSettingsParams 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. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ ApplicationFeePercent *float64 `form:"application_fee_percent"`
+ // Default settings for automatic tax computation.
+ AutomaticTax *SubscriptionAutomaticTaxParams `form:"automatic_tax"`
+ // Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ BillingCycleAnchor *string `form:"billing_cycle_anchor"`
+ // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ CollectionMethod *string `form:"collection_method"`
+ // ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ DefaultPaymentMethod *string `form:"default_payment_method"`
+ // Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ Description *string `form:"description"`
+ // All invoices will be billed using the specified settings.
+ InvoiceSettings *SubscriptionScheduleCreateDefaultSettingsInvoiceSettingsParams `form:"invoice_settings"`
+ // The account on behalf of which to charge, for each of the associated subscription's invoices.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ TransferData *SubscriptionTransferDataParams `form:"transfer_data"`
+}
+
+// Time span for the redeemed discount.
+type SubscriptionScheduleCreatePhaseAddInvoiceItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionScheduleCreatePhaseAddInvoiceItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionScheduleCreatePhaseAddInvoiceItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the item.
+type SubscriptionScheduleCreatePhaseAddInvoiceItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionScheduleCreatePhaseAddInvoiceItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+type SubscriptionScheduleCreatePhaseAddInvoiceItemParams struct {
+ // The coupons to redeem into discounts for the item.
+ Discounts []*SubscriptionScheduleCreatePhaseAddInvoiceItemDiscountParams `form:"discounts"`
+ // The ID of the price object. One of `price` or `price_data` is required.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ PriceData *InvoiceItemPriceDataParams `form:"price_data"`
+ // Quantity for this item. Defaults to 1.
+ Quantity *int64 `form:"quantity"`
+ // The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ TaxRates []*string `form:"tax_rates"`
+}
+
+// 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 SubscriptionScheduleCreatePhaseAutomaticTaxLiabilityParams 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"`
+}
+
+// Automatic tax settings for this phase.
+type SubscriptionScheduleCreatePhaseAutomaticTaxParams struct {
+ // Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ 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 *SubscriptionScheduleCreatePhaseAutomaticTaxLiabilityParams `form:"liability"`
+}
+
+// Time span for the redeemed discount.
+type SubscriptionScheduleCreatePhaseDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionScheduleCreatePhaseDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionScheduleCreatePhaseDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+type SubscriptionScheduleCreatePhaseDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionScheduleCreatePhaseDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type SubscriptionScheduleCreatePhaseInvoiceSettingsIssuerParams 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"`
+}
+
+// All invoices will be billed using the specified settings.
+type SubscriptionScheduleCreatePhaseInvoiceSettingsParams struct {
+ // The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ AccountTaxIDs []*string `form:"account_tax_ids"`
+ // Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *SubscriptionScheduleCreatePhaseInvoiceSettingsIssuerParams `form:"issuer"`
+}
+
+// Time span for the redeemed discount.
+type SubscriptionScheduleCreatePhaseItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionScheduleCreatePhaseItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionScheduleCreatePhaseItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the subscription item.
+type SubscriptionScheduleCreatePhaseItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionScheduleCreatePhaseItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Options that configure the trial on the subscription item.
+type SubscriptionScheduleCreatePhaseItemTrialParams struct {
+ // List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
+ ConvertsTo []*string `form:"converts_to"`
+ // Determines the type of trial for this item.
+ Type *string `form:"type"`
+}
+
+// List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+type SubscriptionScheduleCreatePhaseItemParams struct {
+ // The coupons to redeem into discounts for the subscription item.
+ Discounts []*SubscriptionScheduleCreatePhaseItemDiscountParams `form:"discounts"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ Plan *string `form:"plan"`
+ // The ID of the price object.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ PriceData *SubscriptionItemPriceDataParams `form:"price_data"`
+ // Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ Quantity *int64 `form:"quantity"`
+ // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ TaxRates []*string `form:"tax_rates"`
+ // Options that configure the trial on the subscription item.
+ Trial *SubscriptionScheduleCreatePhaseItemTrialParams `form:"trial"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionScheduleCreatePhaseItemParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+type SubscriptionScheduleCreatePhasePauseCollectionParams struct {
+ // The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
+ Behavior *string `form:"behavior"`
+}
+
+// Defines how the subscription should behave when a trial ends.
+type SubscriptionScheduleCreatePhaseTrialSettingsEndBehaviorParams struct {
+ // Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
+ ProrateUpFront *string `form:"prorate_up_front"`
+}
+
+// Settings related to subscription trials.
+type SubscriptionScheduleCreatePhaseTrialSettingsParams struct {
+ // Defines how the subscription should behave when a trial ends.
+ EndBehavior *SubscriptionScheduleCreatePhaseTrialSettingsEndBehaviorParams `form:"end_behavior"`
+}
+
+// List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
+type SubscriptionScheduleCreatePhaseParams struct {
+ // A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ AddInvoiceItems []*SubscriptionScheduleCreatePhaseAddInvoiceItemParams `form:"add_invoice_items"`
+ // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ ApplicationFeePercent *float64 `form:"application_fee_percent"`
+ // Automatic tax settings for this phase.
+ AutomaticTax *SubscriptionScheduleCreatePhaseAutomaticTaxParams `form:"automatic_tax"`
+ // Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ BillingCycleAnchor *string `form:"billing_cycle_anchor"`
+ // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ CollectionMethod *string `form:"collection_method"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ DefaultPaymentMethod *string `form:"default_payment_method"`
+ // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ DefaultTaxRates []*string `form:"default_tax_rates"`
+ // Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ Description *string `form:"description"`
+ // The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ Discounts []*SubscriptionScheduleCreatePhaseDiscountParams `form:"discounts"`
+ // The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ EndDate *int64 `form:"end_date"`
+ // All invoices will be billed using the specified settings.
+ InvoiceSettings *SubscriptionScheduleCreatePhaseInvoiceSettingsParams `form:"invoice_settings"`
+ // List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ Items []*SubscriptionScheduleCreatePhaseItemParams `form:"items"`
+ // Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ Iterations *int64 `form:"iterations"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The account on behalf of which to charge, for each of the associated subscription's invoices.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+ PauseCollection *SubscriptionScheduleCreatePhasePauseCollectionParams `form:"pause_collection"`
+ // Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ ProrationBehavior *string `form:"proration_behavior"`
+ // The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ TransferData *SubscriptionTransferDataParams `form:"transfer_data"`
+ // If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ Trial *bool `form:"trial"`
+ // Specify trial behavior when crossing phase boundaries
+ TrialContinuation *string `form:"trial_continuation"`
+ // Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ TrialEnd *int64 `form:"trial_end"`
+ // Settings related to subscription trials.
+ TrialSettings *SubscriptionScheduleCreatePhaseTrialSettingsParams `form:"trial_settings"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionScheduleCreatePhaseParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// If specified, the invoicing for the given billing cycle iterations will be processed now.
+type SubscriptionScheduleCreatePrebillingParams struct {
+ // This is used to determine the number of billing cycles to prebill.
+ Iterations *int64 `form:"iterations"`
+ // Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
+ UpdateBehavior *string `form:"update_behavior"`
+}
+
+// Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
+type SubscriptionScheduleCreateParams struct {
+ Params `form:"*"`
+ // Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
+ BillingBehavior *string `form:"billing_behavior"`
+ // The identifier of the customer to create the subscription schedule for.
+ Customer *string `form:"customer"`
+ // The identifier of the account to create the subscription schedule for.
+ CustomerAccount *string `form:"customer_account"`
+ // Object representing the subscription schedule's default settings.
+ DefaultSettings *SubscriptionScheduleCreateDefaultSettingsParams `form:"default_settings"`
+ // Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ EndBehavior *string `form:"end_behavior"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
+ FromSubscription *string `form:"from_subscription"`
+ // 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"`
+ // List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
+ Phases []*SubscriptionScheduleCreatePhaseParams `form:"phases"`
+ // If specified, the invoicing for the given billing cycle iterations will be processed now.
+ Prebilling *SubscriptionScheduleCreatePrebillingParams `form:"prebilling"`
+ // When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
+ StartDate *int64 `form:"start_date"`
+ StartDateNow *bool `form:"-"` // See custom AppendTo
+}
+
+// AddExpand appends a new field to expand.
+func (p *SubscriptionScheduleCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionScheduleCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// AppendTo implements custom encoding logic for SubscriptionScheduleCreateParams.
+func (p *SubscriptionScheduleCreateParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.StartDateNow) {
+ body.Add(form.FormatKey(append(keyParts, "start_date")), "now")
+ }
+}
+
+// Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.
+type SubscriptionScheduleRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SubscriptionScheduleRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type SubscriptionScheduleUpdateDefaultSettingsInvoiceSettingsIssuerParams 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"`
+}
+
+// All invoices will be billed using the specified settings.
+type SubscriptionScheduleUpdateDefaultSettingsInvoiceSettingsParams struct {
+ // The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
+ AccountTaxIDs []*string `form:"account_tax_ids"`
+ // Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *SubscriptionScheduleUpdateDefaultSettingsInvoiceSettingsIssuerParams `form:"issuer"`
+}
+
+// Object representing the subscription schedule's default settings.
+type SubscriptionScheduleUpdateDefaultSettingsParams 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. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ ApplicationFeePercent *float64 `form:"application_fee_percent"`
+ // Default settings for automatic tax computation.
+ AutomaticTax *SubscriptionAutomaticTaxParams `form:"automatic_tax"`
+ // Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ BillingCycleAnchor *string `form:"billing_cycle_anchor"`
+ // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ CollectionMethod *string `form:"collection_method"`
+ // ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ DefaultPaymentMethod *string `form:"default_payment_method"`
+ // Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ Description *string `form:"description"`
+ // All invoices will be billed using the specified settings.
+ InvoiceSettings *SubscriptionScheduleUpdateDefaultSettingsInvoiceSettingsParams `form:"invoice_settings"`
+ // The account on behalf of which to charge, for each of the associated subscription's invoices.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ TransferData *SubscriptionTransferDataParams `form:"transfer_data"`
+}
+
+// Time span for the redeemed discount.
+type SubscriptionScheduleUpdatePhaseAddInvoiceItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionScheduleUpdatePhaseAddInvoiceItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionScheduleUpdatePhaseAddInvoiceItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the item.
+type SubscriptionScheduleUpdatePhaseAddInvoiceItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionScheduleUpdatePhaseAddInvoiceItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+type SubscriptionScheduleUpdatePhaseAddInvoiceItemParams struct {
+ // The coupons to redeem into discounts for the item.
+ Discounts []*SubscriptionScheduleUpdatePhaseAddInvoiceItemDiscountParams `form:"discounts"`
+ // The ID of the price object. One of `price` or `price_data` is required.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
+ PriceData *InvoiceItemPriceDataParams `form:"price_data"`
+ // Quantity for this item. Defaults to 1.
+ Quantity *int64 `form:"quantity"`
+ // The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
+ TaxRates []*string `form:"tax_rates"`
+}
+
+// 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 SubscriptionScheduleUpdatePhaseAutomaticTaxLiabilityParams 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"`
+}
+
+// Automatic tax settings for this phase.
+type SubscriptionScheduleUpdatePhaseAutomaticTaxParams struct {
+ // Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
+ 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 *SubscriptionScheduleUpdatePhaseAutomaticTaxLiabilityParams `form:"liability"`
+}
+
+// Time span for the redeemed discount.
+type SubscriptionScheduleUpdatePhaseDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionScheduleUpdatePhaseDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionScheduleUpdatePhaseDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+type SubscriptionScheduleUpdatePhaseDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionScheduleUpdatePhaseDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+type SubscriptionScheduleUpdatePhaseInvoiceSettingsIssuerParams 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"`
+}
+
+// All invoices will be billed using the specified settings.
+type SubscriptionScheduleUpdatePhaseInvoiceSettingsParams struct {
+ // The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
+ AccountTaxIDs []*string `form:"account_tax_ids"`
+ // Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
+ DaysUntilDue *int64 `form:"days_until_due"`
+ // The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
+ Issuer *SubscriptionScheduleUpdatePhaseInvoiceSettingsIssuerParams `form:"issuer"`
+}
+
+// Time span for the redeemed discount.
+type SubscriptionScheduleUpdatePhaseItemDiscountDiscountEndDurationParams struct {
+ // Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
+ Interval *string `form:"interval"`
+ // The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
+ IntervalCount *int64 `form:"interval_count"`
+}
+
+// Details to determine how long the discount should be applied for.
+type SubscriptionScheduleUpdatePhaseItemDiscountDiscountEndParams struct {
+ // Time span for the redeemed discount.
+ Duration *SubscriptionScheduleUpdatePhaseItemDiscountDiscountEndDurationParams `form:"duration"`
+ // A precise Unix timestamp for the discount to end. Must be in the future.
+ Timestamp *int64 `form:"timestamp"`
+ // The type of calculation made to determine when the discount ends.
+ Type *string `form:"type"`
+}
+
+// The coupons to redeem into discounts for the subscription item.
+type SubscriptionScheduleUpdatePhaseItemDiscountParams struct {
+ // ID of the coupon to create a new discount for.
+ Coupon *string `form:"coupon"`
+ // ID of an existing discount on the object (or one of its ancestors) to reuse.
+ Discount *string `form:"discount"`
+ // Details to determine how long the discount should be applied for.
+ DiscountEnd *SubscriptionScheduleUpdatePhaseItemDiscountDiscountEndParams `form:"discount_end"`
+ // ID of the promotion code to create a new discount for.
+ PromotionCode *string `form:"promotion_code"`
+}
+
+// Options that configure the trial on the subscription item.
+type SubscriptionScheduleUpdatePhaseItemTrialParams struct {
+ // List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
+ ConvertsTo []*string `form:"converts_to"`
+ // Determines the type of trial for this item.
+ Type *string `form:"type"`
+}
+
+// List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+type SubscriptionScheduleUpdatePhaseItemParams struct {
+ // The coupons to redeem into discounts for the subscription item.
+ Discounts []*SubscriptionScheduleUpdatePhaseItemDiscountParams `form:"discounts"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
+ Plan *string `form:"plan"`
+ // The ID of the price object.
+ Price *string `form:"price"`
+ // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
+ PriceData *SubscriptionItemPriceDataParams `form:"price_data"`
+ // Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
+ Quantity *int64 `form:"quantity"`
+ // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
+ TaxRates []*string `form:"tax_rates"`
+ // Options that configure the trial on the subscription item.
+ Trial *SubscriptionScheduleUpdatePhaseItemTrialParams `form:"trial"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionScheduleUpdatePhaseItemParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+type SubscriptionScheduleUpdatePhasePauseCollectionParams struct {
+ // The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
+ Behavior *string `form:"behavior"`
+}
+
+// Defines how the subscription should behave when a trial ends.
+type SubscriptionScheduleUpdatePhaseTrialSettingsEndBehaviorParams struct {
+ // Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
+ ProrateUpFront *string `form:"prorate_up_front"`
+}
+
+// Settings related to subscription trials.
+type SubscriptionScheduleUpdatePhaseTrialSettingsParams struct {
+ // Defines how the subscription should behave when a trial ends.
+ EndBehavior *SubscriptionScheduleUpdatePhaseTrialSettingsEndBehaviorParams `form:"end_behavior"`
+}
+
+// List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
+type SubscriptionScheduleUpdatePhaseParams struct {
+ // A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
+ AddInvoiceItems []*SubscriptionScheduleUpdatePhaseAddInvoiceItemParams `form:"add_invoice_items"`
+ // A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
+ ApplicationFeePercent *float64 `form:"application_fee_percent"`
+ // Automatic tax settings for this phase.
+ AutomaticTax *SubscriptionScheduleUpdatePhaseAutomaticTaxParams `form:"automatic_tax"`
+ // Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
+ BillingCycleAnchor *string `form:"billing_cycle_anchor"`
+ // Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
+ CollectionMethod *string `form:"collection_method"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
+ DefaultPaymentMethod *string `form:"default_payment_method"`
+ // A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
+ DefaultTaxRates []*string `form:"default_tax_rates"`
+ // Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
+ Description *string `form:"description"`
+ // The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
+ Discounts []*SubscriptionScheduleUpdatePhaseDiscountParams `form:"discounts"`
+ // The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
+ EndDate *int64 `form:"end_date"`
+ EndDateNow *bool `form:"-"` // See custom AppendTo
+ // All invoices will be billed using the specified settings.
+ InvoiceSettings *SubscriptionScheduleUpdatePhaseInvoiceSettingsParams `form:"invoice_settings"`
+ // List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
+ Items []*SubscriptionScheduleUpdatePhaseItemParams `form:"items"`
+ // Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
+ Iterations *int64 `form:"iterations"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The account on behalf of which to charge, for each of the associated subscription's invoices.
+ OnBehalfOf *string `form:"on_behalf_of"`
+ // If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
+ PauseCollection *SubscriptionScheduleUpdatePhasePauseCollectionParams `form:"pause_collection"`
+ // Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
+ ProrationBehavior *string `form:"proration_behavior"`
+ // The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
+ StartDate *int64 `form:"start_date"`
+ StartDateNow *bool `form:"-"` // See custom AppendTo
+ // The data with which to automatically create a Transfer for each of the associated subscription's invoices.
+ TransferData *SubscriptionTransferDataParams `form:"transfer_data"`
+ // If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
+ Trial *bool `form:"trial"`
+ // Specify trial behavior when crossing phase boundaries
+ TrialContinuation *string `form:"trial_continuation"`
+ // Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
+ TrialEnd *int64 `form:"trial_end"`
+ TrialEndNow *bool `form:"-"` // See custom AppendTo
+ // Settings related to subscription trials.
+ TrialSettings *SubscriptionScheduleUpdatePhaseTrialSettingsParams `form:"trial_settings"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionScheduleUpdatePhaseParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// AppendTo implements custom encoding logic for SubscriptionScheduleUpdatePhaseParams.
+func (p *SubscriptionScheduleUpdatePhaseParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.EndDateNow) {
+ body.Add(form.FormatKey(append(keyParts, "end_date")), "now")
+ }
+ if BoolValue(p.StartDateNow) {
+ body.Add(form.FormatKey(append(keyParts, "start_date")), "now")
+ }
+ if BoolValue(p.TrialEndNow) {
+ body.Add(form.FormatKey(append(keyParts, "trial_end")), "now")
+ }
+}
+
+// If specified, the invoicing for the given billing cycle iterations will be processed now.
+type SubscriptionScheduleUpdatePrebillingParams struct {
+ // This is used to determine the number of billing cycles to prebill.
+ Iterations *int64 `form:"iterations"`
+ // Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
+ UpdateBehavior *string `form:"update_behavior"`
+}
+
+// Updates an existing subscription schedule.
+type SubscriptionScheduleUpdateParams struct {
+ Params `form:"*"`
+ // Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
+ BillingBehavior *string `form:"billing_behavior"`
+ // Object representing the subscription schedule's default settings.
+ DefaultSettings *SubscriptionScheduleUpdateDefaultSettingsParams `form:"default_settings"`
+ // Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
+ EndBehavior *string `form:"end_behavior"`
+ // 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"`
+ // List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
+ Phases []*SubscriptionScheduleUpdatePhaseParams `form:"phases"`
+ // If specified, the invoicing for the given billing cycle iterations will be processed now.
+ Prebilling *SubscriptionScheduleUpdatePrebillingParams `form:"prebilling"`
+ // If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
+ ProrationBehavior *string `form:"proration_behavior"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *SubscriptionScheduleUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *SubscriptionScheduleUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.
type SubscriptionScheduleCurrentPhase struct {
// The end of this phase of the subscription schedule.
diff --git a/tax_calculation.go b/tax_calculation.go
index 9d205aa33d..7aa8446fee 100644
--- a/tax_calculation.go
+++ b/tax_calculation.go
@@ -354,6 +354,101 @@ type TaxCalculationShippingCostParams struct {
TaxCode *string `form:"tax_code"`
}
+// Retrieves a Tax Calculation object, if the calculation hasn't expired.
+type TaxCalculationRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxCalculationRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness.
+type TaxCalculationCreateCustomerDetailsTaxIDParams 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"`
+}
+
+// Details about the customer, including address and tax IDs.
+type TaxCalculationCreateCustomerDetailsParams struct {
+ // The customer's postal address (for example, home or business location).
+ Address *AddressParams `form:"address"`
+ // The type of customer address provided.
+ AddressSource *string `form:"address_source"`
+ // The customer's IP address (IPv4 or IPv6).
+ IPAddress *string `form:"ip_address"`
+ // Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies.
+ TaxabilityOverride *string `form:"taxability_override"`
+ // The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness.
+ TaxIDs []*TaxCalculationCreateCustomerDetailsTaxIDParams `form:"tax_ids"`
+}
+
+// A list of items the customer is purchasing.
+type TaxCalculationCreateLineItemParams struct {
+ // A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ // If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
+ Amount *int64 `form:"amount"`
+ // If provided, the product's `tax_code` will be used as the line item's `tax_code`.
+ Product *string `form:"product"`
+ // The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25.
+ Quantity *int64 `form:"quantity"`
+ // A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports).
+ Reference *string `form:"reference"`
+ // Specifies whether the `amount` includes taxes. Defaults to `exclusive`.
+ TaxBehavior *string `form:"tax_behavior"`
+ // A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings.
+ TaxCode *string `form:"tax_code"`
+}
+
+// Details about the address from which the goods are being shipped.
+type TaxCalculationCreateShipFromDetailsParams struct {
+ // The address from which the goods are being shipped from.
+ Address *AddressParams `form:"address"`
+}
+
+// Shipping cost details to be used for the calculation.
+type TaxCalculationCreateShippingCostParams struct {
+ // A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
+ Amount *int64 `form:"amount"`
+ // If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters.
+ ShippingRate *string `form:"shipping_rate"`
+ // Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`.
+ TaxBehavior *string `form:"tax_behavior"`
+ // The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used.
+ TaxCode *string `form:"tax_code"`
+}
+
+// Calculates tax based on the input and returns a Tax Calculation object.
+type TaxCalculationCreateParams struct {
+ Params `form:"*"`
+ // 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 to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`.
+ Customer *string `form:"customer"`
+ // Details about the customer, including address and tax IDs.
+ CustomerDetails *TaxCalculationCreateCustomerDetailsParams `form:"customer_details"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // A list of items the customer is purchasing.
+ LineItems []*TaxCalculationCreateLineItemParams `form:"line_items"`
+ // Details about the address from which the goods are being shipped.
+ ShipFromDetails *TaxCalculationCreateShipFromDetailsParams `form:"ship_from_details"`
+ // Shipping cost details to be used for the calculation.
+ ShippingCost *TaxCalculationCreateShippingCostParams `form:"shipping_cost"`
+ // Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.
+ TaxDate *int64 `form:"tax_date"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxCalculationCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The customer's tax IDs (for example, EU VAT numbers).
type TaxCalculationCustomerDetailsTaxID 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`
diff --git a/tax_form.go b/tax_form.go
index eb0cf3ffe6..1c8cf51829 100644
--- a/tax_form.go
+++ b/tax_form.go
@@ -101,6 +101,18 @@ func (p *TaxFormPDFParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of a tax form that has previously been created. Supply the unique tax form ID that was returned from your previous request, and Stripe will return the corresponding tax form information.
+type TaxFormRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxFormRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type TaxFormAuSerr struct {
// End date of the period represented by the information reported on the tax form.
ReportingPeriodEndDate string `json:"reporting_period_end_date"`
diff --git a/tax_registration.go b/tax_registration.go
index 2723580191..8a78038fc7 100644
--- a/tax_registration.go
+++ b/tax_registration.go
@@ -2058,6 +2058,1034 @@ func (p *TaxRegistrationParams) AppendTo(body *form.Values, keyParts []string) {
}
}
+// Options for the registration in AE.
+type TaxRegistrationCreateCountryOptionsAeParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in AL.
+type TaxRegistrationCreateCountryOptionsAlParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in AM.
+type TaxRegistrationCreateCountryOptionsAmParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in AO.
+type TaxRegistrationCreateCountryOptionsAoParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsAtStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in AT.
+type TaxRegistrationCreateCountryOptionsAtParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsAtStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in AU.
+type TaxRegistrationCreateCountryOptionsAuParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in BA.
+type TaxRegistrationCreateCountryOptionsBaParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in BB.
+type TaxRegistrationCreateCountryOptionsBbParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsBeStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in BE.
+type TaxRegistrationCreateCountryOptionsBeParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsBeStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsBGStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in BG.
+type TaxRegistrationCreateCountryOptionsBGParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsBGStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in BH.
+type TaxRegistrationCreateCountryOptionsBhParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in BS.
+type TaxRegistrationCreateCountryOptionsBsParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in BY.
+type TaxRegistrationCreateCountryOptionsByParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the provincial tax registration.
+type TaxRegistrationCreateCountryOptionsCaProvinceStandardParams struct {
+ // Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ Province *string `form:"province"`
+}
+
+// Options for the registration in CA.
+type TaxRegistrationCreateCountryOptionsCaParams struct {
+ // Options for the provincial tax registration.
+ ProvinceStandard *TaxRegistrationCreateCountryOptionsCaProvinceStandardParams `form:"province_standard"`
+ // Type of registration to be created in Canada.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in CD.
+type TaxRegistrationCreateCountryOptionsCdParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in CH.
+type TaxRegistrationCreateCountryOptionsChParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in CL.
+type TaxRegistrationCreateCountryOptionsClParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in CO.
+type TaxRegistrationCreateCountryOptionsCoParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in CR.
+type TaxRegistrationCreateCountryOptionsCrParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsCyStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in CY.
+type TaxRegistrationCreateCountryOptionsCyParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsCyStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsCzStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in CZ.
+type TaxRegistrationCreateCountryOptionsCzParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsCzStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsDEStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in DE.
+type TaxRegistrationCreateCountryOptionsDEParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsDEStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsDkStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in DK.
+type TaxRegistrationCreateCountryOptionsDkParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsDkStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in EC.
+type TaxRegistrationCreateCountryOptionsEcParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsEeStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in EE.
+type TaxRegistrationCreateCountryOptionsEeParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsEeStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in EG.
+type TaxRegistrationCreateCountryOptionsEgParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsESStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in ES.
+type TaxRegistrationCreateCountryOptionsESParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsESStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsFIStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in FI.
+type TaxRegistrationCreateCountryOptionsFIParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsFIStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsFRStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in FR.
+type TaxRegistrationCreateCountryOptionsFRParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsFRStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in GB.
+type TaxRegistrationCreateCountryOptionsGBParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in GE.
+type TaxRegistrationCreateCountryOptionsGeParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in GN.
+type TaxRegistrationCreateCountryOptionsGnParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsGrStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in GR.
+type TaxRegistrationCreateCountryOptionsGrParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsGrStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsHRStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in HR.
+type TaxRegistrationCreateCountryOptionsHRParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsHRStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsHUStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in HU.
+type TaxRegistrationCreateCountryOptionsHUParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsHUStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in ID.
+type TaxRegistrationCreateCountryOptionsIDParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsIeStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in IE.
+type TaxRegistrationCreateCountryOptionsIeParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsIeStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in IN.
+type TaxRegistrationCreateCountryOptionsInParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in IS.
+type TaxRegistrationCreateCountryOptionsIsParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsITStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in IT.
+type TaxRegistrationCreateCountryOptionsITParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsITStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in JP.
+type TaxRegistrationCreateCountryOptionsJPParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in KE.
+type TaxRegistrationCreateCountryOptionsKeParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in KH.
+type TaxRegistrationCreateCountryOptionsKhParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in KR.
+type TaxRegistrationCreateCountryOptionsKrParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in KZ.
+type TaxRegistrationCreateCountryOptionsKzParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsLTStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in LT.
+type TaxRegistrationCreateCountryOptionsLTParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsLTStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsLuStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in LU.
+type TaxRegistrationCreateCountryOptionsLuParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsLuStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsLVStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in LV.
+type TaxRegistrationCreateCountryOptionsLVParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsLVStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in MA.
+type TaxRegistrationCreateCountryOptionsMaParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in MD.
+type TaxRegistrationCreateCountryOptionsMdParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in ME.
+type TaxRegistrationCreateCountryOptionsMeParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in MK.
+type TaxRegistrationCreateCountryOptionsMkParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in MR.
+type TaxRegistrationCreateCountryOptionsMrParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsMTStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in MT.
+type TaxRegistrationCreateCountryOptionsMTParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsMTStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in MX.
+type TaxRegistrationCreateCountryOptionsMXParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in MY.
+type TaxRegistrationCreateCountryOptionsMyParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in NG.
+type TaxRegistrationCreateCountryOptionsNgParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsNLStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in NL.
+type TaxRegistrationCreateCountryOptionsNLParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsNLStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in NO.
+type TaxRegistrationCreateCountryOptionsNoParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in NP.
+type TaxRegistrationCreateCountryOptionsNpParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in NZ.
+type TaxRegistrationCreateCountryOptionsNzParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in OM.
+type TaxRegistrationCreateCountryOptionsOmParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in PE.
+type TaxRegistrationCreateCountryOptionsPeParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsPLStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in PL.
+type TaxRegistrationCreateCountryOptionsPLParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsPLStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsPTStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in PT.
+type TaxRegistrationCreateCountryOptionsPTParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsPTStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsROStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in RO.
+type TaxRegistrationCreateCountryOptionsROParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsROStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in RS.
+type TaxRegistrationCreateCountryOptionsRsParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in RU.
+type TaxRegistrationCreateCountryOptionsRUParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in SA.
+type TaxRegistrationCreateCountryOptionsSaParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsSeStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in SE.
+type TaxRegistrationCreateCountryOptionsSeParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsSeStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in SG.
+type TaxRegistrationCreateCountryOptionsSgParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsSiStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in SI.
+type TaxRegistrationCreateCountryOptionsSiParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsSiStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the standard registration.
+type TaxRegistrationCreateCountryOptionsSKStandardParams struct {
+ // Place of supply scheme used in an EU standard registration.
+ PlaceOfSupplyScheme *string `form:"place_of_supply_scheme"`
+}
+
+// Options for the registration in SK.
+type TaxRegistrationCreateCountryOptionsSKParams struct {
+ // Options for the standard registration.
+ Standard *TaxRegistrationCreateCountryOptionsSKStandardParams `form:"standard"`
+ // Type of registration to be created in an EU country.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in SN.
+type TaxRegistrationCreateCountryOptionsSnParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in SR.
+type TaxRegistrationCreateCountryOptionsSrParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in TH.
+type TaxRegistrationCreateCountryOptionsTHParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in TJ.
+type TaxRegistrationCreateCountryOptionsTjParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in TR.
+type TaxRegistrationCreateCountryOptionsTRParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in TZ.
+type TaxRegistrationCreateCountryOptionsTzParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in UG.
+type TaxRegistrationCreateCountryOptionsUgParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the local amusement tax registration.
+type TaxRegistrationCreateCountryOptionsUSLocalAmusementTaxParams struct {
+ // A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `64343` (River Grove), and `68081` (Schiller Park).
+ Jurisdiction *string `form:"jurisdiction"`
+}
+
+// Options for the local lease tax registration.
+type TaxRegistrationCreateCountryOptionsUSLocalLeaseTaxParams struct {
+ // A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago).
+ Jurisdiction *string `form:"jurisdiction"`
+}
+
+// Elections for the state sales tax registration.
+type TaxRegistrationCreateCountryOptionsUSStateSalesTaxElectionParams struct {
+ // A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City).
+ Jurisdiction *string `form:"jurisdiction"`
+ // The type of the election for the state sales tax registration.
+ Type *string `form:"type"`
+}
+
+// Options for the state sales tax registration.
+type TaxRegistrationCreateCountryOptionsUSStateSalesTaxParams struct {
+ // Elections for the state sales tax registration.
+ Elections []*TaxRegistrationCreateCountryOptionsUSStateSalesTaxElectionParams `form:"elections"`
+}
+
+// Options for the registration in US.
+type TaxRegistrationCreateCountryOptionsUSParams struct {
+ // Options for the local amusement tax registration.
+ LocalAmusementTax *TaxRegistrationCreateCountryOptionsUSLocalAmusementTaxParams `form:"local_amusement_tax"`
+ // Options for the local lease tax registration.
+ LocalLeaseTax *TaxRegistrationCreateCountryOptionsUSLocalLeaseTaxParams `form:"local_lease_tax"`
+ // Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
+ State *string `form:"state"`
+ // Options for the state sales tax registration.
+ StateSalesTax *TaxRegistrationCreateCountryOptionsUSStateSalesTaxParams `form:"state_sales_tax"`
+ // Type of registration to be created in the US.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in UY.
+type TaxRegistrationCreateCountryOptionsUyParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in UZ.
+type TaxRegistrationCreateCountryOptionsUzParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in VN.
+type TaxRegistrationCreateCountryOptionsVnParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in ZA.
+type TaxRegistrationCreateCountryOptionsZaParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in ZM.
+type TaxRegistrationCreateCountryOptionsZmParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Options for the registration in ZW.
+type TaxRegistrationCreateCountryOptionsZwParams struct {
+ // Type of registration to be created in `country`.
+ Type *string `form:"type"`
+}
+
+// Specific options for a registration in the specified `country`.
+type TaxRegistrationCreateCountryOptionsParams struct {
+ // Options for the registration in AE.
+ Ae *TaxRegistrationCreateCountryOptionsAeParams `form:"ae"`
+ // Options for the registration in AL.
+ Al *TaxRegistrationCreateCountryOptionsAlParams `form:"al"`
+ // Options for the registration in AM.
+ Am *TaxRegistrationCreateCountryOptionsAmParams `form:"am"`
+ // Options for the registration in AO.
+ Ao *TaxRegistrationCreateCountryOptionsAoParams `form:"ao"`
+ // Options for the registration in AT.
+ At *TaxRegistrationCreateCountryOptionsAtParams `form:"at"`
+ // Options for the registration in AU.
+ Au *TaxRegistrationCreateCountryOptionsAuParams `form:"au"`
+ // Options for the registration in BA.
+ Ba *TaxRegistrationCreateCountryOptionsBaParams `form:"ba"`
+ // Options for the registration in BB.
+ Bb *TaxRegistrationCreateCountryOptionsBbParams `form:"bb"`
+ // Options for the registration in BE.
+ Be *TaxRegistrationCreateCountryOptionsBeParams `form:"be"`
+ // Options for the registration in BG.
+ BG *TaxRegistrationCreateCountryOptionsBGParams `form:"bg"`
+ // Options for the registration in BH.
+ Bh *TaxRegistrationCreateCountryOptionsBhParams `form:"bh"`
+ // Options for the registration in BS.
+ Bs *TaxRegistrationCreateCountryOptionsBsParams `form:"bs"`
+ // Options for the registration in BY.
+ By *TaxRegistrationCreateCountryOptionsByParams `form:"by"`
+ // Options for the registration in CA.
+ Ca *TaxRegistrationCreateCountryOptionsCaParams `form:"ca"`
+ // Options for the registration in CD.
+ Cd *TaxRegistrationCreateCountryOptionsCdParams `form:"cd"`
+ // Options for the registration in CH.
+ Ch *TaxRegistrationCreateCountryOptionsChParams `form:"ch"`
+ // Options for the registration in CL.
+ Cl *TaxRegistrationCreateCountryOptionsClParams `form:"cl"`
+ // Options for the registration in CO.
+ Co *TaxRegistrationCreateCountryOptionsCoParams `form:"co"`
+ // Options for the registration in CR.
+ Cr *TaxRegistrationCreateCountryOptionsCrParams `form:"cr"`
+ // Options for the registration in CY.
+ Cy *TaxRegistrationCreateCountryOptionsCyParams `form:"cy"`
+ // Options for the registration in CZ.
+ Cz *TaxRegistrationCreateCountryOptionsCzParams `form:"cz"`
+ // Options for the registration in DE.
+ DE *TaxRegistrationCreateCountryOptionsDEParams `form:"de"`
+ // Options for the registration in DK.
+ Dk *TaxRegistrationCreateCountryOptionsDkParams `form:"dk"`
+ // Options for the registration in EC.
+ Ec *TaxRegistrationCreateCountryOptionsEcParams `form:"ec"`
+ // Options for the registration in EE.
+ Ee *TaxRegistrationCreateCountryOptionsEeParams `form:"ee"`
+ // Options for the registration in EG.
+ Eg *TaxRegistrationCreateCountryOptionsEgParams `form:"eg"`
+ // Options for the registration in ES.
+ ES *TaxRegistrationCreateCountryOptionsESParams `form:"es"`
+ // Options for the registration in FI.
+ FI *TaxRegistrationCreateCountryOptionsFIParams `form:"fi"`
+ // Options for the registration in FR.
+ FR *TaxRegistrationCreateCountryOptionsFRParams `form:"fr"`
+ // Options for the registration in GB.
+ GB *TaxRegistrationCreateCountryOptionsGBParams `form:"gb"`
+ // Options for the registration in GE.
+ Ge *TaxRegistrationCreateCountryOptionsGeParams `form:"ge"`
+ // Options for the registration in GN.
+ Gn *TaxRegistrationCreateCountryOptionsGnParams `form:"gn"`
+ // Options for the registration in GR.
+ Gr *TaxRegistrationCreateCountryOptionsGrParams `form:"gr"`
+ // Options for the registration in HR.
+ HR *TaxRegistrationCreateCountryOptionsHRParams `form:"hr"`
+ // Options for the registration in HU.
+ HU *TaxRegistrationCreateCountryOptionsHUParams `form:"hu"`
+ // Options for the registration in ID.
+ ID *TaxRegistrationCreateCountryOptionsIDParams `form:"id"`
+ // Options for the registration in IE.
+ Ie *TaxRegistrationCreateCountryOptionsIeParams `form:"ie"`
+ // Options for the registration in IN.
+ In *TaxRegistrationCreateCountryOptionsInParams `form:"in"`
+ // Options for the registration in IS.
+ Is *TaxRegistrationCreateCountryOptionsIsParams `form:"is"`
+ // Options for the registration in IT.
+ IT *TaxRegistrationCreateCountryOptionsITParams `form:"it"`
+ // Options for the registration in JP.
+ JP *TaxRegistrationCreateCountryOptionsJPParams `form:"jp"`
+ // Options for the registration in KE.
+ Ke *TaxRegistrationCreateCountryOptionsKeParams `form:"ke"`
+ // Options for the registration in KH.
+ Kh *TaxRegistrationCreateCountryOptionsKhParams `form:"kh"`
+ // Options for the registration in KR.
+ Kr *TaxRegistrationCreateCountryOptionsKrParams `form:"kr"`
+ // Options for the registration in KZ.
+ Kz *TaxRegistrationCreateCountryOptionsKzParams `form:"kz"`
+ // Options for the registration in LT.
+ LT *TaxRegistrationCreateCountryOptionsLTParams `form:"lt"`
+ // Options for the registration in LU.
+ Lu *TaxRegistrationCreateCountryOptionsLuParams `form:"lu"`
+ // Options for the registration in LV.
+ LV *TaxRegistrationCreateCountryOptionsLVParams `form:"lv"`
+ // Options for the registration in MA.
+ Ma *TaxRegistrationCreateCountryOptionsMaParams `form:"ma"`
+ // Options for the registration in MD.
+ Md *TaxRegistrationCreateCountryOptionsMdParams `form:"md"`
+ // Options for the registration in ME.
+ Me *TaxRegistrationCreateCountryOptionsMeParams `form:"me"`
+ // Options for the registration in MK.
+ Mk *TaxRegistrationCreateCountryOptionsMkParams `form:"mk"`
+ // Options for the registration in MR.
+ Mr *TaxRegistrationCreateCountryOptionsMrParams `form:"mr"`
+ // Options for the registration in MT.
+ MT *TaxRegistrationCreateCountryOptionsMTParams `form:"mt"`
+ // Options for the registration in MX.
+ MX *TaxRegistrationCreateCountryOptionsMXParams `form:"mx"`
+ // Options for the registration in MY.
+ My *TaxRegistrationCreateCountryOptionsMyParams `form:"my"`
+ // Options for the registration in NG.
+ Ng *TaxRegistrationCreateCountryOptionsNgParams `form:"ng"`
+ // Options for the registration in NL.
+ NL *TaxRegistrationCreateCountryOptionsNLParams `form:"nl"`
+ // Options for the registration in NO.
+ No *TaxRegistrationCreateCountryOptionsNoParams `form:"no"`
+ // Options for the registration in NP.
+ Np *TaxRegistrationCreateCountryOptionsNpParams `form:"np"`
+ // Options for the registration in NZ.
+ Nz *TaxRegistrationCreateCountryOptionsNzParams `form:"nz"`
+ // Options for the registration in OM.
+ Om *TaxRegistrationCreateCountryOptionsOmParams `form:"om"`
+ // Options for the registration in PE.
+ Pe *TaxRegistrationCreateCountryOptionsPeParams `form:"pe"`
+ // Options for the registration in PL.
+ PL *TaxRegistrationCreateCountryOptionsPLParams `form:"pl"`
+ // Options for the registration in PT.
+ PT *TaxRegistrationCreateCountryOptionsPTParams `form:"pt"`
+ // Options for the registration in RO.
+ RO *TaxRegistrationCreateCountryOptionsROParams `form:"ro"`
+ // Options for the registration in RS.
+ Rs *TaxRegistrationCreateCountryOptionsRsParams `form:"rs"`
+ // Options for the registration in RU.
+ RU *TaxRegistrationCreateCountryOptionsRUParams `form:"ru"`
+ // Options for the registration in SA.
+ Sa *TaxRegistrationCreateCountryOptionsSaParams `form:"sa"`
+ // Options for the registration in SE.
+ Se *TaxRegistrationCreateCountryOptionsSeParams `form:"se"`
+ // Options for the registration in SG.
+ Sg *TaxRegistrationCreateCountryOptionsSgParams `form:"sg"`
+ // Options for the registration in SI.
+ Si *TaxRegistrationCreateCountryOptionsSiParams `form:"si"`
+ // Options for the registration in SK.
+ SK *TaxRegistrationCreateCountryOptionsSKParams `form:"sk"`
+ // Options for the registration in SN.
+ Sn *TaxRegistrationCreateCountryOptionsSnParams `form:"sn"`
+ // Options for the registration in SR.
+ Sr *TaxRegistrationCreateCountryOptionsSrParams `form:"sr"`
+ // Options for the registration in TH.
+ TH *TaxRegistrationCreateCountryOptionsTHParams `form:"th"`
+ // Options for the registration in TJ.
+ Tj *TaxRegistrationCreateCountryOptionsTjParams `form:"tj"`
+ // Options for the registration in TR.
+ TR *TaxRegistrationCreateCountryOptionsTRParams `form:"tr"`
+ // Options for the registration in TZ.
+ Tz *TaxRegistrationCreateCountryOptionsTzParams `form:"tz"`
+ // Options for the registration in UG.
+ Ug *TaxRegistrationCreateCountryOptionsUgParams `form:"ug"`
+ // Options for the registration in US.
+ US *TaxRegistrationCreateCountryOptionsUSParams `form:"us"`
+ // Options for the registration in UY.
+ Uy *TaxRegistrationCreateCountryOptionsUyParams `form:"uy"`
+ // Options for the registration in UZ.
+ Uz *TaxRegistrationCreateCountryOptionsUzParams `form:"uz"`
+ // Options for the registration in VN.
+ Vn *TaxRegistrationCreateCountryOptionsVnParams `form:"vn"`
+ // Options for the registration in ZA.
+ Za *TaxRegistrationCreateCountryOptionsZaParams `form:"za"`
+ // Options for the registration in ZM.
+ Zm *TaxRegistrationCreateCountryOptionsZmParams `form:"zm"`
+ // Options for the registration in ZW.
+ Zw *TaxRegistrationCreateCountryOptionsZwParams `form:"zw"`
+}
+
+// Creates a new Tax Registration object.
+type TaxRegistrationCreateParams struct {
+ Params `form:"*"`
+ // Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch.
+ ActiveFrom *int64 `form:"active_from"`
+ ActiveFromNow *bool `form:"-"` // See custom AppendTo
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country"`
+ // Specific options for a registration in the specified `country`.
+ CountryOptions *TaxRegistrationCreateCountryOptionsParams `form:"country_options"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch.
+ ExpiresAt *int64 `form:"expires_at"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxRegistrationCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AppendTo implements custom encoding logic for TaxRegistrationCreateParams.
+func (p *TaxRegistrationCreateParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.ActiveFromNow) {
+ body.Add(form.FormatKey(append(keyParts, "active_from")), "now")
+ }
+}
+
+// Returns a Tax Registration object.
+type TaxRegistrationRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxRegistrationRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates an existing Tax Registration object.
+//
+// A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting expires_at.
+type TaxRegistrationUpdateParams struct {
+ Params `form:"*"`
+ // Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch.
+ ActiveFrom *int64 `form:"active_from"`
+ ActiveFromNow *bool `form:"-"` // See custom AppendTo
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch.
+ ExpiresAt *int64 `form:"expires_at"`
+ ExpiresAtNow *bool `form:"-"` // See custom AppendTo
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxRegistrationUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AppendTo implements custom encoding logic for TaxRegistrationUpdateParams.
+func (p *TaxRegistrationUpdateParams) AppendTo(body *form.Values, keyParts []string) {
+ if BoolValue(p.ActiveFromNow) {
+ body.Add(form.FormatKey(append(keyParts, "active_from")), "now")
+ }
+ if BoolValue(p.ExpiresAtNow) {
+ body.Add(form.FormatKey(append(keyParts, "expires_at")), "now")
+ }
+}
+
type TaxRegistrationCountryOptionsAe struct {
// Type of registration in `country`.
Type TaxRegistrationCountryOptionsAeType `json:"type"`
diff --git a/tax_settings.go b/tax_settings.go
index 6fec34b3c2..6b24b0673d 100644
--- a/tax_settings.go
+++ b/tax_settings.go
@@ -54,6 +54,49 @@ type TaxSettingsHeadOfficeParams struct {
// The location of the business for tax purposes.
Address *AddressParams `form:"address"`
}
+
+// Retrieves Tax Settings for a merchant.
+type TaxSettingsRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxSettingsRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Default configuration to be used on Stripe Tax calculations.
+type TaxSettingsUpdateDefaultsParams struct {
+ // Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null.
+ TaxBehavior *string `form:"tax_behavior"`
+ // A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
+ TaxCode *string `form:"tax_code"`
+}
+
+// The place where your business is located.
+type TaxSettingsUpdateHeadOfficeParams struct {
+ // The location of the business for tax purposes.
+ Address *AddressParams `form:"address"`
+}
+
+// Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.
+type TaxSettingsUpdateParams struct {
+ Params `form:"*"`
+ // Default configuration to be used on Stripe Tax calculations.
+ Defaults *TaxSettingsUpdateDefaultsParams `form:"defaults"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The place where your business is located.
+ HeadOffice *TaxSettingsUpdateHeadOfficeParams `form:"head_office"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxSettingsUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type TaxSettingsDefaults struct {
// Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior.
TaxBehavior TaxSettingsDefaultsTaxBehavior `json:"tax_behavior"`
diff --git a/tax_transaction.go b/tax_transaction.go
index 2db5dfe6c4..3b0231bd5d 100644
--- a/tax_transaction.go
+++ b/tax_transaction.go
@@ -337,6 +337,18 @@ func (p *TaxTransactionCreateReversalParams) AddMetadata(key string, value strin
p.Metadata[key] = value
}
+// Retrieves a Tax Transaction object.
+type TaxTransactionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxTransactionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The customer's tax IDs (for example, EU VAT numbers).
type TaxTransactionCustomerDetailsTaxID 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`
diff --git a/taxcode.go b/taxcode.go
index 11bdd7fdef..eddb0e0943 100644
--- a/taxcode.go
+++ b/taxcode.go
@@ -32,6 +32,18 @@ func (p *TaxCodeParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.
+type TaxCodeRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxCodeRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes.
type TaxCode struct {
APIResource
diff --git a/taxid.go b/taxid.go
index 428394d855..b92d551f62 100644
--- a/taxid.go
+++ b/taxid.go
@@ -168,6 +168,42 @@ func (p *TaxIDListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Deletes an existing tax_id object.
+type TaxIDDeleteParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+}
+
+// Retrieves the tax_id object with the given identifier.
+type TaxIDRetrieveParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxIDRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Creates a new tax_id object for a customer.
+type TaxIDCreateParams struct {
+ Params `form:"*"`
+ Customer *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxIDCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The account or customer the tax ID belongs to.
type TaxIDOwner struct {
// The account being referenced when `type` is `account`.
diff --git a/taxrate.go b/taxrate.go
index a2df60fb23..e93192fed2 100644
--- a/taxrate.go
+++ b/taxrate.go
@@ -112,6 +112,96 @@ func (p *TaxRateParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// Creates a new tax rate.
+type TaxRateCreateParams struct {
+ Params `form:"*"`
+ // Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ Active *bool `form:"active"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country"`
+ // An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ Description *string `form:"description"`
+ // The display name of the tax rate, which will be shown to users.
+ DisplayName *string `form:"display_name"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // This specifies if the tax rate is inclusive or exclusive.
+ Inclusive *bool `form:"inclusive"`
+ // The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice.
+ Jurisdiction *string `form:"jurisdiction"`
+ // 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"`
+ // This represents the tax rate percent out of 100.
+ Percentage *float64 `form:"percentage"`
+ // [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ State *string `form:"state"`
+ // The high-level tax type, such as `vat` or `sales_tax`.
+ TaxType *string `form:"tax_type"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxRateCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TaxRateCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves a tax rate with the given ID
+type TaxRateRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxRateRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates an existing tax rate.
+type TaxRateUpdateParams struct {
+ Params `form:"*"`
+ // Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
+ Active *bool `form:"active"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country"`
+ // An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
+ Description *string `form:"description"`
+ // The display name of the tax rate, which will be shown to users.
+ DisplayName *string `form:"display_name"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice.
+ Jurisdiction *string `form:"jurisdiction"`
+ // 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"`
+ // [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
+ State *string `form:"state"`
+ // The high-level tax type, such as `vat` or `sales_tax`.
+ TaxType *string `form:"tax_type"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TaxRateUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TaxRateUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.
type TaxRateFlatAmount struct {
// Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
diff --git a/terminal_configuration.go b/terminal_configuration.go
index 838d914aa1..b0850f0940 100644
--- a/terminal_configuration.go
+++ b/terminal_configuration.go
@@ -332,6 +332,627 @@ func (p *TerminalConfigurationListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Deletes a Configuration object.
+type TerminalConfigurationDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves a Configuration object.
+type TerminalConfigurationRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TerminalConfigurationRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// An object containing device type specific settings for BBPOS WisePOS E readers
+type TerminalConfigurationUpdateBBPOSWisePOSEParams struct {
+ // A File ID representing an image to display on the reader
+ Splashscreen *string `form:"splashscreen"`
+}
+
+// Configurations for collecting transactions offline.
+type TerminalConfigurationUpdateOfflineParams struct {
+ // Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ Enabled *bool `form:"enabled"`
+}
+
+// Reboot time settings for readers that support customized reboot time configuration.
+type TerminalConfigurationUpdateRebootWindowParams struct {
+ // Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ EndHour *int64 `form:"end_hour"`
+ // Integer between 0 to 23 that represents the start hour of the reboot time window.
+ StartHour *int64 `form:"start_hour"`
+}
+
+// An object containing device type specific settings for Stripe S700 readers
+type TerminalConfigurationUpdateStripeS700Params struct {
+ // A File ID representing an image you would like displayed on the reader.
+ Splashscreen *string `form:"splashscreen"`
+}
+
+// Tipping configuration for AUD
+type TerminalConfigurationUpdateTippingAUDParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for CAD
+type TerminalConfigurationUpdateTippingCADParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for CHF
+type TerminalConfigurationUpdateTippingCHFParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for CZK
+type TerminalConfigurationUpdateTippingCZKParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for DKK
+type TerminalConfigurationUpdateTippingDKKParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for EUR
+type TerminalConfigurationUpdateTippingEURParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for GBP
+type TerminalConfigurationUpdateTippingGBPParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for HKD
+type TerminalConfigurationUpdateTippingHKDParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for JPY
+type TerminalConfigurationUpdateTippingJPYParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for MYR
+type TerminalConfigurationUpdateTippingMYRParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for NOK
+type TerminalConfigurationUpdateTippingNOKParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for NZD
+type TerminalConfigurationUpdateTippingNZDParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for PLN
+type TerminalConfigurationUpdateTippingPLNParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for SEK
+type TerminalConfigurationUpdateTippingSEKParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for SGD
+type TerminalConfigurationUpdateTippingSGDParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for USD
+type TerminalConfigurationUpdateTippingUSDParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configurations for readers supporting on-reader tips
+type TerminalConfigurationUpdateTippingParams struct {
+ // Tipping configuration for AUD
+ AUD *TerminalConfigurationUpdateTippingAUDParams `form:"aud"`
+ // Tipping configuration for CAD
+ CAD *TerminalConfigurationUpdateTippingCADParams `form:"cad"`
+ // Tipping configuration for CHF
+ CHF *TerminalConfigurationUpdateTippingCHFParams `form:"chf"`
+ // Tipping configuration for CZK
+ CZK *TerminalConfigurationUpdateTippingCZKParams `form:"czk"`
+ // Tipping configuration for DKK
+ DKK *TerminalConfigurationUpdateTippingDKKParams `form:"dkk"`
+ // Tipping configuration for EUR
+ EUR *TerminalConfigurationUpdateTippingEURParams `form:"eur"`
+ // Tipping configuration for GBP
+ GBP *TerminalConfigurationUpdateTippingGBPParams `form:"gbp"`
+ // Tipping configuration for HKD
+ HKD *TerminalConfigurationUpdateTippingHKDParams `form:"hkd"`
+ // Tipping configuration for JPY
+ JPY *TerminalConfigurationUpdateTippingJPYParams `form:"jpy"`
+ // Tipping configuration for MYR
+ MYR *TerminalConfigurationUpdateTippingMYRParams `form:"myr"`
+ // Tipping configuration for NOK
+ NOK *TerminalConfigurationUpdateTippingNOKParams `form:"nok"`
+ // Tipping configuration for NZD
+ NZD *TerminalConfigurationUpdateTippingNZDParams `form:"nzd"`
+ // Tipping configuration for PLN
+ PLN *TerminalConfigurationUpdateTippingPLNParams `form:"pln"`
+ // Tipping configuration for SEK
+ SEK *TerminalConfigurationUpdateTippingSEKParams `form:"sek"`
+ // Tipping configuration for SGD
+ SGD *TerminalConfigurationUpdateTippingSGDParams `form:"sgd"`
+ // Tipping configuration for USD
+ USD *TerminalConfigurationUpdateTippingUSDParams `form:"usd"`
+}
+
+// An object containing device type specific settings for Verifone P400 readers
+type TerminalConfigurationUpdateVerifoneP400Params struct {
+ // A File ID representing an image you would like displayed on the reader.
+ Splashscreen *string `form:"splashscreen"`
+}
+
+// Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+type TerminalConfigurationUpdateWifiEnterpriseEapPeapParams struct {
+ // A File ID representing a PEM file containing the server certificate
+ CaCertificateFile *string `form:"ca_certificate_file"`
+ // Password for connecting to the WiFi network
+ Password *string `form:"password"`
+ // Name of the WiFi network
+ Ssid *string `form:"ssid"`
+ // Username for connecting to the WiFi network
+ Username *string `form:"username"`
+}
+
+// Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+type TerminalConfigurationUpdateWifiEnterpriseEapTLSParams struct {
+ // A File ID representing a PEM file containing the server certificate
+ CaCertificateFile *string `form:"ca_certificate_file"`
+ // A File ID representing a PEM file containing the client certificate
+ ClientCertificateFile *string `form:"client_certificate_file"`
+ // A File ID representing a PEM file containing the client RSA private key
+ PrivateKeyFile *string `form:"private_key_file"`
+ // Password for the private key file
+ PrivateKeyFilePassword *string `form:"private_key_file_password"`
+ // Name of the WiFi network
+ Ssid *string `form:"ssid"`
+}
+
+// Credentials for a WPA-Personal WiFi network.
+type TerminalConfigurationUpdateWifiPersonalPskParams struct {
+ // Password for connecting to the WiFi network
+ Password *string `form:"password"`
+ // Name of the WiFi network
+ Ssid *string `form:"ssid"`
+}
+
+// Configurations for connecting to a WiFi network.
+type TerminalConfigurationUpdateWifiParams struct {
+ // Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+ EnterpriseEapPeap *TerminalConfigurationUpdateWifiEnterpriseEapPeapParams `form:"enterprise_eap_peap"`
+ // Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+ EnterpriseEapTLS *TerminalConfigurationUpdateWifiEnterpriseEapTLSParams `form:"enterprise_eap_tls"`
+ // Credentials for a WPA-Personal WiFi network.
+ PersonalPsk *TerminalConfigurationUpdateWifiPersonalPskParams `form:"personal_psk"`
+ // Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type.
+ Type *string `form:"type"`
+}
+
+// Updates a new Configuration object.
+type TerminalConfigurationUpdateParams struct {
+ Params `form:"*"`
+ // An object containing device type specific settings for BBPOS WisePOS E readers
+ BBPOSWisePOSE *TerminalConfigurationUpdateBBPOSWisePOSEParams `form:"bbpos_wisepos_e"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Name of the configuration
+ Name *string `form:"name"`
+ // Configurations for collecting transactions offline.
+ Offline *TerminalConfigurationUpdateOfflineParams `form:"offline"`
+ // Reboot time settings for readers that support customized reboot time configuration.
+ RebootWindow *TerminalConfigurationUpdateRebootWindowParams `form:"reboot_window"`
+ // An object containing device type specific settings for Stripe S700 readers
+ StripeS700 *TerminalConfigurationUpdateStripeS700Params `form:"stripe_s700"`
+ // Tipping configurations for readers supporting on-reader tips
+ Tipping *TerminalConfigurationUpdateTippingParams `form:"tipping"`
+ // An object containing device type specific settings for Verifone P400 readers
+ VerifoneP400 *TerminalConfigurationUpdateVerifoneP400Params `form:"verifone_p400"`
+ // Configurations for connecting to a WiFi network.
+ Wifi *TerminalConfigurationUpdateWifiParams `form:"wifi"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TerminalConfigurationUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// An object containing device type specific settings for BBPOS WisePOS E readers
+type TerminalConfigurationCreateBBPOSWisePOSEParams struct {
+ // A File ID representing an image to display on the reader
+ Splashscreen *string `form:"splashscreen"`
+}
+
+// Configurations for collecting transactions offline.
+type TerminalConfigurationCreateOfflineParams struct {
+ // Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
+ Enabled *bool `form:"enabled"`
+}
+
+// Reboot time settings for readers that support customized reboot time configuration.
+type TerminalConfigurationCreateRebootWindowParams struct {
+ // Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
+ EndHour *int64 `form:"end_hour"`
+ // Integer between 0 to 23 that represents the start hour of the reboot time window.
+ StartHour *int64 `form:"start_hour"`
+}
+
+// An object containing device type specific settings for Stripe S700 readers
+type TerminalConfigurationCreateStripeS700Params struct {
+ // A File ID representing an image you would like displayed on the reader.
+ Splashscreen *string `form:"splashscreen"`
+}
+
+// Tipping configuration for AUD
+type TerminalConfigurationCreateTippingAUDParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for CAD
+type TerminalConfigurationCreateTippingCADParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for CHF
+type TerminalConfigurationCreateTippingCHFParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for CZK
+type TerminalConfigurationCreateTippingCZKParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for DKK
+type TerminalConfigurationCreateTippingDKKParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for EUR
+type TerminalConfigurationCreateTippingEURParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for GBP
+type TerminalConfigurationCreateTippingGBPParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for HKD
+type TerminalConfigurationCreateTippingHKDParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for JPY
+type TerminalConfigurationCreateTippingJPYParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for MYR
+type TerminalConfigurationCreateTippingMYRParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for NOK
+type TerminalConfigurationCreateTippingNOKParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for NZD
+type TerminalConfigurationCreateTippingNZDParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for PLN
+type TerminalConfigurationCreateTippingPLNParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for SEK
+type TerminalConfigurationCreateTippingSEKParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for SGD
+type TerminalConfigurationCreateTippingSGDParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configuration for USD
+type TerminalConfigurationCreateTippingUSDParams struct {
+ // Fixed amounts displayed when collecting a tip
+ FixedAmounts []*int64 `form:"fixed_amounts"`
+ // Percentages displayed when collecting a tip
+ Percentages []*int64 `form:"percentages"`
+ // Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
+ SmartTipThreshold *int64 `form:"smart_tip_threshold"`
+}
+
+// Tipping configurations for readers supporting on-reader tips
+type TerminalConfigurationCreateTippingParams struct {
+ // Tipping configuration for AUD
+ AUD *TerminalConfigurationCreateTippingAUDParams `form:"aud"`
+ // Tipping configuration for CAD
+ CAD *TerminalConfigurationCreateTippingCADParams `form:"cad"`
+ // Tipping configuration for CHF
+ CHF *TerminalConfigurationCreateTippingCHFParams `form:"chf"`
+ // Tipping configuration for CZK
+ CZK *TerminalConfigurationCreateTippingCZKParams `form:"czk"`
+ // Tipping configuration for DKK
+ DKK *TerminalConfigurationCreateTippingDKKParams `form:"dkk"`
+ // Tipping configuration for EUR
+ EUR *TerminalConfigurationCreateTippingEURParams `form:"eur"`
+ // Tipping configuration for GBP
+ GBP *TerminalConfigurationCreateTippingGBPParams `form:"gbp"`
+ // Tipping configuration for HKD
+ HKD *TerminalConfigurationCreateTippingHKDParams `form:"hkd"`
+ // Tipping configuration for JPY
+ JPY *TerminalConfigurationCreateTippingJPYParams `form:"jpy"`
+ // Tipping configuration for MYR
+ MYR *TerminalConfigurationCreateTippingMYRParams `form:"myr"`
+ // Tipping configuration for NOK
+ NOK *TerminalConfigurationCreateTippingNOKParams `form:"nok"`
+ // Tipping configuration for NZD
+ NZD *TerminalConfigurationCreateTippingNZDParams `form:"nzd"`
+ // Tipping configuration for PLN
+ PLN *TerminalConfigurationCreateTippingPLNParams `form:"pln"`
+ // Tipping configuration for SEK
+ SEK *TerminalConfigurationCreateTippingSEKParams `form:"sek"`
+ // Tipping configuration for SGD
+ SGD *TerminalConfigurationCreateTippingSGDParams `form:"sgd"`
+ // Tipping configuration for USD
+ USD *TerminalConfigurationCreateTippingUSDParams `form:"usd"`
+}
+
+// An object containing device type specific settings for Verifone P400 readers
+type TerminalConfigurationCreateVerifoneP400Params struct {
+ // A File ID representing an image you would like displayed on the reader.
+ Splashscreen *string `form:"splashscreen"`
+}
+
+// Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+type TerminalConfigurationCreateWifiEnterpriseEapPeapParams struct {
+ // A File ID representing a PEM file containing the server certificate
+ CaCertificateFile *string `form:"ca_certificate_file"`
+ // Password for connecting to the WiFi network
+ Password *string `form:"password"`
+ // Name of the WiFi network
+ Ssid *string `form:"ssid"`
+ // Username for connecting to the WiFi network
+ Username *string `form:"username"`
+}
+
+// Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+type TerminalConfigurationCreateWifiEnterpriseEapTLSParams struct {
+ // A File ID representing a PEM file containing the server certificate
+ CaCertificateFile *string `form:"ca_certificate_file"`
+ // A File ID representing a PEM file containing the client certificate
+ ClientCertificateFile *string `form:"client_certificate_file"`
+ // A File ID representing a PEM file containing the client RSA private key
+ PrivateKeyFile *string `form:"private_key_file"`
+ // Password for the private key file
+ PrivateKeyFilePassword *string `form:"private_key_file_password"`
+ // Name of the WiFi network
+ Ssid *string `form:"ssid"`
+}
+
+// Credentials for a WPA-Personal WiFi network.
+type TerminalConfigurationCreateWifiPersonalPskParams struct {
+ // Password for connecting to the WiFi network
+ Password *string `form:"password"`
+ // Name of the WiFi network
+ Ssid *string `form:"ssid"`
+}
+
+// Configurations for connecting to a WiFi network.
+type TerminalConfigurationCreateWifiParams struct {
+ // Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method.
+ EnterpriseEapPeap *TerminalConfigurationCreateWifiEnterpriseEapPeapParams `form:"enterprise_eap_peap"`
+ // Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method.
+ EnterpriseEapTLS *TerminalConfigurationCreateWifiEnterpriseEapTLSParams `form:"enterprise_eap_tls"`
+ // Credentials for a WPA-Personal WiFi network.
+ PersonalPsk *TerminalConfigurationCreateWifiPersonalPskParams `form:"personal_psk"`
+ // Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type.
+ Type *string `form:"type"`
+}
+
+// Creates a new Configuration object.
+type TerminalConfigurationCreateParams struct {
+ Params `form:"*"`
+ // An object containing device type specific settings for BBPOS WisePOS E readers
+ BBPOSWisePOSE *TerminalConfigurationCreateBBPOSWisePOSEParams `form:"bbpos_wisepos_e"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Name of the configuration
+ Name *string `form:"name"`
+ // Configurations for collecting transactions offline.
+ Offline *TerminalConfigurationCreateOfflineParams `form:"offline"`
+ // Reboot time settings for readers that support customized reboot time configuration.
+ RebootWindow *TerminalConfigurationCreateRebootWindowParams `form:"reboot_window"`
+ // An object containing device type specific settings for Stripe S700 readers
+ StripeS700 *TerminalConfigurationCreateStripeS700Params `form:"stripe_s700"`
+ // Tipping configurations for readers supporting on-reader tips
+ Tipping *TerminalConfigurationCreateTippingParams `form:"tipping"`
+ // An object containing device type specific settings for Verifone P400 readers
+ VerifoneP400 *TerminalConfigurationCreateVerifoneP400Params `form:"verifone_p400"`
+ // Configurations for connecting to a WiFi network.
+ Wifi *TerminalConfigurationCreateWifiParams `form:"wifi"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TerminalConfigurationCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type TerminalConfigurationBBPOSWisePOSE struct {
// A File ID representing an image to display on the reader
Splashscreen *File `json:"splashscreen"`
diff --git a/terminal_connectiontoken.go b/terminal_connectiontoken.go
index df53320bd6..1baf252ac7 100644
--- a/terminal_connectiontoken.go
+++ b/terminal_connectiontoken.go
@@ -20,6 +20,20 @@ func (p *TerminalConnectionTokenParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
+type TerminalConnectionTokenCreateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
+ Location *string `form:"location"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TerminalConnectionTokenCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// A Connection Token is used by the Stripe Terminal SDK to connect to a reader.
//
// Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)
diff --git a/terminal_location.go b/terminal_location.go
index ce572430dd..4f91d03d0d 100644
--- a/terminal_location.go
+++ b/terminal_location.go
@@ -49,6 +49,82 @@ func (p *TerminalLocationListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Deletes a Location object.
+type TerminalLocationDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves a Location object.
+type TerminalLocationRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TerminalLocationRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+type TerminalLocationUpdateParams struct {
+ Params `form:"*"`
+ // The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location.
+ Address *AddressParams `form:"address"`
+ // The ID of a configuration that will be used to customize all readers in this location.
+ ConfigurationOverrides *string `form:"configuration_overrides"`
+ // A name for the location.
+ DisplayName *string `form:"display_name"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TerminalLocationUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TerminalLocationUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Creates a new Location object.
+// For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide.
+type TerminalLocationCreateParams struct {
+ Params `form:"*"`
+ // The full address of the location.
+ Address *AddressParams `form:"address"`
+ // The ID of a configuration that will be used to customize all readers in this location.
+ ConfigurationOverrides *string `form:"configuration_overrides"`
+ // A name for the location. Maximum length is 1000 characters.
+ DisplayName *string `form:"display_name"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TerminalLocationCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TerminalLocationCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// A Location represents a grouping of readers.
//
// Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)
diff --git a/terminal_reader.go b/terminal_reader.go
index ac9a20755d..7fabe847fd 100644
--- a/terminal_reader.go
+++ b/terminal_reader.go
@@ -435,6 +435,77 @@ func (p *TerminalReaderSetReaderDisplayParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Deletes a Reader object.
+type TerminalReaderDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves a Reader object.
+type TerminalReaderRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TerminalReaderRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+type TerminalReaderUpdateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The new label of the reader.
+ Label *string `form:"label"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TerminalReaderUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TerminalReaderUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Creates a new Reader object.
+type TerminalReaderCreateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Custom label given to the reader for easier identification. If no label is specified, the registration code will be used.
+ Label *string `form:"label"`
+ // The location to assign the reader to.
+ Location *string `form:"location"`
+ // 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"`
+ // A code generated by the reader used for registering to an account.
+ RegistrationCode *string `form:"registration_code"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TerminalReaderCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TerminalReaderCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Default text of input being collected.
type TerminalReaderActionCollectInputsInputCustomText struct {
// Customize the default description for this input
diff --git a/terminal_readercollecteddata.go b/terminal_readercollecteddata.go
index eeaf2ec889..6f8ff8f81c 100644
--- a/terminal_readercollecteddata.go
+++ b/terminal_readercollecteddata.go
@@ -26,6 +26,18 @@ func (p *TerminalReaderCollectedDataParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieve data collected using Reader hardware.
+type TerminalReaderCollectedDataRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TerminalReaderCollectedDataRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// The magstripe data collected by the reader.
type TerminalReaderCollectedDataMagstripe struct {
// The raw magstripe data collected by the reader.
diff --git a/testhelpers_confirmationtoken.go b/testhelpers_confirmationtoken.go
index aece4980b7..5b1e7bd844 100644
--- a/testhelpers_confirmationtoken.go
+++ b/testhelpers_confirmationtoken.go
@@ -489,3 +489,487 @@ type TestHelpersConfirmationTokenParams struct {
func (p *TestHelpersConfirmationTokenParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+
+// If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataACSSDebitParams struct {
+ // Customer's bank account number.
+ AccountNumber *string `form:"account_number"`
+ // Institution number of the customer's bank.
+ InstitutionNumber *string `form:"institution_number"`
+ // Transit number of the customer's bank.
+ TransitNumber *string `form:"transit_number"`
+}
+
+// If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataAffirmParams struct{}
+
+// If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataAfterpayClearpayParams struct{}
+
+// If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataAlipayParams struct{}
+
+// If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataAlmaParams struct{}
+
+// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataAmazonPayParams struct{}
+
+// If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataAUBECSDebitParams struct {
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Bank-State-Branch number of the bank account.
+ BSBNumber *string `form:"bsb_number"`
+}
+
+// If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataBACSDebitParams struct {
+ // Account number of the bank account that the funds will be debited from.
+ AccountNumber *string `form:"account_number"`
+ // Sort code of the bank account. (e.g., `10-20-30`)
+ SortCode *string `form:"sort_code"`
+}
+
+// If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataBancontactParams struct{}
+
+// If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataBillieParams struct{}
+
+// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataBillingDetailsParams struct {
+ // Billing address.
+ Address *AddressParams `form:"address"`
+ // Email address.
+ Email *string `form:"email"`
+ // Full name.
+ Name *string `form:"name"`
+ // Billing phone number (including extension).
+ Phone *string `form:"phone"`
+}
+
+// If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataBLIKParams struct{}
+
+// If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataBoletoParams struct {
+ // The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
+ TaxID *string `form:"tax_id"`
+}
+
+// If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataCashAppParams struct{}
+
+// If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataCustomerBalanceParams struct{}
+
+// If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataEPSParams struct {
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataFPXParams struct {
+ // Account holder type for FPX transaction
+ AccountHolderType *string `form:"account_holder_type"`
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataGiropayParams struct{}
+
+// If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataGopayParams struct{}
+
+// If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataGrabpayParams struct{}
+
+// If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataIDBankTransferParams struct {
+ // Bank where the account is held.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataIDEALParams struct {
+ // The customer's bank. Only use this parameter for existing customers. Don't use it for new customers.
+ Bank *string `form:"bank"`
+}
+
+// If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataInteracPresentParams struct{}
+
+// If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataKakaoPayParams struct{}
+
+// Customer's date of birth
+type TestHelpersConfirmationTokenCreatePaymentMethodDataKlarnaDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataKlarnaParams struct {
+ // Customer's date of birth
+ DOB *TestHelpersConfirmationTokenCreatePaymentMethodDataKlarnaDOBParams `form:"dob"`
+}
+
+// If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataKonbiniParams struct{}
+
+// If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataKrCardParams struct{}
+
+// If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataLinkParams struct{}
+
+// If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataMbWayParams struct{}
+
+// If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataMobilepayParams struct{}
+
+// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataMultibancoParams struct{}
+
+// If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataNaverPayParams struct {
+ // Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
+ Funding *string `form:"funding"`
+}
+
+// If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataNzBankAccountParams struct {
+ // The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details.
+ AccountHolderName *string `form:"account_holder_name"`
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // The numeric code for the bank account's bank.
+ BankCode *string `form:"bank_code"`
+ // The numeric code for the bank account's bank branch.
+ BranchCode *string `form:"branch_code"`
+ Reference *string `form:"reference"`
+ // The suffix of the bank account number.
+ Suffix *string `form:"suffix"`
+}
+
+// If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataOXXOParams struct{}
+
+// If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataP24Params struct {
+ // The customer's bank.
+ Bank *string `form:"bank"`
+}
+
+// If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataPayByBankParams struct{}
+
+// If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataPaycoParams struct{}
+
+// If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataPayNowParams struct{}
+
+// If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataPaypalParams struct{}
+
+// If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataPaytoParams struct {
+ // The account number for the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Bank-State-Branch number of the bank account.
+ BSBNumber *string `form:"bsb_number"`
+ // The PayID alias for the bank account.
+ PayID *string `form:"pay_id"`
+}
+
+// If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataPixParams struct{}
+
+// If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataPromptPayParams struct{}
+
+// If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataQrisParams struct{}
+
+// Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataRadarOptionsParams 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"`
+}
+
+// Customer's date of birth
+type TestHelpersConfirmationTokenCreatePaymentMethodDataRechnungDOBParams struct {
+ // The day of birth, between 1 and 31.
+ Day *int64 `form:"day"`
+ // The month of birth, between 1 and 12.
+ Month *int64 `form:"month"`
+ // The four-digit year of birth.
+ Year *int64 `form:"year"`
+}
+
+// If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataRechnungParams struct {
+ // Customer's date of birth
+ DOB *TestHelpersConfirmationTokenCreatePaymentMethodDataRechnungDOBParams `form:"dob"`
+}
+
+// If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataRevolutPayParams struct{}
+
+// If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataSamsungPayParams struct{}
+
+// If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataSatispayParams struct{}
+
+// If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataSEPADebitParams struct {
+ // IBAN of the bank account.
+ IBAN *string `form:"iban"`
+}
+
+// If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataShopeepayParams struct{}
+
+// If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataSofortParams struct {
+ // Two-letter ISO code representing the country the bank account is located in.
+ Country *string `form:"country"`
+}
+
+// This hash contains details about the Stripe balance payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataStripeBalanceParams struct {
+ // The connected account ID whose Stripe balance to use as the source of payment
+ Account *string `form:"account"`
+ // The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance
+ SourceType *string `form:"source_type"`
+}
+
+// If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataSwishParams struct{}
+
+// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataTWINTParams struct{}
+
+// If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataUSBankAccountParams struct {
+ // Account holder type: individual or company.
+ AccountHolderType *string `form:"account_holder_type"`
+ // Account number of the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Account type: checkings or savings. Defaults to checking if omitted.
+ AccountType *string `form:"account_type"`
+ // The ID of a Financial Connections Account to use as a payment method.
+ FinancialConnectionsAccount *string `form:"financial_connections_account"`
+ // Routing number of the bank account.
+ RoutingNumber *string `form:"routing_number"`
+}
+
+// If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataWeChatPayParams struct{}
+
+// If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataZipParams struct{}
+
+// If provided, this hash will be used to create a PaymentMethod.
+type TestHelpersConfirmationTokenCreatePaymentMethodDataParams struct {
+ // If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
+ ACSSDebit *TestHelpersConfirmationTokenCreatePaymentMethodDataACSSDebitParams `form:"acss_debit"`
+ // If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
+ Affirm *TestHelpersConfirmationTokenCreatePaymentMethodDataAffirmParams `form:"affirm"`
+ // If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
+ AfterpayClearpay *TestHelpersConfirmationTokenCreatePaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"`
+ // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
+ Alipay *TestHelpersConfirmationTokenCreatePaymentMethodDataAlipayParams `form:"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 *string `form:"allow_redisplay"`
+ // If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
+ Alma *TestHelpersConfirmationTokenCreatePaymentMethodDataAlmaParams `form:"alma"`
+ // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
+ AmazonPay *TestHelpersConfirmationTokenCreatePaymentMethodDataAmazonPayParams `form:"amazon_pay"`
+ // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
+ AUBECSDebit *TestHelpersConfirmationTokenCreatePaymentMethodDataAUBECSDebitParams `form:"au_becs_debit"`
+ // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
+ BACSDebit *TestHelpersConfirmationTokenCreatePaymentMethodDataBACSDebitParams `form:"bacs_debit"`
+ // If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
+ Bancontact *TestHelpersConfirmationTokenCreatePaymentMethodDataBancontactParams `form:"bancontact"`
+ // If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
+ Billie *TestHelpersConfirmationTokenCreatePaymentMethodDataBillieParams `form:"billie"`
+ // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ BillingDetails *TestHelpersConfirmationTokenCreatePaymentMethodDataBillingDetailsParams `form:"billing_details"`
+ // If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
+ BLIK *TestHelpersConfirmationTokenCreatePaymentMethodDataBLIKParams `form:"blik"`
+ // If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
+ Boleto *TestHelpersConfirmationTokenCreatePaymentMethodDataBoletoParams `form:"boleto"`
+ // If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
+ CashApp *TestHelpersConfirmationTokenCreatePaymentMethodDataCashAppParams `form:"cashapp"`
+ // If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
+ CustomerBalance *TestHelpersConfirmationTokenCreatePaymentMethodDataCustomerBalanceParams `form:"customer_balance"`
+ // If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
+ EPS *TestHelpersConfirmationTokenCreatePaymentMethodDataEPSParams `form:"eps"`
+ // If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
+ FPX *TestHelpersConfirmationTokenCreatePaymentMethodDataFPXParams `form:"fpx"`
+ // If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
+ Giropay *TestHelpersConfirmationTokenCreatePaymentMethodDataGiropayParams `form:"giropay"`
+ // If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method.
+ Gopay *TestHelpersConfirmationTokenCreatePaymentMethodDataGopayParams `form:"gopay"`
+ // If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
+ Grabpay *TestHelpersConfirmationTokenCreatePaymentMethodDataGrabpayParams `form:"grabpay"`
+ // If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method.
+ IDBankTransfer *TestHelpersConfirmationTokenCreatePaymentMethodDataIDBankTransferParams `form:"id_bank_transfer"`
+ // If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
+ IDEAL *TestHelpersConfirmationTokenCreatePaymentMethodDataIDEALParams `form:"ideal"`
+ // If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
+ InteracPresent *TestHelpersConfirmationTokenCreatePaymentMethodDataInteracPresentParams `form:"interac_present"`
+ // If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
+ KakaoPay *TestHelpersConfirmationTokenCreatePaymentMethodDataKakaoPayParams `form:"kakao_pay"`
+ // If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
+ Klarna *TestHelpersConfirmationTokenCreatePaymentMethodDataKlarnaParams `form:"klarna"`
+ // If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
+ Konbini *TestHelpersConfirmationTokenCreatePaymentMethodDataKonbiniParams `form:"konbini"`
+ // If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
+ KrCard *TestHelpersConfirmationTokenCreatePaymentMethodDataKrCardParams `form:"kr_card"`
+ // If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
+ Link *TestHelpersConfirmationTokenCreatePaymentMethodDataLinkParams `form:"link"`
+ // If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
+ MbWay *TestHelpersConfirmationTokenCreatePaymentMethodDataMbWayParams `form:"mb_way"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
+ Mobilepay *TestHelpersConfirmationTokenCreatePaymentMethodDataMobilepayParams `form:"mobilepay"`
+ // If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
+ Multibanco *TestHelpersConfirmationTokenCreatePaymentMethodDataMultibancoParams `form:"multibanco"`
+ // If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
+ NaverPay *TestHelpersConfirmationTokenCreatePaymentMethodDataNaverPayParams `form:"naver_pay"`
+ // If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
+ NzBankAccount *TestHelpersConfirmationTokenCreatePaymentMethodDataNzBankAccountParams `form:"nz_bank_account"`
+ // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
+ OXXO *TestHelpersConfirmationTokenCreatePaymentMethodDataOXXOParams `form:"oxxo"`
+ // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
+ P24 *TestHelpersConfirmationTokenCreatePaymentMethodDataP24Params `form:"p24"`
+ // If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
+ PayByBank *TestHelpersConfirmationTokenCreatePaymentMethodDataPayByBankParams `form:"pay_by_bank"`
+ // If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
+ Payco *TestHelpersConfirmationTokenCreatePaymentMethodDataPaycoParams `form:"payco"`
+ // If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
+ PayNow *TestHelpersConfirmationTokenCreatePaymentMethodDataPayNowParams `form:"paynow"`
+ // If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
+ Paypal *TestHelpersConfirmationTokenCreatePaymentMethodDataPaypalParams `form:"paypal"`
+ // If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
+ Payto *TestHelpersConfirmationTokenCreatePaymentMethodDataPaytoParams `form:"payto"`
+ // If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
+ Pix *TestHelpersConfirmationTokenCreatePaymentMethodDataPixParams `form:"pix"`
+ // If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
+ PromptPay *TestHelpersConfirmationTokenCreatePaymentMethodDataPromptPayParams `form:"promptpay"`
+ // If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method.
+ Qris *TestHelpersConfirmationTokenCreatePaymentMethodDataQrisParams `form:"qris"`
+ // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information.
+ RadarOptions *TestHelpersConfirmationTokenCreatePaymentMethodDataRadarOptionsParams `form:"radar_options"`
+ // If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
+ Rechnung *TestHelpersConfirmationTokenCreatePaymentMethodDataRechnungParams `form:"rechnung"`
+ // If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
+ RevolutPay *TestHelpersConfirmationTokenCreatePaymentMethodDataRevolutPayParams `form:"revolut_pay"`
+ // If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
+ SamsungPay *TestHelpersConfirmationTokenCreatePaymentMethodDataSamsungPayParams `form:"samsung_pay"`
+ // If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
+ Satispay *TestHelpersConfirmationTokenCreatePaymentMethodDataSatispayParams `form:"satispay"`
+ // If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
+ SEPADebit *TestHelpersConfirmationTokenCreatePaymentMethodDataSEPADebitParams `form:"sepa_debit"`
+ // If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method.
+ Shopeepay *TestHelpersConfirmationTokenCreatePaymentMethodDataShopeepayParams `form:"shopeepay"`
+ // If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
+ Sofort *TestHelpersConfirmationTokenCreatePaymentMethodDataSofortParams `form:"sofort"`
+ // This hash contains details about the Stripe balance payment method.
+ StripeBalance *TestHelpersConfirmationTokenCreatePaymentMethodDataStripeBalanceParams `form:"stripe_balance"`
+ // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
+ Swish *TestHelpersConfirmationTokenCreatePaymentMethodDataSwishParams `form:"swish"`
+ // If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
+ TWINT *TestHelpersConfirmationTokenCreatePaymentMethodDataTWINTParams `form:"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 *string `form:"type"`
+ // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
+ USBankAccount *TestHelpersConfirmationTokenCreatePaymentMethodDataUSBankAccountParams `form:"us_bank_account"`
+ // If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
+ WeChatPay *TestHelpersConfirmationTokenCreatePaymentMethodDataWeChatPayParams `form:"wechat_pay"`
+ // If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.
+ Zip *TestHelpersConfirmationTokenCreatePaymentMethodDataZipParams `form:"zip"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TestHelpersConfirmationTokenCreatePaymentMethodDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// The selected installment plan to use for this payment attempt.
+// This parameter can only be provided during confirmation.
+type TestHelpersConfirmationTokenCreatePaymentMethodOptionsCardInstallmentsPlanParams struct {
+ // For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
+ Count *int64 `form:"count"`
+ // For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
+ // One of `month`.
+ Interval *string `form:"interval"`
+ // Type of installment plan, one of `fixed_count`.
+ Type *string `form:"type"`
+}
+
+// Installment configuration for payments attempted on this PaymentIntent.
+type TestHelpersConfirmationTokenCreatePaymentMethodOptionsCardInstallmentsParams struct {
+ // The selected installment plan to use for this payment attempt.
+ // This parameter can only be provided during confirmation.
+ Plan *TestHelpersConfirmationTokenCreatePaymentMethodOptionsCardInstallmentsPlanParams `form:"plan"`
+}
+type TestHelpersConfirmationTokenCreatePaymentMethodOptionsCardParams struct {
+ // Installment configuration for payments attempted on this PaymentIntent.
+ Installments *TestHelpersConfirmationTokenCreatePaymentMethodOptionsCardInstallmentsParams `form:"installments"`
+}
+type TestHelpersConfirmationTokenCreatePaymentMethodOptionsParams struct {
+ Card *TestHelpersConfirmationTokenCreatePaymentMethodOptionsCardParams `form:"card"`
+}
+
+// Shipping information for this ConfirmationToken.
+type TestHelpersConfirmationTokenCreateShippingParams struct {
+ // Shipping address
+ Address *AddressParams `form:"address"`
+ // Recipient name.
+ Name *string `form:"name"`
+ // Recipient phone (including extension)
+ Phone *string `form:"phone"`
+}
+
+// Creates a test mode Confirmation Token server side for your integration tests.
+type TestHelpersConfirmationTokenCreateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // ID of an existing PaymentMethod.
+ PaymentMethod *string `form:"payment_method"`
+ // If provided, this hash will be used to create a PaymentMethod.
+ PaymentMethodData *TestHelpersConfirmationTokenCreatePaymentMethodDataParams `form:"payment_method_data"`
+ PaymentMethodOptions *TestHelpersConfirmationTokenCreatePaymentMethodOptionsParams `form:"payment_method_options"`
+ // Return URL used to confirm the Intent.
+ ReturnURL *string `form:"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 *string `form:"setup_future_usage"`
+ // Shipping information for this ConfirmationToken.
+ Shipping *TestHelpersConfirmationTokenCreateShippingParams `form:"shipping"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TestHelpersConfirmationTokenCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
diff --git a/testhelpers_testclock.go b/testhelpers_testclock.go
index 42fd5d4816..c7dd912a1f 100644
--- a/testhelpers_testclock.go
+++ b/testhelpers_testclock.go
@@ -60,6 +60,39 @@ func (p *TestHelpersTestClockAdvanceParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Deletes a test clock.
+type TestHelpersTestClockDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves a test clock.
+type TestHelpersTestClockRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TestHelpersTestClockRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Creates a new test clock that can be attached to new customers and quotes.
+type TestHelpersTestClockCreateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The initial frozen time for this test clock.
+ FrozenTime *int64 `form:"frozen_time"`
+ // The name for this test clock.
+ Name *string `form:"name"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TestHelpersTestClockCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type TestHelpersTestClockStatusDetailsAdvancing struct {
// The `frozen_time` that the Test Clock is advancing towards.
TargetFrozenTime int64 `json:"target_frozen_time"`
diff --git a/testhelpersissuing_authorization.go b/testhelpersissuing_authorization.go
index e746046a50..1fcf260fae 100644
--- a/testhelpersissuing_authorization.go
+++ b/testhelpersissuing_authorization.go
@@ -475,3 +475,179 @@ type TestHelpersIssuingAuthorizationReverseParams struct {
func (p *TestHelpersIssuingAuthorizationReverseParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+
+// Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+type TestHelpersIssuingAuthorizationCreateAmountDetailsParams struct {
+ // The ATM withdrawal fee.
+ ATMFee *int64 `form:"atm_fee"`
+ // The amount of cash requested by the cardholder.
+ CashbackAmount *int64 `form:"cashback_amount"`
+}
+
+// Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+type TestHelpersIssuingAuthorizationCreateFleetCardholderPromptDataParams struct {
+ // Driver ID.
+ DriverID *string `form:"driver_id"`
+ // Odometer reading.
+ Odometer *int64 `form:"odometer"`
+ // An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
+ UnspecifiedID *string `form:"unspecified_id"`
+ // User ID.
+ UserID *string `form:"user_id"`
+ // Vehicle number.
+ VehicleNumber *string `form:"vehicle_number"`
+}
+
+// Breakdown of fuel portion of the purchase.
+type TestHelpersIssuingAuthorizationCreateFleetReportedBreakdownFuelParams struct {
+ // Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
+ GrossAmountDecimal *float64 `form:"gross_amount_decimal,high_precision"`
+}
+
+// Breakdown of non-fuel portion of the purchase.
+type TestHelpersIssuingAuthorizationCreateFleetReportedBreakdownNonFuelParams struct {
+ // Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
+ GrossAmountDecimal *float64 `form:"gross_amount_decimal,high_precision"`
+}
+
+// Information about tax included in this transaction.
+type TestHelpersIssuingAuthorizationCreateFleetReportedBreakdownTaxParams struct {
+ // Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ LocalAmountDecimal *float64 `form:"local_amount_decimal,high_precision"`
+ // Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
+ NationalAmountDecimal *float64 `form:"national_amount_decimal,high_precision"`
+}
+
+// More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+type TestHelpersIssuingAuthorizationCreateFleetReportedBreakdownParams struct {
+ // Breakdown of fuel portion of the purchase.
+ Fuel *TestHelpersIssuingAuthorizationCreateFleetReportedBreakdownFuelParams `form:"fuel"`
+ // Breakdown of non-fuel portion of the purchase.
+ NonFuel *TestHelpersIssuingAuthorizationCreateFleetReportedBreakdownNonFuelParams `form:"non_fuel"`
+ // Information about tax included in this transaction.
+ Tax *TestHelpersIssuingAuthorizationCreateFleetReportedBreakdownTaxParams `form:"tax"`
+}
+
+// Fleet-specific information for authorizations using Fleet cards.
+type TestHelpersIssuingAuthorizationCreateFleetParams struct {
+ // Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
+ CardholderPromptData *TestHelpersIssuingAuthorizationCreateFleetCardholderPromptDataParams `form:"cardholder_prompt_data"`
+ // The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
+ PurchaseType *string `form:"purchase_type"`
+ // More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
+ ReportedBreakdown *TestHelpersIssuingAuthorizationCreateFleetReportedBreakdownParams `form:"reported_breakdown"`
+ // The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
+ ServiceType *string `form:"service_type"`
+}
+
+// Information about fuel that was purchased with this transaction.
+type TestHelpersIssuingAuthorizationCreateFuelParams struct {
+ // [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
+ IndustryProductCode *string `form:"industry_product_code"`
+ // The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
+ QuantityDecimal *float64 `form:"quantity_decimal,high_precision"`
+ // The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
+ Type *string `form:"type"`
+ // The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
+ Unit *string `form:"unit"`
+ // The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
+ UnitCostDecimal *float64 `form:"unit_cost_decimal,high_precision"`
+}
+
+// Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+type TestHelpersIssuingAuthorizationCreateMerchantDataParams struct {
+ // A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
+ Category *string `form:"category"`
+ // City where the seller is located
+ City *string `form:"city"`
+ // Country where the seller is located
+ Country *string `form:"country"`
+ // Name of the seller
+ Name *string `form:"name"`
+ // Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
+ NetworkID *string `form:"network_id"`
+ // Postal code where the seller is located
+ PostalCode *string `form:"postal_code"`
+ // State where the seller is located
+ State *string `form:"state"`
+ // An ID assigned by the seller to the location of the sale.
+ TerminalID *string `form:"terminal_id"`
+ // URL provided by the merchant on a 3DS request
+ URL *string `form:"url"`
+}
+
+// Details about the authorization, such as identifiers, set by the card network.
+type TestHelpersIssuingAuthorizationCreateNetworkDataParams struct {
+ // Identifier assigned to the acquirer by the card network.
+ AcquiringInstitutionID *string `form:"acquiring_institution_id"`
+}
+
+// The exemption applied to this authorization.
+type TestHelpersIssuingAuthorizationCreateVerificationDataAuthenticationExemptionParams struct {
+ // The entity that requested the exemption, either the acquiring merchant or the Issuing user.
+ ClaimedBy *string `form:"claimed_by"`
+ // The specific exemption claimed for this authorization.
+ Type *string `form:"type"`
+}
+
+// 3D Secure details.
+type TestHelpersIssuingAuthorizationCreateVerificationDataThreeDSecureParams struct {
+ // The outcome of the 3D Secure authentication request.
+ Result *string `form:"result"`
+}
+
+// Verifications that Stripe performed on information that the cardholder provided to the merchant.
+type TestHelpersIssuingAuthorizationCreateVerificationDataParams struct {
+ // Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`.
+ AddressLine1Check *string `form:"address_line1_check"`
+ // Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`.
+ AddressPostalCodeCheck *string `form:"address_postal_code_check"`
+ // The exemption applied to this authorization.
+ AuthenticationExemption *TestHelpersIssuingAuthorizationCreateVerificationDataAuthenticationExemptionParams `form:"authentication_exemption"`
+ // Whether the cardholder provided a CVC and if it matched Stripe's record.
+ CVCCheck *string `form:"cvc_check"`
+ // Whether the cardholder provided an expiry date and if it matched Stripe's record.
+ ExpiryCheck *string `form:"expiry_check"`
+ // 3D Secure details.
+ ThreeDSecure *TestHelpersIssuingAuthorizationCreateVerificationDataThreeDSecureParams `form:"three_d_secure"`
+}
+
+// Create a test-mode authorization.
+type TestHelpersIssuingAuthorizationCreateParams struct {
+ Params `form:"*"`
+ // The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ Amount *int64 `form:"amount"`
+ // Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ AmountDetails *TestHelpersIssuingAuthorizationCreateAmountDetailsParams `form:"amount_details"`
+ // How the card details were provided. Defaults to online.
+ AuthorizationMethod *string `form:"authorization_method"`
+ // Card associated with this authorization.
+ Card *string `form:"card"`
+ // The currency of the authorization. If not provided, defaults to the currency of the card. 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"`
+ // Fleet-specific information for authorizations using Fleet cards.
+ Fleet *TestHelpersIssuingAuthorizationCreateFleetParams `form:"fleet"`
+ // Information about fuel that was purchased with this transaction.
+ Fuel *TestHelpersIssuingAuthorizationCreateFuelParams `form:"fuel"`
+ // If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization.
+ IsAmountControllable *bool `form:"is_amount_controllable"`
+ // The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
+ MerchantAmount *int64 `form:"merchant_amount"`
+ // The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ MerchantCurrency *string `form:"merchant_currency"`
+ // Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
+ MerchantData *TestHelpersIssuingAuthorizationCreateMerchantDataParams `form:"merchant_data"`
+ // Details about the authorization, such as identifiers, set by the card network.
+ NetworkData *TestHelpersIssuingAuthorizationCreateNetworkDataParams `form:"network_data"`
+ // Verifications that Stripe performed on information that the cardholder provided to the merchant.
+ VerificationData *TestHelpersIssuingAuthorizationCreateVerificationDataParams `form:"verification_data"`
+ // The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized.
+ Wallet *string `form:"wallet"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TestHelpersIssuingAuthorizationCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
diff --git a/testhelperstreasury_outboundpayment.go b/testhelperstreasury_outboundpayment.go
index c82c08a79d..81ca29b7a7 100644
--- a/testhelperstreasury_outboundpayment.go
+++ b/testhelperstreasury_outboundpayment.go
@@ -89,3 +89,43 @@ type TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentParams struct {
func (p *TestHelpersTreasuryOutboundPaymentReturnOutboundPaymentParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+
+// ACH network tracking details.
+type TestHelpersTreasuryOutboundPaymentUpdateTrackingDetailsACHParams struct {
+ // ACH trace ID for funds sent over the `ach` network.
+ TraceID *string `form:"trace_id"`
+}
+
+// US domestic wire network tracking details.
+type TestHelpersTreasuryOutboundPaymentUpdateTrackingDetailsUSDomesticWireParams struct {
+ // CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
+ Chips *string `form:"chips"`
+ // IMAD for funds sent over the `us_domestic_wire` network.
+ Imad *string `form:"imad"`
+ // OMAD for funds sent over the `us_domestic_wire` network.
+ Omad *string `form:"omad"`
+}
+
+// Details about network-specific tracking information.
+type TestHelpersTreasuryOutboundPaymentUpdateTrackingDetailsParams struct {
+ // ACH network tracking details.
+ ACH *TestHelpersTreasuryOutboundPaymentUpdateTrackingDetailsACHParams `form:"ach"`
+ // The US bank account network used to send funds.
+ Type *string `form:"type"`
+ // US domestic wire network tracking details.
+ USDomesticWire *TestHelpersTreasuryOutboundPaymentUpdateTrackingDetailsUSDomesticWireParams `form:"us_domestic_wire"`
+}
+
+// Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+type TestHelpersTreasuryOutboundPaymentUpdateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Details about network-specific tracking information.
+ TrackingDetails *TestHelpersTreasuryOutboundPaymentUpdateTrackingDetailsParams `form:"tracking_details"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TestHelpersTreasuryOutboundPaymentUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
diff --git a/testhelperstreasury_outboundtransfer.go b/testhelperstreasury_outboundtransfer.go
index b3044bd3d5..974fe19d20 100644
--- a/testhelperstreasury_outboundtransfer.go
+++ b/testhelperstreasury_outboundtransfer.go
@@ -89,3 +89,43 @@ type TestHelpersTreasuryOutboundTransferReturnOutboundTransferParams struct {
func (p *TestHelpersTreasuryOutboundTransferReturnOutboundTransferParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+
+// ACH network tracking details.
+type TestHelpersTreasuryOutboundTransferUpdateTrackingDetailsACHParams struct {
+ // ACH trace ID for funds sent over the `ach` network.
+ TraceID *string `form:"trace_id"`
+}
+
+// US domestic wire network tracking details.
+type TestHelpersTreasuryOutboundTransferUpdateTrackingDetailsUSDomesticWireParams struct {
+ // CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network.
+ Chips *string `form:"chips"`
+ // IMAD for funds sent over the `us_domestic_wire` network.
+ Imad *string `form:"imad"`
+ // OMAD for funds sent over the `us_domestic_wire` network.
+ Omad *string `form:"omad"`
+}
+
+// Details about network-specific tracking information.
+type TestHelpersTreasuryOutboundTransferUpdateTrackingDetailsParams struct {
+ // ACH network tracking details.
+ ACH *TestHelpersTreasuryOutboundTransferUpdateTrackingDetailsACHParams `form:"ach"`
+ // The US bank account network used to send funds.
+ Type *string `form:"type"`
+ // US domestic wire network tracking details.
+ USDomesticWire *TestHelpersTreasuryOutboundTransferUpdateTrackingDetailsUSDomesticWireParams `form:"us_domestic_wire"`
+}
+
+// Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+type TestHelpersTreasuryOutboundTransferUpdateParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Details about network-specific tracking information.
+ TrackingDetails *TestHelpersTreasuryOutboundTransferUpdateTrackingDetailsParams `form:"tracking_details"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TestHelpersTreasuryOutboundTransferUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
diff --git a/testhelperstreasury_receivedcredit.go b/testhelperstreasury_receivedcredit.go
index 6b6f3265b6..a7bef7c598 100644
--- a/testhelperstreasury_receivedcredit.go
+++ b/testhelperstreasury_receivedcredit.go
@@ -63,3 +63,61 @@ type TestHelpersTreasuryReceivedCreditParams struct {
func (p *TestHelpersTreasuryReceivedCreditParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+
+// Optional fields for `us_bank_account`.
+type TestHelpersTreasuryReceivedCreditCreateInitiatingPaymentMethodDetailsUSBankAccountParams struct {
+ // The bank account holder's name.
+ AccountHolderName *string `form:"account_holder_name"`
+ // The bank account number.
+ AccountNumber *string `form:"account_number"`
+ // The bank account's routing number.
+ RoutingNumber *string `form:"routing_number"`
+}
+
+// Initiating payment method details for the object.
+type TestHelpersTreasuryReceivedCreditCreateInitiatingPaymentMethodDetailsParams struct {
+ // The source type.
+ Type *string `form:"type"`
+ // Optional fields for `us_bank_account`.
+ USBankAccount *TestHelpersTreasuryReceivedCreditCreateInitiatingPaymentMethodDetailsUSBankAccountParams `form:"us_bank_account"`
+}
+
+// Optional fields for `ach`.
+type TestHelpersTreasuryReceivedCreditCreateNetworkDetailsACHParams struct {
+ // ACH Addenda record
+ Addenda *string `form:"addenda"`
+}
+
+// Details about the network used for the ReceivedCredit.
+type TestHelpersTreasuryReceivedCreditCreateNetworkDetailsParams struct {
+ // Optional fields for `ach`.
+ ACH *TestHelpersTreasuryReceivedCreditCreateNetworkDetailsACHParams `form:"ach"`
+ // The type of flow that originated the ReceivedCredit.
+ Type *string `form:"type"`
+}
+
+// Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
+type TestHelpersTreasuryReceivedCreditCreateParams struct {
+ Params `form:"*"`
+ // Amount (in cents) to be transferred.
+ Amount *int64 `form:"amount"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The FinancialAccount to send funds to.
+ FinancialAccount *string `form:"financial_account"`
+ // Initiating payment method details for the object.
+ InitiatingPaymentMethodDetails *TestHelpersTreasuryReceivedCreditCreateInitiatingPaymentMethodDetailsParams `form:"initiating_payment_method_details"`
+ // Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ Network *string `form:"network"`
+ // Details about the network used for the ReceivedCredit.
+ NetworkDetails *TestHelpersTreasuryReceivedCreditCreateNetworkDetailsParams `form:"network_details"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TestHelpersTreasuryReceivedCreditCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
diff --git a/testhelperstreasury_receiveddebit.go b/testhelperstreasury_receiveddebit.go
index 005b0dbacf..b3cd664268 100644
--- a/testhelperstreasury_receiveddebit.go
+++ b/testhelperstreasury_receiveddebit.go
@@ -63,3 +63,61 @@ type TestHelpersTreasuryReceivedDebitParams struct {
func (p *TestHelpersTreasuryReceivedDebitParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+
+// Optional fields for `us_bank_account`.
+type TestHelpersTreasuryReceivedDebitCreateInitiatingPaymentMethodDetailsUSBankAccountParams struct {
+ // The bank account holder's name.
+ AccountHolderName *string `form:"account_holder_name"`
+ // The bank account number.
+ AccountNumber *string `form:"account_number"`
+ // The bank account's routing number.
+ RoutingNumber *string `form:"routing_number"`
+}
+
+// Initiating payment method details for the object.
+type TestHelpersTreasuryReceivedDebitCreateInitiatingPaymentMethodDetailsParams struct {
+ // The source type.
+ Type *string `form:"type"`
+ // Optional fields for `us_bank_account`.
+ USBankAccount *TestHelpersTreasuryReceivedDebitCreateInitiatingPaymentMethodDetailsUSBankAccountParams `form:"us_bank_account"`
+}
+
+// Optional fields for `ach`.
+type TestHelpersTreasuryReceivedDebitCreateNetworkDetailsACHParams struct {
+ // Addenda record data associated with this ReceivedDebit.
+ Addenda *string `form:"addenda"`
+}
+
+// Details about the network used for the ReceivedDebit.
+type TestHelpersTreasuryReceivedDebitCreateNetworkDetailsParams struct {
+ // Optional fields for `ach`.
+ ACH *TestHelpersTreasuryReceivedDebitCreateNetworkDetailsACHParams `form:"ach"`
+ // The type of flow that originated the ReceivedDebit.
+ Type *string `form:"type"`
+}
+
+// Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
+type TestHelpersTreasuryReceivedDebitCreateParams struct {
+ Params `form:"*"`
+ // Amount (in cents) to be transferred.
+ Amount *int64 `form:"amount"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The FinancialAccount to pull funds from.
+ FinancialAccount *string `form:"financial_account"`
+ // Initiating payment method details for the object.
+ InitiatingPaymentMethodDetails *TestHelpersTreasuryReceivedDebitCreateInitiatingPaymentMethodDetailsParams `form:"initiating_payment_method_details"`
+ // Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ Network *string `form:"network"`
+ // Details about the network used for the ReceivedDebit.
+ NetworkDetails *TestHelpersTreasuryReceivedDebitCreateNetworkDetailsParams `form:"network_details"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TestHelpersTreasuryReceivedDebitCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
diff --git a/token.go b/token.go
index 42043b1c80..a6b3913ac6 100644
--- a/token.go
+++ b/token.go
@@ -68,6 +68,69 @@ type TokenPIIParams struct {
IDNumber *string `form:"id_number"`
}
+// Retrieves the token with the given ID.
+type TokenRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TokenRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Information for the account this token represents.
+type TokenCreateAccountParams struct {
+ // The business type.
+ BusinessType *string `form:"business_type"`
+ // Information about the company or business.
+ Company *AccountCompanyParams `form:"company"`
+ // Information about the person represented by the account.
+ Individual *PersonParams `form:"individual"`
+ // Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://stripe.com/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`.
+ TOSShownAndAccepted *bool `form:"tos_shown_and_accepted"`
+}
+
+// The updated CVC value this token represents.
+type TokenCreateCVCUpdateParams struct {
+ // The CVC value, in string form.
+ CVC *string `form:"cvc"`
+}
+
+// The PII this token represents.
+type TokenCreatePIIParams struct {
+ // The `id_number` for the PII, in string form.
+ IDNumber *string `form:"id_number"`
+}
+
+// Creates a single-use token that represents a bank account's details.
+// You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
+type TokenCreateParams struct {
+ Params `form:"*"`
+ // Information for the account this token represents.
+ Account *TokenCreateAccountParams `form:"account"`
+ // The bank account this token will represent.
+ BankAccount *BankAccountParams `form:"bank_account"`
+ // The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below.
+ Card *CardParams `form:"card"`
+ // Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).
+ Customer *string `form:"customer"`
+ // The updated CVC value this token represents.
+ CVCUpdate *TokenCreateCVCUpdateParams `form:"cvc_update"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Information for the person this token represents.
+ Person *PersonParams `form:"person"`
+ // The PII this token represents.
+ PII *TokenCreatePIIParams `form:"pii"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TokenCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Tokenization is the process Stripe uses to collect sensitive card or bank
// account details, or personally identifiable information (PII), directly from
// your customers in a secure manner. A token representing this information is
diff --git a/topup.go b/topup.go
index 49eed390c9..04075e75ae 100644
--- a/topup.go
+++ b/topup.go
@@ -77,6 +77,78 @@ func (p *TopupParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// Top up the balance of an account
+type TopupCreateParams struct {
+ Params `form:"*"`
+ // A positive integer representing how much to transfer.
+ Amount *int64 `form:"amount"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // 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"`
+ // The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)).
+ Source *string `form:"source"`
+ // Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters.
+ StatementDescriptor *string `form:"statement_descriptor"`
+ // A string that identifies this top-up as part of a group.
+ TransferGroup *string `form:"transfer_group"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TopupCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TopupCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.
+type TopupRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TopupRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates the metadata of a top-up. Other top-up details are not editable by design.
+type TopupUpdateParams struct {
+ Params `form:"*"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TopupUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TopupUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// To top up your Stripe balance, you create a top-up object. You can retrieve
// individual top-ups, as well as list all top-ups. Top-ups are identified by a
// unique, random ID.
diff --git a/transfer.go b/transfer.go
index ebc2a92ae7..5f4f266220 100644
--- a/transfer.go
+++ b/transfer.go
@@ -75,6 +75,82 @@ func (p *TransferParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error.
+type TransferCreateParams struct {
+ Params `form:"*"`
+ // A positive integer in cents (or local equivalent) representing how much to transfer.
+ Amount *int64 `form:"amount"`
+ // 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).
+ Currency *string `form:"currency"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // The ID of a connected Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
+ Destination *string `form:"destination"`
+ // 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"`
+ // You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details.
+ SourceTransaction *string `form:"source_transaction"`
+ // The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`.
+ SourceType *string `form:"source_type"`
+ // A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.
+ TransferGroup *string `form:"transfer_group"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TransferCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TransferCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.
+type TransferRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TransferRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+//
+// This request accepts only metadata as an argument.
+type TransferUpdateParams struct {
+ Params `form:"*"`
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TransferUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TransferUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// A `Transfer` object is created when you move funds between Stripe accounts as
// part of Connect.
//
diff --git a/transferreversal.go b/transferreversal.go
index 9ebd7f44fb..774e0d5d74 100644
--- a/transferreversal.go
+++ b/transferreversal.go
@@ -55,6 +55,79 @@ func (p *TransferReversalParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// When you create a new reversal, you must specify a transfer to create it on.
+//
+// When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.
+//
+// Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.
+type TransferReversalCreateParams struct {
+ Params `form:"*"`
+ ID *string `form:"-"` // Included in URL
+ // A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount.
+ Amount *int64 `form:"amount"`
+ // An arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value.
+ 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"`
+ // Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed.
+ RefundApplicationFee *bool `form:"refund_application_fee"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TransferReversalCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TransferReversalCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.
+type TransferReversalRetrieveParams struct {
+ Params `form:"*"`
+ ID *string `form:"-"` // Included in URL
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TransferReversalRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
+//
+// This request only accepts metadata and description as arguments.
+type TransferReversalUpdateParams struct {
+ Params `form:"*"`
+ ID *string `form:"-"` // Included in URL
+ // 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"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TransferReversalUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TransferReversalUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a
// connected account, either entirely or partially, and can also specify whether
// to refund any related application fees. Transfer reversals add to the
diff --git a/transferreversal/client.go b/transferreversal/client.go
index 8abbc453f8..eaf2f01165 100644
--- a/transferreversal/client.go
+++ b/transferreversal/client.go
@@ -52,7 +52,7 @@ func Get(id string, params *stripe.TransferReversalParams) (*stripe.TransferReve
func (c Client) Get(id string, params *stripe.TransferReversalParams) (*stripe.TransferReversal, error) {
if params == nil {
return nil, fmt.Errorf(
- "params cannnot be nil, and params.Transfer must be set")
+ "params cannot be nil, and params.Transfer must be set")
}
path := stripe.FormatURLPath(
"/v1/transfers/%s/reversals/%s", stripe.StringValue(params.ID), id)
diff --git a/treasury_creditreversal.go b/treasury_creditreversal.go
index 0f64913831..106ba13f89 100644
--- a/treasury_creditreversal.go
+++ b/treasury_creditreversal.go
@@ -68,6 +68,43 @@ func (p *TreasuryCreditReversalParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// Reverses a ReceivedCredit and creates a CreditReversal object.
+type TreasuryCreditReversalCreateParams struct {
+ Params `form:"*"`
+ // 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"`
+ // The ReceivedCredit to reverse.
+ ReceivedCredit *string `form:"received_credit"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryCreditReversalCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TreasuryCreditReversalCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list
+type TreasuryCreditReversalRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryCreditReversalRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type TreasuryCreditReversalStatusTransitions struct {
// Timestamp describing when the CreditReversal changed status to `posted`
PostedAt int64 `json:"posted_at"`
diff --git a/treasury_debitreversal.go b/treasury_debitreversal.go
index 0452bf9b9e..a114577ad2 100644
--- a/treasury_debitreversal.go
+++ b/treasury_debitreversal.go
@@ -70,6 +70,43 @@ func (p *TreasuryDebitReversalParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}
+// Reverses a ReceivedDebit and creates a DebitReversal object.
+type TreasuryDebitReversalCreateParams struct {
+ Params `form:"*"`
+ // 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"`
+ // The ReceivedDebit to reverse.
+ ReceivedDebit *string `form:"received_debit"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryDebitReversalCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TreasuryDebitReversalCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves a DebitReversal object.
+type TreasuryDebitReversalRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryDebitReversalRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Other flows linked to a DebitReversal.
type TreasuryDebitReversalLinkedFlows struct {
// Set if there is an Issuing dispute associated with the DebitReversal.
diff --git a/treasury_financialaccount.go b/treasury_financialaccount.go
index e51f5574f4..2b4e303633 100644
--- a/treasury_financialaccount.go
+++ b/treasury_financialaccount.go
@@ -381,7 +381,7 @@ type TreasuryFinancialAccountUpdateFeaturesOutboundTransfersParams struct {
USDomesticWire *TreasuryFinancialAccountUpdateFeaturesOutboundTransfersUSDomesticWireParams `form:"us_domestic_wire"`
}
-// Updates the Features associated with a FinancialAccount.
+// Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.
type TreasuryFinancialAccountUpdateFeaturesParams struct {
Params `form:"*"`
// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
@@ -431,6 +431,212 @@ func (p *TreasuryFinancialAccountCloseParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+type TreasuryFinancialAccountCreateFeaturesCardIssuingParams struct {
+ // Whether the FinancialAccount should have the Feature.
+ Requested *bool `form:"requested"`
+}
+
+// Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+type TreasuryFinancialAccountCreateFeaturesDepositInsuranceParams struct {
+ // Whether the FinancialAccount should have the Feature.
+ Requested *bool `form:"requested"`
+}
+
+// Adds an ABA FinancialAddress to the FinancialAccount.
+type TreasuryFinancialAccountCreateFeaturesFinancialAddressesABAParams struct {
+ // Requested bank partner
+ Bank *string `form:"bank"`
+ // Whether the FinancialAccount should have the Feature.
+ Requested *bool `form:"requested"`
+}
+
+// Contains Features that add FinancialAddresses to the FinancialAccount.
+type TreasuryFinancialAccountCreateFeaturesFinancialAddressesParams struct {
+ // Adds an ABA FinancialAddress to the FinancialAccount.
+ ABA *TreasuryFinancialAccountCreateFeaturesFinancialAddressesABAParams `form:"aba"`
+}
+
+// Enables ACH Debits via the InboundTransfers API.
+type TreasuryFinancialAccountCreateFeaturesInboundTransfersACHParams struct {
+ // Whether the FinancialAccount should have the Feature.
+ Requested *bool `form:"requested"`
+}
+
+// Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+type TreasuryFinancialAccountCreateFeaturesInboundTransfersParams struct {
+ // Enables ACH Debits via the InboundTransfers API.
+ ACH *TreasuryFinancialAccountCreateFeaturesInboundTransfersACHParams `form:"ach"`
+}
+
+// Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+type TreasuryFinancialAccountCreateFeaturesIntraStripeFlowsParams struct {
+ // Whether the FinancialAccount should have the Feature.
+ Requested *bool `form:"requested"`
+}
+
+// Enables ACH transfers via the OutboundPayments API.
+type TreasuryFinancialAccountCreateFeaturesOutboundPaymentsACHParams struct {
+ // Whether the FinancialAccount should have the Feature.
+ Requested *bool `form:"requested"`
+}
+
+// Enables US domestic wire transfers via the OutboundPayments API.
+type TreasuryFinancialAccountCreateFeaturesOutboundPaymentsUSDomesticWireParams struct {
+ // Whether the FinancialAccount should have the Feature.
+ Requested *bool `form:"requested"`
+}
+
+// Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+type TreasuryFinancialAccountCreateFeaturesOutboundPaymentsParams struct {
+ // Enables ACH transfers via the OutboundPayments API.
+ ACH *TreasuryFinancialAccountCreateFeaturesOutboundPaymentsACHParams `form:"ach"`
+ // Enables US domestic wire transfers via the OutboundPayments API.
+ USDomesticWire *TreasuryFinancialAccountCreateFeaturesOutboundPaymentsUSDomesticWireParams `form:"us_domestic_wire"`
+}
+
+// Enables ACH transfers via the OutboundTransfers API.
+type TreasuryFinancialAccountCreateFeaturesOutboundTransfersACHParams struct {
+ // Whether the FinancialAccount should have the Feature.
+ Requested *bool `form:"requested"`
+}
+
+// Enables US domestic wire transfers via the OutboundTransfers API.
+type TreasuryFinancialAccountCreateFeaturesOutboundTransfersUSDomesticWireParams struct {
+ // Whether the FinancialAccount should have the Feature.
+ Requested *bool `form:"requested"`
+}
+
+// Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+type TreasuryFinancialAccountCreateFeaturesOutboundTransfersParams struct {
+ // Enables ACH transfers via the OutboundTransfers API.
+ ACH *TreasuryFinancialAccountCreateFeaturesOutboundTransfersACHParams `form:"ach"`
+ // Enables US domestic wire transfers via the OutboundTransfers API.
+ USDomesticWire *TreasuryFinancialAccountCreateFeaturesOutboundTransfersUSDomesticWireParams `form:"us_domestic_wire"`
+}
+
+// Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.
+type TreasuryFinancialAccountCreateFeaturesParams struct {
+ // Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount.
+ CardIssuing *TreasuryFinancialAccountCreateFeaturesCardIssuingParams `form:"card_issuing"`
+ // Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount.
+ DepositInsurance *TreasuryFinancialAccountCreateFeaturesDepositInsuranceParams `form:"deposit_insurance"`
+ // Contains Features that add FinancialAddresses to the FinancialAccount.
+ FinancialAddresses *TreasuryFinancialAccountCreateFeaturesFinancialAddressesParams `form:"financial_addresses"`
+ // Contains settings related to adding funds to a FinancialAccount from another Account with the same owner.
+ InboundTransfers *TreasuryFinancialAccountCreateFeaturesInboundTransfersParams `form:"inbound_transfers"`
+ // Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment).
+ IntraStripeFlows *TreasuryFinancialAccountCreateFeaturesIntraStripeFlowsParams `form:"intra_stripe_flows"`
+ // Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money.
+ OutboundPayments *TreasuryFinancialAccountCreateFeaturesOutboundPaymentsParams `form:"outbound_payments"`
+ // Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner.
+ OutboundTransfers *TreasuryFinancialAccountCreateFeaturesOutboundTransfersParams `form:"outbound_transfers"`
+}
+
+// The set of functionalities that the platform can restrict on the FinancialAccount.
+type TreasuryFinancialAccountCreatePlatformRestrictionsParams struct {
+ // Restricts all inbound money movement.
+ InboundFlows *string `form:"inbound_flows"`
+ // Restricts all outbound money movement.
+ OutboundFlows *string `form:"outbound_flows"`
+}
+
+// Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default.
+type TreasuryFinancialAccountCreateParams struct {
+ Params `form:"*"`
+ // The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts.
+ DisplayName *string `form:"display_name"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field.
+ Features *TreasuryFinancialAccountCreateFeaturesParams `form:"features"`
+ // 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 nickname for the FinancialAccount.
+ Nickname *string `form:"nickname"`
+ // The set of functionalities that the platform can restrict on the FinancialAccount.
+ PlatformRestrictions *TreasuryFinancialAccountCreatePlatformRestrictionsParams `form:"platform_restrictions"`
+ // The currencies the FinancialAccount can hold a balance in.
+ SupportedCurrencies []*string `form:"supported_currencies"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryFinancialAccountCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TreasuryFinancialAccountCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of a FinancialAccount.
+type TreasuryFinancialAccountRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryFinancialAccountRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
+type TreasuryFinancialAccountUpdateForwardingSettingsParams struct {
+ // The financial_account id
+ FinancialAccount *string `form:"financial_account"`
+ // The payment_method or bank account id. This needs to be a verified bank account.
+ PaymentMethod *string `form:"payment_method"`
+ // The type of the bank account provided. This can be either "financial_account" or "payment_method"
+ Type *string `form:"type"`
+}
+
+// The set of functionalities that the platform can restrict on the FinancialAccount.
+type TreasuryFinancialAccountUpdatePlatformRestrictionsParams struct {
+ // Restricts all inbound money movement.
+ InboundFlows *string `form:"inbound_flows"`
+ // Restricts all outbound money movement.
+ OutboundFlows *string `form:"outbound_flows"`
+}
+
+// Updates the details of a FinancialAccount.
+type TreasuryFinancialAccountUpdateParams struct {
+ Params `form:"*"`
+ // The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts.
+ DisplayName *string `form:"display_name"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field.
+ Features *TreasuryFinancialAccountUpdateFeaturesParams `form:"features"`
+ // A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0
+ ForwardingSettings *TreasuryFinancialAccountUpdateForwardingSettingsParams `form:"forwarding_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 nickname for the FinancialAccount.
+ Nickname *string `form:"nickname"`
+ // The set of functionalities that the platform can restrict on the FinancialAccount.
+ PlatformRestrictions *TreasuryFinancialAccountUpdatePlatformRestrictionsParams `form:"platform_restrictions"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryFinancialAccountUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TreasuryFinancialAccountUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// Balance information for the FinancialAccount
type TreasuryFinancialAccountBalance struct {
// Funds the user can spend right now.
diff --git a/treasury_inboundtransfer.go b/treasury_inboundtransfer.go
index dee382b727..df2f17c8a3 100644
--- a/treasury_inboundtransfer.go
+++ b/treasury_inboundtransfer.go
@@ -134,6 +134,53 @@ func (p *TreasuryInboundTransferCancelParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Creates an InboundTransfer.
+type TreasuryInboundTransferCreateParams struct {
+ Params `form:"*"`
+ // Amount (in cents) to be transferred.
+ Amount *int64 `form:"amount"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The FinancialAccount to send funds to.
+ FinancialAccount *string `form:"financial_account"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The origin payment method to be debited for the InboundTransfer.
+ OriginPaymentMethod *string `form:"origin_payment_method"`
+ // The complete description that appears on your customers' statements. Maximum 10 characters.
+ StatementDescriptor *string `form:"statement_descriptor"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryInboundTransferCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TreasuryInboundTransferCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of an existing InboundTransfer.
+type TreasuryInboundTransferRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryInboundTransferRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Details about this InboundTransfer's failure. Only set when status is `failed`.
type TreasuryInboundTransferFailureDetails struct {
// Reason for the failure.
diff --git a/treasury_outboundpayment.go b/treasury_outboundpayment.go
index ea2424fe74..ef81e1ceb9 100644
--- a/treasury_outboundpayment.go
+++ b/treasury_outboundpayment.go
@@ -234,6 +234,130 @@ func (p *TreasuryOutboundPaymentCancelParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+type TreasuryOutboundPaymentCreateDestinationPaymentMethodDataBillingDetailsParams struct {
+ // Billing address.
+ Address *AddressParams `form:"address"`
+ // Email address.
+ Email *string `form:"email"`
+ // Full name.
+ Name *string `form:"name"`
+ // Billing phone number (including extension).
+ Phone *string `form:"phone"`
+}
+
+// Required hash if type is set to `us_bank_account`.
+type TreasuryOutboundPaymentCreateDestinationPaymentMethodDataUSBankAccountParams struct {
+ // Account holder type: individual or company.
+ AccountHolderType *string `form:"account_holder_type"`
+ // Account number of the bank account.
+ AccountNumber *string `form:"account_number"`
+ // Account type: checkings or savings. Defaults to checking if omitted.
+ AccountType *string `form:"account_type"`
+ // The ID of a Financial Connections Account to use as a payment method.
+ FinancialConnectionsAccount *string `form:"financial_connections_account"`
+ // Routing number of the bank account.
+ RoutingNumber *string `form:"routing_number"`
+}
+
+// Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.
+type TreasuryOutboundPaymentCreateDestinationPaymentMethodDataParams struct {
+ // Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
+ BillingDetails *TreasuryOutboundPaymentCreateDestinationPaymentMethodDataBillingDetailsParams `form:"billing_details"`
+ // Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
+ FinancialAccount *string `form:"financial_account"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
+ Type *string `form:"type"`
+ // Required hash if type is set to `us_bank_account`.
+ USBankAccount *TreasuryOutboundPaymentCreateDestinationPaymentMethodDataUSBankAccountParams `form:"us_bank_account"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TreasuryOutboundPaymentCreateDestinationPaymentMethodDataParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Optional fields for `us_bank_account`.
+type TreasuryOutboundPaymentCreateDestinationPaymentMethodOptionsUSBankAccountParams struct {
+ // Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ Network *string `form:"network"`
+}
+
+// Payment method-specific configuration for this OutboundPayment.
+type TreasuryOutboundPaymentCreateDestinationPaymentMethodOptionsParams struct {
+ // Optional fields for `us_bank_account`.
+ USBankAccount *TreasuryOutboundPaymentCreateDestinationPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
+}
+
+// End user details.
+type TreasuryOutboundPaymentCreateEndUserDetailsParams struct {
+ // IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`.
+ IPAddress *string `form:"ip_address"`
+ // `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.
+ Present *bool `form:"present"`
+}
+
+// Creates an OutboundPayment.
+type TreasuryOutboundPaymentCreateParams struct {
+ Params `form:"*"`
+ // Amount (in cents) to be transferred.
+ Amount *int64 `form:"amount"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in.
+ Customer *string `form:"customer"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`.
+ DestinationPaymentMethod *string `form:"destination_payment_method"`
+ // Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`.
+ DestinationPaymentMethodData *TreasuryOutboundPaymentCreateDestinationPaymentMethodDataParams `form:"destination_payment_method_data"`
+ // Payment method-specific configuration for this OutboundPayment.
+ DestinationPaymentMethodOptions *TreasuryOutboundPaymentCreateDestinationPaymentMethodOptionsParams `form:"destination_payment_method_options"`
+ // End user details.
+ EndUserDetails *TreasuryOutboundPaymentCreateEndUserDetailsParams `form:"end_user_details"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The FinancialAccount to pull funds from.
+ FinancialAccount *string `form:"financial_account"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment".
+ StatementDescriptor *string `form:"statement_descriptor"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryOutboundPaymentCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TreasuryOutboundPaymentCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.
+type TreasuryOutboundPaymentRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryOutboundPaymentRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type TreasuryOutboundPaymentDestinationPaymentMethodDetailsBillingDetails struct {
Address *Address `json:"address"`
// Email address.
diff --git a/treasury_outboundtransfer.go b/treasury_outboundtransfer.go
index c531bc125e..c29df7c6a9 100644
--- a/treasury_outboundtransfer.go
+++ b/treasury_outboundtransfer.go
@@ -199,6 +199,93 @@ func (p *TreasuryOutboundTransferCancelParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with `destination_payment_method`.
+type TreasuryOutboundTransferCreateDestinationPaymentMethodDataParams struct {
+ // Required if type is set to `financial_account`. The FinancialAccount ID to send funds to.
+ FinancialAccount *string `form:"financial_account"`
+ // The type of the destination.
+ Type *string `form:"type"`
+}
+
+// Optional fields for `us_bank_account`.
+type TreasuryOutboundTransferCreateDestinationPaymentMethodOptionsUSBankAccountParams struct {
+ // Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
+ Network *string `form:"network"`
+}
+
+// Hash describing payment method configuration details.
+type TreasuryOutboundTransferCreateDestinationPaymentMethodOptionsParams struct {
+ // Optional fields for `us_bank_account`.
+ USBankAccount *TreasuryOutboundTransferCreateDestinationPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"`
+}
+
+// Optional fields for `ach`.
+type TreasuryOutboundTransferCreateNetworkDetailsACHParams struct {
+ // Addenda record data associated with this OutboundTransfer.
+ Addenda *string `form:"addenda"`
+}
+
+// Details about the network used for the OutboundTransfer.
+type TreasuryOutboundTransferCreateNetworkDetailsParams struct {
+ // Optional fields for `ach`.
+ ACH *TreasuryOutboundTransferCreateNetworkDetailsACHParams `form:"ach"`
+ // The type of flow that originated the OutboundTransfer.
+ Type *string `form:"type"`
+}
+
+// Creates an OutboundTransfer.
+type TreasuryOutboundTransferCreateParams struct {
+ Params `form:"*"`
+ // Amount (in cents) to be transferred.
+ Amount *int64 `form:"amount"`
+ // Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
+ Currency *string `form:"currency"`
+ // An arbitrary string attached to the object. Often useful for displaying to users.
+ Description *string `form:"description"`
+ // The PaymentMethod to use as the payment instrument for the OutboundTransfer.
+ DestinationPaymentMethod *string `form:"destination_payment_method"`
+ // Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with `destination_payment_method`.
+ DestinationPaymentMethodData *TreasuryOutboundTransferCreateDestinationPaymentMethodDataParams `form:"destination_payment_method_data"`
+ // Hash describing payment method configuration details.
+ DestinationPaymentMethodOptions *TreasuryOutboundTransferCreateDestinationPaymentMethodOptionsParams `form:"destination_payment_method_options"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+ // The FinancialAccount to pull funds from.
+ FinancialAccount *string `form:"financial_account"`
+ // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Metadata map[string]string `form:"metadata"`
+ // Details about the network used for the OutboundTransfer.
+ NetworkDetails *TreasuryOutboundTransferCreateNetworkDetailsParams `form:"network_details"`
+ // Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer".
+ StatementDescriptor *string `form:"statement_descriptor"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryOutboundTransferCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *TreasuryOutboundTransferCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.
+type TreasuryOutboundTransferRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryOutboundTransferRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type TreasuryOutboundTransferDestinationPaymentMethodDetailsBillingDetails struct {
Address *Address `json:"address"`
// Email address.
diff --git a/treasury_receivedcredit.go b/treasury_receivedcredit.go
index ce17fa593f..ede40295e5 100644
--- a/treasury_receivedcredit.go
+++ b/treasury_receivedcredit.go
@@ -133,6 +133,18 @@ func (p *TreasuryReceivedCreditParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
+type TreasuryReceivedCreditRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryReceivedCreditRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type TreasuryReceivedCreditInitiatingPaymentMethodDetailsBillingDetails struct {
Address *Address `json:"address"`
// Email address.
diff --git a/treasury_receiveddebit.go b/treasury_receiveddebit.go
index 98baa98b74..98a7965d2b 100644
--- a/treasury_receiveddebit.go
+++ b/treasury_receiveddebit.go
@@ -113,6 +113,18 @@ func (p *TreasuryReceivedDebitParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list
+type TreasuryReceivedDebitRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryReceivedDebitRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
type TreasuryReceivedDebitInitiatingPaymentMethodDetailsBillingDetails struct {
Address *Address `json:"address"`
// Email address.
diff --git a/treasury_transaction.go b/treasury_transaction.go
index e122f56bdd..ec29027fb5 100644
--- a/treasury_transaction.go
+++ b/treasury_transaction.go
@@ -94,6 +94,18 @@ func (p *TreasuryTransactionParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves the details of an existing Transaction.
+type TreasuryTransactionRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryTransactionRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Change to a FinancialAccount's balance
type TreasuryTransactionBalanceImpact struct {
// The change made to funds the user can spend right now.
diff --git a/treasury_transactionentry.go b/treasury_transactionentry.go
index c65e1645e0..e49c63426b 100644
--- a/treasury_transactionentry.go
+++ b/treasury_transactionentry.go
@@ -101,6 +101,18 @@ func (p *TreasuryTransactionEntryParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// Retrieves a TransactionEntry object.
+type TreasuryTransactionEntryRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *TreasuryTransactionEntryRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
// Change to a FinancialAccount's balance
type TreasuryTransactionEntryBalanceImpact struct {
// The change made to funds the user can spend right now.
diff --git a/v2/core/account/client.go b/v2/core/account/client.go
index 7f68d12a65..266aa2878d 100644
--- a/v2/core/account/client.go
+++ b/v2/core/account/client.go
@@ -51,9 +51,9 @@ func (c Client) Close(id string, params *stripe.V2CoreAccountCloseParams) (*stri
}
// Returns a list of Accounts.
-func (c Client) All(listParams *stripe.V2CoreAccountListParams) stripe.Seq2[stripe.V2CoreAccount, error] {
- return stripe.NewV2List("/v2/core/accounts", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2CoreAccount], error) {
- page := &stripe.V2Page[stripe.V2CoreAccount]{}
+func (c Client) All(listParams *stripe.V2CoreAccountListParams) stripe.Seq2[*stripe.V2CoreAccount, error] {
+ return stripe.NewV2List("/v2/core/accounts", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2CoreAccount], error) {
+ page := &stripe.V2Page[*stripe.V2CoreAccount]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/core/accounts/person/client.go b/v2/core/accounts/person/client.go
index d83ee118b9..15f208a05d 100644
--- a/v2/core/accounts/person/client.go
+++ b/v2/core/accounts/person/client.go
@@ -56,11 +56,11 @@ func (c Client) Del(id string, params *stripe.V2CoreAccountsPersonParams) (*stri
}
// Returns a list of Persons associated with an Account.
-func (c Client) All(listParams *stripe.V2CoreAccountsPersonListParams) stripe.Seq2[stripe.V2CorePerson, error] {
+func (c Client) All(listParams *stripe.V2CoreAccountsPersonListParams) stripe.Seq2[*stripe.V2CorePerson, error] {
path := stripe.FormatURLPath(
"/v2/core/accounts/%s/persons", stripe.StringValue(listParams.AccountID))
- return stripe.NewV2List(path, listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2CorePerson], error) {
- page := &stripe.V2Page[stripe.V2CorePerson]{}
+ return stripe.NewV2List(path, listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2CorePerson], error) {
+ page := &stripe.V2Page[*stripe.V2CorePerson]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/core/eventdestination/client.go b/v2/core/eventdestination/client.go
index 3476906de7..a2f8454ba5 100644
--- a/v2/core/eventdestination/client.go
+++ b/v2/core/eventdestination/client.go
@@ -79,9 +79,9 @@ func (c Client) Ping(id string, params *stripe.V2CoreEventDestinationPingParams)
}
// Lists all event destinations.
-func (c Client) All(listParams *stripe.V2CoreEventDestinationListParams) stripe.Seq2[stripe.V2EventDestination, error] {
- return stripe.NewV2List("/v2/core/event_destinations", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2EventDestination], error) {
- page := &stripe.V2Page[stripe.V2EventDestination]{}
+func (c Client) All(listParams *stripe.V2CoreEventDestinationListParams) stripe.Seq2[*stripe.V2EventDestination, error] {
+ return stripe.NewV2List("/v2/core/event_destinations", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2EventDestination], error) {
+ page := &stripe.V2Page[*stripe.V2EventDestination]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/core/eventdestination/client_test.go b/v2/core/eventdestination/client_test.go
index 6825e69e8c..ed1e427e31 100644
--- a/v2/core/eventdestination/client_test.go
+++ b/v2/core/eventdestination/client_test.go
@@ -260,7 +260,7 @@ func TestEventDestinationList_SinglePage(t *testing.T) {
})
defer testServer.Close()
cnt := 1
- sc.V2CoreEventDestinations.All(params)(func(dest stripe.V2EventDestination, err error) bool {
+ sc.V2CoreEventDestinations.All(params)(func(dest *stripe.V2EventDestination, err error) bool {
assert.Nil(t, err)
assert.NotNil(t, dest)
assert.Equal(t, dest.Description, fmt.Sprintf("Event destination %d", cnt))
@@ -323,7 +323,7 @@ func TestEventDestinationList_MultiplePages(t *testing.T) {
)
sc := client.New(TestAPIKey, backends)
- sc.V2CoreEventDestinations.All(params)(func(dest stripe.V2EventDestination, err error) bool {
+ sc.V2CoreEventDestinations.All(params)(func(dest *stripe.V2EventDestination, err error) bool {
assert.Nil(t, err)
assert.NotNil(t, dest)
assert.Equal(t, dest.Description, fmt.Sprintf("Event destination %d", cnt))
diff --git a/v2/moneymanagement/adjustment/client.go b/v2/moneymanagement/adjustment/client.go
index 44124aaf38..167f5a2d02 100644
--- a/v2/moneymanagement/adjustment/client.go
+++ b/v2/moneymanagement/adjustment/client.go
@@ -28,9 +28,9 @@ func (c Client) Get(id string, params *stripe.V2MoneyManagementAdjustmentParams)
}
// Returns a list of Adjustments that match the provided filters.
-func (c Client) All(listParams *stripe.V2MoneyManagementAdjustmentListParams) stripe.Seq2[stripe.V2MoneyManagementAdjustment, error] {
- return stripe.NewV2List("/v2/money_management/adjustments", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementAdjustment], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementAdjustment]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementAdjustmentListParams) stripe.Seq2[*stripe.V2MoneyManagementAdjustment, error] {
+ return stripe.NewV2List("/v2/money_management/adjustments", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementAdjustment], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementAdjustment]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/moneymanagement/financialaccount/client.go b/v2/moneymanagement/financialaccount/client.go
index b337be9290..0142f59db7 100644
--- a/v2/moneymanagement/financialaccount/client.go
+++ b/v2/moneymanagement/financialaccount/client.go
@@ -28,9 +28,9 @@ func (c Client) Get(id string, params *stripe.V2MoneyManagementFinancialAccountP
}
// Lists FinancialAccounts in this compartment.
-func (c Client) All(listParams *stripe.V2MoneyManagementFinancialAccountListParams) stripe.Seq2[stripe.V2MoneyManagementFinancialAccount, error] {
- return stripe.NewV2List("/v2/money_management/financial_accounts", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementFinancialAccount], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementFinancialAccount]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementFinancialAccountListParams) stripe.Seq2[*stripe.V2MoneyManagementFinancialAccount, error] {
+ return stripe.NewV2List("/v2/money_management/financial_accounts", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementFinancialAccount], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementFinancialAccount]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/moneymanagement/financialaddress/client.go b/v2/moneymanagement/financialaddress/client.go
index 88212d2a63..9f7bb0dd82 100644
--- a/v2/moneymanagement/financialaddress/client.go
+++ b/v2/moneymanagement/financialaddress/client.go
@@ -37,9 +37,9 @@ func (c Client) Get(id string, params *stripe.V2MoneyManagementFinancialAddressP
}
// List all FinancialAddresses for a FinancialAccount.
-func (c Client) All(listParams *stripe.V2MoneyManagementFinancialAddressListParams) stripe.Seq2[stripe.V2MoneyManagementFinancialAddress, error] {
- return stripe.NewV2List("/v2/money_management/financial_addresses", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementFinancialAddress], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementFinancialAddress]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementFinancialAddressListParams) stripe.Seq2[*stripe.V2MoneyManagementFinancialAddress, error] {
+ return stripe.NewV2List("/v2/money_management/financial_addresses", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementFinancialAddress], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementFinancialAddress]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/moneymanagement/inboundtransfer/client.go b/v2/moneymanagement/inboundtransfer/client.go
index ec0582ce73..a8c7c88627 100644
--- a/v2/moneymanagement/inboundtransfer/client.go
+++ b/v2/moneymanagement/inboundtransfer/client.go
@@ -36,9 +36,9 @@ func (c Client) Get(id string, params *stripe.V2MoneyManagementInboundTransferPa
}
// Retrieves a list of InboundTransfers.
-func (c Client) All(listParams *stripe.V2MoneyManagementInboundTransferListParams) stripe.Seq2[stripe.V2MoneyManagementInboundTransfer, error] {
- return stripe.NewV2List("/v2/money_management/inbound_transfers", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementInboundTransfer], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementInboundTransfer]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementInboundTransferListParams) stripe.Seq2[*stripe.V2MoneyManagementInboundTransfer, error] {
+ return stripe.NewV2List("/v2/money_management/inbound_transfers", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementInboundTransfer], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementInboundTransfer]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/moneymanagement/outboundpayment/client.go b/v2/moneymanagement/outboundpayment/client.go
index 7d480bc4c6..4a5e6c4bfa 100644
--- a/v2/moneymanagement/outboundpayment/client.go
+++ b/v2/moneymanagement/outboundpayment/client.go
@@ -45,9 +45,9 @@ func (c Client) Cancel(id string, params *stripe.V2MoneyManagementOutboundPaymen
}
// Returns a list of OutboundPayments that match the provided filters.
-func (c Client) All(listParams *stripe.V2MoneyManagementOutboundPaymentListParams) stripe.Seq2[stripe.V2MoneyManagementOutboundPayment, error] {
- return stripe.NewV2List("/v2/money_management/outbound_payments", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementOutboundPayment], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementOutboundPayment]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementOutboundPaymentListParams) stripe.Seq2[*stripe.V2MoneyManagementOutboundPayment, error] {
+ return stripe.NewV2List("/v2/money_management/outbound_payments", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementOutboundPayment], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementOutboundPayment]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/moneymanagement/outboundsetupintent/client.go b/v2/moneymanagement/outboundsetupintent/client.go
index d3172547cb..d9ac4d894f 100644
--- a/v2/moneymanagement/outboundsetupintent/client.go
+++ b/v2/moneymanagement/outboundsetupintent/client.go
@@ -55,9 +55,9 @@ func (c Client) Cancel(id string, params *stripe.V2MoneyManagementOutboundSetupI
}
// List the OutboundSetupIntent objects.
-func (c Client) All(listParams *stripe.V2MoneyManagementOutboundSetupIntentListParams) stripe.Seq2[stripe.V2MoneyManagementOutboundSetupIntent, error] {
- return stripe.NewV2List("/v2/money_management/outbound_setup_intents", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementOutboundSetupIntent], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementOutboundSetupIntent]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementOutboundSetupIntentListParams) stripe.Seq2[*stripe.V2MoneyManagementOutboundSetupIntent, error] {
+ return stripe.NewV2List("/v2/money_management/outbound_setup_intents", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementOutboundSetupIntent], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementOutboundSetupIntent]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/moneymanagement/outboundtransfer/client.go b/v2/moneymanagement/outboundtransfer/client.go
index f57ab4f8f4..8074f91b30 100644
--- a/v2/moneymanagement/outboundtransfer/client.go
+++ b/v2/moneymanagement/outboundtransfer/client.go
@@ -45,9 +45,9 @@ func (c Client) Cancel(id string, params *stripe.V2MoneyManagementOutboundTransf
}
// Returns a list of OutboundTransfers that match the provided filters.
-func (c Client) All(listParams *stripe.V2MoneyManagementOutboundTransferListParams) stripe.Seq2[stripe.V2MoneyManagementOutboundTransfer, error] {
- return stripe.NewV2List("/v2/money_management/outbound_transfers", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementOutboundTransfer], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementOutboundTransfer]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementOutboundTransferListParams) stripe.Seq2[*stripe.V2MoneyManagementOutboundTransfer, error] {
+ return stripe.NewV2List("/v2/money_management/outbound_transfers", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementOutboundTransfer], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementOutboundTransfer]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/moneymanagement/payoutmethod/client.go b/v2/moneymanagement/payoutmethod/client.go
index 43a6a57604..5838d8106a 100644
--- a/v2/moneymanagement/payoutmethod/client.go
+++ b/v2/moneymanagement/payoutmethod/client.go
@@ -47,9 +47,9 @@ func (c Client) Unarchive(id string, params *stripe.V2MoneyManagementPayoutMetho
}
// List objects that adhere to the PayoutMethod interface.
-func (c Client) All(listParams *stripe.V2MoneyManagementPayoutMethodListParams) stripe.Seq2[stripe.V2MoneyManagementPayoutMethod, error] {
- return stripe.NewV2List("/v2/money_management/payout_methods", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementPayoutMethod], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementPayoutMethod]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementPayoutMethodListParams) stripe.Seq2[*stripe.V2MoneyManagementPayoutMethod, error] {
+ return stripe.NewV2List("/v2/money_management/payout_methods", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementPayoutMethod], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementPayoutMethod]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/moneymanagement/receivedcredit/client.go b/v2/moneymanagement/receivedcredit/client.go
index d7bd8e012e..924b09f20c 100644
--- a/v2/moneymanagement/receivedcredit/client.go
+++ b/v2/moneymanagement/receivedcredit/client.go
@@ -28,9 +28,9 @@ func (c Client) Get(id string, params *stripe.V2MoneyManagementReceivedCreditPar
}
// Retrieves a list of ReceivedCredits.
-func (c Client) All(listParams *stripe.V2MoneyManagementReceivedCreditListParams) stripe.Seq2[stripe.V2MoneyManagementReceivedCredit, error] {
- return stripe.NewV2List("/v2/money_management/received_credits", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementReceivedCredit], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementReceivedCredit]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementReceivedCreditListParams) stripe.Seq2[*stripe.V2MoneyManagementReceivedCredit, error] {
+ return stripe.NewV2List("/v2/money_management/received_credits", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementReceivedCredit], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementReceivedCredit]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/moneymanagement/receiveddebit/client.go b/v2/moneymanagement/receiveddebit/client.go
index 8bcf0abae0..c250f7401d 100644
--- a/v2/moneymanagement/receiveddebit/client.go
+++ b/v2/moneymanagement/receiveddebit/client.go
@@ -28,9 +28,9 @@ func (c Client) Get(id string, params *stripe.V2MoneyManagementReceivedDebitPara
}
// Retrieves a list of ReceivedDebits, given the selected filters.
-func (c Client) All(listParams *stripe.V2MoneyManagementReceivedDebitListParams) stripe.Seq2[stripe.V2MoneyManagementReceivedDebit, error] {
- return stripe.NewV2List("/v2/money_management/received_debits", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementReceivedDebit], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementReceivedDebit]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementReceivedDebitListParams) stripe.Seq2[*stripe.V2MoneyManagementReceivedDebit, error] {
+ return stripe.NewV2List("/v2/money_management/received_debits", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementReceivedDebit], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementReceivedDebit]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/moneymanagement/transaction/client.go b/v2/moneymanagement/transaction/client.go
index 41c2795ab2..825d5488e7 100644
--- a/v2/moneymanagement/transaction/client.go
+++ b/v2/moneymanagement/transaction/client.go
@@ -28,9 +28,9 @@ func (c Client) Get(id string, params *stripe.V2MoneyManagementTransactionParams
}
// Returns a list of Transactions that match the provided filters.
-func (c Client) All(listParams *stripe.V2MoneyManagementTransactionListParams) stripe.Seq2[stripe.V2MoneyManagementTransaction, error] {
- return stripe.NewV2List("/v2/money_management/transactions", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementTransaction], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementTransaction]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementTransactionListParams) stripe.Seq2[*stripe.V2MoneyManagementTransaction, error] {
+ return stripe.NewV2List("/v2/money_management/transactions", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementTransaction], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementTransaction]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2/moneymanagement/transactionentry/client.go b/v2/moneymanagement/transactionentry/client.go
index 2a49d004bb..ea96acd186 100644
--- a/v2/moneymanagement/transactionentry/client.go
+++ b/v2/moneymanagement/transactionentry/client.go
@@ -29,9 +29,9 @@ func (c Client) Get(id string, params *stripe.V2MoneyManagementTransactionEntryP
}
// Returns a list of TransactionEntries that match the provided filters.
-func (c Client) All(listParams *stripe.V2MoneyManagementTransactionEntryListParams) stripe.Seq2[stripe.V2MoneyManagementTransactionEntry, error] {
- return stripe.NewV2List("/v2/money_management/transaction_entries", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[stripe.V2MoneyManagementTransactionEntry], error) {
- page := &stripe.V2Page[stripe.V2MoneyManagementTransactionEntry]{}
+func (c Client) All(listParams *stripe.V2MoneyManagementTransactionEntryListParams) stripe.Seq2[*stripe.V2MoneyManagementTransactionEntry, error] {
+ return stripe.NewV2List("/v2/money_management/transaction_entries", listParams, func(path string, p stripe.ParamsContainer) (*stripe.V2Page[*stripe.V2MoneyManagementTransactionEntry], error) {
+ page := &stripe.V2Page[*stripe.V2MoneyManagementTransactionEntry]{}
err := c.B.Call(http.MethodGet, path, c.Key, p, page)
return page, err
}).All()
diff --git a/v2billing_meterevent_params.go b/v2billing_meterevent_params.go
index 1be98f685f..0fe35e2c41 100644
--- a/v2billing_meterevent_params.go
+++ b/v2billing_meterevent_params.go
@@ -27,3 +27,23 @@ type V2BillingMeterEventParams struct {
// 5 minutes in the future. Defaults to current timestamp if not specified.
Timestamp *time.Time `form:"timestamp" json:"timestamp,omitempty"`
}
+
+// Creates a meter event. Events are validated synchronously, but are processed asynchronously. Supports up to 1,000 events per second in livemode. For higher rate-limits, please use meter event streams instead.
+type V2BillingMeterEventCreateParams struct {
+ Params `form:"*"`
+ // The name of the meter event. Corresponds with the `event_name` field on a meter.
+ EventName *string `form:"event_name" json:"event_name"`
+ // A unique identifier for the event. If not provided, one will be generated.
+ // We recommend using a globally unique identifier for this. We'll enforce
+ // uniqueness within a rolling 24 hour period.
+ Identifier *string `form:"identifier" json:"identifier,omitempty"`
+ // 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" json:"payload"`
+ // The time of the event. Must be within the past 35 calendar days or up to
+ // 5 minutes in the future. Defaults to current timestamp if not specified.
+ Timestamp *time.Time `form:"timestamp" json:"timestamp,omitempty"`
+}
diff --git a/v2billing_metereventadjustment_params.go b/v2billing_metereventadjustment_params.go
index 82979f88f6..b52a1ad16f 100644
--- a/v2billing_metereventadjustment_params.go
+++ b/v2billing_metereventadjustment_params.go
@@ -22,3 +22,20 @@ type V2BillingMeterEventAdjustmentParams struct {
// 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" json:"type"`
}
+
+// Specifies which event to cancel.
+type V2BillingMeterEventAdjustmentCreateCancelParams struct {
+ // Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
+ Identifier *string `form:"identifier" json:"identifier"`
+}
+
+// Creates a meter event adjustment to cancel a previously sent meter event.
+type V2BillingMeterEventAdjustmentCreateParams struct {
+ Params `form:"*"`
+ // Specifies which event to cancel.
+ Cancel *V2BillingMeterEventAdjustmentCreateCancelParams `form:"cancel" json:"cancel"`
+ // The name of the meter event. Corresponds with the `event_name` field on a meter.
+ EventName *string `form:"event_name" json:"event_name"`
+ // 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" json:"type"`
+}
diff --git a/v2billing_metereventsession_params.go b/v2billing_metereventsession_params.go
index e4b842349a..a7f06fc2d4 100644
--- a/v2billing_metereventsession_params.go
+++ b/v2billing_metereventsession_params.go
@@ -10,3 +10,8 @@ package stripe
type V2BillingMeterEventSessionParams struct {
Params `form:"*"`
}
+
+// Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you will need to create a new meter event session when your token expires.
+type V2BillingMeterEventSessionCreateParams struct {
+ Params `form:"*"`
+}
diff --git a/v2billing_metereventstream_params.go b/v2billing_metereventstream_params.go
index ca16f6edf1..8319ad2485 100644
--- a/v2billing_metereventstream_params.go
+++ b/v2billing_metereventstream_params.go
@@ -33,3 +33,29 @@ type V2BillingMeterEventStreamParams struct {
// List of meter events to include in the request.
Events []*V2BillingMeterEventStreamEventParams `form:"events" json:"events"`
}
+
+// List of meter events to include in the request.
+type V2BillingMeterEventStreamCreateEventParams struct {
+ // The name of the meter event. Corresponds with the `event_name` field on a meter.
+ EventName *string `form:"event_name" json:"event_name"`
+ // A unique identifier for the event. If not provided, one will be generated.
+ // We recommend using a globally unique identifier for this. We'll enforce
+ // uniqueness within a rolling 24 hour period.
+ Identifier *string `form:"identifier" json:"identifier,omitempty"`
+ // 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" json:"payload"`
+ // The time of the event. Must be within the past 35 calendar days or up to
+ // 5 minutes in the future. Defaults to current timestamp if not specified.
+ Timestamp *time.Time `form:"timestamp" json:"timestamp,omitempty"`
+}
+
+// Creates meter events. Events are processed asynchronously, including validation. Requires a meter event session for authentication. Supports up to 10,000 requests per second in livemode. For even higher rate-limits, contact sales.
+type V2BillingMeterEventStreamCreateParams struct {
+ Params `form:"*"`
+ // List of meter events to include in the request.
+ Events []*V2BillingMeterEventStreamCreateEventParams `form:"events" json:"events"`
+}
diff --git a/v2core_account_params.go b/v2core_account_params.go
index 84cb056964..fab601e141 100644
--- a/v2core_account_params.go
+++ b/v2core_account_params.go
@@ -1246,3 +1246,2452 @@ type V2CoreAccountListParams struct {
// The upper limit on the number of accounts returned by the List Account request.
Limit *int64 `form:"limit" json:"limit,omitempty"`
}
+
+// Automatic indirect tax settings to be used when automatic tax calculation is enabled on the customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if automatic tax calculation is possible given the current customer location information.
+type V2CoreAccountCreateConfigurationCustomerAutomaticIndirectTaxParams struct {
+ // 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”.
+ Exempt *string `form:"exempt" json:"exempt,omitempty"`
+ // A recent IP address of the customer used for tax reporting and tax location inference.
+ IPAddress *string `form:"ip_address" json:"ip_address,omitempty"`
+ // The data source used by Stripe Tax to identify the customer's location - defaults to 'identity_address'. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions.
+ LocationSource *string `form:"location_source" json:"location_source,omitempty"`
+}
+
+// The list of up to 4 default custom fields to be displayed on invoices for this customer.
+type V2CoreAccountCreateConfigurationCustomerBillingInvoiceCustomFieldParams struct {
+ // The name of the custom field. This may be up to 40 characters.
+ Name *string `form:"name" json:"name"`
+ // The value of the custom field. This may be up to 140 characters. When updating, pass an empty string to remove previously-defined values.
+ Value *string `form:"value" json:"value"`
+}
+
+// Default options for invoice PDF rendering for this customer.
+type V2CoreAccountCreateConfigurationCustomerBillingInvoiceRenderingParams 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" json:"amount_tax_display,omitempty"`
+ // ID of the invoice rendering template to use for future invoices.
+ Template *string `form:"template" json:"template,omitempty"`
+}
+
+// Default settings used on invoices for this customer.
+type V2CoreAccountCreateConfigurationCustomerBillingInvoiceParams struct {
+ // The list of up to 4 default custom fields to be displayed on invoices for this customer.
+ CustomFields []*V2CoreAccountCreateConfigurationCustomerBillingInvoiceCustomFieldParams `form:"custom_fields" json:"custom_fields,omitempty"`
+ // Default footer to be displayed on invoices for this customer.
+ Footer *string `form:"footer" json:"footer,omitempty"`
+ // The sequence to be used on the customer's next invoice. Defaults to 1.
+ NextSequence *int64 `form:"next_sequence" json:"next_sequence,omitempty"`
+ // The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
+ Prefix *string `form:"prefix" json:"prefix,omitempty"`
+ // Default options for invoice PDF rendering for this customer.
+ Rendering *V2CoreAccountCreateConfigurationCustomerBillingInvoiceRenderingParams `form:"rendering" json:"rendering,omitempty"`
+}
+
+// Billing settings - default settings used for this customer in Billing flows such as Invoices and Subscriptions.
+type V2CoreAccountCreateConfigurationCustomerBillingParams struct {
+ // Default settings used on invoices for this customer.
+ Invoice *V2CoreAccountCreateConfigurationCustomerBillingInvoiceParams `form:"invoice" json:"invoice,omitempty"`
+}
+
+// Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. Uses the `location_source` field.
+type V2CoreAccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Capabilities that have been requested on the Customer Configuration.
+type V2CoreAccountCreateConfigurationCustomerCapabilitiesParams struct {
+ // Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. Uses the `location_source` field.
+ AutomaticIndirectTax *V2CoreAccountCreateConfigurationCustomerCapabilitiesAutomaticIndirectTaxParams `form:"automatic_indirect_tax" json:"automatic_indirect_tax,omitempty"`
+}
+
+// The customer's shipping information. Appears on invoices emailed to this customer.
+type V2CoreAccountCreateConfigurationCustomerShippingParams struct {
+ // Customer shipping address.
+ Address *AddressParams `form:"address" json:"address,omitempty"`
+ // Customer name.
+ Name *string `form:"name" json:"name,omitempty"`
+ // Customer phone (including extension).
+ Phone *string `form:"phone" json:"phone,omitempty"`
+}
+
+// The Customer Configuration allows the Account to be used in inbound payment flows.
+type V2CoreAccountCreateConfigurationCustomerParams struct {
+ // Automatic indirect tax settings to be used when automatic tax calculation is enabled on the customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if automatic tax calculation is possible given the current customer location information.
+ AutomaticIndirectTax *V2CoreAccountCreateConfigurationCustomerAutomaticIndirectTaxParams `form:"automatic_indirect_tax" json:"automatic_indirect_tax,omitempty"`
+ // Billing settings - default settings used for this customer in Billing flows such as Invoices and Subscriptions.
+ Billing *V2CoreAccountCreateConfigurationCustomerBillingParams `form:"billing" json:"billing,omitempty"`
+ // Capabilities that have been requested on the Customer Configuration.
+ Capabilities *V2CoreAccountCreateConfigurationCustomerCapabilitiesParams `form:"capabilities" json:"capabilities,omitempty"`
+ // The customer's shipping information. Appears on invoices emailed to this customer.
+ Shipping *V2CoreAccountCreateConfigurationCustomerShippingParams `form:"shipping" json:"shipping,omitempty"`
+ // ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and when the Customer Configuration is first set on an Account.
+ TestClock *string `form:"test_clock" json:"test_clock,omitempty"`
+}
+
+// Settings used for Bacs debit payments.
+type V2CoreAccountCreateConfigurationMerchantBACSDebitPaymentsParams struct {
+ // Display name for Bacs debit payments.
+ DisplayName *string `form:"display_name" json:"display_name,omitempty"`
+}
+
+// Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and other products.
+type V2CoreAccountCreateConfigurationMerchantBrandingParams struct {
+ // ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): An icon for the merchant. Must be square and at least 128px x 128px.
+ Icon *string `form:"icon" json:"icon,omitempty"`
+ // ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px.
+ Logo *string `form:"logo" json:"logo,omitempty"`
+ // A CSS hex color value representing the primary branding color for the merchant.
+ PrimaryColor *string `form:"primary_color" json:"primary_color,omitempty"`
+ // A CSS hex color value representing the secondary branding color for the merchant.
+ SecondaryColor *string `form:"secondary_color" json:"secondary_color,omitempty"`
+}
+
+// Allow the merchant to process ACH debit payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesACHDebitPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process ACSS debit payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesACSSDebitPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Affirm payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Afterpay/Clearpay payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Alma payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Amazon Pay payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Australian BECS Direct Debit payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesAUBECSDebitPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process BACS Direct Debit payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesBACSDebitPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Bancontact payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process BLIK payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesBLIKPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Boleto payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to collect card payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesCardPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Cartes Bancaires payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Cash App payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesCashAppPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process EPS payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesEPSPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process FPX payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesFPXPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process UK bank transfer payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesGBBankTransferPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process GrabPay payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process iDEAL payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesIDEALPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process JCB card payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesJCBPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Japanese bank transfer payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesJPBankTransferPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Kakao Pay payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Klarna payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Konbini convenience store payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Korean card payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Link payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesLinkPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process MobilePay payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Multibanco payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Mexican bank transfer payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesMXBankTransferPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Naver Pay payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process OXXO payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesOXXOPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Przelewy24 (P24) payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesP24PaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Pay by Bank payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process PAYCO payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process PayNow payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesPayNowPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process PromptPay payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesPromptPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Revolut Pay payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Samsung Pay payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process SEPA bank transfer payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesSEPABankTransferPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process SEPA Direct Debit payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesSEPADebitPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Swish payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesSwishPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process TWINT payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesTWINTPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process US bank transfer payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesUSBankTransferPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allow the merchant to process Zip payments.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesZipPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Capabilities to request on the Merchant Configuration.
+type V2CoreAccountCreateConfigurationMerchantCapabilitiesParams struct {
+ // Allow the merchant to process ACH debit payments.
+ ACHDebitPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesACHDebitPaymentsParams `form:"ach_debit_payments" json:"ach_debit_payments,omitempty"`
+ // Allow the merchant to process ACSS debit payments.
+ ACSSDebitPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesACSSDebitPaymentsParams `form:"acss_debit_payments" json:"acss_debit_payments,omitempty"`
+ // Allow the merchant to process Affirm payments.
+ AffirmPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesAffirmPaymentsParams `form:"affirm_payments" json:"affirm_payments,omitempty"`
+ // Allow the merchant to process Afterpay/Clearpay payments.
+ AfterpayClearpayPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsParams `form:"afterpay_clearpay_payments" json:"afterpay_clearpay_payments,omitempty"`
+ // Allow the merchant to process Alma payments.
+ AlmaPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesAlmaPaymentsParams `form:"alma_payments" json:"alma_payments,omitempty"`
+ // Allow the merchant to process Amazon Pay payments.
+ AmazonPayPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesAmazonPayPaymentsParams `form:"amazon_pay_payments" json:"amazon_pay_payments,omitempty"`
+ // Allow the merchant to process Australian BECS Direct Debit payments.
+ AUBECSDebitPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesAUBECSDebitPaymentsParams `form:"au_becs_debit_payments" json:"au_becs_debit_payments,omitempty"`
+ // Allow the merchant to process BACS Direct Debit payments.
+ BACSDebitPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesBACSDebitPaymentsParams `form:"bacs_debit_payments" json:"bacs_debit_payments,omitempty"`
+ // Allow the merchant to process Bancontact payments.
+ BancontactPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesBancontactPaymentsParams `form:"bancontact_payments" json:"bancontact_payments,omitempty"`
+ // Allow the merchant to process BLIK payments.
+ BLIKPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesBLIKPaymentsParams `form:"blik_payments" json:"blik_payments,omitempty"`
+ // Allow the merchant to process Boleto payments.
+ BoletoPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesBoletoPaymentsParams `form:"boleto_payments" json:"boleto_payments,omitempty"`
+ // Allow the merchant to collect card payments.
+ CardPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesCardPaymentsParams `form:"card_payments" json:"card_payments,omitempty"`
+ // Allow the merchant to process Cartes Bancaires payments.
+ CartesBancairesPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesCartesBancairesPaymentsParams `form:"cartes_bancaires_payments" json:"cartes_bancaires_payments,omitempty"`
+ // Allow the merchant to process Cash App payments.
+ CashAppPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesCashAppPaymentsParams `form:"cashapp_payments" json:"cashapp_payments,omitempty"`
+ // Allow the merchant to process EPS payments.
+ EPSPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesEPSPaymentsParams `form:"eps_payments" json:"eps_payments,omitempty"`
+ // Allow the merchant to process FPX payments.
+ FPXPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesFPXPaymentsParams `form:"fpx_payments" json:"fpx_payments,omitempty"`
+ // Allow the merchant to process UK bank transfer payments.
+ GBBankTransferPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesGBBankTransferPaymentsParams `form:"gb_bank_transfer_payments" json:"gb_bank_transfer_payments,omitempty"`
+ // Allow the merchant to process GrabPay payments.
+ GrabpayPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesGrabpayPaymentsParams `form:"grabpay_payments" json:"grabpay_payments,omitempty"`
+ // Allow the merchant to process iDEAL payments.
+ IDEALPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesIDEALPaymentsParams `form:"ideal_payments" json:"ideal_payments,omitempty"`
+ // Allow the merchant to process JCB card payments.
+ JCBPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesJCBPaymentsParams `form:"jcb_payments" json:"jcb_payments,omitempty"`
+ // Allow the merchant to process Japanese bank transfer payments.
+ JPBankTransferPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesJPBankTransferPaymentsParams `form:"jp_bank_transfer_payments" json:"jp_bank_transfer_payments,omitempty"`
+ // Allow the merchant to process Kakao Pay payments.
+ KakaoPayPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesKakaoPayPaymentsParams `form:"kakao_pay_payments" json:"kakao_pay_payments,omitempty"`
+ // Allow the merchant to process Klarna payments.
+ KlarnaPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesKlarnaPaymentsParams `form:"klarna_payments" json:"klarna_payments,omitempty"`
+ // Allow the merchant to process Konbini convenience store payments.
+ KonbiniPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesKonbiniPaymentsParams `form:"konbini_payments" json:"konbini_payments,omitempty"`
+ // Allow the merchant to process Korean card payments.
+ KrCardPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesKrCardPaymentsParams `form:"kr_card_payments" json:"kr_card_payments,omitempty"`
+ // Allow the merchant to process Link payments.
+ LinkPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesLinkPaymentsParams `form:"link_payments" json:"link_payments,omitempty"`
+ // Allow the merchant to process MobilePay payments.
+ MobilepayPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesMobilepayPaymentsParams `form:"mobilepay_payments" json:"mobilepay_payments,omitempty"`
+ // Allow the merchant to process Multibanco payments.
+ MultibancoPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesMultibancoPaymentsParams `form:"multibanco_payments" json:"multibanco_payments,omitempty"`
+ // Allow the merchant to process Mexican bank transfer payments.
+ MXBankTransferPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesMXBankTransferPaymentsParams `form:"mx_bank_transfer_payments" json:"mx_bank_transfer_payments,omitempty"`
+ // Allow the merchant to process Naver Pay payments.
+ NaverPayPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesNaverPayPaymentsParams `form:"naver_pay_payments" json:"naver_pay_payments,omitempty"`
+ // Allow the merchant to process OXXO payments.
+ OXXOPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesOXXOPaymentsParams `form:"oxxo_payments" json:"oxxo_payments,omitempty"`
+ // Allow the merchant to process Przelewy24 (P24) payments.
+ P24Payments *V2CoreAccountCreateConfigurationMerchantCapabilitiesP24PaymentsParams `form:"p24_payments" json:"p24_payments,omitempty"`
+ // Allow the merchant to process Pay by Bank payments.
+ PayByBankPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesPayByBankPaymentsParams `form:"pay_by_bank_payments" json:"pay_by_bank_payments,omitempty"`
+ // Allow the merchant to process PAYCO payments.
+ PaycoPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesPaycoPaymentsParams `form:"payco_payments" json:"payco_payments,omitempty"`
+ // Allow the merchant to process PayNow payments.
+ PayNowPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesPayNowPaymentsParams `form:"paynow_payments" json:"paynow_payments,omitempty"`
+ // Allow the merchant to process PromptPay payments.
+ PromptPayPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesPromptPayPaymentsParams `form:"promptpay_payments" json:"promptpay_payments,omitempty"`
+ // Allow the merchant to process Revolut Pay payments.
+ RevolutPayPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesRevolutPayPaymentsParams `form:"revolut_pay_payments" json:"revolut_pay_payments,omitempty"`
+ // Allow the merchant to process Samsung Pay payments.
+ SamsungPayPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesSamsungPayPaymentsParams `form:"samsung_pay_payments" json:"samsung_pay_payments,omitempty"`
+ // Allow the merchant to process SEPA bank transfer payments.
+ SEPABankTransferPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesSEPABankTransferPaymentsParams `form:"sepa_bank_transfer_payments" json:"sepa_bank_transfer_payments,omitempty"`
+ // Allow the merchant to process SEPA Direct Debit payments.
+ SEPADebitPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesSEPADebitPaymentsParams `form:"sepa_debit_payments" json:"sepa_debit_payments,omitempty"`
+ // Allow the merchant to process Swish payments.
+ SwishPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesSwishPaymentsParams `form:"swish_payments" json:"swish_payments,omitempty"`
+ // Allow the merchant to process TWINT payments.
+ TWINTPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesTWINTPaymentsParams `form:"twint_payments" json:"twint_payments,omitempty"`
+ // Allow the merchant to process US bank transfer payments.
+ USBankTransferPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesUSBankTransferPaymentsParams `form:"us_bank_transfer_payments" json:"us_bank_transfer_payments,omitempty"`
+ // Allow the merchant to process Zip payments.
+ ZipPayments *V2CoreAccountCreateConfigurationMerchantCapabilitiesZipPaymentsParams `form:"zip_payments" json:"zip_payments,omitempty"`
+}
+
+// Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+type V2CoreAccountCreateConfigurationMerchantCardPaymentsDeclineOnParams 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" json:"avs_failure,omitempty"`
+ // 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" json:"cvc_failure,omitempty"`
+}
+
+// Card payments settings.
+type V2CoreAccountCreateConfigurationMerchantCardPaymentsParams struct {
+ // Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ DeclineOn *V2CoreAccountCreateConfigurationMerchantCardPaymentsDeclineOnParams `form:"decline_on" json:"decline_on,omitempty"`
+}
+
+// Statement descriptor.
+type V2CoreAccountCreateConfigurationMerchantStatementDescriptorParams 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 Merchant Configuration settings documentation.
+ Descriptor *string `form:"descriptor" json:"descriptor,omitempty"`
+ // Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation.
+ Prefix *string `form:"prefix" json:"prefix,omitempty"`
+}
+
+// A publicly available mailing address for sending support issues to.
+type V2CoreAccountCreateConfigurationMerchantSupportAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Publicly available contact information for sending support issues to.
+type V2CoreAccountCreateConfigurationMerchantSupportParams struct {
+ // A publicly available mailing address for sending support issues to.
+ Address *V2CoreAccountCreateConfigurationMerchantSupportAddressParams `form:"address" json:"address,omitempty"`
+ // A publicly available email address for sending support issues to.
+ Email *string `form:"email" json:"email,omitempty"`
+ // A publicly available phone number to call with support issues.
+ Phone *string `form:"phone" json:"phone,omitempty"`
+ // A publicly available website for handling support issues.
+ URL *string `form:"url" json:"url,omitempty"`
+}
+
+// The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you've completed onboarding as a Connect platform.
+type V2CoreAccountCreateConfigurationMerchantParams struct {
+ // Settings used for Bacs debit payments.
+ BACSDebitPayments *V2CoreAccountCreateConfigurationMerchantBACSDebitPaymentsParams `form:"bacs_debit_payments" json:"bacs_debit_payments,omitempty"`
+ // Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and other products.
+ Branding *V2CoreAccountCreateConfigurationMerchantBrandingParams `form:"branding" json:"branding,omitempty"`
+ // Capabilities to request on the Merchant Configuration.
+ Capabilities *V2CoreAccountCreateConfigurationMerchantCapabilitiesParams `form:"capabilities" json:"capabilities,omitempty"`
+ // Card payments settings.
+ CardPayments *V2CoreAccountCreateConfigurationMerchantCardPaymentsParams `form:"card_payments" json:"card_payments,omitempty"`
+ // The merchant category code for the Merchant Configuration. MCCs are used to classify businesses based on the goods or services they provide.
+ MCC *string `form:"mcc" json:"mcc,omitempty"`
+ // Statement descriptor.
+ StatementDescriptor *V2CoreAccountCreateConfigurationMerchantStatementDescriptorParams `form:"statement_descriptor" json:"statement_descriptor,omitempty"`
+ // Publicly available contact information for sending support issues to.
+ Support *V2CoreAccountCreateConfigurationMerchantSupportParams `form:"support" json:"support,omitempty"`
+}
+
+// Enables this Account to receive OutboundPayments to linked bank accounts over local networks.
+type V2CoreAccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Enables this Account to receive OutboundPayments to linked bank accounts over wire.
+type V2CoreAccountCreateConfigurationRecipientCapabilitiesBankAccountsWireParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Capabilities that enable OutboundPayments to a bank account linked to this Account.
+type V2CoreAccountCreateConfigurationRecipientCapabilitiesBankAccountsParams struct {
+ // Enables this Account to receive OutboundPayments to linked bank accounts over local networks.
+ Local *V2CoreAccountCreateConfigurationRecipientCapabilitiesBankAccountsLocalParams `form:"local" json:"local,omitempty"`
+ // Enables this Account to receive OutboundPayments to linked bank accounts over wire.
+ Wire *V2CoreAccountCreateConfigurationRecipientCapabilitiesBankAccountsWireParams `form:"wire" json:"wire,omitempty"`
+}
+
+// Capabilities that enable OutboundPayments to a card linked to this Account.
+type V2CoreAccountCreateConfigurationRecipientCapabilitiesCardsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Allows the recipient to receive /v1/transfers into their Stripe Balance (/v1/balance).
+type V2CoreAccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested"`
+}
+
+// Capabilities that enable the recipient to receive money into their Stripe Balance (/v1/balance).
+type V2CoreAccountCreateConfigurationRecipientCapabilitiesStripeBalanceParams struct {
+ // Allows the recipient to receive /v1/transfers into their Stripe Balance (/v1/balance).
+ StripeTransfers *V2CoreAccountCreateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersParams `form:"stripe_transfers" json:"stripe_transfers,omitempty"`
+}
+
+// Capabilities to be requested on the Recipient Configuration.
+type V2CoreAccountCreateConfigurationRecipientCapabilitiesParams struct {
+ // Capabilities that enable OutboundPayments to a bank account linked to this Account.
+ BankAccounts *V2CoreAccountCreateConfigurationRecipientCapabilitiesBankAccountsParams `form:"bank_accounts" json:"bank_accounts,omitempty"`
+ // Capabilities that enable OutboundPayments to a card linked to this Account.
+ Cards *V2CoreAccountCreateConfigurationRecipientCapabilitiesCardsParams `form:"cards" json:"cards,omitempty"`
+ // Capabilities that enable the recipient to receive money into their Stripe Balance (/v1/balance).
+ StripeBalance *V2CoreAccountCreateConfigurationRecipientCapabilitiesStripeBalanceParams `form:"stripe_balance" json:"stripe_balance,omitempty"`
+}
+
+// The Recipient Configuration allows the Account to receive funds.
+type V2CoreAccountCreateConfigurationRecipientParams struct {
+ // Capabilities to be requested on the Recipient Configuration.
+ Capabilities *V2CoreAccountCreateConfigurationRecipientCapabilitiesParams `form:"capabilities" json:"capabilities,omitempty"`
+}
+
+// An Account Configuration which allows the Account to take on a key persona across Stripe products.
+type V2CoreAccountCreateConfigurationParams struct {
+ // The Customer Configuration allows the Account to be used in inbound payment flows.
+ Customer *V2CoreAccountCreateConfigurationCustomerParams `form:"customer" json:"customer,omitempty"`
+ // The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you've completed onboarding as a Connect platform.
+ Merchant *V2CoreAccountCreateConfigurationMerchantParams `form:"merchant" json:"merchant,omitempty"`
+ // The Recipient Configuration allows the Account to receive funds.
+ Recipient *V2CoreAccountCreateConfigurationRecipientParams `form:"recipient" json:"recipient,omitempty"`
+}
+
+// Default responsibilities held by either Stripe or the platform.
+type V2CoreAccountCreateDefaultsResponsibilitiesParams struct {
+ // A value indicating the party responsible for collecting fees from this account.
+ FeesCollector *string `form:"fees_collector" json:"fees_collector"`
+ // A value indicating who is responsible for losses when this Account can't pay back negative balances from payments.
+ LossesCollector *string `form:"losses_collector" json:"losses_collector"`
+}
+
+// Default values to be used on Account Configurations.
+type V2CoreAccountCreateDefaultsParams 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" json:"currency,omitempty"`
+ // The Account's preferred locales (languages), ordered by preference.
+ Locales []*string `form:"locales" json:"locales,omitempty"`
+ // Default responsibilities held by either Stripe or the platform.
+ Responsibilities *V2CoreAccountCreateDefaultsResponsibilitiesParams `form:"responsibilities" json:"responsibilities,omitempty"`
+}
+
+// This hash is used to attest that the directors information provided to Stripe is both current and correct.
+type V2CoreAccountCreateIdentityAttestationsDirectorshipDeclarationParams struct {
+ // The time marking when the director attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
+ Date *time.Time `form:"date" json:"date,omitempty"`
+ // The IP address from which the director attestation was made.
+ IP *string `form:"ip" json:"ip,omitempty"`
+ // The user agent of the browser from which the director attestation was made.
+ UserAgent *string `form:"user_agent" json:"user_agent,omitempty"`
+}
+
+// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+type V2CoreAccountCreateIdentityAttestationsOwnershipDeclarationParams struct {
+ // The time marking when the beneficial owner attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
+ Date *time.Time `form:"date" json:"date,omitempty"`
+ // The IP address from which the beneficial owner attestation was made.
+ IP *string `form:"ip" json:"ip,omitempty"`
+ // The user agent of the browser from which the beneficial owner attestation was made.
+ UserAgent *string `form:"user_agent" json:"user_agent,omitempty"`
+}
+
+// Attestation that all Persons with a specific Relationship value have been provided.
+type V2CoreAccountCreateIdentityAttestationsPersonsProvidedParams struct {
+ // 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://docs.stripe.com/api/v2/core/accounts/createperson).
+ Directors *bool `form:"directors" json:"directors,omitempty"`
+ // 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://docs.stripe.com/api/v2/core/accounts/createperson).
+ Executives *bool `form:"executives" json:"executives,omitempty"`
+ // 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://docs.stripe.com/api/v2/core/accounts/createperson).
+ Owners *bool `form:"owners" json:"owners,omitempty"`
+ // Reason for why the company is exempt from providing ownership information.
+ OwnershipExemptionReason *string `form:"ownership_exemption_reason" json:"ownership_exemption_reason,omitempty"`
+}
+
+// Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance).
+type V2CoreAccountCreateIdentityAttestationsTermsOfServiceAccountParams struct {
+ // The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
+ Date *time.Time `form:"date" json:"date"`
+ // The IP address from which the Account's representative accepted the terms of service.
+ IP *string `form:"ip" json:"ip"`
+ // The user agent of the browser from which the Account's representative accepted the terms of service.
+ UserAgent *string `form:"user_agent" json:"user_agent,omitempty"`
+}
+
+// Attestations of accepted terms of service agreements.
+type V2CoreAccountCreateIdentityAttestationsTermsOfServiceParams struct {
+ // Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance).
+ Account *V2CoreAccountCreateIdentityAttestationsTermsOfServiceAccountParams `form:"account" json:"account,omitempty"`
+}
+
+// Attestations from the identity's key people, e.g. owners, executives, directors.
+type V2CoreAccountCreateIdentityAttestationsParams struct {
+ // This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ DirectorshipDeclaration *V2CoreAccountCreateIdentityAttestationsDirectorshipDeclarationParams `form:"directorship_declaration" json:"directorship_declaration,omitempty"`
+ // This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ OwnershipDeclaration *V2CoreAccountCreateIdentityAttestationsOwnershipDeclarationParams `form:"ownership_declaration" json:"ownership_declaration,omitempty"`
+ // Attestation that all Persons with a specific Relationship value have been provided.
+ PersonsProvided *V2CoreAccountCreateIdentityAttestationsPersonsProvidedParams `form:"persons_provided" json:"persons_provided,omitempty"`
+ // Attestations of accepted terms of service agreements.
+ TermsOfService *V2CoreAccountCreateIdentityAttestationsTermsOfServiceParams `form:"terms_of_service" json:"terms_of_service,omitempty"`
+}
+
+// The business registration address of the business entity.
+type V2CoreAccountCreateIdentityBusinessDetailsAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The business gross annual revenue for its preceding fiscal year.
+type V2CoreAccountCreateIdentityBusinessDetailsAnnualRevenueParams struct {
+ // A non-negative integer representing the amount in the smallest currency unit.
+ Amount *Amount `form:"amount" json:"amount,omitempty"`
+ // 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" json:"fiscal_year_end,omitempty"`
+}
+
+// One or more documents that support the 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 V2CoreAccountCreateIdentityBusinessDetailsDocumentsBankAccountOwnershipVerificationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents that demonstrate proof of a company's license to operate.
+type V2CoreAccountCreateIdentityBusinessDetailsDocumentsCompanyLicenseParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the company's Memorandum of Association.
+type V2CoreAccountCreateIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// Certain countries only: One or more documents showing the ministerial decree legalizing the company's establishment.
+type V2CoreAccountCreateIdentityBusinessDetailsDocumentsCompanyMinisterialDecreeParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+type V2CoreAccountCreateIdentityBusinessDetailsDocumentsCompanyRegistrationVerificationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents that demonstrate proof of a company's tax ID.
+type V2CoreAccountCreateIdentityBusinessDetailsDocumentsCompanyTaxIDVerificationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+type V2CoreAccountCreateIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBackParams struct {
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back" json:"back,omitempty"`
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front" json:"front"`
+}
+
+// A document verifying the business.
+type V2CoreAccountCreateIdentityBusinessDetailsDocumentsPrimaryVerificationParams struct {
+ // The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+ FrontBack *V2CoreAccountCreateIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBackParams `form:"front_back" json:"front_back"`
+ // The format of the verification document. Currently supports `front_back` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the company's proof of registration with the national business registry.
+type V2CoreAccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents that demonstrate proof of ultimate beneficial ownership.
+type V2CoreAccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// A document verifying the business.
+type V2CoreAccountCreateIdentityBusinessDetailsDocumentsParams struct {
+ // One or more documents that support the 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 *V2CoreAccountCreateIdentityBusinessDetailsDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification" json:"bank_account_ownership_verification,omitempty"`
+ // One or more documents that demonstrate proof of a company's license to operate.
+ CompanyLicense *V2CoreAccountCreateIdentityBusinessDetailsDocumentsCompanyLicenseParams `form:"company_license" json:"company_license,omitempty"`
+ // One or more documents showing the company's Memorandum of Association.
+ CompanyMemorandumOfAssociation *V2CoreAccountCreateIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociationParams `form:"company_memorandum_of_association" json:"company_memorandum_of_association,omitempty"`
+ // Certain countries only: One or more documents showing the ministerial decree legalizing the company's establishment.
+ CompanyMinisterialDecree *V2CoreAccountCreateIdentityBusinessDetailsDocumentsCompanyMinisterialDecreeParams `form:"company_ministerial_decree" json:"company_ministerial_decree,omitempty"`
+ // One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ CompanyRegistrationVerification *V2CoreAccountCreateIdentityBusinessDetailsDocumentsCompanyRegistrationVerificationParams `form:"company_registration_verification" json:"company_registration_verification,omitempty"`
+ // One or more documents that demonstrate proof of a company's tax ID.
+ CompanyTaxIDVerification *V2CoreAccountCreateIdentityBusinessDetailsDocumentsCompanyTaxIDVerificationParams `form:"company_tax_id_verification" json:"company_tax_id_verification,omitempty"`
+ // A document verifying the business.
+ PrimaryVerification *V2CoreAccountCreateIdentityBusinessDetailsDocumentsPrimaryVerificationParams `form:"primary_verification" json:"primary_verification,omitempty"`
+ // One or more documents showing the company's proof of registration with the national business registry.
+ ProofOfRegistration *V2CoreAccountCreateIdentityBusinessDetailsDocumentsProofOfRegistrationParams `form:"proof_of_registration" json:"proof_of_registration,omitempty"`
+ // One or more documents that demonstrate proof of ultimate beneficial ownership.
+ ProofOfUltimateBeneficialOwnership *V2CoreAccountCreateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipParams `form:"proof_of_ultimate_beneficial_ownership" json:"proof_of_ultimate_beneficial_ownership,omitempty"`
+}
+
+// The ID numbers of a business entity.
+type V2CoreAccountCreateIdentityBusinessDetailsIDNumberParams struct {
+ // The registrar of the ID number (Only valid for DE ID number types).
+ Registrar *string `form:"registrar" json:"registrar,omitempty"`
+ // Open Enum. The ID number type of a business entity.
+ Type *string `form:"type" json:"type"`
+ // The value of the ID number.
+ Value *string `form:"value" json:"value"`
+}
+
+// An estimate of the monthly revenue of the business.
+type V2CoreAccountCreateIdentityBusinessDetailsMonthlyEstimatedRevenueParams struct {
+ // A non-negative integer representing the amount in the smallest currency unit.
+ Amount *Amount `form:"amount" json:"amount,omitempty"`
+}
+
+// Kana Address.
+type V2CoreAccountCreateIdentityBusinessDetailsScriptAddressesKanaParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Kanji Address.
+type V2CoreAccountCreateIdentityBusinessDetailsScriptAddressesKanjiParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The business registration address of the business entity in non latin script.
+type V2CoreAccountCreateIdentityBusinessDetailsScriptAddressesParams struct {
+ // Kana Address.
+ Kana *V2CoreAccountCreateIdentityBusinessDetailsScriptAddressesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Kanji Address.
+ Kanji *V2CoreAccountCreateIdentityBusinessDetailsScriptAddressesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Kana name.
+type V2CoreAccountCreateIdentityBusinessDetailsScriptNamesKanaParams struct {
+ // Registered name of the business.
+ RegisteredName *string `form:"registered_name" json:"registered_name,omitempty"`
+}
+
+// Kanji name.
+type V2CoreAccountCreateIdentityBusinessDetailsScriptNamesKanjiParams struct {
+ // Registered name of the business.
+ RegisteredName *string `form:"registered_name" json:"registered_name,omitempty"`
+}
+
+// The business legal name in non latin script.
+type V2CoreAccountCreateIdentityBusinessDetailsScriptNamesParams struct {
+ // Kana name.
+ Kana *V2CoreAccountCreateIdentityBusinessDetailsScriptNamesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Kanji name.
+ Kanji *V2CoreAccountCreateIdentityBusinessDetailsScriptNamesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Information about the company or business.
+type V2CoreAccountCreateIdentityBusinessDetailsParams struct {
+ // The business registration address of the business entity.
+ Address *V2CoreAccountCreateIdentityBusinessDetailsAddressParams `form:"address" json:"address,omitempty"`
+ // The business gross annual revenue for its preceding fiscal year.
+ AnnualRevenue *V2CoreAccountCreateIdentityBusinessDetailsAnnualRevenueParams `form:"annual_revenue" json:"annual_revenue,omitempty"`
+ // A document verifying the business.
+ Documents *V2CoreAccountCreateIdentityBusinessDetailsDocumentsParams `form:"documents" json:"documents,omitempty"`
+ // The name which is used by the business.
+ DoingBusinessAs *string `form:"doing_business_as" json:"doing_business_as,omitempty"`
+ // An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ EstimatedWorkerCount *int64 `form:"estimated_worker_count" json:"estimated_worker_count,omitempty"`
+ // The ID numbers of a business entity.
+ IDNumbers []*V2CoreAccountCreateIdentityBusinessDetailsIDNumberParams `form:"id_numbers" json:"id_numbers,omitempty"`
+ // An estimate of the monthly revenue of the business.
+ MonthlyEstimatedRevenue *V2CoreAccountCreateIdentityBusinessDetailsMonthlyEstimatedRevenueParams `form:"monthly_estimated_revenue" json:"monthly_estimated_revenue,omitempty"`
+ // The phone number of the Business Entity.
+ Phone *string `form:"phone" json:"phone,omitempty"`
+ // 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 `form:"product_description" json:"product_description,omitempty"`
+ // The business legal name.
+ RegisteredName *string `form:"registered_name" json:"registered_name,omitempty"`
+ // The business registration address of the business entity in non latin script.
+ ScriptAddresses *V2CoreAccountCreateIdentityBusinessDetailsScriptAddressesParams `form:"script_addresses" json:"script_addresses,omitempty"`
+ // The business legal name in non latin script.
+ ScriptNames *V2CoreAccountCreateIdentityBusinessDetailsScriptNamesParams `form:"script_names" json:"script_names,omitempty"`
+ // The category identifying the legal structure of the business.
+ Structure *string `form:"structure" json:"structure,omitempty"`
+ // The business's publicly available website.
+ URL *string `form:"url" json:"url,omitempty"`
+}
+
+// Additional addresses associated with the individual.
+type V2CoreAccountCreateIdentityIndividualAdditionalAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // Purpose of additional address.
+ Purpose *string `form:"purpose" json:"purpose"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Additional names (e.g. aliases) associated with the individual.
+type V2CoreAccountCreateIdentityIndividualAdditionalNameParams struct {
+ // The person's full name.
+ FullName *string `form:"full_name" json:"full_name,omitempty"`
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The purpose or type of the additional name.
+ Purpose *string `form:"purpose" json:"purpose"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// The individual's residential address.
+type V2CoreAccountCreateIdentityIndividualAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The individual's date of birth.
+type V2CoreAccountCreateIdentityIndividualDateOfBirthParams struct {
+ // The day of birth.
+ Day *int64 `form:"day" json:"day"`
+ // The month of birth.
+ Month *int64 `form:"month" json:"month"`
+ // The year of birth.
+ Year *int64 `form:"year" json:"year"`
+}
+
+// One or more documents that demonstrate proof that this person is authorized to represent the company.
+type V2CoreAccountCreateIdentityIndividualDocumentsCompanyAuthorizationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the person's passport page with photo and personal data.
+type V2CoreAccountCreateIdentityIndividualDocumentsPassportParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+type V2CoreAccountCreateIdentityIndividualDocumentsPrimaryVerificationFrontBackParams struct {
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back" json:"back,omitempty"`
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front" json:"front"`
+}
+
+// An identifying document showing the person's name, either a passport or local ID card.
+type V2CoreAccountCreateIdentityIndividualDocumentsPrimaryVerificationParams struct {
+ // The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+ FrontBack *V2CoreAccountCreateIdentityIndividualDocumentsPrimaryVerificationFrontBackParams `form:"front_back" json:"front_back"`
+ // The format of the verification document. Currently supports `front_back` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+type V2CoreAccountCreateIdentityIndividualDocumentsSecondaryVerificationFrontBackParams struct {
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back" json:"back,omitempty"`
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front" json:"front"`
+}
+
+// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+type V2CoreAccountCreateIdentityIndividualDocumentsSecondaryVerificationParams struct {
+ // The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+ FrontBack *V2CoreAccountCreateIdentityIndividualDocumentsSecondaryVerificationFrontBackParams `form:"front_back" json:"front_back"`
+ // The format of the verification document. Currently supports `front_back` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the person's visa required for living in the country where they are residing.
+type V2CoreAccountCreateIdentityIndividualDocumentsVisaParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// Documents that may be submitted to satisfy various informational requests.
+type V2CoreAccountCreateIdentityIndividualDocumentsParams struct {
+ // One or more documents that demonstrate proof that this person is authorized to represent the company.
+ CompanyAuthorization *V2CoreAccountCreateIdentityIndividualDocumentsCompanyAuthorizationParams `form:"company_authorization" json:"company_authorization,omitempty"`
+ // One or more documents showing the person's passport page with photo and personal data.
+ Passport *V2CoreAccountCreateIdentityIndividualDocumentsPassportParams `form:"passport" json:"passport,omitempty"`
+ // An identifying document showing the person's name, either a passport or local ID card.
+ PrimaryVerification *V2CoreAccountCreateIdentityIndividualDocumentsPrimaryVerificationParams `form:"primary_verification" json:"primary_verification,omitempty"`
+ // A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ SecondaryVerification *V2CoreAccountCreateIdentityIndividualDocumentsSecondaryVerificationParams `form:"secondary_verification" json:"secondary_verification,omitempty"`
+ // One or more documents showing the person's visa required for living in the country where they are residing.
+ Visa *V2CoreAccountCreateIdentityIndividualDocumentsVisaParams `form:"visa" json:"visa,omitempty"`
+}
+
+// The identification numbers (e.g., SSN) associated with the individual.
+type V2CoreAccountCreateIdentityIndividualIDNumberParams struct {
+ // The ID number type of an individual.
+ Type *string `form:"type" json:"type"`
+ // The value of the ID number.
+ Value *string `form:"value" json:"value"`
+}
+
+// The relationship that this individual has with the account's identity.
+type V2CoreAccountCreateIdentityIndividualRelationshipParams struct {
+ // Whether the person is a director of the account's identity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ Director *bool `form:"director" json:"director,omitempty"`
+ // Whether the person has significant responsibility to control, manage, or direct the organization.
+ Executive *bool `form:"executive" json:"executive,omitempty"`
+ // Whether the person is an owner of the account's identity.
+ Owner *bool `form:"owner" json:"owner,omitempty"`
+ // The percent owned by the person of the account's legal entity.
+ PercentOwnership *string `form:"percent_ownership" json:"percent_ownership,omitempty"`
+ // The person's title (e.g., CEO, Support Engineer).
+ Title *string `form:"title" json:"title,omitempty"`
+}
+
+// Kana Address.
+type V2CoreAccountCreateIdentityIndividualScriptAddressesKanaParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Kanji Address.
+type V2CoreAccountCreateIdentityIndividualScriptAddressesKanjiParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The script addresses (e.g., non-Latin characters) associated with the individual.
+type V2CoreAccountCreateIdentityIndividualScriptAddressesParams struct {
+ // Kana Address.
+ Kana *V2CoreAccountCreateIdentityIndividualScriptAddressesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Kanji Address.
+ Kanji *V2CoreAccountCreateIdentityIndividualScriptAddressesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Persons name in kana script.
+type V2CoreAccountCreateIdentityIndividualScriptNamesKanaParams struct {
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// Persons name in kanji script.
+type V2CoreAccountCreateIdentityIndividualScriptNamesKanjiParams struct {
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// The individuals primary name in non latin script.
+type V2CoreAccountCreateIdentityIndividualScriptNamesParams struct {
+ // Persons name in kana script.
+ Kana *V2CoreAccountCreateIdentityIndividualScriptNamesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Persons name in kanji script.
+ Kanji *V2CoreAccountCreateIdentityIndividualScriptNamesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Information about the person represented by the account.
+type V2CoreAccountCreateIdentityIndividualParams struct {
+ // Additional addresses associated with the individual.
+ AdditionalAddresses []*V2CoreAccountCreateIdentityIndividualAdditionalAddressParams `form:"additional_addresses" json:"additional_addresses,omitempty"`
+ // Additional names (e.g. aliases) associated with the individual.
+ AdditionalNames []*V2CoreAccountCreateIdentityIndividualAdditionalNameParams `form:"additional_names" json:"additional_names,omitempty"`
+ // The individual's residential address.
+ Address *V2CoreAccountCreateIdentityIndividualAddressParams `form:"address" json:"address,omitempty"`
+ // The individual's date of birth.
+ DateOfBirth *V2CoreAccountCreateIdentityIndividualDateOfBirthParams `form:"date_of_birth" json:"date_of_birth,omitempty"`
+ // Documents that may be submitted to satisfy various informational requests.
+ Documents *V2CoreAccountCreateIdentityIndividualDocumentsParams `form:"documents" json:"documents,omitempty"`
+ // The individual's email address.
+ Email *string `form:"email" json:"email,omitempty"`
+ // The individual's first name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The identification numbers (e.g., SSN) associated with the individual.
+ IDNumbers []*V2CoreAccountCreateIdentityIndividualIDNumberParams `form:"id_numbers" json:"id_numbers,omitempty"`
+ // The individual's gender (International regulations require either "male" or "female").
+ LegalGender *string `form:"legal_gender" json:"legal_gender,omitempty"`
+ // Set of key-value pairs 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 `form:"metadata" json:"metadata,omitempty"`
+ // The countries where the individual is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Nationalities []*string `form:"nationalities" json:"nationalities,omitempty"`
+ // The individual's phone number.
+ Phone *string `form:"phone" json:"phone,omitempty"`
+ // The individual's political exposure.
+ PoliticalExposure *string `form:"political_exposure" json:"political_exposure,omitempty"`
+ // The relationship that this individual has with the account's identity.
+ Relationship *V2CoreAccountCreateIdentityIndividualRelationshipParams `form:"relationship" json:"relationship,omitempty"`
+ // The script addresses (e.g., non-Latin characters) associated with the individual.
+ ScriptAddresses *V2CoreAccountCreateIdentityIndividualScriptAddressesParams `form:"script_addresses" json:"script_addresses,omitempty"`
+ // The individuals primary name in non latin script.
+ ScriptNames *V2CoreAccountCreateIdentityIndividualScriptNamesParams `form:"script_names" json:"script_names,omitempty"`
+ // The individual's last name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *V2CoreAccountCreateIdentityIndividualParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Information about the company, individual, and business represented by the Account.
+type V2CoreAccountCreateIdentityParams struct {
+ // Attestations from the identity's key people, e.g. owners, executives, directors.
+ Attestations *V2CoreAccountCreateIdentityAttestationsParams `form:"attestations" json:"attestations,omitempty"`
+ // Information about the company or business.
+ BusinessDetails *V2CoreAccountCreateIdentityBusinessDetailsParams `form:"business_details" json:"business_details,omitempty"`
+ // 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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
+ Country *string `form:"country" json:"country,omitempty"`
+ // The entity type.
+ EntityType *string `form:"entity_type" json:"entity_type,omitempty"`
+ // Information about the person represented by the account.
+ Individual *V2CoreAccountCreateIdentityIndividualParams `form:"individual" json:"individual,omitempty"`
+}
+
+// An Account is a representation of a company, individual or other entity that a user interacts with. Accounts contain identifying information about the entity, and configurations that store the features an account has access to. An account can be configured as any or all of the following configurations: Customer, Merchant and/or Recipient.
+type V2CoreAccountCreateParams struct {
+ Params `form:"*"`
+ // An Account Configuration which allows the Account to take on a key persona across Stripe products.
+ Configuration *V2CoreAccountCreateConfigurationParams `form:"configuration" json:"configuration,omitempty"`
+ // The default contact email address for the Account. Required when configuring the account as a merchant or recipient.
+ ContactEmail *string `form:"contact_email" json:"contact_email,omitempty"`
+ // A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account.
+ Dashboard *string `form:"dashboard" json:"dashboard,omitempty"`
+ // Default values to be used on Account Configurations.
+ Defaults *V2CoreAccountCreateDefaultsParams `form:"defaults" json:"defaults,omitempty"`
+ // A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on any invoices sent to the Account.
+ DisplayName *string `form:"display_name" json:"display_name,omitempty"`
+ // Information about the company, individual, and business represented by the Account.
+ Identity *V2CoreAccountCreateIdentityParams `form:"identity" json:"identity,omitempty"`
+ // Additional fields to include in the response.
+ Include []*string `form:"include" json:"include,omitempty"`
+ // Set of key-value pairs 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 `form:"metadata" json:"metadata,omitempty"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *V2CoreAccountCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of an Account.
+type V2CoreAccountRetrieveParams struct {
+ Params `form:"*"`
+ // Additional fields to include in the response.
+ Include []*string `form:"include" json:"include,omitempty"`
+}
+
+// Automatic indirect tax settings to be used when automatic tax calculation is enabled on the customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if automatic tax calculation is possible given the current customer location information.
+type V2CoreAccountUpdateConfigurationCustomerAutomaticIndirectTaxParams struct {
+ // 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”.
+ Exempt *string `form:"exempt" json:"exempt,omitempty"`
+ // A recent IP address of the customer used for tax reporting and tax location inference.
+ IPAddress *string `form:"ip_address" json:"ip_address,omitempty"`
+ // The data source used by Stripe Tax to identify the customer's location - defaults to 'identity_address'. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions.
+ LocationSource *string `form:"location_source" json:"location_source,omitempty"`
+}
+
+// The list of up to 4 default custom fields to be displayed on invoices for this customer.
+type V2CoreAccountUpdateConfigurationCustomerBillingInvoiceCustomFieldParams struct {
+ // The name of the custom field. This may be up to 40 characters.
+ Name *string `form:"name" json:"name"`
+ // The value of the custom field. This may be up to 140 characters. When updating, pass an empty string to remove previously-defined values.
+ Value *string `form:"value" json:"value"`
+}
+
+// Default options for invoice PDF rendering for this customer.
+type V2CoreAccountUpdateConfigurationCustomerBillingInvoiceRenderingParams 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" json:"amount_tax_display,omitempty"`
+ // ID of the invoice rendering template to use for future invoices.
+ Template *string `form:"template" json:"template,omitempty"`
+}
+
+// Default settings used on invoices for this customer.
+type V2CoreAccountUpdateConfigurationCustomerBillingInvoiceParams struct {
+ // The list of up to 4 default custom fields to be displayed on invoices for this customer.
+ CustomFields []*V2CoreAccountUpdateConfigurationCustomerBillingInvoiceCustomFieldParams `form:"custom_fields" json:"custom_fields,omitempty"`
+ // Default footer to be displayed on invoices for this customer.
+ Footer *string `form:"footer" json:"footer,omitempty"`
+ // The sequence to be used on the customer's next invoice. Defaults to 1.
+ NextSequence *int64 `form:"next_sequence" json:"next_sequence,omitempty"`
+ // The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
+ Prefix *string `form:"prefix" json:"prefix,omitempty"`
+ // Default options for invoice PDF rendering for this customer.
+ Rendering *V2CoreAccountUpdateConfigurationCustomerBillingInvoiceRenderingParams `form:"rendering" json:"rendering,omitempty"`
+}
+
+// Billing settings - default settings used for this customer in Billing flows such as Invoices and Subscriptions.
+type V2CoreAccountUpdateConfigurationCustomerBillingParams struct {
+ // ID of a payment method that's attached to the customer, to be used as the customer's default payment method for invoices and subscriptions.
+ DefaultPaymentMethod *string `form:"default_payment_method" json:"default_payment_method,omitempty"`
+ // Default settings used on invoices for this customer.
+ Invoice *V2CoreAccountUpdateConfigurationCustomerBillingInvoiceParams `form:"invoice" json:"invoice,omitempty"`
+}
+
+// Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. Uses the `location_source` field.
+type V2CoreAccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Capabilities that have been requested on the Customer Configuration.
+type V2CoreAccountUpdateConfigurationCustomerCapabilitiesParams struct {
+ // Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. Uses the `location_source` field.
+ AutomaticIndirectTax *V2CoreAccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxParams `form:"automatic_indirect_tax" json:"automatic_indirect_tax,omitempty"`
+}
+
+// The customer's shipping information. Appears on invoices emailed to this customer.
+type V2CoreAccountUpdateConfigurationCustomerShippingParams struct {
+ // Customer shipping address.
+ Address *AddressParams `form:"address" json:"address,omitempty"`
+ // Customer name.
+ Name *string `form:"name" json:"name,omitempty"`
+ // Customer phone (including extension).
+ Phone *string `form:"phone" json:"phone,omitempty"`
+}
+
+// The Customer Configuration allows the Account to be charged.
+type V2CoreAccountUpdateConfigurationCustomerParams struct {
+ // Automatic indirect tax settings to be used when automatic tax calculation is enabled on the customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if automatic tax calculation is possible given the current customer location information.
+ AutomaticIndirectTax *V2CoreAccountUpdateConfigurationCustomerAutomaticIndirectTaxParams `form:"automatic_indirect_tax" json:"automatic_indirect_tax,omitempty"`
+ // Billing settings - default settings used for this customer in Billing flows such as Invoices and Subscriptions.
+ Billing *V2CoreAccountUpdateConfigurationCustomerBillingParams `form:"billing" json:"billing,omitempty"`
+ // Capabilities that have been requested on the Customer Configuration.
+ Capabilities *V2CoreAccountUpdateConfigurationCustomerCapabilitiesParams `form:"capabilities" json:"capabilities,omitempty"`
+ // The customer's shipping information. Appears on invoices emailed to this customer.
+ Shipping *V2CoreAccountUpdateConfigurationCustomerShippingParams `form:"shipping" json:"shipping,omitempty"`
+ // ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and when the Customer Configuration is first set on an Account.
+ TestClock *string `form:"test_clock" json:"test_clock,omitempty"`
+}
+
+// Settings used for Bacs debit payments.
+type V2CoreAccountUpdateConfigurationMerchantBACSDebitPaymentsParams struct {
+ // Display name for Bacs debit payments.
+ DisplayName *string `form:"display_name" json:"display_name,omitempty"`
+}
+
+// Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and other products.
+type V2CoreAccountUpdateConfigurationMerchantBrandingParams struct {
+ // ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): An icon for the merchant. Must be square and at least 128px x 128px.
+ Icon *string `form:"icon" json:"icon,omitempty"`
+ // ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px.
+ Logo *string `form:"logo" json:"logo,omitempty"`
+ // A CSS hex color value representing the primary branding color for the merchant.
+ PrimaryColor *string `form:"primary_color" json:"primary_color,omitempty"`
+ // A CSS hex color value representing the secondary branding color for the merchant.
+ SecondaryColor *string `form:"secondary_color" json:"secondary_color,omitempty"`
+}
+
+// Allow the merchant to process ACH debit payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesACHDebitPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process ACSS debit payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesACSSDebitPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Affirm payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Afterpay/Clearpay payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Alma payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Amazon Pay payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Australian BECS Direct Debit payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesAUBECSDebitPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process BACS Direct Debit payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesBACSDebitPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Bancontact payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process BLIK payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesBLIKPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Boleto payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to collect card payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesCardPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Cartes Bancaires payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Cash App payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesCashAppPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process EPS payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesEPSPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process FPX payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesFPXPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process UK bank transfer payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesGBBankTransferPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process GrabPay payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process iDEAL payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesIDEALPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process JCB card payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesJCBPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Japanese bank transfer payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesJPBankTransferPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Kakao Pay payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Klarna payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Konbini convenience store payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Korean card payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Link payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process MobilePay payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Multibanco payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Mexican bank transfer payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesMXBankTransferPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Naver Pay payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process OXXO payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesOXXOPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Przelewy24 (P24) payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesP24PaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Pay by Bank payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process PAYCO payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process PayNow payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesPayNowPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process PromptPay payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesPromptPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Revolut Pay payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Samsung Pay payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process SEPA bank transfer payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesSEPABankTransferPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process SEPA Direct Debit payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesSEPADebitPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Swish payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process TWINT payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesTWINTPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process US bank transfer payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesUSBankTransferPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allow the merchant to process Zip payments.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesZipPaymentsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Capabilities to request on the Merchant Configuration.
+type V2CoreAccountUpdateConfigurationMerchantCapabilitiesParams struct {
+ // Allow the merchant to process ACH debit payments.
+ ACHDebitPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesACHDebitPaymentsParams `form:"ach_debit_payments" json:"ach_debit_payments,omitempty"`
+ // Allow the merchant to process ACSS debit payments.
+ ACSSDebitPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesACSSDebitPaymentsParams `form:"acss_debit_payments" json:"acss_debit_payments,omitempty"`
+ // Allow the merchant to process Affirm payments.
+ AffirmPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesAffirmPaymentsParams `form:"affirm_payments" json:"affirm_payments,omitempty"`
+ // Allow the merchant to process Afterpay/Clearpay payments.
+ AfterpayClearpayPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesAfterpayClearpayPaymentsParams `form:"afterpay_clearpay_payments" json:"afterpay_clearpay_payments,omitempty"`
+ // Allow the merchant to process Alma payments.
+ AlmaPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesAlmaPaymentsParams `form:"alma_payments" json:"alma_payments,omitempty"`
+ // Allow the merchant to process Amazon Pay payments.
+ AmazonPayPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesAmazonPayPaymentsParams `form:"amazon_pay_payments" json:"amazon_pay_payments,omitempty"`
+ // Allow the merchant to process Australian BECS Direct Debit payments.
+ AUBECSDebitPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesAUBECSDebitPaymentsParams `form:"au_becs_debit_payments" json:"au_becs_debit_payments,omitempty"`
+ // Allow the merchant to process BACS Direct Debit payments.
+ BACSDebitPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesBACSDebitPaymentsParams `form:"bacs_debit_payments" json:"bacs_debit_payments,omitempty"`
+ // Allow the merchant to process Bancontact payments.
+ BancontactPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesBancontactPaymentsParams `form:"bancontact_payments" json:"bancontact_payments,omitempty"`
+ // Allow the merchant to process BLIK payments.
+ BLIKPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesBLIKPaymentsParams `form:"blik_payments" json:"blik_payments,omitempty"`
+ // Allow the merchant to process Boleto payments.
+ BoletoPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesBoletoPaymentsParams `form:"boleto_payments" json:"boleto_payments,omitempty"`
+ // Allow the merchant to collect card payments.
+ CardPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesCardPaymentsParams `form:"card_payments" json:"card_payments,omitempty"`
+ // Allow the merchant to process Cartes Bancaires payments.
+ CartesBancairesPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesCartesBancairesPaymentsParams `form:"cartes_bancaires_payments" json:"cartes_bancaires_payments,omitempty"`
+ // Allow the merchant to process Cash App payments.
+ CashAppPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesCashAppPaymentsParams `form:"cashapp_payments" json:"cashapp_payments,omitempty"`
+ // Allow the merchant to process EPS payments.
+ EPSPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesEPSPaymentsParams `form:"eps_payments" json:"eps_payments,omitempty"`
+ // Allow the merchant to process FPX payments.
+ FPXPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesFPXPaymentsParams `form:"fpx_payments" json:"fpx_payments,omitempty"`
+ // Allow the merchant to process UK bank transfer payments.
+ GBBankTransferPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesGBBankTransferPaymentsParams `form:"gb_bank_transfer_payments" json:"gb_bank_transfer_payments,omitempty"`
+ // Allow the merchant to process GrabPay payments.
+ GrabpayPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesGrabpayPaymentsParams `form:"grabpay_payments" json:"grabpay_payments,omitempty"`
+ // Allow the merchant to process iDEAL payments.
+ IDEALPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesIDEALPaymentsParams `form:"ideal_payments" json:"ideal_payments,omitempty"`
+ // Allow the merchant to process JCB card payments.
+ JCBPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesJCBPaymentsParams `form:"jcb_payments" json:"jcb_payments,omitempty"`
+ // Allow the merchant to process Japanese bank transfer payments.
+ JPBankTransferPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesJPBankTransferPaymentsParams `form:"jp_bank_transfer_payments" json:"jp_bank_transfer_payments,omitempty"`
+ // Allow the merchant to process Kakao Pay payments.
+ KakaoPayPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesKakaoPayPaymentsParams `form:"kakao_pay_payments" json:"kakao_pay_payments,omitempty"`
+ // Allow the merchant to process Klarna payments.
+ KlarnaPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesKlarnaPaymentsParams `form:"klarna_payments" json:"klarna_payments,omitempty"`
+ // Allow the merchant to process Konbini convenience store payments.
+ KonbiniPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesKonbiniPaymentsParams `form:"konbini_payments" json:"konbini_payments,omitempty"`
+ // Allow the merchant to process Korean card payments.
+ KrCardPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesKrCardPaymentsParams `form:"kr_card_payments" json:"kr_card_payments,omitempty"`
+ // Allow the merchant to process Link payments.
+ LinkPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesLinkPaymentsParams `form:"link_payments" json:"link_payments,omitempty"`
+ // Allow the merchant to process MobilePay payments.
+ MobilepayPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesMobilepayPaymentsParams `form:"mobilepay_payments" json:"mobilepay_payments,omitempty"`
+ // Allow the merchant to process Multibanco payments.
+ MultibancoPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesMultibancoPaymentsParams `form:"multibanco_payments" json:"multibanco_payments,omitempty"`
+ // Allow the merchant to process Mexican bank transfer payments.
+ MXBankTransferPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesMXBankTransferPaymentsParams `form:"mx_bank_transfer_payments" json:"mx_bank_transfer_payments,omitempty"`
+ // Allow the merchant to process Naver Pay payments.
+ NaverPayPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesNaverPayPaymentsParams `form:"naver_pay_payments" json:"naver_pay_payments,omitempty"`
+ // Allow the merchant to process OXXO payments.
+ OXXOPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesOXXOPaymentsParams `form:"oxxo_payments" json:"oxxo_payments,omitempty"`
+ // Allow the merchant to process Przelewy24 (P24) payments.
+ P24Payments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesP24PaymentsParams `form:"p24_payments" json:"p24_payments,omitempty"`
+ // Allow the merchant to process Pay by Bank payments.
+ PayByBankPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesPayByBankPaymentsParams `form:"pay_by_bank_payments" json:"pay_by_bank_payments,omitempty"`
+ // Allow the merchant to process PAYCO payments.
+ PaycoPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesPaycoPaymentsParams `form:"payco_payments" json:"payco_payments,omitempty"`
+ // Allow the merchant to process PayNow payments.
+ PayNowPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesPayNowPaymentsParams `form:"paynow_payments" json:"paynow_payments,omitempty"`
+ // Allow the merchant to process PromptPay payments.
+ PromptPayPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesPromptPayPaymentsParams `form:"promptpay_payments" json:"promptpay_payments,omitempty"`
+ // Allow the merchant to process Revolut Pay payments.
+ RevolutPayPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesRevolutPayPaymentsParams `form:"revolut_pay_payments" json:"revolut_pay_payments,omitempty"`
+ // Allow the merchant to process Samsung Pay payments.
+ SamsungPayPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesSamsungPayPaymentsParams `form:"samsung_pay_payments" json:"samsung_pay_payments,omitempty"`
+ // Allow the merchant to process SEPA bank transfer payments.
+ SEPABankTransferPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesSEPABankTransferPaymentsParams `form:"sepa_bank_transfer_payments" json:"sepa_bank_transfer_payments,omitempty"`
+ // Allow the merchant to process SEPA Direct Debit payments.
+ SEPADebitPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesSEPADebitPaymentsParams `form:"sepa_debit_payments" json:"sepa_debit_payments,omitempty"`
+ // Allow the merchant to process Swish payments.
+ SwishPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesSwishPaymentsParams `form:"swish_payments" json:"swish_payments,omitempty"`
+ // Allow the merchant to process TWINT payments.
+ TWINTPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesTWINTPaymentsParams `form:"twint_payments" json:"twint_payments,omitempty"`
+ // Allow the merchant to process US bank transfer payments.
+ USBankTransferPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesUSBankTransferPaymentsParams `form:"us_bank_transfer_payments" json:"us_bank_transfer_payments,omitempty"`
+ // Allow the merchant to process Zip payments.
+ ZipPayments *V2CoreAccountUpdateConfigurationMerchantCapabilitiesZipPaymentsParams `form:"zip_payments" json:"zip_payments,omitempty"`
+}
+
+// Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+type V2CoreAccountUpdateConfigurationMerchantCardPaymentsDeclineOnParams 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" json:"avs_failure,omitempty"`
+ // 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" json:"cvc_failure,omitempty"`
+}
+
+// Card payments settings.
+type V2CoreAccountUpdateConfigurationMerchantCardPaymentsParams struct {
+ // Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge.
+ DeclineOn *V2CoreAccountUpdateConfigurationMerchantCardPaymentsDeclineOnParams `form:"decline_on" json:"decline_on,omitempty"`
+}
+
+// Statement descriptor.
+type V2CoreAccountUpdateConfigurationMerchantStatementDescriptorParams 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 Merchant Configuration settings documentation.
+ Descriptor *string `form:"descriptor" json:"descriptor,omitempty"`
+ // Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation.
+ Prefix *string `form:"prefix" json:"prefix,omitempty"`
+}
+
+// A publicly available mailing address for sending support issues to.
+type V2CoreAccountUpdateConfigurationMerchantSupportAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Publicly available contact information for sending support issues to.
+type V2CoreAccountUpdateConfigurationMerchantSupportParams struct {
+ // A publicly available mailing address for sending support issues to.
+ Address *V2CoreAccountUpdateConfigurationMerchantSupportAddressParams `form:"address" json:"address,omitempty"`
+ // A publicly available email address for sending support issues to.
+ Email *string `form:"email" json:"email,omitempty"`
+ // A publicly available phone number to call with support issues.
+ Phone *string `form:"phone" json:"phone,omitempty"`
+ // A publicly available website for handling support issues.
+ URL *string `form:"url" json:"url,omitempty"`
+}
+
+// The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you've completed onboarding as a Connect platform.
+type V2CoreAccountUpdateConfigurationMerchantParams struct {
+ // Settings used for Bacs debit payments.
+ BACSDebitPayments *V2CoreAccountUpdateConfigurationMerchantBACSDebitPaymentsParams `form:"bacs_debit_payments" json:"bacs_debit_payments,omitempty"`
+ // Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and other products.
+ Branding *V2CoreAccountUpdateConfigurationMerchantBrandingParams `form:"branding" json:"branding,omitempty"`
+ // Capabilities to request on the Merchant Configuration.
+ Capabilities *V2CoreAccountUpdateConfigurationMerchantCapabilitiesParams `form:"capabilities" json:"capabilities,omitempty"`
+ // Card payments settings.
+ CardPayments *V2CoreAccountUpdateConfigurationMerchantCardPaymentsParams `form:"card_payments" json:"card_payments,omitempty"`
+ // The merchant category code for the merchant. MCCs are used to classify businesses based on the goods or services they provide.
+ MCC *string `form:"mcc" json:"mcc,omitempty"`
+ // Statement descriptor.
+ StatementDescriptor *V2CoreAccountUpdateConfigurationMerchantStatementDescriptorParams `form:"statement_descriptor" json:"statement_descriptor,omitempty"`
+ // Publicly available contact information for sending support issues to.
+ Support *V2CoreAccountUpdateConfigurationMerchantSupportParams `form:"support" json:"support,omitempty"`
+}
+
+// Enables this Account to receive OutboundPayments to linked bank accounts over local networks.
+type V2CoreAccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Enables this Account to receive OutboundPayments to linked bank accounts over wire.
+type V2CoreAccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Capabilities that enable OutboundPayments to a bank account linked to this Account.
+type V2CoreAccountUpdateConfigurationRecipientCapabilitiesBankAccountsParams struct {
+ // Enables this Account to receive OutboundPayments to linked bank accounts over local networks.
+ Local *V2CoreAccountUpdateConfigurationRecipientCapabilitiesBankAccountsLocalParams `form:"local" json:"local,omitempty"`
+ // Enables this Account to receive OutboundPayments to linked bank accounts over wire.
+ Wire *V2CoreAccountUpdateConfigurationRecipientCapabilitiesBankAccountsWireParams `form:"wire" json:"wire,omitempty"`
+}
+
+// Capability that enable OutboundPayments to a debit card linked to this Account.
+type V2CoreAccountUpdateConfigurationRecipientCapabilitiesCardsParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Allows the recipient to receive /v1/transfers into their Stripe Balance (/v1/balance).
+type V2CoreAccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersParams struct {
+ // To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ Requested *bool `form:"requested" json:"requested,omitempty"`
+}
+
+// Capabilities that enable the recipient to receive money into their Stripe Balance (/v1/balance).
+type V2CoreAccountUpdateConfigurationRecipientCapabilitiesStripeBalanceParams struct {
+ // Allows the recipient to receive /v1/transfers into their Stripe Balance (/v1/balance).
+ StripeTransfers *V2CoreAccountUpdateConfigurationRecipientCapabilitiesStripeBalanceStripeTransfersParams `form:"stripe_transfers" json:"stripe_transfers,omitempty"`
+}
+
+// Capabilities to request on the Recipient Configuration.
+type V2CoreAccountUpdateConfigurationRecipientCapabilitiesParams struct {
+ // Capabilities that enable OutboundPayments to a bank account linked to this Account.
+ BankAccounts *V2CoreAccountUpdateConfigurationRecipientCapabilitiesBankAccountsParams `form:"bank_accounts" json:"bank_accounts,omitempty"`
+ // Capability that enable OutboundPayments to a debit card linked to this Account.
+ Cards *V2CoreAccountUpdateConfigurationRecipientCapabilitiesCardsParams `form:"cards" json:"cards,omitempty"`
+ // Capabilities that enable the recipient to receive money into their Stripe Balance (/v1/balance).
+ StripeBalance *V2CoreAccountUpdateConfigurationRecipientCapabilitiesStripeBalanceParams `form:"stripe_balance" json:"stripe_balance,omitempty"`
+}
+
+// The Recipient Configuration allows the Account to receive funds.
+type V2CoreAccountUpdateConfigurationRecipientParams struct {
+ // Capabilities to request on the Recipient Configuration.
+ Capabilities *V2CoreAccountUpdateConfigurationRecipientCapabilitiesParams `form:"capabilities" json:"capabilities,omitempty"`
+ // The payout method id to be used as a default outbound destination. This will allow the PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via dashboard. Can also be explicitly set to `null` to clear the existing default outbound destination.
+ DefaultOutboundDestination *string `form:"default_outbound_destination" json:"default_outbound_destination,omitempty"`
+}
+
+// An Account Configuration which allows the Account to take on a key persona across Stripe products.
+type V2CoreAccountUpdateConfigurationParams struct {
+ // The Customer Configuration allows the Account to be charged.
+ Customer *V2CoreAccountUpdateConfigurationCustomerParams `form:"customer" json:"customer,omitempty"`
+ // The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you've completed onboarding as a Connect platform.
+ Merchant *V2CoreAccountUpdateConfigurationMerchantParams `form:"merchant" json:"merchant,omitempty"`
+ // The Recipient Configuration allows the Account to receive funds.
+ Recipient *V2CoreAccountUpdateConfigurationRecipientParams `form:"recipient" json:"recipient,omitempty"`
+}
+
+// Default responsibilities held by either Stripe or the platform.
+type V2CoreAccountUpdateDefaultsResponsibilitiesParams struct {
+ // A value indicating the party responsible for collecting fees from this account.
+ FeesCollector *string `form:"fees_collector" json:"fees_collector"`
+ // A value indicating who is responsible for losses when this Account can't pay back negative balances from payments.
+ LossesCollector *string `form:"losses_collector" json:"losses_collector"`
+}
+
+// Default values to be used on Account Configurations.
+type V2CoreAccountUpdateDefaultsParams 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" json:"currency,omitempty"`
+ // The Account's preferred locales (languages), ordered by preference.
+ Locales []*string `form:"locales" json:"locales,omitempty"`
+ // Default responsibilities held by either Stripe or the platform.
+ Responsibilities *V2CoreAccountUpdateDefaultsResponsibilitiesParams `form:"responsibilities" json:"responsibilities,omitempty"`
+}
+
+// This hash is used to attest that the directors information provided to Stripe is both current and correct.
+type V2CoreAccountUpdateIdentityAttestationsDirectorshipDeclarationParams struct {
+ // The time marking when the director attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
+ Date *time.Time `form:"date" json:"date,omitempty"`
+ // The IP address from which the director attestation was made.
+ IP *string `form:"ip" json:"ip,omitempty"`
+ // The user agent of the browser from which the director attestation was made.
+ UserAgent *string `form:"user_agent" json:"user_agent,omitempty"`
+}
+
+// This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+type V2CoreAccountUpdateIdentityAttestationsOwnershipDeclarationParams struct {
+ // The time marking when the beneficial owner attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
+ Date *time.Time `form:"date" json:"date,omitempty"`
+ // The IP address from which the beneficial owner attestation was made.
+ IP *string `form:"ip" json:"ip,omitempty"`
+ // The user agent of the browser from which the beneficial owner attestation was made.
+ UserAgent *string `form:"user_agent" json:"user_agent,omitempty"`
+}
+
+// Attestation that all Persons with a specific Relationship value have been provided.
+type V2CoreAccountUpdateIdentityAttestationsPersonsProvidedParams struct {
+ // 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://docs.stripe.com/api/v2/core/accounts/createperson).
+ Directors *bool `form:"directors" json:"directors,omitempty"`
+ // 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://docs.stripe.com/api/v2/core/accounts/createperson).
+ Executives *bool `form:"executives" json:"executives,omitempty"`
+ // 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://docs.stripe.com/api/v2/core/accounts/createperson).
+ Owners *bool `form:"owners" json:"owners,omitempty"`
+ // Reason for why the company is exempt from providing ownership information.
+ OwnershipExemptionReason *string `form:"ownership_exemption_reason" json:"ownership_exemption_reason,omitempty"`
+}
+
+// Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance).
+type V2CoreAccountUpdateIdentityAttestationsTermsOfServiceAccountParams struct {
+ // The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
+ Date *time.Time `form:"date" json:"date,omitempty"`
+ // The IP address from which the Account's representative accepted the terms of service.
+ IP *string `form:"ip" json:"ip,omitempty"`
+ // The user agent of the browser from which the Account's representative accepted the terms of service.
+ UserAgent *string `form:"user_agent" json:"user_agent,omitempty"`
+}
+
+// Attestations of accepted terms of service agreements.
+type V2CoreAccountUpdateIdentityAttestationsTermsOfServiceParams struct {
+ // Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance).
+ Account *V2CoreAccountUpdateIdentityAttestationsTermsOfServiceAccountParams `form:"account" json:"account,omitempty"`
+}
+
+// Attestations from the identity's key people, e.g. owners, executives, directors.
+type V2CoreAccountUpdateIdentityAttestationsParams struct {
+ // This hash is used to attest that the directors information provided to Stripe is both current and correct.
+ DirectorshipDeclaration *V2CoreAccountUpdateIdentityAttestationsDirectorshipDeclarationParams `form:"directorship_declaration" json:"directorship_declaration,omitempty"`
+ // This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct.
+ OwnershipDeclaration *V2CoreAccountUpdateIdentityAttestationsOwnershipDeclarationParams `form:"ownership_declaration" json:"ownership_declaration,omitempty"`
+ // Attestation that all Persons with a specific Relationship value have been provided.
+ PersonsProvided *V2CoreAccountUpdateIdentityAttestationsPersonsProvidedParams `form:"persons_provided" json:"persons_provided,omitempty"`
+ // Attestations of accepted terms of service agreements.
+ TermsOfService *V2CoreAccountUpdateIdentityAttestationsTermsOfServiceParams `form:"terms_of_service" json:"terms_of_service,omitempty"`
+}
+
+// The business registration address of the business entity.
+type V2CoreAccountUpdateIdentityBusinessDetailsAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The business gross annual revenue for its preceding fiscal year.
+type V2CoreAccountUpdateIdentityBusinessDetailsAnnualRevenueParams struct {
+ // A non-negative integer representing the amount in the smallest currency unit.
+ Amount *Amount `form:"amount" json:"amount,omitempty"`
+ // 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" json:"fiscal_year_end,omitempty"`
+}
+
+// One or more documents that support the 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 V2CoreAccountUpdateIdentityBusinessDetailsDocumentsBankAccountOwnershipVerificationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents that demonstrate proof of a company's license to operate.
+type V2CoreAccountUpdateIdentityBusinessDetailsDocumentsCompanyLicenseParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the company's Memorandum of Association.
+type V2CoreAccountUpdateIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// Certain countries only: One or more documents showing the ministerial decree legalizing the company's establishment.
+type V2CoreAccountUpdateIdentityBusinessDetailsDocumentsCompanyMinisterialDecreeParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+type V2CoreAccountUpdateIdentityBusinessDetailsDocumentsCompanyRegistrationVerificationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents that demonstrate proof of a company's tax ID.
+type V2CoreAccountUpdateIdentityBusinessDetailsDocumentsCompanyTaxIDVerificationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+type V2CoreAccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBackParams struct {
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back" json:"back,omitempty"`
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front" json:"front,omitempty"`
+}
+
+// A document verifying the business.
+type V2CoreAccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationParams struct {
+ // The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+ FrontBack *V2CoreAccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBackParams `form:"front_back" json:"front_back"`
+ // The format of the verification document. Currently supports `front_back` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the company's proof of registration with the national business registry.
+type V2CoreAccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents that demonstrate proof of ultimate beneficial ownership.
+type V2CoreAccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// A document verifying the business.
+type V2CoreAccountUpdateIdentityBusinessDetailsDocumentsParams struct {
+ // One or more documents that support the 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 *V2CoreAccountUpdateIdentityBusinessDetailsDocumentsBankAccountOwnershipVerificationParams `form:"bank_account_ownership_verification" json:"bank_account_ownership_verification,omitempty"`
+ // One or more documents that demonstrate proof of a company's license to operate.
+ CompanyLicense *V2CoreAccountUpdateIdentityBusinessDetailsDocumentsCompanyLicenseParams `form:"company_license" json:"company_license,omitempty"`
+ // One or more documents showing the company's Memorandum of Association.
+ CompanyMemorandumOfAssociation *V2CoreAccountUpdateIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociationParams `form:"company_memorandum_of_association" json:"company_memorandum_of_association,omitempty"`
+ // Certain countries only: One or more documents showing the ministerial decree legalizing the company's establishment.
+ CompanyMinisterialDecree *V2CoreAccountUpdateIdentityBusinessDetailsDocumentsCompanyMinisterialDecreeParams `form:"company_ministerial_decree" json:"company_ministerial_decree,omitempty"`
+ // One or more documents that demonstrate proof of a company's registration with the appropriate local authorities.
+ CompanyRegistrationVerification *V2CoreAccountUpdateIdentityBusinessDetailsDocumentsCompanyRegistrationVerificationParams `form:"company_registration_verification" json:"company_registration_verification,omitempty"`
+ // One or more documents that demonstrate proof of a company's tax ID.
+ CompanyTaxIDVerification *V2CoreAccountUpdateIdentityBusinessDetailsDocumentsCompanyTaxIDVerificationParams `form:"company_tax_id_verification" json:"company_tax_id_verification,omitempty"`
+ // A document verifying the business.
+ PrimaryVerification *V2CoreAccountUpdateIdentityBusinessDetailsDocumentsPrimaryVerificationParams `form:"primary_verification" json:"primary_verification,omitempty"`
+ // One or more documents showing the company's proof of registration with the national business registry.
+ ProofOfRegistration *V2CoreAccountUpdateIdentityBusinessDetailsDocumentsProofOfRegistrationParams `form:"proof_of_registration" json:"proof_of_registration,omitempty"`
+ // One or more documents that demonstrate proof of ultimate beneficial ownership.
+ ProofOfUltimateBeneficialOwnership *V2CoreAccountUpdateIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipParams `form:"proof_of_ultimate_beneficial_ownership" json:"proof_of_ultimate_beneficial_ownership,omitempty"`
+}
+
+// The ID numbers of a business entity.
+type V2CoreAccountUpdateIdentityBusinessDetailsIDNumberParams struct {
+ // The registrar of the ID number (Only valid for DE ID number types).
+ Registrar *string `form:"registrar" json:"registrar,omitempty"`
+ // Open Enum. The ID number type of a business entity.
+ Type *string `form:"type" json:"type"`
+ // The value of the ID number.
+ Value *string `form:"value" json:"value"`
+}
+
+// An estimate of the monthly revenue of the business.
+type V2CoreAccountUpdateIdentityBusinessDetailsMonthlyEstimatedRevenueParams struct {
+ // A non-negative integer representing the amount in the smallest currency unit.
+ Amount *Amount `form:"amount" json:"amount,omitempty"`
+}
+
+// Kana Address.
+type V2CoreAccountUpdateIdentityBusinessDetailsScriptAddressesKanaParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Kanji Address.
+type V2CoreAccountUpdateIdentityBusinessDetailsScriptAddressesKanjiParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The business registration address of the business entity in non latin script.
+type V2CoreAccountUpdateIdentityBusinessDetailsScriptAddressesParams struct {
+ // Kana Address.
+ Kana *V2CoreAccountUpdateIdentityBusinessDetailsScriptAddressesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Kanji Address.
+ Kanji *V2CoreAccountUpdateIdentityBusinessDetailsScriptAddressesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Kana name.
+type V2CoreAccountUpdateIdentityBusinessDetailsScriptNamesKanaParams struct {
+ // Registered name of the business.
+ RegisteredName *string `form:"registered_name" json:"registered_name,omitempty"`
+}
+
+// Kanji name.
+type V2CoreAccountUpdateIdentityBusinessDetailsScriptNamesKanjiParams struct {
+ // Registered name of the business.
+ RegisteredName *string `form:"registered_name" json:"registered_name,omitempty"`
+}
+
+// The business legal name in non latin script.
+type V2CoreAccountUpdateIdentityBusinessDetailsScriptNamesParams struct {
+ // Kana name.
+ Kana *V2CoreAccountUpdateIdentityBusinessDetailsScriptNamesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Kanji name.
+ Kanji *V2CoreAccountUpdateIdentityBusinessDetailsScriptNamesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Information about the company or business.
+type V2CoreAccountUpdateIdentityBusinessDetailsParams struct {
+ // The business registration address of the business entity.
+ Address *V2CoreAccountUpdateIdentityBusinessDetailsAddressParams `form:"address" json:"address,omitempty"`
+ // The business gross annual revenue for its preceding fiscal year.
+ AnnualRevenue *V2CoreAccountUpdateIdentityBusinessDetailsAnnualRevenueParams `form:"annual_revenue" json:"annual_revenue,omitempty"`
+ // A document verifying the business.
+ Documents *V2CoreAccountUpdateIdentityBusinessDetailsDocumentsParams `form:"documents" json:"documents,omitempty"`
+ // The name which is used by the business.
+ DoingBusinessAs *string `form:"doing_business_as" json:"doing_business_as,omitempty"`
+ // An estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
+ EstimatedWorkerCount *int64 `form:"estimated_worker_count" json:"estimated_worker_count,omitempty"`
+ // The ID numbers of a business entity.
+ IDNumbers []*V2CoreAccountUpdateIdentityBusinessDetailsIDNumberParams `form:"id_numbers" json:"id_numbers,omitempty"`
+ // An estimate of the monthly revenue of the business.
+ MonthlyEstimatedRevenue *V2CoreAccountUpdateIdentityBusinessDetailsMonthlyEstimatedRevenueParams `form:"monthly_estimated_revenue" json:"monthly_estimated_revenue,omitempty"`
+ // The phone number of the Business Entity.
+ Phone *string `form:"phone" json:"phone,omitempty"`
+ // 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 `form:"product_description" json:"product_description,omitempty"`
+ // The business legal name.
+ RegisteredName *string `form:"registered_name" json:"registered_name,omitempty"`
+ // The business registration address of the business entity in non latin script.
+ ScriptAddresses *V2CoreAccountUpdateIdentityBusinessDetailsScriptAddressesParams `form:"script_addresses" json:"script_addresses,omitempty"`
+ // The business legal name in non latin script.
+ ScriptNames *V2CoreAccountUpdateIdentityBusinessDetailsScriptNamesParams `form:"script_names" json:"script_names,omitempty"`
+ // The category identifying the legal structure of the business.
+ Structure *string `form:"structure" json:"structure,omitempty"`
+ // The business's publicly available website.
+ URL *string `form:"url" json:"url,omitempty"`
+}
+
+// Additional addresses associated with the individual.
+type V2CoreAccountUpdateIdentityIndividualAdditionalAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // Purpose of additional address.
+ Purpose *string `form:"purpose" json:"purpose"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Additional names (e.g. aliases) associated with the individual.
+type V2CoreAccountUpdateIdentityIndividualAdditionalNameParams struct {
+ // The person's full name.
+ FullName *string `form:"full_name" json:"full_name,omitempty"`
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The purpose or type of the additional name.
+ Purpose *string `form:"purpose" json:"purpose"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// The individual's residential address.
+type V2CoreAccountUpdateIdentityIndividualAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The individual's date of birth.
+type V2CoreAccountUpdateIdentityIndividualDateOfBirthParams struct {
+ // The day of the birth.
+ Day *int64 `form:"day" json:"day"`
+ // The month of birth.
+ Month *int64 `form:"month" json:"month"`
+ // The year of birth.
+ Year *int64 `form:"year" json:"year"`
+}
+
+// One or more documents that demonstrate proof that this person is authorized to represent the company.
+type V2CoreAccountUpdateIdentityIndividualDocumentsCompanyAuthorizationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the person's passport page with photo and personal data.
+type V2CoreAccountUpdateIdentityIndividualDocumentsPassportParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+type V2CoreAccountUpdateIdentityIndividualDocumentsPrimaryVerificationFrontBackParams struct {
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back" json:"back,omitempty"`
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front" json:"front,omitempty"`
+}
+
+// An identifying document showing the person's name, either a passport or local ID card.
+type V2CoreAccountUpdateIdentityIndividualDocumentsPrimaryVerificationParams struct {
+ // The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+ FrontBack *V2CoreAccountUpdateIdentityIndividualDocumentsPrimaryVerificationFrontBackParams `form:"front_back" json:"front_back"`
+ // The format of the verification document. Currently supports `front_back` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+type V2CoreAccountUpdateIdentityIndividualDocumentsSecondaryVerificationFrontBackParams struct {
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back" json:"back,omitempty"`
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front" json:"front,omitempty"`
+}
+
+// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+type V2CoreAccountUpdateIdentityIndividualDocumentsSecondaryVerificationParams struct {
+ // The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+ FrontBack *V2CoreAccountUpdateIdentityIndividualDocumentsSecondaryVerificationFrontBackParams `form:"front_back" json:"front_back"`
+ // The format of the verification document. Currently supports `front_back` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the person's visa required for living in the country where they are residing.
+type V2CoreAccountUpdateIdentityIndividualDocumentsVisaParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// Documents that may be submitted to satisfy various informational requests.
+type V2CoreAccountUpdateIdentityIndividualDocumentsParams struct {
+ // One or more documents that demonstrate proof that this person is authorized to represent the company.
+ CompanyAuthorization *V2CoreAccountUpdateIdentityIndividualDocumentsCompanyAuthorizationParams `form:"company_authorization" json:"company_authorization,omitempty"`
+ // One or more documents showing the person's passport page with photo and personal data.
+ Passport *V2CoreAccountUpdateIdentityIndividualDocumentsPassportParams `form:"passport" json:"passport,omitempty"`
+ // An identifying document showing the person's name, either a passport or local ID card.
+ PrimaryVerification *V2CoreAccountUpdateIdentityIndividualDocumentsPrimaryVerificationParams `form:"primary_verification" json:"primary_verification,omitempty"`
+ // A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ SecondaryVerification *V2CoreAccountUpdateIdentityIndividualDocumentsSecondaryVerificationParams `form:"secondary_verification" json:"secondary_verification,omitempty"`
+ // One or more documents showing the person's visa required for living in the country where they are residing.
+ Visa *V2CoreAccountUpdateIdentityIndividualDocumentsVisaParams `form:"visa" json:"visa,omitempty"`
+}
+
+// The identification numbers (e.g., SSN) associated with the individual.
+type V2CoreAccountUpdateIdentityIndividualIDNumberParams struct {
+ // The ID number type of an individual.
+ Type *string `form:"type" json:"type"`
+ // The value of the ID number.
+ Value *string `form:"value" json:"value"`
+}
+
+// The relationship that this individual has with the account's identity.
+type V2CoreAccountUpdateIdentityIndividualRelationshipParams struct {
+ // Whether the person is a director of the account's identity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations.
+ Director *bool `form:"director" json:"director,omitempty"`
+ // Whether the person has significant responsibility to control, manage, or direct the organization.
+ Executive *bool `form:"executive" json:"executive,omitempty"`
+ // Whether the person is an owner of the account's identity.
+ Owner *bool `form:"owner" json:"owner,omitempty"`
+ // The percent owned by the person of the account's legal entity.
+ PercentOwnership *string `form:"percent_ownership" json:"percent_ownership,omitempty"`
+ // The person's title (e.g., CEO, Support Engineer).
+ Title *string `form:"title" json:"title,omitempty"`
+}
+
+// Kana Address.
+type V2CoreAccountUpdateIdentityIndividualScriptAddressesKanaParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Kanji Address.
+type V2CoreAccountUpdateIdentityIndividualScriptAddressesKanjiParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The script addresses (e.g., non-Latin characters) associated with the individual.
+type V2CoreAccountUpdateIdentityIndividualScriptAddressesParams struct {
+ // Kana Address.
+ Kana *V2CoreAccountUpdateIdentityIndividualScriptAddressesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Kanji Address.
+ Kanji *V2CoreAccountUpdateIdentityIndividualScriptAddressesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Persons name in kana script.
+type V2CoreAccountUpdateIdentityIndividualScriptNamesKanaParams struct {
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// Persons name in kanji script.
+type V2CoreAccountUpdateIdentityIndividualScriptNamesKanjiParams struct {
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// The individuals primary name in non latin script.
+type V2CoreAccountUpdateIdentityIndividualScriptNamesParams struct {
+ // Persons name in kana script.
+ Kana *V2CoreAccountUpdateIdentityIndividualScriptNamesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Persons name in kanji script.
+ Kanji *V2CoreAccountUpdateIdentityIndividualScriptNamesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Information about the individual represented by the Account. This property is `null` unless `entity_type` is set to `individual`.
+type V2CoreAccountUpdateIdentityIndividualParams struct {
+ // Additional addresses associated with the individual.
+ AdditionalAddresses []*V2CoreAccountUpdateIdentityIndividualAdditionalAddressParams `form:"additional_addresses" json:"additional_addresses,omitempty"`
+ // Additional names (e.g. aliases) associated with the individual.
+ AdditionalNames []*V2CoreAccountUpdateIdentityIndividualAdditionalNameParams `form:"additional_names" json:"additional_names,omitempty"`
+ // The individual's residential address.
+ Address *V2CoreAccountUpdateIdentityIndividualAddressParams `form:"address" json:"address,omitempty"`
+ // The individual's date of birth.
+ DateOfBirth *V2CoreAccountUpdateIdentityIndividualDateOfBirthParams `form:"date_of_birth" json:"date_of_birth,omitempty"`
+ // Documents that may be submitted to satisfy various informational requests.
+ Documents *V2CoreAccountUpdateIdentityIndividualDocumentsParams `form:"documents" json:"documents,omitempty"`
+ // The individual's email address.
+ Email *string `form:"email" json:"email,omitempty"`
+ // The individual's first name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The identification numbers (e.g., SSN) associated with the individual.
+ IDNumbers []*V2CoreAccountUpdateIdentityIndividualIDNumberParams `form:"id_numbers" json:"id_numbers,omitempty"`
+ // The individual's gender (International regulations require either "male" or "female").
+ LegalGender *string `form:"legal_gender" json:"legal_gender,omitempty"`
+ // Set of key-value pairs 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 `form:"metadata" json:"metadata,omitempty"`
+ // The countries where the individual is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Nationalities []*string `form:"nationalities" json:"nationalities,omitempty"`
+ // The individual's phone number.
+ Phone *string `form:"phone" json:"phone,omitempty"`
+ // The individual's political exposure.
+ PoliticalExposure *string `form:"political_exposure" json:"political_exposure,omitempty"`
+ // The relationship that this individual has with the account's identity.
+ Relationship *V2CoreAccountUpdateIdentityIndividualRelationshipParams `form:"relationship" json:"relationship,omitempty"`
+ // The script addresses (e.g., non-Latin characters) associated with the individual.
+ ScriptAddresses *V2CoreAccountUpdateIdentityIndividualScriptAddressesParams `form:"script_addresses" json:"script_addresses,omitempty"`
+ // The individuals primary name in non latin script.
+ ScriptNames *V2CoreAccountUpdateIdentityIndividualScriptNamesParams `form:"script_names" json:"script_names,omitempty"`
+ // The individual's last name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *V2CoreAccountUpdateIdentityIndividualParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Information about the company, individual, and business represented by the Account.
+type V2CoreAccountUpdateIdentityParams struct {
+ // Attestations from the identity's key people, e.g. owners, executives, directors.
+ Attestations *V2CoreAccountUpdateIdentityAttestationsParams `form:"attestations" json:"attestations,omitempty"`
+ // Information about the company or business.
+ BusinessDetails *V2CoreAccountUpdateIdentityBusinessDetailsParams `form:"business_details" json:"business_details,omitempty"`
+ // 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](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.
+ Country *string `form:"country" json:"country,omitempty"`
+ // The entity type.
+ EntityType *string `form:"entity_type" json:"entity_type,omitempty"`
+ // Information about the individual represented by the Account. This property is `null` unless `entity_type` is set to `individual`.
+ Individual *V2CoreAccountUpdateIdentityIndividualParams `form:"individual" json:"individual,omitempty"`
+}
+
+// Updates the details of an Account.
+type V2CoreAccountUpdateParams struct {
+ Params `form:"*"`
+ // An Account Configuration which allows the Account to take on a key persona across Stripe products.
+ Configuration *V2CoreAccountUpdateConfigurationParams `form:"configuration" json:"configuration,omitempty"`
+ // The default contact email address for the Account. Required when configuring the account as a merchant or recipient.
+ ContactEmail *string `form:"contact_email" json:"contact_email,omitempty"`
+ // A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account.
+ Dashboard *string `form:"dashboard" json:"dashboard,omitempty"`
+ // Default values to be used on Account Configurations.
+ Defaults *V2CoreAccountUpdateDefaultsParams `form:"defaults" json:"defaults,omitempty"`
+ // A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on any invoices sent to the Account.
+ DisplayName *string `form:"display_name" json:"display_name,omitempty"`
+ // Information about the company, individual, and business represented by the Account.
+ Identity *V2CoreAccountUpdateIdentityParams `form:"identity" json:"identity,omitempty"`
+ // Additional fields to include in the response.
+ Include []*string `form:"include" json:"include,omitempty"`
+ // Set of key-value pairs 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 `form:"metadata" json:"metadata,omitempty"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *V2CoreAccountUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
diff --git a/v2core_accountlink_params.go b/v2core_accountlink_params.go
index 3aefdc6cab..dcdfc4c8b3 100644
--- a/v2core_accountlink_params.go
+++ b/v2core_accountlink_params.go
@@ -44,3 +44,42 @@ type V2CoreAccountLinkParams struct {
// The use case of the AccountLink.
UseCase *V2CoreAccountLinkUseCaseParams `form:"use_case" json:"use_case"`
}
+
+// Indicates that the AccountLink provided should onboard an account.
+type V2CoreAccountLinkCreateUseCaseAccountOnboardingParams struct {
+ // Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s.
+ Configurations []*string `form:"configurations" json:"configurations"`
+ // The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink's URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party.
+ RefreshURL *string `form:"refresh_url" json:"refresh_url"`
+ // The URL that the user will be redirected to upon completing the linked flow.
+ ReturnURL *string `form:"return_url" json:"return_url,omitempty"`
+}
+
+// Indicates that the AccountLink provided should update a previously onboarded account.
+type V2CoreAccountLinkCreateUseCaseAccountUpdateParams struct {
+ // Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s.
+ Configurations []*string `form:"configurations" json:"configurations"`
+ // The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink's URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party.
+ RefreshURL *string `form:"refresh_url" json:"refresh_url"`
+ // The URL that the user will be redirected to upon completing the linked flow.
+ ReturnURL *string `form:"return_url" json:"return_url,omitempty"`
+}
+
+// The use case of the AccountLink.
+type V2CoreAccountLinkCreateUseCaseParams struct {
+ // Indicates that the AccountLink provided should onboard an account.
+ AccountOnboarding *V2CoreAccountLinkCreateUseCaseAccountOnboardingParams `form:"account_onboarding" json:"account_onboarding,omitempty"`
+ // Indicates that the AccountLink provided should update a previously onboarded account.
+ AccountUpdate *V2CoreAccountLinkCreateUseCaseAccountUpdateParams `form:"account_update" json:"account_update,omitempty"`
+ // Open Enum. The type of AccountLink the user is requesting.
+ Type *string `form:"type" json:"type"`
+}
+
+// Creates an AccountLink object that includes a single-use Stripe URL that the merchant can redirect their user to in order to take them to a Stripe-hosted application such as Recipient Onboarding.
+type V2CoreAccountLinkCreateParams struct {
+ Params `form:"*"`
+ // The ID of the Account to create link for.
+ Account *string `form:"account" json:"account"`
+ // The use case of the AccountLink.
+ UseCase *V2CoreAccountLinkCreateUseCaseParams `form:"use_case" json:"use_case"`
+}
diff --git a/v2core_event_params.go b/v2core_event_params.go
index d245851698..5c842b9418 100644
--- a/v2core_event_params.go
+++ b/v2core_event_params.go
@@ -19,3 +19,8 @@ type V2CoreEventListParams struct {
type V2CoreEventParams struct {
Params `form:"*"`
}
+
+// Retrieves the details of an event.
+type V2CoreEventRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/v2core_eventdestination_params.go b/v2core_eventdestination_params.go
index 8e95f50e74..c4f323895f 100644
--- a/v2core_eventdestination_params.go
+++ b/v2core_eventdestination_params.go
@@ -79,3 +79,97 @@ type V2CoreEventDestinationListParams struct {
type V2CoreEventDestinationPingParams struct {
Params `form:"*"`
}
+
+// Amazon EventBridge configuration.
+type V2CoreEventDestinationCreateAmazonEventbridgeParams struct {
+ // The AWS account ID.
+ AwsAccountID *string `form:"aws_account_id" json:"aws_account_id"`
+ // The region of the AWS event source.
+ AwsRegion *string `form:"aws_region" json:"aws_region"`
+}
+
+// Webhook endpoint configuration.
+type V2CoreEventDestinationCreateWebhookEndpointParams struct {
+ // The URL of the webhook endpoint.
+ URL *string `form:"url" json:"url"`
+}
+
+// Create a new event destination.
+type V2CoreEventDestinationCreateParams struct {
+ Params `form:"*"`
+ // Amazon EventBridge configuration.
+ AmazonEventbridge *V2CoreEventDestinationCreateAmazonEventbridgeParams `form:"amazon_eventbridge" json:"amazon_eventbridge,omitempty"`
+ // An optional description of what the event destination is used for.
+ Description *string `form:"description" json:"description,omitempty"`
+ // The list of events to enable for this endpoint.
+ EnabledEvents []*string `form:"enabled_events" json:"enabled_events"`
+ // Payload type of events being subscribed to.
+ EventPayload *string `form:"event_payload" json:"event_payload"`
+ // Where events should be routed from.
+ EventsFrom []*string `form:"events_from" json:"events_from,omitempty"`
+ // Additional fields to include in the response.
+ Include []*string `form:"include" json:"include,omitempty"`
+ // Metadata.
+ Metadata map[string]string `form:"metadata" json:"metadata,omitempty"`
+ // Event destination name.
+ Name *string `form:"name" json:"name"`
+ // If using the snapshot event payload, the API version events are rendered as.
+ SnapshotAPIVersion *string `form:"snapshot_api_version" json:"snapshot_api_version,omitempty"`
+ // Event destination type.
+ Type *string `form:"type" json:"type"`
+ // Webhook endpoint configuration.
+ WebhookEndpoint *V2CoreEventDestinationCreateWebhookEndpointParams `form:"webhook_endpoint" json:"webhook_endpoint,omitempty"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *V2CoreEventDestinationCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Delete an event destination.
+type V2CoreEventDestinationDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves the details of an event destination.
+type V2CoreEventDestinationRetrieveParams struct {
+ Params `form:"*"`
+ // Additional fields to include in the response.
+ Include []*string `form:"include" json:"include,omitempty"`
+}
+
+// Webhook endpoint configuration.
+type V2CoreEventDestinationUpdateWebhookEndpointParams struct {
+ // The URL of the webhook endpoint.
+ URL *string `form:"url" json:"url"`
+}
+
+// Update the details of an event destination.
+type V2CoreEventDestinationUpdateParams struct {
+ Params `form:"*"`
+ // An optional description of what the event destination is used for.
+ Description *string `form:"description" json:"description,omitempty"`
+ // The list of events to enable for this endpoint.
+ EnabledEvents []*string `form:"enabled_events" json:"enabled_events,omitempty"`
+ // Additional fields to include in the response. Currently supports `webhook_endpoint.url`.
+ Include []*string `form:"include" json:"include,omitempty"`
+ // Metadata.
+ Metadata map[string]string `form:"metadata" json:"metadata,omitempty"`
+ // Event destination name.
+ Name *string `form:"name" json:"name,omitempty"`
+ // Webhook endpoint configuration.
+ WebhookEndpoint *V2CoreEventDestinationUpdateWebhookEndpointParams `form:"webhook_endpoint" json:"webhook_endpoint,omitempty"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *V2CoreEventDestinationUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
diff --git a/v2coreaccounts_person_params.go b/v2coreaccounts_person_params.go
index dc3ef70933..99dad888c3 100644
--- a/v2coreaccounts_person_params.go
+++ b/v2coreaccounts_person_params.go
@@ -308,3 +308,601 @@ type V2CoreAccountsPersonListParams struct {
// The upper limit on the number of accounts returned by the List Account request.
Limit *int64 `form:"limit" json:"limit,omitempty"`
}
+
+// Additional addresses associated with the person.
+type V2CoreAccountsPersonCreateAdditionalAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // Purpose of additional address.
+ Purpose *string `form:"purpose" json:"purpose"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Additional names (e.g. aliases) associated with the person.
+type V2CoreAccountsPersonCreateAdditionalNameParams struct {
+ // The person's full name.
+ FullName *string `form:"full_name" json:"full_name,omitempty"`
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The purpose or type of the additional name.
+ Purpose *string `form:"purpose" json:"purpose"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// Stripe terms of service agreement.
+type V2CoreAccountsPersonCreateAdditionalTermsOfServiceAccountParams struct {
+ // The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
+ Date *time.Time `form:"date" json:"date"`
+ // The IP address from which the Account's representative accepted the terms of service.
+ IP *string `form:"ip" json:"ip"`
+ // The user agent of the browser from which the Account's representative accepted the terms of service.
+ UserAgent *string `form:"user_agent" json:"user_agent,omitempty"`
+}
+
+// Attestations of accepted terms of service agreements.
+type V2CoreAccountsPersonCreateAdditionalTermsOfServiceParams struct {
+ // Stripe terms of service agreement.
+ Account *V2CoreAccountsPersonCreateAdditionalTermsOfServiceAccountParams `form:"account" json:"account,omitempty"`
+}
+
+// The person's residential address.
+type V2CoreAccountsPersonCreateAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The person's date of birth.
+type V2CoreAccountsPersonCreateDateOfBirthParams struct {
+ // The day of birth.
+ Day *int64 `form:"day" json:"day"`
+ // The month of birth.
+ Month *int64 `form:"month" json:"month"`
+ // The year of birth.
+ Year *int64 `form:"year" json:"year"`
+}
+
+// One or more documents that demonstrate proof that this person is authorized to represent the company.
+type V2CoreAccountsPersonCreateDocumentsCompanyAuthorizationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the person's passport page with photo and personal data.
+type V2CoreAccountsPersonCreateDocumentsPassportParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+type V2CoreAccountsPersonCreateDocumentsPrimaryVerificationFrontBackParams struct {
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back" json:"back,omitempty"`
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front" json:"front"`
+}
+
+// An identifying document showing the person's name, either a passport or local ID card.
+type V2CoreAccountsPersonCreateDocumentsPrimaryVerificationParams struct {
+ // The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+ FrontBack *V2CoreAccountsPersonCreateDocumentsPrimaryVerificationFrontBackParams `form:"front_back" json:"front_back"`
+ // The format of the verification document. Currently supports `front_back` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+type V2CoreAccountsPersonCreateDocumentsSecondaryVerificationFrontBackParams struct {
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back" json:"back,omitempty"`
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front" json:"front"`
+}
+
+// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+type V2CoreAccountsPersonCreateDocumentsSecondaryVerificationParams struct {
+ // The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+ FrontBack *V2CoreAccountsPersonCreateDocumentsSecondaryVerificationFrontBackParams `form:"front_back" json:"front_back"`
+ // The format of the verification document. Currently supports `front_back` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the person's visa required for living in the country where they are residing.
+type V2CoreAccountsPersonCreateDocumentsVisaParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// Documents that may be submitted to satisfy various informational requests.
+type V2CoreAccountsPersonCreateDocumentsParams struct {
+ // One or more documents that demonstrate proof that this person is authorized to represent the company.
+ CompanyAuthorization *V2CoreAccountsPersonCreateDocumentsCompanyAuthorizationParams `form:"company_authorization" json:"company_authorization,omitempty"`
+ // One or more documents showing the person's passport page with photo and personal data.
+ Passport *V2CoreAccountsPersonCreateDocumentsPassportParams `form:"passport" json:"passport,omitempty"`
+ // An identifying document showing the person's name, either a passport or local ID card.
+ PrimaryVerification *V2CoreAccountsPersonCreateDocumentsPrimaryVerificationParams `form:"primary_verification" json:"primary_verification,omitempty"`
+ // A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ SecondaryVerification *V2CoreAccountsPersonCreateDocumentsSecondaryVerificationParams `form:"secondary_verification" json:"secondary_verification,omitempty"`
+ // One or more documents showing the person's visa required for living in the country where they are residing.
+ Visa *V2CoreAccountsPersonCreateDocumentsVisaParams `form:"visa" json:"visa,omitempty"`
+}
+
+// The identification numbers (e.g., SSN) associated with the person.
+type V2CoreAccountsPersonCreateIDNumberParams struct {
+ // The ID number type of an individual.
+ Type *string `form:"type" json:"type"`
+ // The value of the ID number.
+ Value *string `form:"value" json:"value"`
+}
+
+// The relationship that this person has with the Account's business or legal entity.
+type V2CoreAccountsPersonCreateRelationshipParams struct {
+ // Indicates whether the person is a director of the associated legal entity.
+ Director *bool `form:"director" json:"director,omitempty"`
+ // Indicates whether the person is an executive of the associated legal entity.
+ Executive *bool `form:"executive" json:"executive,omitempty"`
+ // Indicates whether the person is a legal guardian of the associated legal entity.
+ LegalGuardian *bool `form:"legal_guardian" json:"legal_guardian,omitempty"`
+ // Indicates whether the person is an owner of the associated legal entity.
+ Owner *bool `form:"owner" json:"owner,omitempty"`
+ // The percentage of ownership the person has in the associated legal entity.
+ PercentOwnership *string `form:"percent_ownership" json:"percent_ownership,omitempty"`
+ // Indicates whether the person is a representative of the associated legal entity.
+ Representative *bool `form:"representative" json:"representative,omitempty"`
+ // The title or position the person holds in the associated legal entity.
+ Title *string `form:"title" json:"title,omitempty"`
+}
+
+// Kana Address.
+type V2CoreAccountsPersonCreateScriptAddressesKanaParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Kanji Address.
+type V2CoreAccountsPersonCreateScriptAddressesKanjiParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The script addresses (e.g., non-Latin characters) associated with the person.
+type V2CoreAccountsPersonCreateScriptAddressesParams struct {
+ // Kana Address.
+ Kana *V2CoreAccountsPersonCreateScriptAddressesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Kanji Address.
+ Kanji *V2CoreAccountsPersonCreateScriptAddressesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Persons name in kana script.
+type V2CoreAccountsPersonCreateScriptNamesKanaParams struct {
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// Persons name in kanji script.
+type V2CoreAccountsPersonCreateScriptNamesKanjiParams struct {
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// The script names (e.g. non-Latin characters) associated with the person.
+type V2CoreAccountsPersonCreateScriptNamesParams struct {
+ // Persons name in kana script.
+ Kana *V2CoreAccountsPersonCreateScriptNamesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Persons name in kanji script.
+ Kanji *V2CoreAccountsPersonCreateScriptNamesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Create a Person associated with an Account.
+type V2CoreAccountsPersonCreateParams struct {
+ Params `form:"*"`
+ // Account the Person should be associated with.
+ AccountID *string `form:"-" json:"-"` // Included in URL
+ // Additional addresses associated with the person.
+ AdditionalAddresses []*V2CoreAccountsPersonCreateAdditionalAddressParams `form:"additional_addresses" json:"additional_addresses,omitempty"`
+ // Additional names (e.g. aliases) associated with the person.
+ AdditionalNames []*V2CoreAccountsPersonCreateAdditionalNameParams `form:"additional_names" json:"additional_names,omitempty"`
+ // Attestations of accepted terms of service agreements.
+ AdditionalTermsOfService *V2CoreAccountsPersonCreateAdditionalTermsOfServiceParams `form:"additional_terms_of_service" json:"additional_terms_of_service,omitempty"`
+ // The person's residential address.
+ Address *V2CoreAccountsPersonCreateAddressParams `form:"address" json:"address,omitempty"`
+ // The person's date of birth.
+ DateOfBirth *V2CoreAccountsPersonCreateDateOfBirthParams `form:"date_of_birth" json:"date_of_birth,omitempty"`
+ // Documents that may be submitted to satisfy various informational requests.
+ Documents *V2CoreAccountsPersonCreateDocumentsParams `form:"documents" json:"documents,omitempty"`
+ // Email.
+ Email *string `form:"email" json:"email,omitempty"`
+ // The person's first name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The identification numbers (e.g., SSN) associated with the person.
+ IDNumbers []*V2CoreAccountsPersonCreateIDNumberParams `form:"id_numbers" json:"id_numbers,omitempty"`
+ // The person's gender (International regulations require either "male" or "female").
+ LegalGender *string `form:"legal_gender" json:"legal_gender,omitempty"`
+ // Set of key-value pairs 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 `form:"metadata" json:"metadata,omitempty"`
+ // The nationalities (countries) this person is associated with.
+ Nationalities []*string `form:"nationalities" json:"nationalities,omitempty"`
+ // The phone number for this person.
+ Phone *string `form:"phone" json:"phone,omitempty"`
+ // The person's political exposure.
+ PoliticalExposure *string `form:"political_exposure" json:"political_exposure,omitempty"`
+ // The relationship that this person has with the Account's business or legal entity.
+ Relationship *V2CoreAccountsPersonCreateRelationshipParams `form:"relationship" json:"relationship,omitempty"`
+ // The script addresses (e.g., non-Latin characters) associated with the person.
+ ScriptAddresses *V2CoreAccountsPersonCreateScriptAddressesParams `form:"script_addresses" json:"script_addresses,omitempty"`
+ // The script names (e.g. non-Latin characters) associated with the person.
+ ScriptNames *V2CoreAccountsPersonCreateScriptNamesParams `form:"script_names" json:"script_names,omitempty"`
+ // The person's last name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *V2CoreAccountsPersonCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Delete a Person associated with an Account.
+type V2CoreAccountsPersonDeleteParams struct {
+ Params `form:"*"`
+ // The Account the Person is associated with.
+ AccountID *string `form:"-" json:"-"` // Included in URL
+}
+
+// Retrieves a Person associated with an Account.
+type V2CoreAccountsPersonRetrieveParams struct {
+ Params `form:"*"`
+ // The Account the Person is associated with.
+ AccountID *string `form:"-" json:"-"` // Included in URL
+}
+
+// Additional addresses associated with the person.
+type V2CoreAccountsPersonUpdateAdditionalAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // Purpose of additional address.
+ Purpose *string `form:"purpose" json:"purpose"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Additional names (e.g. aliases) associated with the person.
+type V2CoreAccountsPersonUpdateAdditionalNameParams struct {
+ // The person's full name.
+ FullName *string `form:"full_name" json:"full_name,omitempty"`
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The purpose or type of the additional name.
+ Purpose *string `form:"purpose" json:"purpose"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// Stripe terms of service agreement.
+type V2CoreAccountsPersonUpdateAdditionalTermsOfServiceAccountParams struct {
+ // The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
+ Date *time.Time `form:"date" json:"date,omitempty"`
+ // The IP address from which the Account's representative accepted the terms of service.
+ IP *string `form:"ip" json:"ip,omitempty"`
+ // The user agent of the browser from which the Account's representative accepted the terms of service.
+ UserAgent *string `form:"user_agent" json:"user_agent,omitempty"`
+}
+
+// Attestations of accepted terms of service agreements.
+type V2CoreAccountsPersonUpdateAdditionalTermsOfServiceParams struct {
+ // Stripe terms of service agreement.
+ Account *V2CoreAccountsPersonUpdateAdditionalTermsOfServiceAccountParams `form:"account" json:"account,omitempty"`
+}
+
+// The primary address associated with the person.
+type V2CoreAccountsPersonUpdateAddressParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The person's date of birth.
+type V2CoreAccountsPersonUpdateDateOfBirthParams struct {
+ // The day of the birth.
+ Day *int64 `form:"day" json:"day"`
+ // The month of birth.
+ Month *int64 `form:"month" json:"month"`
+ // The year of birth.
+ Year *int64 `form:"year" json:"year"`
+}
+
+// One or more documents that demonstrate proof that this person is authorized to represent the company.
+type V2CoreAccountsPersonUpdateDocumentsCompanyAuthorizationParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the person's passport page with photo and personal data.
+type V2CoreAccountsPersonUpdateDocumentsPassportParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+type V2CoreAccountsPersonUpdateDocumentsPrimaryVerificationFrontBackParams struct {
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back" json:"back,omitempty"`
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front" json:"front,omitempty"`
+}
+
+// An identifying document showing the person's name, either a passport or local ID card.
+type V2CoreAccountsPersonUpdateDocumentsPrimaryVerificationParams struct {
+ // The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+ FrontBack *V2CoreAccountsPersonUpdateDocumentsPrimaryVerificationFrontBackParams `form:"front_back" json:"front_back"`
+ // The format of the verification document. Currently supports `front_back` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+type V2CoreAccountsPersonUpdateDocumentsSecondaryVerificationFrontBackParams struct {
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Back *string `form:"back" json:"back,omitempty"`
+ // A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size.
+ Front *string `form:"front" json:"front,omitempty"`
+}
+
+// A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+type V2CoreAccountsPersonUpdateDocumentsSecondaryVerificationParams struct {
+ // The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document.
+ FrontBack *V2CoreAccountsPersonUpdateDocumentsSecondaryVerificationFrontBackParams `form:"front_back" json:"front_back"`
+ // The format of the verification document. Currently supports `front_back` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// One or more documents showing the person's visa required for living in the country where they are residing.
+type V2CoreAccountsPersonUpdateDocumentsVisaParams struct {
+ // One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`.
+ Files []*string `form:"files" json:"files"`
+ // The format of the document. Currently supports `files` only.
+ Type *string `form:"type" json:"type"`
+}
+
+// Documents that may be submitted to satisfy various informational requests.
+type V2CoreAccountsPersonUpdateDocumentsParams struct {
+ // One or more documents that demonstrate proof that this person is authorized to represent the company.
+ CompanyAuthorization *V2CoreAccountsPersonUpdateDocumentsCompanyAuthorizationParams `form:"company_authorization" json:"company_authorization,omitempty"`
+ // One or more documents showing the person's passport page with photo and personal data.
+ Passport *V2CoreAccountsPersonUpdateDocumentsPassportParams `form:"passport" json:"passport,omitempty"`
+ // An identifying document showing the person's name, either a passport or local ID card.
+ PrimaryVerification *V2CoreAccountsPersonUpdateDocumentsPrimaryVerificationParams `form:"primary_verification" json:"primary_verification,omitempty"`
+ // A document showing address, either a passport, local ID card, or utility bill from a well-known utility company.
+ SecondaryVerification *V2CoreAccountsPersonUpdateDocumentsSecondaryVerificationParams `form:"secondary_verification" json:"secondary_verification,omitempty"`
+ // One or more documents showing the person's visa required for living in the country where they are residing.
+ Visa *V2CoreAccountsPersonUpdateDocumentsVisaParams `form:"visa" json:"visa,omitempty"`
+}
+
+// The identification numbers (e.g., SSN) associated with the person.
+type V2CoreAccountsPersonUpdateIDNumberParams struct {
+ // The ID number type of an individual.
+ Type *string `form:"type" json:"type"`
+ // The value of the ID number.
+ Value *string `form:"value" json:"value"`
+}
+
+// The relationship that this person has with the Account's business or legal entity.
+type V2CoreAccountsPersonUpdateRelationshipParams struct {
+ // Indicates whether the person is a director of the associated legal entity.
+ Director *bool `form:"director" json:"director,omitempty"`
+ // Indicates whether the person is an executive of the associated legal entity.
+ Executive *bool `form:"executive" json:"executive,omitempty"`
+ // Indicates whether the person is a legal guardian of the associated legal entity.
+ LegalGuardian *bool `form:"legal_guardian" json:"legal_guardian,omitempty"`
+ // Indicates whether the person is an owner of the associated legal entity.
+ Owner *bool `form:"owner" json:"owner,omitempty"`
+ // The percentage of ownership the person has in the associated legal entity.
+ PercentOwnership *string `form:"percent_ownership" json:"percent_ownership,omitempty"`
+ // Indicates whether the person is a representative of the associated legal entity.
+ Representative *bool `form:"representative" json:"representative,omitempty"`
+ // The title or position the person holds in the associated legal entity.
+ Title *string `form:"title" json:"title,omitempty"`
+}
+
+// Kana Address.
+type V2CoreAccountsPersonUpdateScriptAddressesKanaParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// Kanji Address.
+type V2CoreAccountsPersonUpdateScriptAddressesKanjiParams struct {
+ // City, district, suburb, town, or village.
+ City *string `form:"city" json:"city,omitempty"`
+ // Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ Country *string `form:"country" json:"country,omitempty"`
+ // Address line 1 (e.g., street, PO Box, or company name).
+ Line1 *string `form:"line1" json:"line1,omitempty"`
+ // Address line 2 (e.g., apartment, suite, unit, or building).
+ Line2 *string `form:"line2" json:"line2,omitempty"`
+ // ZIP or postal code.
+ PostalCode *string `form:"postal_code" json:"postal_code,omitempty"`
+ // State, county, province, or region.
+ State *string `form:"state" json:"state,omitempty"`
+ // Town or cho-me.
+ Town *string `form:"town" json:"town,omitempty"`
+}
+
+// The script addresses (e.g., non-Latin characters) associated with the person.
+type V2CoreAccountsPersonUpdateScriptAddressesParams struct {
+ // Kana Address.
+ Kana *V2CoreAccountsPersonUpdateScriptAddressesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Kanji Address.
+ Kanji *V2CoreAccountsPersonUpdateScriptAddressesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Persons name in kana script.
+type V2CoreAccountsPersonUpdateScriptNamesKanaParams struct {
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// Persons name in kanji script.
+type V2CoreAccountsPersonUpdateScriptNamesKanjiParams struct {
+ // The person's first or given name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The person's last or family name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// The script names (e.g. non-Latin characters) associated with the person.
+type V2CoreAccountsPersonUpdateScriptNamesParams struct {
+ // Persons name in kana script.
+ Kana *V2CoreAccountsPersonUpdateScriptNamesKanaParams `form:"kana" json:"kana,omitempty"`
+ // Persons name in kanji script.
+ Kanji *V2CoreAccountsPersonUpdateScriptNamesKanjiParams `form:"kanji" json:"kanji,omitempty"`
+}
+
+// Updates a Person associated with an Account.
+type V2CoreAccountsPersonUpdateParams struct {
+ Params `form:"*"`
+ // The Account the Person is associated with.
+ AccountID *string `form:"-" json:"-"` // Included in URL
+ // Additional addresses associated with the person.
+ AdditionalAddresses []*V2CoreAccountsPersonUpdateAdditionalAddressParams `form:"additional_addresses" json:"additional_addresses,omitempty"`
+ // Additional names (e.g. aliases) associated with the person.
+ AdditionalNames []*V2CoreAccountsPersonUpdateAdditionalNameParams `form:"additional_names" json:"additional_names,omitempty"`
+ // Attestations of accepted terms of service agreements.
+ AdditionalTermsOfService *V2CoreAccountsPersonUpdateAdditionalTermsOfServiceParams `form:"additional_terms_of_service" json:"additional_terms_of_service,omitempty"`
+ // The primary address associated with the person.
+ Address *V2CoreAccountsPersonUpdateAddressParams `form:"address" json:"address,omitempty"`
+ // The person's date of birth.
+ DateOfBirth *V2CoreAccountsPersonUpdateDateOfBirthParams `form:"date_of_birth" json:"date_of_birth,omitempty"`
+ // Documents that may be submitted to satisfy various informational requests.
+ Documents *V2CoreAccountsPersonUpdateDocumentsParams `form:"documents" json:"documents,omitempty"`
+ // Email.
+ Email *string `form:"email" json:"email,omitempty"`
+ // The person's first name.
+ GivenName *string `form:"given_name" json:"given_name,omitempty"`
+ // The identification numbers (e.g., SSN) associated with the person.
+ IDNumbers []*V2CoreAccountsPersonUpdateIDNumberParams `form:"id_numbers" json:"id_numbers,omitempty"`
+ // The person's gender (International regulations require either "male" or "female").
+ LegalGender *string `form:"legal_gender" json:"legal_gender,omitempty"`
+ // Set of key-value pairs 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 `form:"metadata" json:"metadata,omitempty"`
+ // The nationalities (countries) this person is associated with.
+ Nationalities []*string `form:"nationalities" json:"nationalities,omitempty"`
+ // The phone number for this person.
+ Phone *string `form:"phone" json:"phone,omitempty"`
+ // The person's political exposure.
+ PoliticalExposure *string `form:"political_exposure" json:"political_exposure,omitempty"`
+ // The relationship that this person has with the Account's business or legal entity.
+ Relationship *V2CoreAccountsPersonUpdateRelationshipParams `form:"relationship" json:"relationship,omitempty"`
+ // The script addresses (e.g., non-Latin characters) associated with the person.
+ ScriptAddresses *V2CoreAccountsPersonUpdateScriptAddressesParams `form:"script_addresses" json:"script_addresses,omitempty"`
+ // The script names (e.g. non-Latin characters) associated with the person.
+ ScriptNames *V2CoreAccountsPersonUpdateScriptNamesParams `form:"script_names" json:"script_names,omitempty"`
+ // The person's last name.
+ Surname *string `form:"surname" json:"surname,omitempty"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *V2CoreAccountsPersonUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
diff --git a/v2corevault_gbbankaccount_params.go b/v2corevault_gbbankaccount_params.go
index 63fc2451ff..5988364fbc 100644
--- a/v2corevault_gbbankaccount_params.go
+++ b/v2corevault_gbbankaccount_params.go
@@ -59,3 +59,36 @@ type V2CoreVaultGBBankAccountInitiateConfirmationOfPayeeParams struct {
// The name of the user to be checked against. Legal entity information will be used if unspecified.
Name *string `form:"name" json:"name,omitempty"`
}
+
+// Whether or not to automatically perform Confirmation of Payee to verify the users information
+// against what was provided by the bank. Doing so is required for all bank accounts not owned
+// by you before making domestic UK OutboundPayments.
+type V2CoreVaultGBBankAccountCreateConfirmationOfPayeeParams struct {
+ // The business type to be checked against. Legal entity information will be used if unspecified.
+ // Closed enum.
+ BusinessType *string `form:"business_type" json:"business_type,omitempty"`
+ // User specifies whether Confirmation of Payee is automatically initiated when creating the bank account.
+ Initiate *bool `form:"initiate" json:"initiate"`
+ // The name to be checked against. Legal entity information will be used if unspecified.
+ Name *string `form:"name" json:"name,omitempty"`
+}
+
+// Create a GB bank account.
+type V2CoreVaultGBBankAccountCreateParams struct {
+ Params `form:"*"`
+ // The Account Number of the bank account.
+ AccountNumber *string `form:"account_number" json:"account_number"`
+ // Closed Enum. The type of the bank account (checking or savings).
+ BankAccountType *string `form:"bank_account_type" json:"bank_account_type,omitempty"`
+ // Whether or not to automatically perform Confirmation of Payee to verify the users information
+ // against what was provided by the bank. Doing so is required for all bank accounts not owned
+ // by you before making domestic UK OutboundPayments.
+ ConfirmationOfPayee *V2CoreVaultGBBankAccountCreateConfirmationOfPayeeParams `form:"confirmation_of_payee" json:"confirmation_of_payee,omitempty"`
+ // The Sort Code of the bank account.
+ SortCode *string `form:"sort_code" json:"sort_code"`
+}
+
+// Retrieve a GB bank account.
+type V2CoreVaultGBBankAccountRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/v2corevault_usbankaccount_params.go b/v2corevault_usbankaccount_params.go
index e8dac04a66..8922e3123a 100644
--- a/v2corevault_usbankaccount_params.go
+++ b/v2corevault_usbankaccount_params.go
@@ -25,3 +25,30 @@ type V2CoreVaultUSBankAccountParams struct {
// The ACH routing number of the bank account. Note that certain banks have the same ACH and wire routing number.
RoutingNumber *string `form:"routing_number" json:"routing_number,omitempty"`
}
+
+// Create a UsBankAccount object.
+type V2CoreVaultUSBankAccountCreateParams struct {
+ Params `form:"*"`
+ // The account number of the bank account.
+ AccountNumber *string `form:"account_number" json:"account_number"`
+ // Closed Enum. The type of the bank account (checking or savings).
+ BankAccountType *string `form:"bank_account_type" json:"bank_account_type,omitempty"`
+ // The fedwire routing number of the bank account. Note that certain banks have the same ACH and wire routing number.
+ FedwireRoutingNumber *string `form:"fedwire_routing_number" json:"fedwire_routing_number,omitempty"`
+ // The ACH routing number of the bank account. Note that certain banks have the same ACH and wire routing number.
+ RoutingNumber *string `form:"routing_number" json:"routing_number,omitempty"`
+}
+
+// Retrieve a UsBankAccount object.
+type V2CoreVaultUSBankAccountRetrieveParams struct {
+ Params `form:"*"`
+}
+
+// Update a UsBankAccount object. This is limited to supplying a previously empty routing_number field.
+type V2CoreVaultUSBankAccountUpdateParams struct {
+ Params `form:"*"`
+ // The bank account's fedwire routing number can be provided for update it was were empty previously.
+ FedwireRoutingNumber *string `form:"fedwire_routing_number" json:"fedwire_routing_number,omitempty"`
+ // The bank account's ACH routing number can be provided for update if it was empty previously.
+ RoutingNumber *string `form:"routing_number" json:"routing_number,omitempty"`
+}
diff --git a/v2moneymanagement_adjustment_params.go b/v2moneymanagement_adjustment_params.go
index c38d03f911..f48a00425d 100644
--- a/v2moneymanagement_adjustment_params.go
+++ b/v2moneymanagement_adjustment_params.go
@@ -36,3 +36,8 @@ type V2MoneyManagementAdjustmentListParams struct {
type V2MoneyManagementAdjustmentParams struct {
Params `form:"*"`
}
+
+// Retrieves the details of an Adjustment by ID.
+type V2MoneyManagementAdjustmentRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/v2moneymanagement_financialaccount_params.go b/v2moneymanagement_financialaccount_params.go
index 1c7162c221..75b6d6cee1 100644
--- a/v2moneymanagement_financialaccount_params.go
+++ b/v2moneymanagement_financialaccount_params.go
@@ -17,3 +17,8 @@ type V2MoneyManagementFinancialAccountListParams struct {
type V2MoneyManagementFinancialAccountParams struct {
Params `form:"*"`
}
+
+// Retrieves the details of an existing FinancialAccount.
+type V2MoneyManagementFinancialAccountRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/v2moneymanagement_financialaddress_params.go b/v2moneymanagement_financialaddress_params.go
index 14d7cea6c9..0331e2424b 100644
--- a/v2moneymanagement_financialaddress_params.go
+++ b/v2moneymanagement_financialaddress_params.go
@@ -27,3 +27,19 @@ type V2MoneyManagementFinancialAddressListParams struct {
// The page limit.
Limit *int64 `form:"limit" json:"limit,omitempty"`
}
+
+// Create a new FinancialAddress for a FinancialAccount.
+type V2MoneyManagementFinancialAddressCreateParams struct {
+ Params `form:"*"`
+ // Open Enum. The currency the FinancialAddress should support. Currently, only the `usd` and `gbp` values are supported.
+ Currency *string `form:"currency" json:"currency"`
+ // The ID of the FinancialAccount the new FinancialAddress should be associated with.
+ FinancialAccount *string `form:"financial_account" json:"financial_account"`
+}
+
+// Retrieve a FinancialAddress. By default, the FinancialAddress will be returned in it's unexpanded state, revealing only the last 4 digits of the account number.
+type V2MoneyManagementFinancialAddressRetrieveParams struct {
+ Params `form:"*"`
+ // Open Enum. A list of fields to reveal in the FinancialAddresses returned.
+ Include []*string `form:"include" json:"include,omitempty"`
+}
diff --git a/v2moneymanagement_inboundtransfer_params.go b/v2moneymanagement_inboundtransfer_params.go
index f9e89cabfe..a5950b3d4a 100644
--- a/v2moneymanagement_inboundtransfer_params.go
+++ b/v2moneymanagement_inboundtransfer_params.go
@@ -59,3 +59,38 @@ type V2MoneyManagementInboundTransferListParams struct {
// The page limit.
Limit *int64 `form:"limit" json:"limit,omitempty"`
}
+
+// Object containing details about where the funds will originate from.
+type V2MoneyManagementInboundTransferCreateFromParams struct {
+ // An optional currency field used to specify which currency is debited from the Payment Method.
+ // Since many Payment Methods support only one currency, this field is optional.
+ Currency *string `form:"currency" json:"currency,omitempty"`
+ // ID of the Payment Method using which IBT will be made.
+ PaymentMethod *string `form:"payment_method" json:"payment_method"`
+}
+
+// Object containing details about where the funds will land.
+type V2MoneyManagementInboundTransferCreateToParams struct {
+ // The currency in which funds will land in.
+ Currency *string `form:"currency" json:"currency"`
+ // The FinancialAccount that funds will land in.
+ FinancialAccount *string `form:"financial_account" json:"financial_account"`
+}
+
+// InboundTransfers APIs are used to create, retrieve or list InboundTransfers.
+type V2MoneyManagementInboundTransferCreateParams struct {
+ Params `form:"*"`
+ // The amount, in specified currency, by which the FinancialAccount balance will increase due to the InboundTransfer.
+ Amount *Amount `form:"amount" json:"amount"`
+ // An optional, freeform description field intended to store metadata.
+ Description *string `form:"description" json:"description,omitempty"`
+ // Object containing details about where the funds will originate from.
+ From *V2MoneyManagementInboundTransferCreateFromParams `form:"from" json:"from"`
+ // Object containing details about where the funds will land.
+ To *V2MoneyManagementInboundTransferCreateToParams `form:"to" json:"to"`
+}
+
+// Retrieve an InboundTransfer by ID.
+type V2MoneyManagementInboundTransferRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/v2moneymanagement_outboundpayment_params.go b/v2moneymanagement_outboundpayment_params.go
index e8d8fbbdc1..c8adac8ec3 100644
--- a/v2moneymanagement_outboundpayment_params.go
+++ b/v2moneymanagement_outboundpayment_params.go
@@ -105,3 +105,75 @@ type V2MoneyManagementOutboundPaymentListParams struct {
// Closed Enum. Only return OutboundPayments with this status.
Status []*string `form:"status" json:"status,omitempty"`
}
+
+// Delivery options to be used to send the OutboundPayment.
+type V2MoneyManagementOutboundPaymentCreateDeliveryOptionsParams struct {
+ // Open Enum. Method for bank account.
+ BankAccount *string `form:"bank_account" json:"bank_account,omitempty"`
+}
+
+// From which FinancialAccount and BalanceType to pull funds from.
+type V2MoneyManagementOutboundPaymentCreateFromParams struct {
+ // Describes the FinancialAmount's currency drawn from.
+ Currency *string `form:"currency" json:"currency"`
+ // The FinancialAccount that funds were pulled from.
+ FinancialAccount *string `form:"financial_account" json:"financial_account"`
+}
+
+// Details about the notification settings for the OutboundPayment recipient.
+type V2MoneyManagementOutboundPaymentCreateRecipientNotificationParams struct {
+ // Closed Enum. Configuration option to enable or disable notifications to recipients.
+ // Do not send notifications when setting is NONE. Default to account setting when setting is CONFIGURED or not set.
+ Setting *string `form:"setting" json:"setting"`
+}
+
+// To which payout method to send the OutboundPayment.
+type V2MoneyManagementOutboundPaymentCreateToParams struct {
+ // Describes the currency to send to the recipient.
+ // If included, this currency must match a currency supported by the destination.
+ // Can be omitted in the following cases:
+ // - destination only supports one currency
+ // - destination supports multiple currencies and one of the currencies matches the FA currency
+ // - destination supports multiple currencies and one of the currencies matches the presentment currency
+ // Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX.
+ Currency *string `form:"currency" json:"currency,omitempty"`
+ // The payout method which the OutboundPayment uses to send payout.
+ PayoutMethod *string `form:"payout_method" json:"payout_method,omitempty"`
+ // To which account the OutboundPayment is sent.
+ Recipient *string `form:"recipient" json:"recipient"`
+}
+
+// Creates an OutboundPayment.
+type V2MoneyManagementOutboundPaymentCreateParams struct {
+ Params `form:"*"`
+ // The "presentment amount" to be sent to the recipient.
+ Amount *Amount `form:"amount" json:"amount"`
+ // Delivery options to be used to send the OutboundPayment.
+ DeliveryOptions *V2MoneyManagementOutboundPaymentCreateDeliveryOptionsParams `form:"delivery_options" json:"delivery_options,omitempty"`
+ // An arbitrary string attached to the OutboundPayment. Often useful for displaying to users.
+ Description *string `form:"description" json:"description,omitempty"`
+ // From which FinancialAccount and BalanceType to pull funds from.
+ From *V2MoneyManagementOutboundPaymentCreateFromParams `form:"from" json:"from"`
+ // Set of key-value pairs 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 `form:"metadata" json:"metadata,omitempty"`
+ // The quote for this OutboundPayment. Only required for countries with regulatory mandates to display fee estimates before OutboundPayment creation.
+ OutboundPaymentQuote *string `form:"outbound_payment_quote" json:"outbound_payment_quote,omitempty"`
+ // Details about the notification settings for the OutboundPayment recipient.
+ RecipientNotification *V2MoneyManagementOutboundPaymentCreateRecipientNotificationParams `form:"recipient_notification" json:"recipient_notification,omitempty"`
+ // To which payout method to send the OutboundPayment.
+ To *V2MoneyManagementOutboundPaymentCreateToParams `form:"to" json:"to"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *V2MoneyManagementOutboundPaymentCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment create or list response.
+type V2MoneyManagementOutboundPaymentRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/v2moneymanagement_outboundpaymentquote_params.go b/v2moneymanagement_outboundpaymentquote_params.go
index 1653d8b1ef..dde738025f 100644
--- a/v2moneymanagement_outboundpaymentquote_params.go
+++ b/v2moneymanagement_outboundpaymentquote_params.go
@@ -48,3 +48,46 @@ type V2MoneyManagementOutboundPaymentQuoteParams struct {
// Request details about the recipient of an OutboundPaymentQuote.
To *V2MoneyManagementOutboundPaymentQuoteToParams `form:"to" json:"to"`
}
+
+// Method to be used to send the OutboundPayment.
+type V2MoneyManagementOutboundPaymentQuoteCreateDeliveryOptionsParams struct {
+ // Open Enum. Method for bank account.
+ BankAccount *string `form:"bank_account" json:"bank_account,omitempty"`
+}
+
+// Request details about the sender of an OutboundPaymentQuote.
+type V2MoneyManagementOutboundPaymentQuoteCreateFromParams struct {
+ // Describes the FinancialAccount's currency drawn from.
+ Currency *string `form:"currency" json:"currency"`
+ // The FinancialAccount that funds were pulled from.
+ FinancialAccount *string `form:"financial_account" json:"financial_account"`
+}
+
+// Request details about the recipient of an OutboundPaymentQuote.
+type V2MoneyManagementOutboundPaymentQuoteCreateToParams struct {
+ // Describes the currency to send to the recipient.
+ // If included, this currency must match a currency supported by the destination.
+ // Can be omitted in the following cases:
+ // - destination only supports one currency
+ // - destination supports multiple currencies and one of the currencies matches the FA currency
+ // - destination supports multiple currencies and one of the currencies matches the presentment currency
+ // Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX.
+ Currency *string `form:"currency" json:"currency,omitempty"`
+ // The payout method which the OutboundPayment uses to send payout.
+ PayoutMethod *string `form:"payout_method" json:"payout_method,omitempty"`
+ // To which account the OutboundPayment is sent.
+ Recipient *string `form:"recipient" json:"recipient"`
+}
+
+// Creates an OutboundPaymentQuote usable in an OutboundPayment.
+type V2MoneyManagementOutboundPaymentQuoteCreateParams struct {
+ Params `form:"*"`
+ // The "presentment amount" to be sent to the recipient.
+ Amount *Amount `form:"amount" json:"amount"`
+ // Method to be used to send the OutboundPayment.
+ DeliveryOptions *V2MoneyManagementOutboundPaymentQuoteCreateDeliveryOptionsParams `form:"delivery_options" json:"delivery_options,omitempty"`
+ // Request details about the sender of an OutboundPaymentQuote.
+ From *V2MoneyManagementOutboundPaymentQuoteCreateFromParams `form:"from" json:"from"`
+ // Request details about the recipient of an OutboundPaymentQuote.
+ To *V2MoneyManagementOutboundPaymentQuoteCreateToParams `form:"to" json:"to"`
+}
diff --git a/v2moneymanagement_outboundsetupintent_params.go b/v2moneymanagement_outboundsetupintent_params.go
index 21c05427be..77ba8ad19b 100644
--- a/v2moneymanagement_outboundsetupintent_params.go
+++ b/v2moneymanagement_outboundsetupintent_params.go
@@ -68,3 +68,106 @@ type V2MoneyManagementOutboundSetupIntentListParams struct {
// The page size.
Limit *int64 `form:"limit" json:"limit,omitempty"`
}
+
+// The type specific details of the bank account payout method.
+type V2MoneyManagementOutboundSetupIntentCreatePayoutMethodDataBankAccountParams struct {
+ // The account number or IBAN of the bank account.
+ AccountNumber *string `form:"account_number" json:"account_number"`
+ // Closed Enum. The type of the bank account (checking or savings).
+ BankAccountType *string `form:"bank_account_type" json:"bank_account_type,omitempty"`
+ // The branch number of the bank account, if present.
+ BranchNumber *string `form:"branch_number" json:"branch_number,omitempty"`
+ // The country code of the bank account.
+ Country *string `form:"country" json:"country"`
+ // The routing number of the bank account, if present.
+ RoutingNumber *string `form:"routing_number" json:"routing_number,omitempty"`
+ // The swift code of the bank account, if present.
+ SwiftCode *string `form:"swift_code" json:"swift_code,omitempty"`
+}
+
+// The type specific details of the card payout method.
+type V2MoneyManagementOutboundSetupIntentCreatePayoutMethodDataCardParams struct {
+ // The expiration month of the card.
+ ExpMonth *string `form:"exp_month" json:"exp_month"`
+ // The expiration year of the card.
+ ExpYear *string `form:"exp_year" json:"exp_year"`
+ // The card number.
+ Number *string `form:"number" json:"number"`
+}
+
+// If no payout_method provided, used to create the underlying credential that is set up for outbound money movement.
+// If a payout_method provided, used to update data on the credential linked to this setup intent.
+type V2MoneyManagementOutboundSetupIntentCreatePayoutMethodDataParams struct {
+ // The type specific details of the bank account payout method.
+ BankAccount *V2MoneyManagementOutboundSetupIntentCreatePayoutMethodDataBankAccountParams `form:"bank_account" json:"bank_account,omitempty"`
+ // The type specific details of the card payout method.
+ Card *V2MoneyManagementOutboundSetupIntentCreatePayoutMethodDataCardParams `form:"card" json:"card,omitempty"`
+ // Closed Enum. The type of payout method to be created.
+ Type *string `form:"type" json:"type"`
+}
+
+// Create an OutboundSetupIntent object.
+type V2MoneyManagementOutboundSetupIntentCreateParams struct {
+ Params `form:"*"`
+ // If provided, the existing payout method resource to link to this setup intent.
+ // Any payout_method_data provided is used to update information on this linked payout method resource.
+ PayoutMethod *string `form:"payout_method" json:"payout_method,omitempty"`
+ // If no payout_method provided, used to create the underlying credential that is set up for outbound money movement.
+ // If a payout_method provided, used to update data on the credential linked to this setup intent.
+ PayoutMethodData *V2MoneyManagementOutboundSetupIntentCreatePayoutMethodDataParams `form:"payout_method_data" json:"payout_method_data,omitempty"`
+ // Specify which type of outbound money movement this credential should be set up for (payment | transfer).
+ // If not provided, defaults to payment.
+ UsageIntent *string `form:"usage_intent" json:"usage_intent,omitempty"`
+}
+
+// Retrieve an OutboundSetupIntent object.
+type V2MoneyManagementOutboundSetupIntentRetrieveParams struct {
+ Params `form:"*"`
+}
+
+// The type specific details of the bank account payout method.
+type V2MoneyManagementOutboundSetupIntentUpdatePayoutMethodDataBankAccountParams struct {
+ // The account number or IBAN of the bank account.
+ AccountNumber *string `form:"account_number" json:"account_number"`
+ // Closed Enum. The type of the bank account (checking or savings).
+ BankAccountType *string `form:"bank_account_type" json:"bank_account_type,omitempty"`
+ // The branch number of the bank account, if present.
+ BranchNumber *string `form:"branch_number" json:"branch_number,omitempty"`
+ // The country code of the bank account.
+ Country *string `form:"country" json:"country"`
+ // The routing number of the bank account, if present.
+ RoutingNumber *string `form:"routing_number" json:"routing_number,omitempty"`
+ // The swift code of the bank account, if present.
+ SwiftCode *string `form:"swift_code" json:"swift_code,omitempty"`
+}
+
+// The type specific details of the card payout method.
+type V2MoneyManagementOutboundSetupIntentUpdatePayoutMethodDataCardParams struct {
+ // The expiration month of the card.
+ ExpMonth *string `form:"exp_month" json:"exp_month,omitempty"`
+ // The expiration year of the card.
+ ExpYear *string `form:"exp_year" json:"exp_year,omitempty"`
+ // The card number. This can only be passed when creating a new credential on an outbound setup intent in the requires_payout_method state.
+ Number *string `form:"number" json:"number,omitempty"`
+}
+
+// If no payout_method provided, used to create the underlying credential that is set up for outbound money movement.
+// If a payout_method provided, used to update data on the credential linked to this setup intent.
+type V2MoneyManagementOutboundSetupIntentUpdatePayoutMethodDataParams struct {
+ // The type specific details of the bank account payout method.
+ BankAccount *V2MoneyManagementOutboundSetupIntentUpdatePayoutMethodDataBankAccountParams `form:"bank_account" json:"bank_account,omitempty"`
+ // The type specific details of the card payout method.
+ Card *V2MoneyManagementOutboundSetupIntentUpdatePayoutMethodDataCardParams `form:"card" json:"card,omitempty"`
+ // Closed Enum. The type of payout method to be created/updated.
+ Type *string `form:"type" json:"type"`
+}
+
+// Update an OutboundSetupIntent object.
+type V2MoneyManagementOutboundSetupIntentUpdateParams struct {
+ Params `form:"*"`
+ // If provided, the existing payout method resource to link to this outbound setup intent.
+ PayoutMethod *string `form:"payout_method" json:"payout_method,omitempty"`
+ // If no payout_method provided, used to create the underlying credential that is set up for outbound money movement.
+ // If a payout_method provided, used to update data on the credential linked to this setup intent.
+ PayoutMethodData *V2MoneyManagementOutboundSetupIntentUpdatePayoutMethodDataParams `form:"payout_method_data" json:"payout_method_data,omitempty"`
+}
diff --git a/v2moneymanagement_outboundtransfer_params.go b/v2moneymanagement_outboundtransfer_params.go
index 22d789aea2..2627580caa 100644
--- a/v2moneymanagement_outboundtransfer_params.go
+++ b/v2moneymanagement_outboundtransfer_params.go
@@ -90,3 +90,62 @@ type V2MoneyManagementOutboundTransferListParams struct {
// Closed Enum. Only return OutboundTransfers with this status.
Status []*string `form:"status" json:"status,omitempty"`
}
+
+// Delivery options to be used to send the OutboundTransfer.
+type V2MoneyManagementOutboundTransferCreateDeliveryOptionsParams struct {
+ // Open Enum. Method for bank account.
+ BankAccount *string `form:"bank_account" json:"bank_account,omitempty"`
+}
+
+// The FinancialAccount to pull funds from.
+type V2MoneyManagementOutboundTransferCreateFromParams struct {
+ // Describes the FinancialAmount's currency drawn from.
+ Currency *string `form:"currency" json:"currency"`
+ // The FinancialAccount that funds were pulled from.
+ FinancialAccount *string `form:"financial_account" json:"financial_account"`
+}
+
+// To which payout method to send the OutboundTransfer.
+type V2MoneyManagementOutboundTransferCreateToParams struct {
+ // Describes the currency to send to the recipient.
+ // If included, this currency must match a currency supported by the destination.
+ // Can be omitted in the following cases:
+ // - destination only supports one currency
+ // - destination supports multiple currencies and one of the currencies matches the FA currency
+ // - destination supports multiple currencies and one of the currencies matches the presentment currency
+ // Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX.
+ Currency *string `form:"currency" json:"currency,omitempty"`
+ // The payout method which the OutboundTransfer uses to send payout.
+ PayoutMethod *string `form:"payout_method" json:"payout_method"`
+}
+
+// Creates an OutboundTransfer.
+type V2MoneyManagementOutboundTransferCreateParams struct {
+ Params `form:"*"`
+ // The "presentment amount" for the OutboundPayment.
+ Amount *Amount `form:"amount" json:"amount"`
+ // Delivery options to be used to send the OutboundTransfer.
+ DeliveryOptions *V2MoneyManagementOutboundTransferCreateDeliveryOptionsParams `form:"delivery_options" json:"delivery_options,omitempty"`
+ // An arbitrary string attached to the OutboundTransfer. Often useful for displaying to users.
+ Description *string `form:"description" json:"description,omitempty"`
+ // The FinancialAccount to pull funds from.
+ From *V2MoneyManagementOutboundTransferCreateFromParams `form:"from" json:"from"`
+ // Set of key-value pairs 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 `form:"metadata" json:"metadata,omitempty"`
+ // To which payout method to send the OutboundTransfer.
+ To *V2MoneyManagementOutboundTransferCreateToParams `form:"to" json:"to"`
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *V2MoneyManagementOutboundTransferCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundPayment create or list response.
+type V2MoneyManagementOutboundTransferRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/v2moneymanagement_payoutmethod_params.go b/v2moneymanagement_payoutmethod_params.go
index 29d7110130..fdd0d23089 100644
--- a/v2moneymanagement_payoutmethod_params.go
+++ b/v2moneymanagement_payoutmethod_params.go
@@ -38,3 +38,8 @@ type V2MoneyManagementPayoutMethodParams struct {
type V2MoneyManagementPayoutMethodUnarchiveParams struct {
Params `form:"*"`
}
+
+// Retrieve a PayoutMethod object.
+type V2MoneyManagementPayoutMethodRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/v2moneymanagement_payoutmethodsbankaccountspec_params.go b/v2moneymanagement_payoutmethodsbankaccountspec_params.go
index 28647d0437..708f5a3701 100644
--- a/v2moneymanagement_payoutmethodsbankaccountspec_params.go
+++ b/v2moneymanagement_payoutmethodsbankaccountspec_params.go
@@ -14,3 +14,12 @@ type V2MoneyManagementPayoutMethodsBankAccountSpecParams struct {
// The countries to fetch the bank account spec for.
Countries []*string `form:"countries" json:"countries,omitempty"`
}
+
+// Fetch the specifications for a set of countries to know which
+// credential fields are required, the validations for each fields, and how to translate these
+// country-specific fields to the generic fields in the PayoutMethodBankAccount type.
+type V2MoneyManagementPayoutMethodsBankAccountSpecRetrieveParams struct {
+ Params `form:"*"`
+ // The countries to fetch the bank account spec for.
+ Countries []*string `form:"countries" json:"countries,omitempty"`
+}
diff --git a/v2moneymanagement_receivedcredit_params.go b/v2moneymanagement_receivedcredit_params.go
index aa1390d80b..2d6cb0d04f 100644
--- a/v2moneymanagement_receivedcredit_params.go
+++ b/v2moneymanagement_receivedcredit_params.go
@@ -34,3 +34,8 @@ type V2MoneyManagementReceivedCreditListParams struct {
type V2MoneyManagementReceivedCreditParams struct {
Params `form:"*"`
}
+
+// Retrieve a ReceivedCredit by ID.
+type V2MoneyManagementReceivedCreditRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/v2moneymanagement_receiveddebit_params.go b/v2moneymanagement_receiveddebit_params.go
index 461d49f496..9e0d4b362b 100644
--- a/v2moneymanagement_receiveddebit_params.go
+++ b/v2moneymanagement_receiveddebit_params.go
@@ -17,3 +17,8 @@ type V2MoneyManagementReceivedDebitListParams struct {
type V2MoneyManagementReceivedDebitParams struct {
Params `form:"*"`
}
+
+// Retrieves a single ReceivedDebit by ID.
+type V2MoneyManagementReceivedDebitRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/v2moneymanagement_transaction_params.go b/v2moneymanagement_transaction_params.go
index 8b368a22ca..d983c4960c 100644
--- a/v2moneymanagement_transaction_params.go
+++ b/v2moneymanagement_transaction_params.go
@@ -33,3 +33,8 @@ type V2MoneyManagementTransactionListParams struct {
type V2MoneyManagementTransactionParams struct {
Params `form:"*"`
}
+
+// Retrieves the details of a Transaction by ID.
+type V2MoneyManagementTransactionRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/v2moneymanagement_transactionentry_params.go b/v2moneymanagement_transactionentry_params.go
index 9eebfacc0f..626009244c 100644
--- a/v2moneymanagement_transactionentry_params.go
+++ b/v2moneymanagement_transactionentry_params.go
@@ -31,3 +31,8 @@ type V2MoneyManagementTransactionEntryListParams struct {
type V2MoneyManagementTransactionEntryParams struct {
Params `form:"*"`
}
+
+// Retrieves the details of a TransactionEntry by ID.
+type V2MoneyManagementTransactionEntryRetrieveParams struct {
+ Params `form:"*"`
+}
diff --git a/webhook/client.go b/webhook/client.go
index 918e19ef53..4309842663 100644
--- a/webhook/client.go
+++ b/webhook/client.go
@@ -280,12 +280,12 @@ func validatePayload(payload []byte, sigHeader string, secret string, tolerance
return err
}
- expectedSignature := ComputeSignature(header.timestamp, payload, secret)
expiredTimestamp := time.Since(header.timestamp) > tolerance
if enforceTolerance && expiredTimestamp {
return ErrTooOld
}
+ expectedSignature := ComputeSignature(header.timestamp, payload, secret)
// Check all given v1 signatures, multiple signatures will be sent temporarily in the case of a rolled signature secret
for _, sig := range header.signatures {
if hmac.Equal(expectedSignature, sig) {
diff --git a/webhookendpoint.go b/webhookendpoint.go
index 70b8d403f5..9be608301d 100644
--- a/webhookendpoint.go
+++ b/webhookendpoint.go
@@ -55,6 +55,87 @@ func (p *WebhookEndpointListParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}
+// You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard.
+type WebhookEndpointDeleteParams struct {
+ Params `form:"*"`
+}
+
+// Retrieves the webhook endpoint with the given ID.
+type WebhookEndpointRetrieveParams struct {
+ Params `form:"*"`
+ // Specifies which fields in the response should be expanded.
+ Expand []*string `form:"expand"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *WebhookEndpointRetrieveParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.
+type WebhookEndpointUpdateParams struct {
+ Params `form:"*"`
+ // An optional description of what the webhook is used for.
+ Description *string `form:"description"`
+ // Disable the webhook endpoint if set to true.
+ Disabled *bool `form:"disabled"`
+ // The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
+ EnabledEvents []*string `form:"enabled_events"`
+ // 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"`
+ // The URL of the webhook endpoint.
+ URL *string `form:"url"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *WebhookEndpointUpdateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *WebhookEndpointUpdateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
+// A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.
+type WebhookEndpointCreateParams struct {
+ Params `form:"*"`
+ // Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version.
+ APIVersion *string `form:"api_version"`
+ // Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`.
+ Connect *bool `form:"connect"`
+ // An optional description of what the webhook is used for.
+ Description *string `form:"description"`
+ // The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection.
+ EnabledEvents []*string `form:"enabled_events"`
+ // 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"`
+ // The URL of the webhook endpoint.
+ URL *string `form:"url"`
+}
+
+// AddExpand appends a new field to expand.
+func (p *WebhookEndpointCreateParams) AddExpand(f string) {
+ p.Expand = append(p.Expand, &f)
+}
+
+// AddMetadata adds a new key-value pair to the Metadata.
+func (p *WebhookEndpointCreateParams) AddMetadata(key string, value string) {
+ if p.Metadata == nil {
+ p.Metadata = make(map[string]string)
+ }
+
+ p.Metadata[key] = value
+}
+
// You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be
// notified about events that happen in your Stripe account or connected
// accounts.