diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8d1f4287e9..ebd06a8137 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1065 \ No newline at end of file +v1077 \ No newline at end of file diff --git a/account.go b/account.go index 51fdd95340..b195706704 100644 --- a/account.go +++ b/account.go @@ -465,6 +465,12 @@ type AccountCapabilitiesMobilepayPaymentsParams struct { Requested *bool `form:"requested"` } +// The multibanco_payments capability. +type AccountCapabilitiesMultibancoPaymentsParams struct { + // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + Requested *bool `form:"requested"` +} + // The mx_bank_transfer_payments capability. type AccountCapabilitiesMXBankTransferPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. @@ -549,6 +555,12 @@ type AccountCapabilitiesTreasuryParams struct { Requested *bool `form:"requested"` } +// The twint_payments capability. +type AccountCapabilitiesTWINTPaymentsParams struct { + // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + Requested *bool `form:"requested"` +} + // The us_bank_account_ach_payments capability. type AccountCapabilitiesUSBankAccountACHPaymentsParams struct { // Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. @@ -632,6 +644,8 @@ type AccountCapabilitiesParams struct { LinkPayments *AccountCapabilitiesLinkPaymentsParams `form:"link_payments"` // The mobilepay_payments capability. MobilepayPayments *AccountCapabilitiesMobilepayPaymentsParams `form:"mobilepay_payments"` + // The multibanco_payments capability. + MultibancoPayments *AccountCapabilitiesMultibancoPaymentsParams `form:"multibanco_payments"` // The mx_bank_transfer_payments capability. MXBankTransferPayments *AccountCapabilitiesMXBankTransferPaymentsParams `form:"mx_bank_transfer_payments"` // The oxxo_payments capability. @@ -660,6 +674,8 @@ type AccountCapabilitiesParams struct { Transfers *AccountCapabilitiesTransfersParams `form:"transfers"` // The treasury capability. Treasury *AccountCapabilitiesTreasuryParams `form:"treasury"` + // The twint_payments capability. + TWINTPayments *AccountCapabilitiesTWINTPaymentsParams `form:"twint_payments"` // The us_bank_account_ach_payments capability. USBankAccountACHPayments *AccountCapabilitiesUSBankAccountACHPaymentsParams `form:"us_bank_account_ach_payments"` // The us_bank_transfer_payments capability. @@ -1173,6 +1189,8 @@ type AccountCapabilities struct { LinkPayments AccountCapabilityStatus `json:"link_payments"` // The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. MobilepayPayments AccountCapabilityStatus `json:"mobilepay_payments"` + // The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. + MultibancoPayments AccountCapabilityStatus `json:"multibanco_payments"` // The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. MXBankTransferPayments AccountCapabilityStatus `json:"mx_bank_transfer_payments"` // The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. @@ -1201,6 +1219,8 @@ type AccountCapabilities struct { Transfers AccountCapabilityStatus `json:"transfers"` // The status of the banking capability, or whether the account can have bank accounts. Treasury AccountCapabilityStatus `json:"treasury"` + // The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. + TWINTPayments AccountCapabilityStatus `json:"twint_payments"` // The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. USBankAccountACHPayments AccountCapabilityStatus `json:"us_bank_account_ach_payments"` // The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. diff --git a/bankaccount.go b/bankaccount.go index 55cd361571..7928862647 100644 --- a/bankaccount.go +++ b/bankaccount.go @@ -443,8 +443,7 @@ type BankAccountRequirements struct { // These bank accounts are payment methods on `Customer` objects. // // On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer -// destinations on `Account` objects for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) -// is `application`, which includes [Custom accounts](https://stripe.com/connect/custom-accounts). +// destinations on `Account` objects for connected accounts. // They can be bank accounts or debit cards as well, and are documented in the links above. // // Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers) diff --git a/charge.go b/charge.go index df55111a14..a54dad25c9 100644 --- a/charge.go +++ b/charge.go @@ -1172,6 +1172,7 @@ type ChargePaymentMethodDetailsSwish struct { // The last four digits of the Swish account phone number VerifiedPhoneLast4 string `json:"verified_phone_last4"` } +type ChargePaymentMethodDetailsTWINT struct{} type ChargePaymentMethodDetailsUSBankAccount struct { // Account holder type: individual or company. AccountHolderType ChargePaymentMethodDetailsUSBankAccountAccountHolderType `json:"account_holder_type"` @@ -1240,6 +1241,7 @@ type ChargePaymentMethodDetails struct { Sofort *ChargePaymentMethodDetailsSofort `json:"sofort"` StripeAccount *ChargePaymentMethodDetailsStripeAccount `json:"stripe_account"` Swish *ChargePaymentMethodDetailsSwish `json:"swish"` + TWINT *ChargePaymentMethodDetailsTWINT `json:"twint"` // The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. // An additional hash is included on `payment_method_details` with a name matching this value. // It contains information specific to the payment method. diff --git a/checkout_session.go b/checkout_session.go index efc0d83b18..8d81178220 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -120,7 +120,7 @@ const ( CheckoutSessionCustomerDetailsTaxExemptReverse CheckoutSessionCustomerDetailsTaxExempt = "reverse" ) -// 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, or `unknown` +// 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` type CheckoutSessionCustomerDetailsTaxIDType string // List of values that CheckoutSessionCustomerDetailsTaxIDType can take @@ -146,6 +146,7 @@ const ( CheckoutSessionCustomerDetailsTaxIDTypeCNTIN CheckoutSessionCustomerDetailsTaxIDType = "cn_tin" CheckoutSessionCustomerDetailsTaxIDTypeCONIT CheckoutSessionCustomerDetailsTaxIDType = "co_nit" CheckoutSessionCustomerDetailsTaxIDTypeCRTIN CheckoutSessionCustomerDetailsTaxIDType = "cr_tin" + CheckoutSessionCustomerDetailsTaxIDTypeDEStn CheckoutSessionCustomerDetailsTaxIDType = "de_stn" CheckoutSessionCustomerDetailsTaxIDTypeDORCN CheckoutSessionCustomerDetailsTaxIDType = "do_rcn" CheckoutSessionCustomerDetailsTaxIDTypeECRUC CheckoutSessionCustomerDetailsTaxIDType = "ec_ruc" CheckoutSessionCustomerDetailsTaxIDTypeEGTIN CheckoutSessionCustomerDetailsTaxIDType = "eg_tin" @@ -575,6 +576,18 @@ const ( CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage = "none" ) +// Indicates that you intend to make future payments with this PaymentIntent's payment method. +// +// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. +// +// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). +type CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage string + +// List of values that CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage can take +const ( + CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsageNone CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage = "none" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. @@ -1533,6 +1546,16 @@ type CheckoutSessionPaymentMethodOptionsMobilepayParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// contains details about the Multibanco payment method options. +type CheckoutSessionPaymentMethodOptionsMultibancoParams struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + SetupFutureUsage *string `form:"setup_future_usage"` +} + // contains details about the OXXO payment method options. type CheckoutSessionPaymentMethodOptionsOXXOParams struct { // The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -1709,6 +1732,8 @@ type CheckoutSessionPaymentMethodOptionsParams struct { Link *CheckoutSessionPaymentMethodOptionsLinkParams `form:"link"` // contains details about the Mobilepay payment method options. Mobilepay *CheckoutSessionPaymentMethodOptionsMobilepayParams `form:"mobilepay"` + // contains details about the Multibanco payment method options. + Multibanco *CheckoutSessionPaymentMethodOptionsMultibancoParams `form:"multibanco"` // contains details about the OXXO payment method options. OXXO *CheckoutSessionPaymentMethodOptionsOXXOParams `form:"oxxo"` // contains details about the P24 payment method options. @@ -1832,7 +1857,7 @@ type CheckoutSessionShippingOptionShippingRateDataParams struct { TaxBehavior *string `form:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. TaxCode *string `form:"tax_code"` - // The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + // The type of calculation to use on the shipping rate. Type *string `form:"type"` } @@ -2286,7 +2311,7 @@ type CheckoutSessionCustomText struct { // The customer's tax IDs after a completed Checkout Session. type CheckoutSessionCustomerDetailsTaxID struct { - // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, or `unknown` + // 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` Type CheckoutSessionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` @@ -2576,6 +2601,14 @@ type CheckoutSessionPaymentMethodOptionsMobilepay struct { // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage `json:"setup_future_usage"` } +type CheckoutSessionPaymentMethodOptionsMultibanco struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + SetupFutureUsage CheckoutSessionPaymentMethodOptionsMultibancoSetupFutureUsage `json:"setup_future_usage"` +} type CheckoutSessionPaymentMethodOptionsOXXO struct { // The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. ExpiresAfterDays int64 `json:"expires_after_days"` @@ -2691,6 +2724,7 @@ type CheckoutSessionPaymentMethodOptions struct { Konbini *CheckoutSessionPaymentMethodOptionsKonbini `json:"konbini"` Link *CheckoutSessionPaymentMethodOptionsLink `json:"link"` Mobilepay *CheckoutSessionPaymentMethodOptionsMobilepay `json:"mobilepay"` + Multibanco *CheckoutSessionPaymentMethodOptionsMultibanco `json:"multibanco"` OXXO *CheckoutSessionPaymentMethodOptionsOXXO `json:"oxxo"` P24 *CheckoutSessionPaymentMethodOptionsP24 `json:"p24"` PayNow *CheckoutSessionPaymentMethodOptionsPayNow `json:"paynow"` diff --git a/confirmationtoken.go b/confirmationtoken.go index 1f5f08544d..835554486b 100644 --- a/confirmationtoken.go +++ b/confirmationtoken.go @@ -259,6 +259,7 @@ const ( ConfirmationTokenPaymentMethodPreviewTypeKonbini ConfirmationTokenPaymentMethodPreviewType = "konbini" ConfirmationTokenPaymentMethodPreviewTypeLink ConfirmationTokenPaymentMethodPreviewType = "link" ConfirmationTokenPaymentMethodPreviewTypeMobilepay ConfirmationTokenPaymentMethodPreviewType = "mobilepay" + ConfirmationTokenPaymentMethodPreviewTypeMultibanco ConfirmationTokenPaymentMethodPreviewType = "multibanco" ConfirmationTokenPaymentMethodPreviewTypeOXXO ConfirmationTokenPaymentMethodPreviewType = "oxxo" ConfirmationTokenPaymentMethodPreviewTypeP24 ConfirmationTokenPaymentMethodPreviewType = "p24" ConfirmationTokenPaymentMethodPreviewTypePayNow ConfirmationTokenPaymentMethodPreviewType = "paynow" @@ -269,6 +270,7 @@ const ( ConfirmationTokenPaymentMethodPreviewTypeSEPADebit ConfirmationTokenPaymentMethodPreviewType = "sepa_debit" ConfirmationTokenPaymentMethodPreviewTypeSofort ConfirmationTokenPaymentMethodPreviewType = "sofort" ConfirmationTokenPaymentMethodPreviewTypeSwish ConfirmationTokenPaymentMethodPreviewType = "swish" + ConfirmationTokenPaymentMethodPreviewTypeTWINT ConfirmationTokenPaymentMethodPreviewType = "twint" ConfirmationTokenPaymentMethodPreviewTypeUSBankAccount ConfirmationTokenPaymentMethodPreviewType = "us_bank_account" ConfirmationTokenPaymentMethodPreviewTypeWeChatPay ConfirmationTokenPaymentMethodPreviewType = "wechat_pay" ConfirmationTokenPaymentMethodPreviewTypeZip ConfirmationTokenPaymentMethodPreviewType = "zip" @@ -746,6 +748,7 @@ type ConfirmationTokenPaymentMethodPreviewLink struct { PersistentToken string `json:"persistent_token"` } type ConfirmationTokenPaymentMethodPreviewMobilepay struct{} +type ConfirmationTokenPaymentMethodPreviewMultibanco struct{} type ConfirmationTokenPaymentMethodPreviewOXXO struct{} type ConfirmationTokenPaymentMethodPreviewP24 struct { // The customer's bank, if provided. @@ -789,6 +792,7 @@ type ConfirmationTokenPaymentMethodPreviewSofort struct { Country string `json:"country"` } type ConfirmationTokenPaymentMethodPreviewSwish struct{} +type ConfirmationTokenPaymentMethodPreviewTWINT struct{} // Contains information about US bank account networks that can be used. type ConfirmationTokenPaymentMethodPreviewUSBankAccountNetworks struct { @@ -860,6 +864,7 @@ type ConfirmationTokenPaymentMethodPreview struct { Konbini *ConfirmationTokenPaymentMethodPreviewKonbini `json:"konbini"` Link *ConfirmationTokenPaymentMethodPreviewLink `json:"link"` Mobilepay *ConfirmationTokenPaymentMethodPreviewMobilepay `json:"mobilepay"` + Multibanco *ConfirmationTokenPaymentMethodPreviewMultibanco `json:"multibanco"` OXXO *ConfirmationTokenPaymentMethodPreviewOXXO `json:"oxxo"` P24 *ConfirmationTokenPaymentMethodPreviewP24 `json:"p24"` PayNow *ConfirmationTokenPaymentMethodPreviewPayNow `json:"paynow"` @@ -870,6 +875,7 @@ type ConfirmationTokenPaymentMethodPreview struct { SEPADebit *ConfirmationTokenPaymentMethodPreviewSEPADebit `json:"sepa_debit"` Sofort *ConfirmationTokenPaymentMethodPreviewSofort `json:"sofort"` Swish *ConfirmationTokenPaymentMethodPreviewSwish `json:"swish"` + TWINT *ConfirmationTokenPaymentMethodPreviewTWINT `json:"twint"` // The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. Type ConfirmationTokenPaymentMethodPreviewType `json:"type"` USBankAccount *ConfirmationTokenPaymentMethodPreviewUSBankAccount `json:"us_bank_account"` diff --git a/customer.go b/customer.go index f70622a223..5683e1b79a 100644 --- a/customer.go +++ b/customer.go @@ -192,7 +192,7 @@ func (p *CustomerListParams) AddExpand(f string) { // The customer's tax IDs. type CustomerTaxIDDataParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `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`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` diff --git a/invoice.go b/invoice.go index 5166e4d2fd..333af5424e 100644 --- a/invoice.go +++ b/invoice.go @@ -561,7 +561,7 @@ type InvoiceShippingCostShippingRateDataParams struct { TaxBehavior *string `form:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. TaxCode *string `form:"tax_code"` - // The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + // The type of calculation to use on the shipping rate. Type *string `form:"type"` } @@ -673,7 +673,7 @@ type InvoiceUpcomingCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceUpcomingCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `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`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -1243,7 +1243,7 @@ type InvoiceUpcomingLinesCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceUpcomingLinesCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `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`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -1996,7 +1996,7 @@ type InvoiceCreatePreviewCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceCreatePreviewCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `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`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -2565,7 +2565,7 @@ type InvoiceCustomField struct { // The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. type InvoiceCustomerTaxID 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, or `unknown` + // 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` Type *TaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/issuing_transaction.go b/issuing_transaction.go index 18998ddc71..9a2f789943 100644 --- a/issuing_transaction.go +++ b/issuing_transaction.go @@ -25,9 +25,14 @@ type IssuingTransactionPurchaseDetailsFuelUnit string // List of values that IssuingTransactionPurchaseDetailsFuelUnit can take const ( - IssuingTransactionPurchaseDetailsFuelUnitLiter IssuingTransactionPurchaseDetailsFuelUnit = "liter" - IssuingTransactionPurchaseDetailsFuelUnitUSGallon IssuingTransactionPurchaseDetailsFuelUnit = "us_gallon" - IssuingTransactionPurchaseDetailsFuelUnitOther IssuingTransactionPurchaseDetailsFuelUnit = "other" + IssuingTransactionPurchaseDetailsFuelUnitChargingMinute IssuingTransactionPurchaseDetailsFuelUnit = "charging_minute" + IssuingTransactionPurchaseDetailsFuelUnitImperialGallon IssuingTransactionPurchaseDetailsFuelUnit = "imperial_gallon" + IssuingTransactionPurchaseDetailsFuelUnitKilogram IssuingTransactionPurchaseDetailsFuelUnit = "kilogram" + IssuingTransactionPurchaseDetailsFuelUnitKilowattHour IssuingTransactionPurchaseDetailsFuelUnit = "kilowatt_hour" + IssuingTransactionPurchaseDetailsFuelUnitLiter IssuingTransactionPurchaseDetailsFuelUnit = "liter" + IssuingTransactionPurchaseDetailsFuelUnitPound IssuingTransactionPurchaseDetailsFuelUnit = "pound" + IssuingTransactionPurchaseDetailsFuelUnitUSGallon IssuingTransactionPurchaseDetailsFuelUnit = "us_gallon" + IssuingTransactionPurchaseDetailsFuelUnitOther IssuingTransactionPurchaseDetailsFuelUnit = "other" ) // The nature of the transaction. diff --git a/paymentintent.go b/paymentintent.go index 1b598615e9..3775633f6b 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -642,6 +642,18 @@ const ( PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsageNone PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage = "none" ) +// Indicates that you intend to make future payments with this PaymentIntent's payment method. +// +// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. +// +// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). +type PaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage string + +// List of values that PaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage can take +const ( + PaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsageNone PaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage = "none" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. @@ -783,6 +795,18 @@ const ( PaymentIntentPaymentMethodOptionsSwishSetupFutureUsageNone PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage = "none" ) +// Indicates that you intend to make future payments with this PaymentIntent's payment method. +// +// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. +// +// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). +type PaymentIntentPaymentMethodOptionsTWINTSetupFutureUsage string + +// List of values that PaymentIntentPaymentMethodOptionsTWINTSetupFutureUsage can take +const ( + PaymentIntentPaymentMethodOptionsTWINTSetupFutureUsageNone PaymentIntentPaymentMethodOptionsTWINTSetupFutureUsage = "none" +) + // The list of permissions to request. The `payment_method` permission must be included. type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission string @@ -1043,6 +1067,8 @@ type PaymentIntentPaymentMethodDataParams struct { 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 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. @@ -1065,6 +1091,8 @@ type PaymentIntentPaymentMethodDataParams struct { Sofort *PaymentMethodSofortParams `form:"sofort"` // 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. @@ -1610,6 +1638,18 @@ type PaymentIntentPaymentMethodOptionsMobilepayParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. +type PaymentIntentPaymentMethodOptionsMultibancoParams struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + // + // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + SetupFutureUsage *string `form:"setup_future_usage"` +} + // If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. type PaymentIntentPaymentMethodOptionsOXXOParams struct { // The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -1759,6 +1799,18 @@ type PaymentIntentPaymentMethodOptionsSwishParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. +type PaymentIntentPaymentMethodOptionsTWINTParams struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + // + // If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + SetupFutureUsage *string `form:"setup_future_usage"` +} + // Additional fields for Financial Connections Session creation type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsParams struct { // The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. @@ -1881,6 +1933,8 @@ type PaymentIntentPaymentMethodOptionsParams struct { Link *PaymentIntentPaymentMethodOptionsLinkParams `form:"link"` // If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. Mobilepay *PaymentIntentPaymentMethodOptionsMobilepayParams `form:"mobilepay"` + // If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + Multibanco *PaymentIntentPaymentMethodOptionsMultibancoParams `form:"multibanco"` // If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. OXXO *PaymentIntentPaymentMethodOptionsOXXOParams `form:"oxxo"` // If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. @@ -1901,6 +1955,8 @@ type PaymentIntentPaymentMethodOptionsParams struct { Sofort *PaymentIntentPaymentMethodOptionsSofortParams `form:"sofort"` // If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. Swish *PaymentIntentPaymentMethodOptionsSwishParams `form:"swish"` + // If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + TWINT *PaymentIntentPaymentMethodOptionsTWINTParams `form:"twint"` // If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. USBankAccount *PaymentIntentPaymentMethodOptionsUSBankAccountParams `form:"us_bank_account"` // If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. @@ -2514,6 +2570,16 @@ type PaymentIntentNextActionKonbiniDisplayDetails struct { HostedVoucherURL string `json:"hosted_voucher_url"` Stores *PaymentIntentNextActionKonbiniDisplayDetailsStores `json:"stores"` } +type PaymentIntentNextActionMultibancoDisplayDetails struct { + // Entity number associated with this Multibanco payment. + Entity string `json:"entity"` + // The timestamp at which the Multibanco voucher expires. + ExpiresAt int64 `json:"expires_at"` + // The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. + HostedVoucherURL string `json:"hosted_voucher_url"` + // Reference number associated with this Multibanco payment. + Reference string `json:"reference"` +} type PaymentIntentNextActionOXXODisplayDetails struct { // The timestamp after which the OXXO voucher expires. ExpiresAfter int64 `json:"expires_after"` @@ -2627,6 +2693,7 @@ type PaymentIntentNextAction struct { CashAppHandleRedirectOrDisplayQRCode *PaymentIntentNextActionCashAppHandleRedirectOrDisplayQRCode `json:"cashapp_handle_redirect_or_display_qr_code"` DisplayBankTransferInstructions *PaymentIntentNextActionDisplayBankTransferInstructions `json:"display_bank_transfer_instructions"` KonbiniDisplayDetails *PaymentIntentNextActionKonbiniDisplayDetails `json:"konbini_display_details"` + MultibancoDisplayDetails *PaymentIntentNextActionMultibancoDisplayDetails `json:"multibanco_display_details"` OXXODisplayDetails *PaymentIntentNextActionOXXODisplayDetails `json:"oxxo_display_details"` PayNowDisplayQRCode *PaymentIntentNextActionPayNowDisplayQRCode `json:"paynow_display_qr_code"` PixDisplayQRCode *PaymentIntentNextActionPixDisplayQRCode `json:"pix_display_qr_code"` @@ -2974,6 +3041,14 @@ type PaymentIntentPaymentMethodOptionsMobilepay struct { // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsMobilepaySetupFutureUsage `json:"setup_future_usage"` } +type PaymentIntentPaymentMethodOptionsMultibanco struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + SetupFutureUsage PaymentIntentPaymentMethodOptionsMultibancoSetupFutureUsage `json:"setup_future_usage"` +} type PaymentIntentPaymentMethodOptionsOXXO struct { // The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. ExpiresAfterDays int64 `json:"expires_after_days"` @@ -3074,6 +3149,14 @@ type PaymentIntentPaymentMethodOptionsSwish struct { // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage PaymentIntentPaymentMethodOptionsSwishSetupFutureUsage `json:"setup_future_usage"` } +type PaymentIntentPaymentMethodOptionsTWINT struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + SetupFutureUsage PaymentIntentPaymentMethodOptionsTWINTSetupFutureUsage `json:"setup_future_usage"` +} type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnections struct { // The list of permissions to request. The `payment_method` permission must be included. Permissions []PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission `json:"permissions"` @@ -3147,6 +3230,7 @@ type PaymentIntentPaymentMethodOptions struct { Konbini *PaymentIntentPaymentMethodOptionsKonbini `json:"konbini"` Link *PaymentIntentPaymentMethodOptionsLink `json:"link"` Mobilepay *PaymentIntentPaymentMethodOptionsMobilepay `json:"mobilepay"` + Multibanco *PaymentIntentPaymentMethodOptionsMultibanco `json:"multibanco"` OXXO *PaymentIntentPaymentMethodOptionsOXXO `json:"oxxo"` P24 *PaymentIntentPaymentMethodOptionsP24 `json:"p24"` PayNow *PaymentIntentPaymentMethodOptionsPayNow `json:"paynow"` @@ -3157,6 +3241,7 @@ type PaymentIntentPaymentMethodOptions struct { SEPADebit *PaymentIntentPaymentMethodOptionsSEPADebit `json:"sepa_debit"` Sofort *PaymentIntentPaymentMethodOptionsSofort `json:"sofort"` Swish *PaymentIntentPaymentMethodOptionsSwish `json:"swish"` + TWINT *PaymentIntentPaymentMethodOptionsTWINT `json:"twint"` USBankAccount *PaymentIntentPaymentMethodOptionsUSBankAccount `json:"us_bank_account"` WeChatPay *PaymentIntentPaymentMethodOptionsWeChatPay `json:"wechat_pay"` Zip *PaymentIntentPaymentMethodOptionsZip `json:"zip"` diff --git a/paymentmethod.go b/paymentmethod.go index 6951218c6a..d8844b9fd2 100644 --- a/paymentmethod.go +++ b/paymentmethod.go @@ -199,6 +199,7 @@ const ( PaymentMethodTypeKonbini PaymentMethodType = "konbini" PaymentMethodTypeLink PaymentMethodType = "link" PaymentMethodTypeMobilepay PaymentMethodType = "mobilepay" + PaymentMethodTypeMultibanco PaymentMethodType = "multibanco" PaymentMethodTypeOXXO PaymentMethodType = "oxxo" PaymentMethodTypeP24 PaymentMethodType = "p24" PaymentMethodTypePayNow PaymentMethodType = "paynow" @@ -209,6 +210,7 @@ const ( PaymentMethodTypeSEPADebit PaymentMethodType = "sepa_debit" PaymentMethodTypeSofort PaymentMethodType = "sofort" PaymentMethodTypeSwish PaymentMethodType = "swish" + PaymentMethodTypeTWINT PaymentMethodType = "twint" PaymentMethodTypeUSBankAccount PaymentMethodType = "us_bank_account" PaymentMethodTypeWeChatPay PaymentMethodType = "wechat_pay" PaymentMethodTypeZip PaymentMethodType = "zip" @@ -433,6 +435,9 @@ type PaymentMethodLinkParams struct{} // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. type PaymentMethodMobilepayParams struct{} +// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. +type PaymentMethodMultibancoParams struct{} + // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. type PaymentMethodOXXOParams struct{} @@ -478,6 +483,9 @@ type PaymentMethodSofortParams struct { // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. type PaymentMethodSwishParams struct{} +// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. +type PaymentMethodTWINTParams struct{} + // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. type PaymentMethodUSBankAccountParams struct { // Account holder type: individual or company. @@ -557,6 +565,8 @@ type PaymentMethodParams struct { 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 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. @@ -579,6 +589,8 @@ type PaymentMethodParams struct { Sofort *PaymentMethodSofortParams `form:"sofort"` // 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. @@ -1017,6 +1029,7 @@ type PaymentMethodLink struct { PersistentToken string `json:"persistent_token"` } type PaymentMethodMobilepay struct{} +type PaymentMethodMultibanco struct{} type PaymentMethodOXXO struct{} type PaymentMethodP24 struct { // The customer's bank, if provided. @@ -1066,6 +1079,7 @@ type PaymentMethodSofort struct { Country string `json:"country"` } type PaymentMethodSwish struct{} +type PaymentMethodTWINT struct{} // Contains information about US bank account networks that can be used. type PaymentMethodUSBankAccountNetworks struct { @@ -1150,8 +1164,9 @@ type PaymentMethod struct { // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - Metadata map[string]string `json:"metadata"` - Mobilepay *PaymentMethodMobilepay `json:"mobilepay"` + Metadata map[string]string `json:"metadata"` + Mobilepay *PaymentMethodMobilepay `json:"mobilepay"` + Multibanco *PaymentMethodMultibanco `json:"multibanco"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` OXXO *PaymentMethodOXXO `json:"oxxo"` @@ -1166,6 +1181,7 @@ type PaymentMethod struct { SEPADebit *PaymentMethodSEPADebit `json:"sepa_debit"` Sofort *PaymentMethodSofort `json:"sofort"` Swish *PaymentMethodSwish `json:"swish"` + TWINT *PaymentMethodTWINT `json:"twint"` // The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. Type PaymentMethodType `json:"type"` USBankAccount *PaymentMethodUSBankAccount `json:"us_bank_account"` diff --git a/paymentmethodconfiguration.go b/paymentmethodconfiguration.go index 63ee404f36..19a5e0321a 100644 --- a/paymentmethodconfiguration.go +++ b/paymentmethodconfiguration.go @@ -500,6 +500,25 @@ const ( PaymentMethodConfigurationMobilepayDisplayPreferenceValueOn PaymentMethodConfigurationMobilepayDisplayPreferenceValue = "on" ) +// The account's display preference. +type PaymentMethodConfigurationMultibancoDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationMultibancoDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceNone PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "none" + PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceOff PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "off" + PaymentMethodConfigurationMultibancoDisplayPreferencePreferenceOn PaymentMethodConfigurationMultibancoDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationMultibancoDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationMultibancoDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationMultibancoDisplayPreferenceValueOff PaymentMethodConfigurationMultibancoDisplayPreferenceValue = "off" + PaymentMethodConfigurationMultibancoDisplayPreferenceValueOn PaymentMethodConfigurationMultibancoDisplayPreferenceValue = "on" +) + // The account's display preference. type PaymentMethodConfigurationOXXODisplayPreferencePreference string @@ -1066,6 +1085,18 @@ type PaymentMethodConfigurationMobilepayParams struct { DisplayPreference *PaymentMethodConfigurationMobilepayDisplayPreferenceParams `form:"display_preference"` } +// Whether or not the payment method should be displayed. +type PaymentMethodConfigurationMultibancoDisplayPreferenceParams 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 PaymentMethodConfigurationMultibancoParams struct { + // Whether or not the payment method should be displayed. + DisplayPreference *PaymentMethodConfigurationMultibancoDisplayPreferenceParams `form:"display_preference"` +} + // Whether or not the payment method should be displayed. type PaymentMethodConfigurationOXXODisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. @@ -1271,6 +1302,8 @@ type PaymentMethodConfigurationParams struct { Link *PaymentMethodConfigurationLinkParams `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 *PaymentMethodConfigurationMobilepayParams `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 *PaymentMethodConfigurationMultibancoParams `form:"multibanco"` // Configuration name. Name *string `form:"name"` // 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. @@ -1644,6 +1677,19 @@ type PaymentMethodConfigurationMobilepay struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationMobilepayDisplayPreference `json:"display_preference"` } +type PaymentMethodConfigurationMultibancoDisplayPreference 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"` + // The account's display preference. + Preference PaymentMethodConfigurationMultibancoDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationMultibancoDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationMultibanco struct { + // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + Available bool `json:"available"` + DisplayPreference *PaymentMethodConfigurationMultibancoDisplayPreference `json:"display_preference"` +} type PaymentMethodConfigurationOXXODisplayPreference 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"` @@ -1851,8 +1897,9 @@ type PaymentMethodConfiguration struct { Konbini *PaymentMethodConfigurationKonbini `json:"konbini"` Link *PaymentMethodConfigurationLink `json:"link"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - Livemode bool `json:"livemode"` - Mobilepay *PaymentMethodConfigurationMobilepay `json:"mobilepay"` + Livemode bool `json:"livemode"` + Mobilepay *PaymentMethodConfigurationMobilepay `json:"mobilepay"` + Multibanco *PaymentMethodConfigurationMultibanco `json:"multibanco"` // The configuration's name. Name string `json:"name"` // String representing the object's type. Objects of the same type share the same value. diff --git a/refund.go b/refund.go index dc634853a1..1fbf726f99 100644 --- a/refund.go +++ b/refund.go @@ -190,6 +190,12 @@ type RefundDestinationDetailsJPBankTransfer struct { ReferenceStatus string `json:"reference_status"` } type RefundDestinationDetailsKlarna struct{} +type RefundDestinationDetailsMultibanco struct { + // The reference assigned to the refund. + Reference string `json:"reference"` + // Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + ReferenceStatus string `json:"reference_status"` +} type RefundDestinationDetailsMXBankTransfer struct { // The reference assigned to the refund. Reference string `json:"reference"` @@ -245,6 +251,7 @@ type RefundDestinationDetails struct { Grabpay *RefundDestinationDetailsGrabpay `json:"grabpay"` JPBankTransfer *RefundDestinationDetailsJPBankTransfer `json:"jp_bank_transfer"` Klarna *RefundDestinationDetailsKlarna `json:"klarna"` + Multibanco *RefundDestinationDetailsMultibanco `json:"multibanco"` MXBankTransfer *RefundDestinationDetailsMXBankTransfer `json:"mx_bank_transfer"` P24 *RefundDestinationDetailsP24 `json:"p24"` PayNow *RefundDestinationDetailsPayNow `json:"paynow"` diff --git a/setupintent.go b/setupintent.go index 0cd4cddba5..7a7c1829c4 100644 --- a/setupintent.go +++ b/setupintent.go @@ -413,6 +413,9 @@ type SetupIntentPaymentMethodDataLinkParams struct{} // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. type SetupIntentPaymentMethodDataMobilepayParams struct{} +// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. +type SetupIntentPaymentMethodDataMultibancoParams struct{} + // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. type SetupIntentPaymentMethodDataOXXOParams struct{} @@ -458,6 +461,9 @@ type SetupIntentPaymentMethodDataSofortParams struct { // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. type SetupIntentPaymentMethodDataSwishParams struct{} +// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. +type SetupIntentPaymentMethodDataTWINTParams struct{} + // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. type SetupIntentPaymentMethodDataUSBankAccountParams struct { // Account holder type: individual or company. @@ -531,6 +537,8 @@ type SetupIntentPaymentMethodDataParams struct { Metadata map[string]string `form:"metadata"` // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. Mobilepay *SetupIntentPaymentMethodDataMobilepayParams `form:"mobilepay"` + // If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + Multibanco *SetupIntentPaymentMethodDataMultibancoParams `form:"multibanco"` // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. OXXO *SetupIntentPaymentMethodDataOXXOParams `form:"oxxo"` // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. @@ -553,6 +561,8 @@ type SetupIntentPaymentMethodDataParams struct { Sofort *SetupIntentPaymentMethodDataSofortParams `form:"sofort"` // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. Swish *SetupIntentPaymentMethodDataSwishParams `form:"swish"` + // If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + TWINT *SetupIntentPaymentMethodDataTWINTParams `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. @@ -991,6 +1001,9 @@ type SetupIntentConfirmPaymentMethodDataLinkParams struct{} // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. type SetupIntentConfirmPaymentMethodDataMobilepayParams struct{} +// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. +type SetupIntentConfirmPaymentMethodDataMultibancoParams struct{} + // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. type SetupIntentConfirmPaymentMethodDataOXXOParams struct{} @@ -1036,6 +1049,9 @@ type SetupIntentConfirmPaymentMethodDataSofortParams struct { // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. type SetupIntentConfirmPaymentMethodDataSwishParams struct{} +// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. +type SetupIntentConfirmPaymentMethodDataTWINTParams struct{} + // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. type SetupIntentConfirmPaymentMethodDataUSBankAccountParams struct { // Account holder type: individual or company. @@ -1109,6 +1125,8 @@ type SetupIntentConfirmPaymentMethodDataParams struct { Metadata map[string]string `form:"metadata"` // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. Mobilepay *SetupIntentConfirmPaymentMethodDataMobilepayParams `form:"mobilepay"` + // If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + Multibanco *SetupIntentConfirmPaymentMethodDataMultibancoParams `form:"multibanco"` // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. OXXO *SetupIntentConfirmPaymentMethodDataOXXOParams `form:"oxxo"` // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. @@ -1131,6 +1149,8 @@ type SetupIntentConfirmPaymentMethodDataParams struct { Sofort *SetupIntentConfirmPaymentMethodDataSofortParams `form:"sofort"` // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. Swish *SetupIntentConfirmPaymentMethodDataSwishParams `form:"swish"` + // If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + TWINT *SetupIntentConfirmPaymentMethodDataTWINTParams `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. diff --git a/shippingrate.go b/shippingrate.go index 6416a2e27a..0ae5ca22ed 100644 --- a/shippingrate.go +++ b/shippingrate.go @@ -52,7 +52,7 @@ const ( ShippingRateTaxBehaviorUnspecified ShippingRateTaxBehavior = "unspecified" ) -// The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. +// The type of calculation to use on the shipping rate. type ShippingRateType string // List of values that ShippingRateType can take @@ -141,7 +141,7 @@ type ShippingRateParams struct { TaxBehavior *string `form:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. TaxCode *string `form:"tax_code"` - // The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + // The type of calculation to use on the shipping rate. Type *string `form:"type"` } @@ -224,7 +224,7 @@ type ShippingRate struct { TaxBehavior ShippingRateTaxBehavior `json:"tax_behavior"` // A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. TaxCode *TaxCode `json:"tax_code"` - // The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + // The type of calculation to use on the shipping rate. Type ShippingRateType `json:"type"` } diff --git a/subscription.go b/subscription.go index 6a36c12b84..285a3449bd 100644 --- a/subscription.go +++ b/subscription.go @@ -54,6 +54,15 @@ const ( SubscriptionCollectionMethodSendInvoice SubscriptionCollectionMethod = "send_invoice" ) +// Type of the account referenced. +type SubscriptionInvoiceSettingsIssuerType string + +// List of values that SubscriptionInvoiceSettingsIssuerType can take +const ( + SubscriptionInvoiceSettingsIssuerTypeAccount SubscriptionInvoiceSettingsIssuerType = "account" + SubscriptionInvoiceSettingsIssuerTypeSelf SubscriptionInvoiceSettingsIssuerType = "self" +) + // The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. type SubscriptionPauseCollectionBehavior string @@ -269,9 +278,9 @@ type SubscriptionCancelParams struct { CancellationDetails *SubscriptionCancelCancellationDetailsParams `form:"cancellation_details"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` - // Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. + // Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. InvoiceNow *bool `form:"invoice_now"` - // Will generate a proration invoice item that credits remaining unused time until the subscription period end. + // Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`. Prorate *bool `form:"prorate"` } @@ -806,6 +815,17 @@ type SubscriptionCancellationDetails struct { // Why this subscription was canceled. Reason SubscriptionCancellationDetailsReason `json:"reason"` } +type SubscriptionInvoiceSettingsIssuer struct { + // The connected account being referenced when `type` is `account`. + Account *Account `json:"account"` + // Type of the account referenced. + Type SubscriptionInvoiceSettingsIssuerType `json:"type"` +} +type SubscriptionInvoiceSettings struct { + // The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + AccountTaxIDs []*TaxID `json:"account_tax_ids"` + Issuer *SubscriptionInvoiceSettingsIssuer `json:"issuer"` +} // 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/billing/subscriptions/pause-payment). type SubscriptionPauseCollection struct { @@ -1007,7 +1027,8 @@ type Subscription struct { // If the subscription has ended, the date the subscription ended. EndedAt int64 `json:"ended_at"` // Unique identifier for the object. - ID string `json:"id"` + ID string `json:"id"` + InvoiceSettings *SubscriptionInvoiceSettings `json:"invoice_settings"` // List of subscription items, each with an attached price. Items *SubscriptionItemList `json:"items"` // The most recent invoice this subscription has generated. diff --git a/tax_calculation.go b/tax_calculation.go index 9a1907ecd6..3154f89d96 100644 --- a/tax_calculation.go +++ b/tax_calculation.go @@ -15,7 +15,7 @@ const ( TaxCalculationCustomerDetailsAddressSourceShipping TaxCalculationCustomerDetailsAddressSource = "shipping" ) -// 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, or `unknown` +// 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` type TaxCalculationCustomerDetailsTaxIDType string // List of values that TaxCalculationCustomerDetailsTaxIDType can take @@ -41,6 +41,7 @@ const ( TaxCalculationCustomerDetailsTaxIDTypeCNTIN TaxCalculationCustomerDetailsTaxIDType = "cn_tin" TaxCalculationCustomerDetailsTaxIDTypeCONIT TaxCalculationCustomerDetailsTaxIDType = "co_nit" TaxCalculationCustomerDetailsTaxIDTypeCRTIN TaxCalculationCustomerDetailsTaxIDType = "cr_tin" + TaxCalculationCustomerDetailsTaxIDTypeDEStn TaxCalculationCustomerDetailsTaxIDType = "de_stn" TaxCalculationCustomerDetailsTaxIDTypeDORCN TaxCalculationCustomerDetailsTaxIDType = "do_rcn" TaxCalculationCustomerDetailsTaxIDTypeECRUC TaxCalculationCustomerDetailsTaxIDType = "ec_ruc" TaxCalculationCustomerDetailsTaxIDTypeEGTIN TaxCalculationCustomerDetailsTaxIDType = "eg_tin" @@ -231,7 +232,7 @@ func (p *TaxCalculationListLineItemsParams) AddExpand(f string) { // 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 TaxCalculationCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `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`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -316,7 +317,7 @@ func (p *TaxCalculationParams) AddExpand(f string) { // 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, or `unknown` + // 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` Type TaxCalculationCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/tax_transaction.go b/tax_transaction.go index c081556a15..c3e6ef3df8 100644 --- a/tax_transaction.go +++ b/tax_transaction.go @@ -15,7 +15,7 @@ const ( TaxTransactionCustomerDetailsAddressSourceShipping TaxTransactionCustomerDetailsAddressSource = "shipping" ) -// 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, or `unknown` +// 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` type TaxTransactionCustomerDetailsTaxIDType string // List of values that TaxTransactionCustomerDetailsTaxIDType can take @@ -41,6 +41,7 @@ const ( TaxTransactionCustomerDetailsTaxIDTypeCNTIN TaxTransactionCustomerDetailsTaxIDType = "cn_tin" TaxTransactionCustomerDetailsTaxIDTypeCONIT TaxTransactionCustomerDetailsTaxIDType = "co_nit" TaxTransactionCustomerDetailsTaxIDTypeCRTIN TaxTransactionCustomerDetailsTaxIDType = "cr_tin" + TaxTransactionCustomerDetailsTaxIDTypeDEStn TaxTransactionCustomerDetailsTaxIDType = "de_stn" TaxTransactionCustomerDetailsTaxIDTypeDORCN TaxTransactionCustomerDetailsTaxIDType = "do_rcn" TaxTransactionCustomerDetailsTaxIDTypeECRUC TaxTransactionCustomerDetailsTaxIDType = "ec_ruc" TaxTransactionCustomerDetailsTaxIDTypeEGTIN TaxTransactionCustomerDetailsTaxIDType = "eg_tin" @@ -306,7 +307,7 @@ func (p *TaxTransactionCreateReversalParams) AddMetadata(key string, value strin // 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, or `unknown` + // 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`, `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`, `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`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, or `unknown` Type TaxTransactionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/taxid.go b/taxid.go index d8181f012a..d86c3d366a 100644 --- a/taxid.go +++ b/taxid.go @@ -19,7 +19,7 @@ const ( TaxIDOwnerTypeSelf TaxIDOwnerType = "self" ) -// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` +// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `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`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` type TaxIDType string // List of values that TaxIDType can take @@ -45,6 +45,7 @@ const ( TaxIDTypeCNTIN TaxIDType = "cn_tin" TaxIDTypeCONIT TaxIDType = "co_nit" TaxIDTypeCRTIN TaxIDType = "cr_tin" + TaxIDTypeDEStn TaxIDType = "de_stn" TaxIDTypeDORCN TaxIDType = "do_rcn" TaxIDTypeECRUC TaxIDType = "ec_ruc" TaxIDTypeEGTIN TaxIDType = "eg_tin" @@ -115,7 +116,7 @@ type TaxIDParams struct { 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`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `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`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -182,7 +183,7 @@ type TaxID struct { Object string `json:"object"` // The account or customer the tax ID belongs to. Owner *TaxIDOwner `json:"owner"` - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `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`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`. Note that some legacy tax IDs have type `unknown` Type TaxIDType `json:"type"` // Value of the tax ID. Value string `json:"value"` diff --git a/terminal_location.go b/terminal_location.go index 95bcadf51c..dbbceaebb5 100644 --- a/terminal_location.go +++ b/terminal_location.go @@ -11,7 +11,7 @@ import "encoding/json" // Deletes a Location object. type TerminalLocationParams struct { Params `form:"*"` - // The full address of the location. + // The full address of the location. If you're updating the `address` field, avoid changing the `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"` diff --git a/testhelpers_confirmationtoken.go b/testhelpers_confirmationtoken.go index 5160e59765..74cef5da25 100644 --- a/testhelpers_confirmationtoken.go +++ b/testhelpers_confirmationtoken.go @@ -128,6 +128,9 @@ type TestHelpersConfirmationTokenPaymentMethodDataLinkParams struct{} // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. type TestHelpersConfirmationTokenPaymentMethodDataMobilepayParams struct{} +// If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. +type TestHelpersConfirmationTokenPaymentMethodDataMultibancoParams struct{} + // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. type TestHelpersConfirmationTokenPaymentMethodDataOXXOParams struct{} @@ -173,6 +176,9 @@ type TestHelpersConfirmationTokenPaymentMethodDataSofortParams struct { // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. type TestHelpersConfirmationTokenPaymentMethodDataSwishParams struct{} +// If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. +type TestHelpersConfirmationTokenPaymentMethodDataTWINTParams struct{} + // If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. type TestHelpersConfirmationTokenPaymentMethodDataUSBankAccountParams struct { // Account holder type: individual or company. @@ -245,6 +251,8 @@ type TestHelpersConfirmationTokenPaymentMethodDataParams struct { Metadata map[string]string `form:"metadata"` // If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. Mobilepay *TestHelpersConfirmationTokenPaymentMethodDataMobilepayParams `form:"mobilepay"` + // If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + Multibanco *TestHelpersConfirmationTokenPaymentMethodDataMultibancoParams `form:"multibanco"` // If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. OXXO *TestHelpersConfirmationTokenPaymentMethodDataOXXOParams `form:"oxxo"` // If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. @@ -267,6 +275,8 @@ type TestHelpersConfirmationTokenPaymentMethodDataParams struct { Sofort *TestHelpersConfirmationTokenPaymentMethodDataSofortParams `form:"sofort"` // If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. Swish *TestHelpersConfirmationTokenPaymentMethodDataSwishParams `form:"swish"` + // If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + TWINT *TestHelpersConfirmationTokenPaymentMethodDataTWINTParams `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. diff --git a/token.go b/token.go index daa836a049..3bba350b2c 100644 --- a/token.go +++ b/token.go @@ -93,8 +93,7 @@ type Token struct { // These bank accounts are payment methods on `Customer` objects. // // On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer - // destinations on `Account` objects for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) - // is `application`, which includes [Custom accounts](https://stripe.com/connect/custom-accounts). + // destinations on `Account` objects for connected accounts. // They can be bank accounts or debit cards as well, and are documented in the links above. // // Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers) diff --git a/transferreversal.go b/transferreversal.go index 6973ea11c1..9ebd7f44fb 100644 --- a/transferreversal.go +++ b/transferreversal.go @@ -31,7 +31,7 @@ type TransferReversalParams struct { ID *string `form:"-"` // Included in URL // A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. Amount *int64 `form:"amount"` - // An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. + // 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"`