From 9cf3d79a520254dfb4498f2a7d2d58fd0968e4a4 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:51:23 -0700 Subject: [PATCH] Update generated code (#1846) * Update generated code for v941 * Update generated code for v942 * Update generated code for v943 * Update generated code for v944 * Update generated code for v945 * Update generated code for v946 * Update generated code for v947 * Update generated code for v948 * Update generated code for v949 * Update generated code for v950 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- account.go | 4 +- accountsession.go | 72 ++++++++++++++++++++++++++++---- bankaccount.go | 4 +- billing_meter.go | 2 +- billing_metereventadjustment.go | 10 +++-- billingportal_session.go | 4 +- capability.go | 4 +- charge.go | 10 +++-- checkout_session.go | 23 +++++++++- confirmationtoken.go | 3 ++ customer.go | 2 +- error.go | 4 ++ financialconnections_account.go | 2 + invoice.go | 8 ++-- paymentintent.go | 34 +++++++++++++++ paymentmethod.go | 8 ++++ paymentmethodconfiguration.go | 47 +++++++++++++++++++++ person.go | 4 +- refund.go | 2 + setupintent.go | 18 ++++++++ subscription.go | 3 +- tax_calculation.go | 10 +++-- tax_transaction.go | 8 +++- taxid.go | 10 +++-- testhelpers_confirmationtoken.go | 5 +++ transferreversal.go | 2 +- usagerecord.go | 2 + 28 files changed, 264 insertions(+), 43 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 33b0af2583..b18a87edcc 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v940 +v950 \ No newline at end of file diff --git a/account.go b/account.go index 74ef1f5298..7d4c9b5aae 100644 --- a/account.go +++ b/account.go @@ -1296,7 +1296,7 @@ type AccountFutureRequirements struct { EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. PastDue []string `json:"past_due"` - // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. + // Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. PendingVerification []string `json:"pending_verification"` } @@ -1332,7 +1332,7 @@ type AccountRequirements struct { EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. PastDue []string `json:"past_due"` - // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + // Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. PendingVerification []string `json:"pending_verification"` } type AccountSettingsBACSDebitPayments struct { diff --git a/accountsession.go b/accountsession.go index cf797743e7..1ff12aab82 100644 --- a/accountsession.go +++ b/accountsession.go @@ -7,7 +7,24 @@ package stripe // The list of features enabled in the embedded component. -type AccountSessionComponentsAccountOnboardingFeaturesParams struct{} +type AccountSessionComponentsAccountManagementFeaturesParams struct { + // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + ExternalAccountCollection *bool `form:"external_account_collection"` +} + +// Configuration for the account management embedded component. +type AccountSessionComponentsAccountManagementParams struct { + // Whether the embedded component is enabled. + Enabled *bool `form:"enabled"` + // The list of features enabled in the embedded component. + Features *AccountSessionComponentsAccountManagementFeaturesParams `form:"features"` +} + +// The list of features enabled in the embedded component. +type AccountSessionComponentsAccountOnboardingFeaturesParams struct { + // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + ExternalAccountCollection *bool `form:"external_account_collection"` +} // Configuration for the account onboarding embedded component. type AccountSessionComponentsAccountOnboardingParams struct { @@ -28,6 +45,20 @@ type AccountSessionComponentsDocumentsParams struct { Features *AccountSessionComponentsDocumentsFeaturesParams `form:"features"` } +// The list of features enabled in the embedded component. +type AccountSessionComponentsNotificationBannerFeaturesParams struct { + // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + ExternalAccountCollection *bool `form:"external_account_collection"` +} + +// Configuration for the notification banner embedded component. +type AccountSessionComponentsNotificationBannerParams struct { + // Whether the embedded component is enabled. + Enabled *bool `form:"enabled"` + // The list of features enabled in the embedded component. + Features *AccountSessionComponentsNotificationBannerFeaturesParams `form:"features"` +} + // The list of features enabled in the embedded component. type AccountSessionComponentsPaymentDetailsFeaturesParams struct { // Whether to allow capturing and cancelling payment intents. This is `true` by default. @@ -88,10 +119,14 @@ type AccountSessionComponentsPayoutsParams struct { // Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). type AccountSessionComponentsParams struct { + // Configuration for the account management embedded component. + AccountManagement *AccountSessionComponentsAccountManagementParams `form:"account_management"` // Configuration for the account onboarding embedded component. AccountOnboarding *AccountSessionComponentsAccountOnboardingParams `form:"account_onboarding"` // Configuration for the documents embedded component. Documents *AccountSessionComponentsDocumentsParams `form:"documents"` + // Configuration for the notification banner embedded component. + NotificationBanner *AccountSessionComponentsNotificationBannerParams `form:"notification_banner"` // Configuration for the payment details embedded component. PaymentDetails *AccountSessionComponentsPaymentDetailsParams `form:"payment_details"` // Configuration for the payments embedded component. @@ -116,7 +151,19 @@ func (p *AccountSessionParams) AddExpand(f string) { p.Expand = append(p.Expand, &f) } -type AccountSessionComponentsAccountOnboardingFeatures struct{} +type AccountSessionComponentsAccountManagementFeatures struct { + // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + ExternalAccountCollection bool `json:"external_account_collection"` +} +type AccountSessionComponentsAccountManagement struct { + // Whether the embedded component is enabled. + Enabled bool `json:"enabled"` + Features *AccountSessionComponentsAccountManagementFeatures `json:"features"` +} +type AccountSessionComponentsAccountOnboardingFeatures struct { + // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + ExternalAccountCollection bool `json:"external_account_collection"` +} type AccountSessionComponentsAccountOnboarding struct { // Whether the embedded component is enabled. Enabled bool `json:"enabled"` @@ -128,6 +175,15 @@ type AccountSessionComponentsDocuments struct { Enabled bool `json:"enabled"` Features *AccountSessionComponentsDocumentsFeatures `json:"features"` } +type AccountSessionComponentsNotificationBannerFeatures struct { + // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + ExternalAccountCollection bool `json:"external_account_collection"` +} +type AccountSessionComponentsNotificationBanner struct { + // Whether the embedded component is enabled. + Enabled bool `json:"enabled"` + Features *AccountSessionComponentsNotificationBannerFeatures `json:"features"` +} type AccountSessionComponentsPaymentDetailsFeatures struct { // Whether to allow capturing and cancelling payment intents. This is `true` by default. CapturePayments bool `json:"capture_payments"` @@ -172,11 +228,13 @@ type AccountSessionComponentsPayouts struct { Features *AccountSessionComponentsPayoutsFeatures `json:"features"` } type AccountSessionComponents struct { - AccountOnboarding *AccountSessionComponentsAccountOnboarding `json:"account_onboarding"` - Documents *AccountSessionComponentsDocuments `json:"documents"` - PaymentDetails *AccountSessionComponentsPaymentDetails `json:"payment_details"` - Payments *AccountSessionComponentsPayments `json:"payments"` - Payouts *AccountSessionComponentsPayouts `json:"payouts"` + AccountManagement *AccountSessionComponentsAccountManagement `json:"account_management"` + AccountOnboarding *AccountSessionComponentsAccountOnboarding `json:"account_onboarding"` + Documents *AccountSessionComponentsDocuments `json:"documents"` + NotificationBanner *AccountSessionComponentsNotificationBanner `json:"notification_banner"` + PaymentDetails *AccountSessionComponentsPaymentDetails `json:"payment_details"` + Payments *AccountSessionComponentsPayments `json:"payments"` + Payouts *AccountSessionComponentsPayouts `json:"payouts"` } // An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components. diff --git a/bankaccount.go b/bankaccount.go index 4f8c09d37f..145821649e 100644 --- a/bankaccount.go +++ b/bankaccount.go @@ -412,7 +412,7 @@ type BankAccountFutureRequirements struct { Errors []*BankAccountFutureRequirementsError `json:"errors"` // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. PastDue []string `json:"past_due"` - // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + // Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. PendingVerification []string `json:"pending_verification"` } @@ -434,7 +434,7 @@ type BankAccountRequirements struct { Errors []*BankAccountRequirementsError `json:"errors"` // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. PastDue []string `json:"past_due"` - // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + // Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. PendingVerification []string `json:"pending_verification"` } diff --git a/billing_meter.go b/billing_meter.go index d1b898b047..251edc94a8 100644 --- a/billing_meter.go +++ b/billing_meter.go @@ -142,7 +142,7 @@ type BillingMeterValueSettings struct { EventPayloadKey string `json:"event_payload_key"` } -// A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then use the billing meter to charge the user for the number of API calls they make. +// A billing meter is a resource that allows you to track usage of a particular event. For example, you might create a billing meter to track the number of API calls made by a particular user. You can then attach the billing meter to a price and attach the price to a subscription to charge the user for the number of API calls they make. type BillingMeter struct { APIResource // Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/billing_metereventadjustment.go b/billing_metereventadjustment.go index 68aec4ac58..3294bcb3ca 100644 --- a/billing_metereventadjustment.go +++ b/billing_metereventadjustment.go @@ -15,7 +15,7 @@ const ( BillingMeterEventAdjustmentStatusPending BillingMeterEventAdjustmentStatus = "pending" ) -// Specifies whether to cancel a single event or a range of events for a time period. +// Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. type BillingMeterEventAdjustmentType string // List of values that BillingMeterEventAdjustmentType can take @@ -38,7 +38,7 @@ type BillingMeterEventAdjustmentParams struct { EventName *string `form:"event_name"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` - // Specifies whether to cancel a single event or a range of events for a time period. + // Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. Type *string `form:"type"` } @@ -47,14 +47,16 @@ func (p *BillingMeterEventAdjustmentParams) AddExpand(f string) { p.Expand = append(p.Expand, &f) } +// Specifies which event to cancel. type BillingMeterEventAdjustmentCancel struct { // Unique identifier for the event. Identifier string `json:"identifier"` } -// A billing meter event adjustment represents the status of a meter event adjustment. +// A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. type BillingMeterEventAdjustment struct { APIResource + // Specifies which event to cancel. Cancel *BillingMeterEventAdjustmentCancel `json:"cancel"` // The name of the meter event. Corresponds with the `event_name` field on a meter. EventName string `json:"event_name"` @@ -64,6 +66,6 @@ type BillingMeterEventAdjustment struct { Object string `json:"object"` // The meter event adjustment's status. Status BillingMeterEventAdjustmentStatus `json:"status"` - // Specifies whether to cancel a single event or a range of events for a time period. + // Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. Type BillingMeterEventAdjustmentType `json:"type"` } diff --git a/billingportal_session.go b/billingportal_session.go index 68547104f5..ad097fcc41 100644 --- a/billingportal_session.go +++ b/billingportal_session.go @@ -140,7 +140,7 @@ type BillingPortalSessionParams struct { FlowData *BillingPortalSessionFlowDataParams `form:"flow_data"` // The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used. Locale *string `form:"locale"` - // The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + // The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. OnBehalfOf *string `form:"on_behalf_of"` // The default URL to redirect customers to when they click on the portal's link to return to your website. ReturnURL *string `form:"return_url"` @@ -272,7 +272,7 @@ type BillingPortalSession struct { Locale string `json:"locale"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` - // The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + // The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. OnBehalfOf string `json:"on_behalf_of"` // The URL to redirect customers to when they click on the portal's link to return to your website. ReturnURL string `json:"return_url"` diff --git a/capability.go b/capability.go index f0173f2dc1..7651b77b6a 100644 --- a/capability.go +++ b/capability.go @@ -99,7 +99,7 @@ type CapabilityFutureRequirements struct { EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. PastDue []string `json:"past_due"` - // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. + // Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. PendingVerification []string `json:"pending_verification"` } @@ -131,7 +131,7 @@ type CapabilityRequirements struct { EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. PastDue []string `json:"past_due"` - // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + // Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. PendingVerification []string `json:"pending_verification"` } diff --git a/charge.go b/charge.go index fec0d16731..e370011dff 100644 --- a/charge.go +++ b/charge.go @@ -369,7 +369,7 @@ type ChargeParams struct { // Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). Amount *int64 `form:"amount"` ApplicationFee *int64 `form:"application_fee"` - // A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). + // A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees). ApplicationFeeAmount *int64 `form:"application_fee_amount"` // Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. Capture *bool `form:"capture"` @@ -388,7 +388,7 @@ type ChargeParams struct { Level3 *ChargeLevel3Params `form:"level3"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata map[string]string `form:"metadata"` - // The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). + // The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). OnBehalfOf *string `form:"on_behalf_of"` // Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. RadarOptions *ChargeRadarOptionsParams `form:"radar_options"` @@ -624,6 +624,7 @@ type ChargePaymentMethodDetailsAlipay struct { // Transaction ID of this particular Alipay transaction. TransactionID string `json:"transaction_id"` } +type ChargePaymentMethodDetailsAmazonPay struct{} type ChargePaymentMethodDetailsAUBECSDebit struct { // Bank-State-Branch number of the bank account. BSBNumber string `json:"bsb_number"` @@ -1201,6 +1202,7 @@ type ChargePaymentMethodDetails struct { Affirm *ChargePaymentMethodDetailsAffirm `json:"affirm"` AfterpayClearpay *ChargePaymentMethodDetailsAfterpayClearpay `json:"afterpay_clearpay"` Alipay *ChargePaymentMethodDetailsAlipay `json:"alipay"` + AmazonPay *ChargePaymentMethodDetailsAmazonPay `json:"amazon_pay"` AUBECSDebit *ChargePaymentMethodDetailsAUBECSDebit `json:"au_becs_debit"` BACSDebit *ChargePaymentMethodDetailsBACSDebit `json:"bacs_debit"` Bancontact *ChargePaymentMethodDetailsBancontact `json:"bancontact"` @@ -1271,9 +1273,9 @@ type Charge struct { AmountRefunded int64 `json:"amount_refunded"` // ID of the Connect application that created the charge. Application *Application `json:"application"` - // The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. + // The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. ApplicationFee *ApplicationFee `json:"application_fee"` - // The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. + // The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. ApplicationFeeAmount int64 `json:"application_fee_amount"` // Authorization code on the charge. AuthorizationCode string `json:"authorization_code"` diff --git a/checkout_session.go b/checkout_session.go index 673631aaa2..f65f85897f 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`, 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`, or `unknown` type CheckoutSessionCustomerDetailsTaxIDType string // List of values that CheckoutSessionCustomerDetailsTaxIDType can take @@ -131,6 +131,7 @@ const ( CheckoutSessionCustomerDetailsTaxIDTypeAUABN CheckoutSessionCustomerDetailsTaxIDType = "au_abn" CheckoutSessionCustomerDetailsTaxIDTypeAUARN CheckoutSessionCustomerDetailsTaxIDType = "au_arn" CheckoutSessionCustomerDetailsTaxIDTypeBGUIC CheckoutSessionCustomerDetailsTaxIDType = "bg_uic" + CheckoutSessionCustomerDetailsTaxIDTypeBhVAT CheckoutSessionCustomerDetailsTaxIDType = "bh_vat" CheckoutSessionCustomerDetailsTaxIDTypeBOTIN CheckoutSessionCustomerDetailsTaxIDType = "bo_tin" CheckoutSessionCustomerDetailsTaxIDTypeBRCNPJ CheckoutSessionCustomerDetailsTaxIDType = "br_cnpj" CheckoutSessionCustomerDetailsTaxIDTypeBRCPF CheckoutSessionCustomerDetailsTaxIDType = "br_cpf" @@ -164,14 +165,17 @@ const ( CheckoutSessionCustomerDetailsTaxIDTypeJPTRN CheckoutSessionCustomerDetailsTaxIDType = "jp_trn" CheckoutSessionCustomerDetailsTaxIDTypeKEPIN CheckoutSessionCustomerDetailsTaxIDType = "ke_pin" CheckoutSessionCustomerDetailsTaxIDTypeKRBRN CheckoutSessionCustomerDetailsTaxIDType = "kr_brn" + CheckoutSessionCustomerDetailsTaxIDTypeKzBin CheckoutSessionCustomerDetailsTaxIDType = "kz_bin" CheckoutSessionCustomerDetailsTaxIDTypeLIUID CheckoutSessionCustomerDetailsTaxIDType = "li_uid" CheckoutSessionCustomerDetailsTaxIDTypeMXRFC CheckoutSessionCustomerDetailsTaxIDType = "mx_rfc" CheckoutSessionCustomerDetailsTaxIDTypeMYFRP CheckoutSessionCustomerDetailsTaxIDType = "my_frp" CheckoutSessionCustomerDetailsTaxIDTypeMYITN CheckoutSessionCustomerDetailsTaxIDType = "my_itn" CheckoutSessionCustomerDetailsTaxIDTypeMYSST CheckoutSessionCustomerDetailsTaxIDType = "my_sst" + CheckoutSessionCustomerDetailsTaxIDTypeNgTin CheckoutSessionCustomerDetailsTaxIDType = "ng_tin" CheckoutSessionCustomerDetailsTaxIDTypeNOVAT CheckoutSessionCustomerDetailsTaxIDType = "no_vat" CheckoutSessionCustomerDetailsTaxIDTypeNOVOEC CheckoutSessionCustomerDetailsTaxIDType = "no_voec" CheckoutSessionCustomerDetailsTaxIDTypeNZGST CheckoutSessionCustomerDetailsTaxIDType = "nz_gst" + CheckoutSessionCustomerDetailsTaxIDTypeOmVAT CheckoutSessionCustomerDetailsTaxIDType = "om_vat" CheckoutSessionCustomerDetailsTaxIDTypePERUC CheckoutSessionCustomerDetailsTaxIDType = "pe_ruc" CheckoutSessionCustomerDetailsTaxIDTypePHTIN CheckoutSessionCustomerDetailsTaxIDType = "ph_tin" CheckoutSessionCustomerDetailsTaxIDTypeROTIN CheckoutSessionCustomerDetailsTaxIDType = "ro_tin" @@ -646,6 +650,7 @@ type CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetc // List of values that CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take const ( CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances" + CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchOwnership CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "ownership" CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchTransactions CheckoutSessionPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "transactions" ) @@ -1239,6 +1244,16 @@ type CheckoutSessionPaymentMethodOptionsAlipayParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// contains details about the AmazonPay payment method options. +type CheckoutSessionPaymentMethodOptionsAmazonPayParams struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + SetupFutureUsage *string `form:"setup_future_usage"` +} + // contains details about the AU Becs Debit payment method options. type CheckoutSessionPaymentMethodOptionsAUBECSDebitParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1572,6 +1587,8 @@ type CheckoutSessionPaymentMethodOptionsParams struct { AfterpayClearpay *CheckoutSessionPaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"` // contains details about the Alipay payment method options. Alipay *CheckoutSessionPaymentMethodOptionsAlipayParams `form:"alipay"` + // contains details about the AmazonPay payment method options. + AmazonPay *CheckoutSessionPaymentMethodOptionsAmazonPayParams `form:"amazon_pay"` // contains details about the AU Becs Debit payment method options. AUBECSDebit *CheckoutSessionPaymentMethodOptionsAUBECSDebitParams `form:"au_becs_debit"` // contains details about the Bacs Debit payment method options. @@ -2161,7 +2178,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`, 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`, or `unknown` Type CheckoutSessionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` @@ -2284,6 +2301,7 @@ type CheckoutSessionPaymentMethodOptionsAlipay 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 CheckoutSessionPaymentMethodOptionsAlipaySetupFutureUsage `json:"setup_future_usage"` } +type CheckoutSessionPaymentMethodOptionsAmazonPay struct{} type CheckoutSessionPaymentMethodOptionsAUBECSDebit struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // @@ -2526,6 +2544,7 @@ type CheckoutSessionPaymentMethodOptions struct { Affirm *CheckoutSessionPaymentMethodOptionsAffirm `json:"affirm"` AfterpayClearpay *CheckoutSessionPaymentMethodOptionsAfterpayClearpay `json:"afterpay_clearpay"` Alipay *CheckoutSessionPaymentMethodOptionsAlipay `json:"alipay"` + AmazonPay *CheckoutSessionPaymentMethodOptionsAmazonPay `json:"amazon_pay"` AUBECSDebit *CheckoutSessionPaymentMethodOptionsAUBECSDebit `json:"au_becs_debit"` BACSDebit *CheckoutSessionPaymentMethodOptionsBACSDebit `json:"bacs_debit"` Bancontact *CheckoutSessionPaymentMethodOptionsBancontact `json:"bancontact"` diff --git a/confirmationtoken.go b/confirmationtoken.go index 915c2538fd..9130389fb5 100644 --- a/confirmationtoken.go +++ b/confirmationtoken.go @@ -206,6 +206,7 @@ const ( ConfirmationTokenPaymentMethodPreviewTypeAffirm ConfirmationTokenPaymentMethodPreviewType = "affirm" ConfirmationTokenPaymentMethodPreviewTypeAfterpayClearpay ConfirmationTokenPaymentMethodPreviewType = "afterpay_clearpay" ConfirmationTokenPaymentMethodPreviewTypeAlipay ConfirmationTokenPaymentMethodPreviewType = "alipay" + ConfirmationTokenPaymentMethodPreviewTypeAmazonPay ConfirmationTokenPaymentMethodPreviewType = "amazon_pay" ConfirmationTokenPaymentMethodPreviewTypeAUBECSDebit ConfirmationTokenPaymentMethodPreviewType = "au_becs_debit" ConfirmationTokenPaymentMethodPreviewTypeBACSDebit ConfirmationTokenPaymentMethodPreviewType = "bacs_debit" ConfirmationTokenPaymentMethodPreviewTypeBancontact ConfirmationTokenPaymentMethodPreviewType = "bancontact" @@ -358,6 +359,7 @@ type ConfirmationTokenPaymentMethodPreviewACSSDebit struct { type ConfirmationTokenPaymentMethodPreviewAffirm struct{} type ConfirmationTokenPaymentMethodPreviewAfterpayClearpay struct{} type ConfirmationTokenPaymentMethodPreviewAlipay struct{} +type ConfirmationTokenPaymentMethodPreviewAmazonPay struct{} type ConfirmationTokenPaymentMethodPreviewAUBECSDebit struct { // Six-digit number identifying bank and branch associated with this bank account. BSBNumber string `json:"bsb_number"` @@ -704,6 +706,7 @@ type ConfirmationTokenPaymentMethodPreview struct { Affirm *ConfirmationTokenPaymentMethodPreviewAffirm `json:"affirm"` AfterpayClearpay *ConfirmationTokenPaymentMethodPreviewAfterpayClearpay `json:"afterpay_clearpay"` Alipay *ConfirmationTokenPaymentMethodPreviewAlipay `json:"alipay"` + AmazonPay *ConfirmationTokenPaymentMethodPreviewAmazonPay `json:"amazon_pay"` AUBECSDebit *ConfirmationTokenPaymentMethodPreviewAUBECSDebit `json:"au_becs_debit"` BACSDebit *ConfirmationTokenPaymentMethodPreviewBACSDebit `json:"bacs_debit"` Bancontact *ConfirmationTokenPaymentMethodPreviewBancontact `json:"bancontact"` diff --git a/customer.go b/customer.go index b5860de12f..163ccc2de7 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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `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`, `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/error.go b/error.go index 25e162411a..1b4acf6377 100644 --- a/error.go +++ b/error.go @@ -46,6 +46,10 @@ const ( ErrorCodeBankAccountUnverified ErrorCode = "bank_account_unverified" ErrorCodeBankAccountVerificationFailed ErrorCode = "bank_account_verification_failed" ErrorCodeBillingInvalidMandate ErrorCode = "billing_invalid_mandate" + ErrorCodeBillingPolicyRemoteFunctionResponseInvalid ErrorCode = "billing_policy_remote_function_response_invalid" + ErrorCodeBillingPolicyRemoteFunctionTimeout ErrorCode = "billing_policy_remote_function_timeout" + ErrorCodeBillingPolicyRemoteFunctionUnexpectedStatusCode ErrorCode = "billing_policy_remote_function_unexpected_status_code" + ErrorCodeBillingPolicyRemoteFunctionUnreachable ErrorCode = "billing_policy_remote_function_unreachable" ErrorCodeBitcoinUpgradeRequired ErrorCode = "bitcoin_upgrade_required" ErrorCodeCaptureChargeAuthorizationExpired ErrorCode = "capture_charge_authorization_expired" ErrorCodeCaptureUnauthorizedPayment ErrorCode = "capture_unauthorized_payment" diff --git a/financialconnections_account.go b/financialconnections_account.go index e93ed64887..b54ef1fe40 100644 --- a/financialconnections_account.go +++ b/financialconnections_account.go @@ -290,6 +290,8 @@ type FinancialConnectionsAccountBalanceRefresh struct { type FinancialConnectionsAccountOwnershipRefresh struct { // The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. LastAttemptedAt int64 `json:"last_attempted_at"` + // Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + NextRefreshAvailableAt int64 `json:"next_refresh_available_at"` // The status of the last refresh attempt. Status FinancialConnectionsAccountOwnershipRefreshStatus `json:"status"` } diff --git a/invoice.go b/invoice.go index 562e22722f..dca9c50104 100644 --- a/invoice.go +++ b/invoice.go @@ -115,6 +115,7 @@ type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections // List of values that InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take const ( InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances" + InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "ownership" InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method" InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" ) @@ -125,6 +126,7 @@ type InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnections // List of values that InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take const ( InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances" + InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchOwnership InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "ownership" InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchTransactions InvoicePaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "transactions" ) @@ -668,7 +670,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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `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`, `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"` @@ -861,7 +863,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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `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`, `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"` @@ -1244,7 +1246,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`, 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`, or `unknown` Type *TaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/paymentintent.go b/paymentintent.go index 4dcad9c854..c4edbb26c2 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -209,6 +209,14 @@ const ( PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsageOffSession PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage = "off_session" ) +// Controls when the funds will be captured from the customer's account. +type PaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod string + +// List of values that PaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod can take +const ( + PaymentIntentPaymentMethodOptionsAmazonPayCaptureMethodManual PaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod = "manual" +) + // 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. @@ -749,6 +757,7 @@ type PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch // List of values that PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take const ( PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances" + PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchOwnership PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "ownership" PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchTransactions PaymentIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "transactions" ) @@ -949,6 +958,8 @@ type PaymentIntentPaymentMethodDataParams struct { AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *PaymentMethodAlipayParams `form:"alipay"` + // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + AmazonPay *PaymentMethodAmazonPayParams `form:"amazon_pay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"` // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. @@ -1111,6 +1122,22 @@ type PaymentIntentPaymentMethodOptionsAlipayParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. +type PaymentIntentPaymentMethodOptionsAmazonPayParams struct { + // Controls when the funds will be captured from the customer's account. + // + // If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + // + // If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + CaptureMethod *string `form:"capture_method"` + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + SetupFutureUsage *string `form:"setup_future_usage"` +} + // If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. type PaymentIntentPaymentMethodOptionsAUBECSDebitParams struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1754,6 +1781,8 @@ type PaymentIntentPaymentMethodOptionsParams struct { AfterpayClearpay *PaymentIntentPaymentMethodOptionsAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. Alipay *PaymentIntentPaymentMethodOptionsAlipayParams `form:"alipay"` + // If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + AmazonPay *PaymentIntentPaymentMethodOptionsAmazonPayParams `form:"amazon_pay"` // If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. AUBECSDebit *PaymentIntentPaymentMethodOptionsAUBECSDebitParams `form:"au_becs_debit"` // If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. @@ -2613,6 +2642,10 @@ type PaymentIntentPaymentMethodOptionsAlipay 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 PaymentIntentPaymentMethodOptionsAlipaySetupFutureUsage `json:"setup_future_usage"` } +type PaymentIntentPaymentMethodOptionsAmazonPay struct { + // Controls when the funds will be captured from the customer's account. + CaptureMethod PaymentIntentPaymentMethodOptionsAmazonPayCaptureMethod `json:"capture_method"` +} type PaymentIntentPaymentMethodOptionsAUBECSDebit struct { // Indicates that you intend to make future payments with this PaymentIntent's payment method. // @@ -3011,6 +3044,7 @@ type PaymentIntentPaymentMethodOptions struct { Affirm *PaymentIntentPaymentMethodOptionsAffirm `json:"affirm"` AfterpayClearpay *PaymentIntentPaymentMethodOptionsAfterpayClearpay `json:"afterpay_clearpay"` Alipay *PaymentIntentPaymentMethodOptionsAlipay `json:"alipay"` + AmazonPay *PaymentIntentPaymentMethodOptionsAmazonPay `json:"amazon_pay"` AUBECSDebit *PaymentIntentPaymentMethodOptionsAUBECSDebit `json:"au_becs_debit"` BACSDebit *PaymentIntentPaymentMethodOptionsBACSDebit `json:"bacs_debit"` Bancontact *PaymentIntentPaymentMethodOptionsBancontact `json:"bancontact"` diff --git a/paymentmethod.go b/paymentmethod.go index b3b7116eaa..a6d2e65cde 100644 --- a/paymentmethod.go +++ b/paymentmethod.go @@ -146,6 +146,7 @@ const ( PaymentMethodTypeAffirm PaymentMethodType = "affirm" PaymentMethodTypeAfterpayClearpay PaymentMethodType = "afterpay_clearpay" PaymentMethodTypeAlipay PaymentMethodType = "alipay" + PaymentMethodTypeAmazonPay PaymentMethodType = "amazon_pay" PaymentMethodTypeAUBECSDebit PaymentMethodType = "au_becs_debit" PaymentMethodTypeBACSDebit PaymentMethodType = "bacs_debit" PaymentMethodTypeBancontact PaymentMethodType = "bancontact" @@ -274,6 +275,9 @@ type PaymentMethodAfterpayClearpayParams struct{} // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. type PaymentMethodAlipayParams struct{} +// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. +type PaymentMethodAmazonPayParams struct{} + // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. type PaymentMethodAUBECSDebitParams struct { // The account number for the bank account. @@ -474,6 +478,8 @@ type PaymentMethodParams struct { AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *PaymentMethodAlipayParams `form:"alipay"` + // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + AmazonPay *PaymentMethodAmazonPayParams `form:"amazon_pay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. AUBECSDebit *PaymentMethodAUBECSDebitParams `form:"au_becs_debit"` // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. @@ -620,6 +626,7 @@ type PaymentMethodACSSDebit struct { type PaymentMethodAffirm struct{} type PaymentMethodAfterpayClearpay struct{} type PaymentMethodAlipay struct{} +type PaymentMethodAmazonPay struct{} type PaymentMethodAUBECSDebit struct { // Six-digit number identifying bank and branch associated with this bank account. BSBNumber string `json:"bsb_number"` @@ -979,6 +986,7 @@ type PaymentMethod struct { Affirm *PaymentMethodAffirm `json:"affirm"` AfterpayClearpay *PaymentMethodAfterpayClearpay `json:"afterpay_clearpay"` Alipay *PaymentMethodAlipay `json:"alipay"` + AmazonPay *PaymentMethodAmazonPay `json:"amazon_pay"` AUBECSDebit *PaymentMethodAUBECSDebit `json:"au_becs_debit"` BACSDebit *PaymentMethodBACSDebit `json:"bacs_debit"` Bancontact *PaymentMethodBancontact `json:"bancontact"` diff --git a/paymentmethodconfiguration.go b/paymentmethodconfiguration.go index 8fd6511d1b..c70a90c19e 100644 --- a/paymentmethodconfiguration.go +++ b/paymentmethodconfiguration.go @@ -82,6 +82,25 @@ const ( PaymentMethodConfigurationAlipayDisplayPreferenceValueOn PaymentMethodConfigurationAlipayDisplayPreferenceValue = "on" ) +// The account's display preference. +type PaymentMethodConfigurationAmazonPayDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationAmazonPayDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationAmazonPayDisplayPreferencePreferenceNone PaymentMethodConfigurationAmazonPayDisplayPreferencePreference = "none" + PaymentMethodConfigurationAmazonPayDisplayPreferencePreferenceOff PaymentMethodConfigurationAmazonPayDisplayPreferencePreference = "off" + PaymentMethodConfigurationAmazonPayDisplayPreferencePreferenceOn PaymentMethodConfigurationAmazonPayDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationAmazonPayDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationAmazonPayDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationAmazonPayDisplayPreferenceValueOff PaymentMethodConfigurationAmazonPayDisplayPreferenceValue = "off" + PaymentMethodConfigurationAmazonPayDisplayPreferenceValueOn PaymentMethodConfigurationAmazonPayDisplayPreferenceValue = "on" +) + // The account's display preference. type PaymentMethodConfigurationApplePayDisplayPreferencePreference string @@ -733,6 +752,18 @@ type PaymentMethodConfigurationAlipayParams struct { DisplayPreference *PaymentMethodConfigurationAlipayDisplayPreferenceParams `form:"display_preference"` } +// Whether or not the payment method should be displayed. +type PaymentMethodConfigurationAmazonPayDisplayPreferenceParams struct { + // The account's preference for whether or not to display this payment method. + Preference *string `form:"preference"` +} + +// Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. +type PaymentMethodConfigurationAmazonPayParams struct { + // Whether or not the payment method should be displayed. + DisplayPreference *PaymentMethodConfigurationAmazonPayDisplayPreferenceParams `form:"display_preference"` +} + // Whether or not the payment method should be displayed. type PaymentMethodConfigurationApplePayDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. @@ -1130,6 +1161,8 @@ type PaymentMethodConfigurationParams struct { AfterpayClearpay *PaymentMethodConfigurationAfterpayClearpayParams `form:"afterpay_clearpay"` // Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. Alipay *PaymentMethodConfigurationAlipayParams `form:"alipay"` + // Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + AmazonPay *PaymentMethodConfigurationAmazonPayParams `form:"amazon_pay"` // Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. ApplePay *PaymentMethodConfigurationApplePayParams `form:"apple_pay"` // Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. @@ -1259,6 +1292,19 @@ type PaymentMethodConfigurationAlipay struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationAlipayDisplayPreference `json:"display_preference"` } +type PaymentMethodConfigurationAmazonPayDisplayPreference 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 PaymentMethodConfigurationAmazonPayDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationAmazonPayDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationAmazonPay 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 *PaymentMethodConfigurationAmazonPayDisplayPreference `json:"display_preference"` +} type PaymentMethodConfigurationApplePayDisplayPreference 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"` @@ -1685,6 +1731,7 @@ type PaymentMethodConfiguration struct { Affirm *PaymentMethodConfigurationAffirm `json:"affirm"` AfterpayClearpay *PaymentMethodConfigurationAfterpayClearpay `json:"afterpay_clearpay"` Alipay *PaymentMethodConfigurationAlipay `json:"alipay"` + AmazonPay *PaymentMethodConfigurationAmazonPay `json:"amazon_pay"` ApplePay *PaymentMethodConfigurationApplePay `json:"apple_pay"` // For child configs, the Connect application associated with the configuration. Application string `json:"application"` diff --git a/person.go b/person.go index 42d897dd14..d79085c997 100644 --- a/person.go +++ b/person.go @@ -383,7 +383,7 @@ type PersonFutureRequirements struct { EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. PastDue []string `json:"past_due"` - // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. + // Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. PendingVerification []string `json:"pending_verification"` } type PersonRelationship struct { @@ -423,7 +423,7 @@ type PersonRequirements struct { EventuallyDue []string `json:"eventually_due"` // Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. PastDue []string `json:"past_due"` - // Fields that may become required depending on the results of verification or review. Will be an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. + // Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. PendingVerification []string `json:"pending_verification"` } diff --git a/refund.go b/refund.go index 7639abfb9e..dc634853a1 100644 --- a/refund.go +++ b/refund.go @@ -142,6 +142,7 @@ func (p *RefundCancelParams) AddExpand(f string) { type RefundDestinationDetailsAffirm struct{} type RefundDestinationDetailsAfterpayClearpay struct{} type RefundDestinationDetailsAlipay struct{} +type RefundDestinationDetailsAmazonPay struct{} type RefundDestinationDetailsAuBankTransfer struct{} type RefundDestinationDetailsBLIK struct { // The reference assigned to the refund. @@ -230,6 +231,7 @@ type RefundDestinationDetails struct { Affirm *RefundDestinationDetailsAffirm `json:"affirm"` AfterpayClearpay *RefundDestinationDetailsAfterpayClearpay `json:"afterpay_clearpay"` Alipay *RefundDestinationDetailsAlipay `json:"alipay"` + AmazonPay *RefundDestinationDetailsAmazonPay `json:"amazon_pay"` AuBankTransfer *RefundDestinationDetailsAuBankTransfer `json:"au_bank_transfer"` BLIK *RefundDestinationDetailsBLIK `json:"blik"` BrBankTransfer *RefundDestinationDetailsBrBankTransfer `json:"br_bank_transfer"` diff --git a/setupintent.go b/setupintent.go index 91a1c38a5a..8dec48f88e 100644 --- a/setupintent.go +++ b/setupintent.go @@ -182,6 +182,7 @@ type SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch st // List of values that SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take const ( SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances" + SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchOwnership SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "ownership" SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchTransactions SetupIntentPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "transactions" ) @@ -309,6 +310,9 @@ type SetupIntentPaymentMethodDataAfterpayClearpayParams struct{} // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. type SetupIntentPaymentMethodDataAlipayParams struct{} +// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. +type SetupIntentPaymentMethodDataAmazonPayParams struct{} + // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. type SetupIntentPaymentMethodDataAUBECSDebitParams struct { // The account number for the bank account. @@ -485,6 +489,8 @@ type SetupIntentPaymentMethodDataParams struct { AfterpayClearpay *SetupIntentPaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *SetupIntentPaymentMethodDataAlipayParams `form:"alipay"` + // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + AmazonPay *SetupIntentPaymentMethodDataAmazonPayParams `form:"amazon_pay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. AUBECSDebit *SetupIntentPaymentMethodDataAUBECSDebitParams `form:"au_becs_debit"` // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. @@ -590,6 +596,9 @@ type SetupIntentPaymentMethodOptionsACSSDebitParams struct { VerificationMethod *string `form:"verification_method"` } +// If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. +type SetupIntentPaymentMethodOptionsAmazonPayParams struct{} + // Configuration options for setting up an eMandate for cards issued in India. type SetupIntentPaymentMethodOptionsCardMandateOptionsParams struct { // Amount to be charged for future payments. @@ -744,6 +753,8 @@ type SetupIntentPaymentMethodOptionsUSBankAccountParams struct { type SetupIntentPaymentMethodOptionsParams struct { // If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. ACSSDebit *SetupIntentPaymentMethodOptionsACSSDebitParams `form:"acss_debit"` + // If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + AmazonPay *SetupIntentPaymentMethodOptionsAmazonPayParams `form:"amazon_pay"` // Configuration for any card setup attempted on this SetupIntent. Card *SetupIntentPaymentMethodOptionsCardParams `form:"card"` // If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. @@ -874,6 +885,9 @@ type SetupIntentConfirmPaymentMethodDataAfterpayClearpayParams struct{} // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. type SetupIntentConfirmPaymentMethodDataAlipayParams struct{} +// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. +type SetupIntentConfirmPaymentMethodDataAmazonPayParams struct{} + // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. type SetupIntentConfirmPaymentMethodDataAUBECSDebitParams struct { // The account number for the bank account. @@ -1050,6 +1064,8 @@ type SetupIntentConfirmPaymentMethodDataParams struct { AfterpayClearpay *SetupIntentConfirmPaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *SetupIntentConfirmPaymentMethodDataAlipayParams `form:"alipay"` + // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + AmazonPay *SetupIntentConfirmPaymentMethodDataAmazonPayParams `form:"amazon_pay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. AUBECSDebit *SetupIntentConfirmPaymentMethodDataAUBECSDebitParams `form:"au_becs_debit"` // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. @@ -1267,6 +1283,7 @@ type SetupIntentPaymentMethodOptionsACSSDebit struct { // Bank account verification method. VerificationMethod SetupIntentPaymentMethodOptionsACSSDebitVerificationMethod `json:"verification_method"` } +type SetupIntentPaymentMethodOptionsAmazonPay struct{} // Configuration options for setting up an eMandate for cards issued in India. type SetupIntentPaymentMethodOptionsCardMandateOptions struct { @@ -1334,6 +1351,7 @@ type SetupIntentPaymentMethodOptionsUSBankAccount struct { // Payment method-specific configuration for this SetupIntent. type SetupIntentPaymentMethodOptions struct { ACSSDebit *SetupIntentPaymentMethodOptionsACSSDebit `json:"acss_debit"` + AmazonPay *SetupIntentPaymentMethodOptionsAmazonPay `json:"amazon_pay"` Card *SetupIntentPaymentMethodOptionsCard `json:"card"` CardPresent *SetupIntentPaymentMethodOptionsCardPresent `json:"card_present"` Link *SetupIntentPaymentMethodOptionsLink `json:"link"` diff --git a/subscription.go b/subscription.go index 4a376fbb90..8508a40699 100644 --- a/subscription.go +++ b/subscription.go @@ -8,7 +8,6 @@ package stripe import ( "encoding/json" - "github.com/stripe/stripe-go/v78/form" ) @@ -135,6 +134,7 @@ type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnec // List of values that SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission can take const ( SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionBalances SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "balances" + SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionOwnership SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "ownership" SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionPaymentMethod SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "payment_method" SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermissionTransactions SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPermission = "transactions" ) @@ -145,6 +145,7 @@ type SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnec // List of values that SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch can take const ( SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchBalances SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "balances" + SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchOwnership SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "ownership" SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetchTransactions SubscriptionPaymentSettingsPaymentMethodOptionsUSBankAccountFinancialConnectionsPrefetch = "transactions" ) diff --git a/tax_calculation.go b/tax_calculation.go index 2bd4f2e2be..da247fe8b2 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`, 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`, or `unknown` type TaxCalculationCustomerDetailsTaxIDType string // List of values that TaxCalculationCustomerDetailsTaxIDType can take @@ -26,6 +26,7 @@ const ( TaxCalculationCustomerDetailsTaxIDTypeAUABN TaxCalculationCustomerDetailsTaxIDType = "au_abn" TaxCalculationCustomerDetailsTaxIDTypeAUARN TaxCalculationCustomerDetailsTaxIDType = "au_arn" TaxCalculationCustomerDetailsTaxIDTypeBGUIC TaxCalculationCustomerDetailsTaxIDType = "bg_uic" + TaxCalculationCustomerDetailsTaxIDTypeBhVAT TaxCalculationCustomerDetailsTaxIDType = "bh_vat" TaxCalculationCustomerDetailsTaxIDTypeBOTIN TaxCalculationCustomerDetailsTaxIDType = "bo_tin" TaxCalculationCustomerDetailsTaxIDTypeBRCNPJ TaxCalculationCustomerDetailsTaxIDType = "br_cnpj" TaxCalculationCustomerDetailsTaxIDTypeBRCPF TaxCalculationCustomerDetailsTaxIDType = "br_cpf" @@ -59,14 +60,17 @@ const ( TaxCalculationCustomerDetailsTaxIDTypeJPTRN TaxCalculationCustomerDetailsTaxIDType = "jp_trn" TaxCalculationCustomerDetailsTaxIDTypeKEPIN TaxCalculationCustomerDetailsTaxIDType = "ke_pin" TaxCalculationCustomerDetailsTaxIDTypeKRBRN TaxCalculationCustomerDetailsTaxIDType = "kr_brn" + TaxCalculationCustomerDetailsTaxIDTypeKzBin TaxCalculationCustomerDetailsTaxIDType = "kz_bin" TaxCalculationCustomerDetailsTaxIDTypeLIUID TaxCalculationCustomerDetailsTaxIDType = "li_uid" TaxCalculationCustomerDetailsTaxIDTypeMXRFC TaxCalculationCustomerDetailsTaxIDType = "mx_rfc" TaxCalculationCustomerDetailsTaxIDTypeMYFRP TaxCalculationCustomerDetailsTaxIDType = "my_frp" TaxCalculationCustomerDetailsTaxIDTypeMYITN TaxCalculationCustomerDetailsTaxIDType = "my_itn" TaxCalculationCustomerDetailsTaxIDTypeMYSST TaxCalculationCustomerDetailsTaxIDType = "my_sst" + TaxCalculationCustomerDetailsTaxIDTypeNgTin TaxCalculationCustomerDetailsTaxIDType = "ng_tin" TaxCalculationCustomerDetailsTaxIDTypeNOVAT TaxCalculationCustomerDetailsTaxIDType = "no_vat" TaxCalculationCustomerDetailsTaxIDTypeNOVOEC TaxCalculationCustomerDetailsTaxIDType = "no_voec" TaxCalculationCustomerDetailsTaxIDTypeNZGST TaxCalculationCustomerDetailsTaxIDType = "nz_gst" + TaxCalculationCustomerDetailsTaxIDTypeOmVAT TaxCalculationCustomerDetailsTaxIDType = "om_vat" TaxCalculationCustomerDetailsTaxIDTypePERUC TaxCalculationCustomerDetailsTaxIDType = "pe_ruc" TaxCalculationCustomerDetailsTaxIDTypePHTIN TaxCalculationCustomerDetailsTaxIDType = "ph_tin" TaxCalculationCustomerDetailsTaxIDTypeROTIN TaxCalculationCustomerDetailsTaxIDType = "ro_tin" @@ -227,7 +231,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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `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`, `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"` @@ -304,7 +308,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`, 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`, 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 7770a79b83..8640d90125 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`, 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`, or `unknown` type TaxTransactionCustomerDetailsTaxIDType string // List of values that TaxTransactionCustomerDetailsTaxIDType can take @@ -26,6 +26,7 @@ const ( TaxTransactionCustomerDetailsTaxIDTypeAUABN TaxTransactionCustomerDetailsTaxIDType = "au_abn" TaxTransactionCustomerDetailsTaxIDTypeAUARN TaxTransactionCustomerDetailsTaxIDType = "au_arn" TaxTransactionCustomerDetailsTaxIDTypeBGUIC TaxTransactionCustomerDetailsTaxIDType = "bg_uic" + TaxTransactionCustomerDetailsTaxIDTypeBhVAT TaxTransactionCustomerDetailsTaxIDType = "bh_vat" TaxTransactionCustomerDetailsTaxIDTypeBOTIN TaxTransactionCustomerDetailsTaxIDType = "bo_tin" TaxTransactionCustomerDetailsTaxIDTypeBRCNPJ TaxTransactionCustomerDetailsTaxIDType = "br_cnpj" TaxTransactionCustomerDetailsTaxIDTypeBRCPF TaxTransactionCustomerDetailsTaxIDType = "br_cpf" @@ -59,14 +60,17 @@ const ( TaxTransactionCustomerDetailsTaxIDTypeJPTRN TaxTransactionCustomerDetailsTaxIDType = "jp_trn" TaxTransactionCustomerDetailsTaxIDTypeKEPIN TaxTransactionCustomerDetailsTaxIDType = "ke_pin" TaxTransactionCustomerDetailsTaxIDTypeKRBRN TaxTransactionCustomerDetailsTaxIDType = "kr_brn" + TaxTransactionCustomerDetailsTaxIDTypeKzBin TaxTransactionCustomerDetailsTaxIDType = "kz_bin" TaxTransactionCustomerDetailsTaxIDTypeLIUID TaxTransactionCustomerDetailsTaxIDType = "li_uid" TaxTransactionCustomerDetailsTaxIDTypeMXRFC TaxTransactionCustomerDetailsTaxIDType = "mx_rfc" TaxTransactionCustomerDetailsTaxIDTypeMYFRP TaxTransactionCustomerDetailsTaxIDType = "my_frp" TaxTransactionCustomerDetailsTaxIDTypeMYITN TaxTransactionCustomerDetailsTaxIDType = "my_itn" TaxTransactionCustomerDetailsTaxIDTypeMYSST TaxTransactionCustomerDetailsTaxIDType = "my_sst" + TaxTransactionCustomerDetailsTaxIDTypeNgTin TaxTransactionCustomerDetailsTaxIDType = "ng_tin" TaxTransactionCustomerDetailsTaxIDTypeNOVAT TaxTransactionCustomerDetailsTaxIDType = "no_vat" TaxTransactionCustomerDetailsTaxIDTypeNOVOEC TaxTransactionCustomerDetailsTaxIDType = "no_voec" TaxTransactionCustomerDetailsTaxIDTypeNZGST TaxTransactionCustomerDetailsTaxIDType = "nz_gst" + TaxTransactionCustomerDetailsTaxIDTypeOmVAT TaxTransactionCustomerDetailsTaxIDType = "om_vat" TaxTransactionCustomerDetailsTaxIDTypePERUC TaxTransactionCustomerDetailsTaxIDType = "pe_ruc" TaxTransactionCustomerDetailsTaxIDTypePHTIN TaxTransactionCustomerDetailsTaxIDType = "ph_tin" TaxTransactionCustomerDetailsTaxIDTypeROTIN TaxTransactionCustomerDetailsTaxIDType = "ro_tin" @@ -302,7 +306,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`, 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`, 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 7da3931917..d8181f012a 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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `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`, `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 @@ -30,6 +30,7 @@ const ( TaxIDTypeAUABN TaxIDType = "au_abn" TaxIDTypeAUARN TaxIDType = "au_arn" TaxIDTypeBGUIC TaxIDType = "bg_uic" + TaxIDTypeBhVAT TaxIDType = "bh_vat" TaxIDTypeBOTIN TaxIDType = "bo_tin" TaxIDTypeBRCNPJ TaxIDType = "br_cnpj" TaxIDTypeBRCPF TaxIDType = "br_cpf" @@ -63,14 +64,17 @@ const ( TaxIDTypeJPTRN TaxIDType = "jp_trn" TaxIDTypeKEPIN TaxIDType = "ke_pin" TaxIDTypeKRBRN TaxIDType = "kr_brn" + TaxIDTypeKzBin TaxIDType = "kz_bin" TaxIDTypeLIUID TaxIDType = "li_uid" TaxIDTypeMXRFC TaxIDType = "mx_rfc" TaxIDTypeMYFRP TaxIDType = "my_frp" TaxIDTypeMYITN TaxIDType = "my_itn" TaxIDTypeMYSST TaxIDType = "my_sst" + TaxIDTypeNgTin TaxIDType = "ng_tin" TaxIDTypeNOVAT TaxIDType = "no_vat" TaxIDTypeNOVOEC TaxIDType = "no_voec" TaxIDTypeNZGST TaxIDType = "nz_gst" + TaxIDTypeOmVAT TaxIDType = "om_vat" TaxIDTypePERUC TaxIDType = "pe_ruc" TaxIDTypePHTIN TaxIDType = "ph_tin" TaxIDTypeROTIN TaxIDType = "ro_tin" @@ -111,7 +115,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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `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`, `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"` @@ -178,7 +182,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`, `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`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `no_voec`, `nz_gst`, `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`, `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/testhelpers_confirmationtoken.go b/testhelpers_confirmationtoken.go index 8e3b9c20c7..1774ebd537 100644 --- a/testhelpers_confirmationtoken.go +++ b/testhelpers_confirmationtoken.go @@ -25,6 +25,9 @@ type TestHelpersConfirmationTokenPaymentMethodDataAfterpayClearpayParams struct{ // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. type TestHelpersConfirmationTokenPaymentMethodDataAlipayParams struct{} +// If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. +type TestHelpersConfirmationTokenPaymentMethodDataAmazonPayParams struct{} + // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. type TestHelpersConfirmationTokenPaymentMethodDataAUBECSDebitParams struct { // The account number for the bank account. @@ -200,6 +203,8 @@ type TestHelpersConfirmationTokenPaymentMethodDataParams struct { AfterpayClearpay *TestHelpersConfirmationTokenPaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *TestHelpersConfirmationTokenPaymentMethodDataAlipayParams `form:"alipay"` + // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + AmazonPay *TestHelpersConfirmationTokenPaymentMethodDataAmazonPayParams `form:"amazon_pay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. AUBECSDebit *TestHelpersConfirmationTokenPaymentMethodDataAUBECSDebitParams `form:"au_becs_debit"` // If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. diff --git a/transferreversal.go b/transferreversal.go index 630dfe0b3b..6973ea11c1 100644 --- a/transferreversal.go +++ b/transferreversal.go @@ -67,7 +67,7 @@ func (p *TransferReversalParams) AddMetadata(key string, value string) { // transfer only if the destination account has enough balance to cover the // reversal. // -// Related guide: [Reversing transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reversing-transfers) +// Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) type TransferReversal struct { APIResource // Amount, in cents (or local equivalent). diff --git a/usagerecord.go b/usagerecord.go index 90d6e3fe91..7b8674e455 100644 --- a/usagerecord.go +++ b/usagerecord.go @@ -51,6 +51,8 @@ func (p *UsageRecordParams) AppendTo(body *form.Values, keyParts []string) { // metered billing of subscription prices. // // Related guide: [Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing) +// +// This is our legacy usage-based billing API. See the [updated usage-based billing docs](https://docs.stripe.com/billing/subscriptions/usage-based). type UsageRecord struct { APIResource // Unique identifier for the object.