From db21314d8250b8b028a95f5c731267617feb764c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 01:17:08 +0000 Subject: [PATCH 01/10] Update generated code for v1357 --- OPENAPI_VERSION | 2 +- charge.go | 62 +++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 20cbdd3048..d469526029 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1356 \ No newline at end of file +v1357 \ No newline at end of file diff --git a/charge.go b/charge.go index 5f9210d729..ea8ec77617 100644 --- a/charge.go +++ b/charge.go @@ -25,6 +25,14 @@ const ( ChargeFraudUserReportSafe ChargeFraudUserReport = "safe" ) +// funding type of the underlying payment method. +type ChargePaymentMethodDetailsAmazonPayFundingType string + +// List of values that ChargePaymentMethodDetailsAmazonPayFundingType can take +const ( + ChargePaymentMethodDetailsAmazonPayFundingTypeCard ChargePaymentMethodDetailsAmazonPayFundingType = "card" +) + // If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. type ChargePaymentMethodDetailsCardChecksAddressLine1Check string @@ -310,6 +318,14 @@ const ( ChargePaymentMethodDetailsPaypalSellerProtectionStatusPartiallyEligible ChargePaymentMethodDetailsPaypalSellerProtectionStatus = "partially_eligible" ) +// funding type of the underlying payment method. +type ChargePaymentMethodDetailsRevolutPayFundingType string + +// List of values that ChargePaymentMethodDetailsRevolutPayFundingType can take +const ( + ChargePaymentMethodDetailsRevolutPayFundingTypeCard ChargePaymentMethodDetailsRevolutPayFundingType = "card" +) + // The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. // An additional hash is included on `payment_method_details` with a name matching this value. // It contains information specific to the payment method. @@ -1325,7 +1341,28 @@ type ChargePaymentMethodDetailsAlipay struct { TransactionID string `json:"transaction_id"` } type ChargePaymentMethodDetailsAlma struct{} -type ChargePaymentMethodDetailsAmazonPay struct{} +type ChargePaymentMethodDetailsAmazonPayFundingCard struct { + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Brand string `json:"brand"` + // Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + Country string `json:"country"` + // Two-digit number representing the card's expiration month. + ExpMonth int64 `json:"exp_month"` + // Four-digit number representing the card's expiration year. + ExpYear int64 `json:"exp_year"` + // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + Funding string `json:"funding"` + // The last four digits of the card. + Last4 string `json:"last4"` +} +type ChargePaymentMethodDetailsAmazonPayFunding struct { + Card *ChargePaymentMethodDetailsAmazonPayFundingCard `json:"card"` + // funding type of the underlying payment method. + Type ChargePaymentMethodDetailsAmazonPayFundingType `json:"type"` +} +type ChargePaymentMethodDetailsAmazonPay struct { + Funding *ChargePaymentMethodDetailsAmazonPayFunding `json:"funding"` +} type ChargePaymentMethodDetailsAUBECSDebit struct { // Bank-State-Branch number of the bank account. BSBNumber string `json:"bsb_number"` @@ -1916,7 +1953,28 @@ type ChargePaymentMethodDetailsPromptPay struct { } type ChargePaymentMethodDetailsQris struct{} type ChargePaymentMethodDetailsRechnung struct{} -type ChargePaymentMethodDetailsRevolutPay struct{} +type ChargePaymentMethodDetailsRevolutPayFundingCard struct { + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + Brand string `json:"brand"` + // Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + Country string `json:"country"` + // Two-digit number representing the card's expiration month. + ExpMonth int64 `json:"exp_month"` + // Four-digit number representing the card's expiration year. + ExpYear int64 `json:"exp_year"` + // Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + Funding string `json:"funding"` + // The last four digits of the card. + Last4 string `json:"last4"` +} +type ChargePaymentMethodDetailsRevolutPayFunding struct { + Card *ChargePaymentMethodDetailsRevolutPayFundingCard `json:"card"` + // funding type of the underlying payment method. + Type ChargePaymentMethodDetailsRevolutPayFundingType `json:"type"` +} +type ChargePaymentMethodDetailsRevolutPay struct { + Funding *ChargePaymentMethodDetailsRevolutPayFunding `json:"funding"` +} type ChargePaymentMethodDetailsSamsungPay struct { // A unique identifier for the buyer as determined by the local payment processor. BuyerID string `json:"buyer_id"` From 7c2c320b997c9a6e47d9015867031bb09eb96214 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 01:46:46 +0000 Subject: [PATCH 02/10] Update generated code for v1358 --- OPENAPI_VERSION | 2 +- charge.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d469526029..dc09197e85 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1357 \ No newline at end of file +v1358 \ No newline at end of file diff --git a/charge.go b/charge.go index ea8ec77617..1411f29d13 100644 --- a/charge.go +++ b/charge.go @@ -1251,6 +1251,10 @@ type ChargeOutcomeRule struct { // Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. type ChargeOutcome struct { + // For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error. + NetworkAdviceCode string `json:"network_advice_code"` + // For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + NetworkDeclineCode string `json:"network_decline_code"` // Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. NetworkStatus string `json:"network_status"` // An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. From c50a22e27b80ec8dd050bac2e497dc60c9025f77 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 22:28:51 +0000 Subject: [PATCH 03/10] Update generated code for v1359 --- OPENAPI_VERSION | 2 +- terminal_location.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dc09197e85..c20f8e67ef 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1358 \ No newline at end of file +v1359 \ No newline at end of file diff --git a/terminal_location.go b/terminal_location.go index 1b8cecd221..ce572430dd 100644 --- a/terminal_location.go +++ b/terminal_location.go @@ -11,7 +11,7 @@ import "encoding/json" // Deletes a Location object. type TerminalLocationParams struct { Params `form:"*"` - // The full address of the location. If you're updating the `address` field, avoid changing the `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. + // The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. Address *AddressParams `form:"address"` // The ID of a configuration that will be used to customize all readers in this location. ConfigurationOverrides *string `form:"configuration_overrides"` From 75da43d9c2f1f78e331ebe25690cb639bc090636 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:33:19 +0000 Subject: [PATCH 04/10] Update generated code for v1362 --- OPENAPI_VERSION | 2 +- event.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c20f8e67ef..6ccc407d42 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1359 \ No newline at end of file +v1362 \ No newline at end of file diff --git a/event.go b/event.go index 44582811f5..d2e3ae4aa3 100644 --- a/event.go +++ b/event.go @@ -141,6 +141,7 @@ const ( EventTypeInvoiceFinalized EventType = "invoice.finalized" EventTypeInvoiceMarkedUncollectible EventType = "invoice.marked_uncollectible" EventTypeInvoiceOverdue EventType = "invoice.overdue" + EventTypeInvoiceOverpaid EventType = "invoice.overpaid" EventTypeInvoicePaid EventType = "invoice.paid" EventTypeInvoicePaymentOverpaid EventType = "invoice.payment.overpaid" EventTypeInvoicePaymentActionRequired EventType = "invoice.payment_action_required" From 60f75349a42a082378000ce269f5ca3854d24b8a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 23:22:25 +0000 Subject: [PATCH 05/10] Update generated code for v1365 --- OPENAPI_VERSION | 2 +- accountsession.go | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6ccc407d42..998a0ecff3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1362 \ No newline at end of file +v1365 \ No newline at end of file diff --git a/accountsession.go b/accountsession.go index 0b8dbb0086..7fafec9566 100644 --- a/accountsession.go +++ b/accountsession.go @@ -8,7 +8,7 @@ package stripe // The list of features enabled in the embedded component. type AccountSessionComponentsAccountManagementFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -24,7 +24,7 @@ type AccountSessionComponentsAccountManagementParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsAccountOnboardingFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -68,7 +68,7 @@ type AccountSessionComponentsAppViewportParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsBalancesFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule *bool `form:"edit_payout_schedule"` @@ -145,7 +145,7 @@ type AccountSessionComponentsDocumentsParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsFinancialAccountFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow external accounts to be linked for money transfer. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -221,7 +221,7 @@ type AccountSessionComponentsIssuingCardsListParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsNotificationBannerFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection *bool `form:"external_account_collection"` @@ -288,7 +288,7 @@ type AccountSessionComponentsPaymentsParams struct { // The list of features enabled in the embedded component. type AccountSessionComponentsPayoutsFeaturesParams struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication *bool `form:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule *bool `form:"edit_payout_schedule"` @@ -432,7 +432,7 @@ func (p *AccountSessionParams) AddExpand(f string) { } type AccountSessionComponentsAccountManagementFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -443,7 +443,7 @@ type AccountSessionComponentsAccountManagement struct { Features *AccountSessionComponentsAccountManagementFeatures `json:"features"` } type AccountSessionComponentsAccountOnboardingFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -454,7 +454,7 @@ type AccountSessionComponentsAccountOnboarding struct { Features *AccountSessionComponentsAccountOnboardingFeatures `json:"features"` } type AccountSessionComponentsBalancesFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule bool `json:"edit_payout_schedule"` @@ -495,7 +495,7 @@ type AccountSessionComponentsDocuments struct { Features *AccountSessionComponentsDocumentsFeatures `json:"features"` } type AccountSessionComponentsNotificationBannerFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. ExternalAccountCollection bool `json:"external_account_collection"` @@ -536,7 +536,7 @@ type AccountSessionComponentsPayments struct { Features *AccountSessionComponentsPaymentsFeatures `json:"features"` } type AccountSessionComponentsPayoutsFeatures struct { - // Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you're responsible for collecting updated information when requirements are due or change, like custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. + // Disables Stripe user authentication for this embedded component. This feature can only be `true` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `false` when `external_account_collection` is enabled and `true` otherwise. DisableStripeUserAuthentication bool `json:"disable_stripe_user_authentication"` // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. EditPayoutSchedule bool `json:"edit_payout_schedule"` From ace09d930e101b44ccbb8f3e8a7e26fbd9afd5ed Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 00:28:48 +0000 Subject: [PATCH 06/10] Update generated code for v1366 --- OPENAPI_VERSION | 2 +- checkout_session.go | 54 +++++++++++++++++++++++++++++++++++++++++---- lineitem.go | 15 +++++++++++++ 3 files changed, 66 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 998a0ecff3..fc4d95130a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1365 \ No newline at end of file +v1366 \ No newline at end of file diff --git a/checkout_session.go b/checkout_session.go index 74fc190137..0cfa451b36 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -1088,6 +1088,19 @@ const ( CheckoutSessionPaymentStatusUnpaid CheckoutSessionPaymentStatus = "unpaid" ) +// Determines which entity is allowed to update the line items. +// +// Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. +// +// When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. +type CheckoutSessionPermissionsUpdateLineItems string + +// List of values that CheckoutSessionPermissionsUpdateLineItems can take +const ( + CheckoutSessionPermissionsUpdateLineItemsClientOnly CheckoutSessionPermissionsUpdateLineItems = "client_only" + CheckoutSessionPermissionsUpdateLineItemsServerOnly CheckoutSessionPermissionsUpdateLineItems = "server_only" +) + // Determines which entity is allowed to update the shipping details. // // Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. @@ -1495,7 +1508,7 @@ type CheckoutSessionInvoiceCreationParams struct { // When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. type CheckoutSessionLineItemAdjustableQuantityParams struct { - // Set to true if the quantity can be adjusted to any non-negative integer. + // Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity. Enabled *bool `form:"enabled"` // The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. Maximum *int64 `form:"maximum"` @@ -1562,6 +1575,10 @@ type CheckoutSessionLineItemParams struct { AdjustableQuantity *CheckoutSessionLineItemAdjustableQuantityParams `form:"adjustable_quantity"` // The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. DynamicTaxRates []*string `form:"dynamic_tax_rates"` + // ID of an existing line item. + ID *string `form:"id"` + // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + Metadata map[string]string `form:"metadata"` // The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. Price *string `form:"price"` // Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. @@ -1572,6 +1589,15 @@ type CheckoutSessionLineItemParams struct { TaxRates []*string `form:"tax_rates"` } +// AddMetadata adds a new key-value pair to the Metadata. +func (p *CheckoutSessionLineItemParams) AddMetadata(key string, value string) { + if p.Metadata == nil { + p.Metadata = make(map[string]string) + } + + p.Metadata[key] = value +} + // The parameters used to automatically create a Transfer when the payment succeeds. // For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). type CheckoutSessionPaymentIntentDataTransferDataParams struct { @@ -2322,6 +2348,12 @@ type CheckoutSessionPaymentMethodOptionsParams struct { // Permissions for updating the Checkout Session. type CheckoutSessionPermissionsUpdateParams struct { + // Determines which entity is allowed to update the line items. + // + // Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + // + // When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + LineItems *string `form:"line_items"` // Determines which entity is allowed to update the shipping details. // // Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. @@ -2611,11 +2643,19 @@ type CheckoutSessionParams struct { ExpiresAt *int64 `form:"expires_at"` // Generate a post-purchase Invoice for one-time payments. InvoiceCreation *CheckoutSessionInvoiceCreationParams `form:"invoice_creation"` - // A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + // A list of items the customer is purchasing. // - // For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. + // When updating line items, the entire array of line items must be retransmitted. // - // For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. + // To retain an existing line item, specify its `id`. + // + // To update an existing line item, specify its `id` along with the new values of the fields to be updated. + // + // To add a new line item, specify a `price` and `quantity`. Recurring prices are not supported yet. + // + // To remove an existing line item, omit the line item's ID from the retransmitted array. + // + // To reorder a line item, specify it at the desired position in the retransmitted array. LineItems []*CheckoutSessionLineItemParams `form:"line_items"` // The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. Locale *string `form:"locale"` @@ -3528,6 +3568,12 @@ type CheckoutSessionPaymentMethodOptions struct { // Permissions for updating the Checkout Session. type CheckoutSessionPermissionsUpdate struct { + // Determines which entity is allowed to update the line items. + // + // Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + // + // When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + LineItems CheckoutSessionPermissionsUpdateLineItems `json:"line_items"` // Determines which entity is allowed to update the shipping details. // // Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. diff --git a/lineitem.go b/lineitem.go index d3ffeaeb1a..e705c102a9 100644 --- a/lineitem.go +++ b/lineitem.go @@ -28,6 +28,12 @@ const ( LineItemTaxTaxabilityReasonZeroRated LineItemTaxTaxabilityReason = "zero_rated" ) +type LineItemAdjustableQuantity struct { + Enabled bool `json:"enabled"` + Maximum int64 `json:"maximum"` + Minimum int64 `json:"minimum"` +} + // The discounts applied to the line item. type LineItemDiscount struct { // The amount discounted. @@ -38,6 +44,11 @@ type LineItemDiscount struct { // Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) Discount *Discount `json:"discount"` } +type LineItemDisplay struct { + Description string `json:"description"` + Images []string `json:"images"` + Name string `json:"name"` +} // The taxes applied to the line item. type LineItemTax struct { @@ -55,6 +66,7 @@ type LineItemTax struct { // A line item. type LineItem struct { + AdjustableQuantity *LineItemAdjustableQuantity `json:"adjustable_quantity"` // Total discount amount applied. If no discounts were applied, defaults to 0. AmountDiscount int64 `json:"amount_discount"` // Total before any discounts or taxes are applied. @@ -69,8 +81,11 @@ type LineItem struct { Description string `json:"description"` // The discounts applied to the line item. Discounts []*LineItemDiscount `json:"discounts"` + Display *LineItemDisplay `json:"display"` // Unique identifier for the object. ID string `json:"id"` + // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + Metadata map[string]string `json:"metadata"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` // The price used to generate the line item. From cd9880c31ff607feca3bde60e263f2e240479aa2 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:48:46 +0000 Subject: [PATCH 07/10] Update generated code for v1368 --- OPENAPI_VERSION | 2 +- checkout_session.go | 4 +++- paymentlink.go | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index fc4d95130a..e16afd5cbb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1366 \ No newline at end of file +v1368 \ No newline at end of file diff --git a/checkout_session.go b/checkout_session.go index 0cfa451b36..fe2cd73f63 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -1305,7 +1305,9 @@ type CheckoutSessionAutomaticTaxLiabilityParams struct { // Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. type CheckoutSessionAutomaticTaxParams struct { - // Set to true to enable automatic taxes. + // Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + // + // Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation. Enabled *bool `form:"enabled"` // The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. Liability *CheckoutSessionAutomaticTaxLiabilityParams `form:"liability"` diff --git a/paymentlink.go b/paymentlink.go index d04c85fa08..8cde30ef43 100644 --- a/paymentlink.go +++ b/paymentlink.go @@ -260,7 +260,9 @@ type PaymentLinkAutomaticTaxLiabilityParams struct { // Configuration for automatic tax collection. type PaymentLinkAutomaticTaxParams struct { - // If `true`, tax will be calculated automatically using the customer's location. + // Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + // + // Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. Enabled *bool `form:"enabled"` // The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. Liability *PaymentLinkAutomaticTaxLiabilityParams `form:"liability"` From f1cd02c73c1fb0517b1a9b85a79a3dac2134cda2 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 22:47:44 +0000 Subject: [PATCH 08/10] Update generated code for v1369 --- OPENAPI_VERSION | 2 +- charge.go | 22 ++++++++++++++++++++-- paymentintent.go | 27 +++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e16afd5cbb..4b855ecebb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1368 \ No newline at end of file +v1369 \ No newline at end of file diff --git a/charge.go b/charge.go index 1411f29d13..a2fbbf02a5 100644 --- a/charge.go +++ b/charge.go @@ -128,6 +128,17 @@ const ( ChargePaymentMethodDetailsCardOvercaptureStatusUnavailable ChargePaymentMethodDetailsCardOvercaptureStatus = "unavailable" ) +// Indicates whether the transaction requested for partial authorization feature and the authorization outcome. +type ChargePaymentMethodDetailsCardPartialAuthorizationStatus string + +// List of values that ChargePaymentMethodDetailsCardPartialAuthorizationStatus can take +const ( + ChargePaymentMethodDetailsCardPartialAuthorizationStatusDeclined ChargePaymentMethodDetailsCardPartialAuthorizationStatus = "declined" + ChargePaymentMethodDetailsCardPartialAuthorizationStatusFullyAuthorized ChargePaymentMethodDetailsCardPartialAuthorizationStatus = "fully_authorized" + ChargePaymentMethodDetailsCardPartialAuthorizationStatusNotRequested ChargePaymentMethodDetailsCardPartialAuthorizationStatus = "not_requested" + ChargePaymentMethodDetailsCardPartialAuthorizationStatusPartiallyAuthorized ChargePaymentMethodDetailsCardPartialAuthorizationStatus = "partially_authorized" +) + // For authenticated transactions: how the customer was authenticated by // the issuing bank. type ChargePaymentMethodDetailsCardThreeDSecureAuthenticationFlow string @@ -1461,6 +1472,10 @@ type ChargePaymentMethodDetailsCardOvercapture struct { // Indicates whether or not the authorized amount can be over-captured. Status ChargePaymentMethodDetailsCardOvercaptureStatus `json:"status"` } +type ChargePaymentMethodDetailsCardPartialAuthorization struct { + // Indicates whether the transaction requested for partial authorization feature and the authorization outcome. + Status ChargePaymentMethodDetailsCardPartialAuthorizationStatus `json:"status"` +} // Populated if this transaction used 3D Secure authentication. type ChargePaymentMethodDetailsCardThreeDSecure struct { @@ -1529,6 +1544,8 @@ type ChargePaymentMethodDetailsCardWallet struct { type ChargePaymentMethodDetailsCard struct { // The authorized amount. AmountAuthorized int64 `json:"amount_authorized"` + // The latest amount intended to be authorized by this charge. + AmountRequested int64 `json:"amount_requested"` // Authorization code on the charge. AuthorizationCode string `json:"authorization_code"` // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. @@ -1566,8 +1583,9 @@ type ChargePaymentMethodDetailsCard struct { // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Network ChargePaymentMethodDetailsCardNetwork `json:"network"` // If this card has network token credentials, this contains the details of the network token credentials. - NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"` - Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"` + NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"` + Overcapture *ChargePaymentMethodDetailsCardOvercapture `json:"overcapture"` + PartialAuthorization *ChargePaymentMethodDetailsCardPartialAuthorization `json:"partial_authorization"` // Populated if this transaction used 3D Secure authentication. ThreeDSecure *ChargePaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"` // If this Card is part of a card wallet, this contains the details of the card wallet. diff --git a/paymentintent.go b/paymentintent.go index 1956cce410..e8a9926e65 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -499,6 +499,15 @@ const ( PaymentIntentPaymentMethodOptionsCardRequestOvercaptureNever PaymentIntentPaymentMethodOptionsCardRequestOvercapture = "never" ) +// Request partial authorization on this PaymentIntent. +type PaymentIntentPaymentMethodOptionsCardRequestPartialAuthorization string + +// List of values that PaymentIntentPaymentMethodOptionsCardRequestPartialAuthorization can take +const ( + PaymentIntentPaymentMethodOptionsCardRequestPartialAuthorizationIfAvailable PaymentIntentPaymentMethodOptionsCardRequestPartialAuthorization = "if_available" + PaymentIntentPaymentMethodOptionsCardRequestPartialAuthorizationNever PaymentIntentPaymentMethodOptionsCardRequestPartialAuthorization = "never" +) + // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. type PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure string @@ -2200,6 +2209,8 @@ type PaymentIntentPaymentMethodOptionsCardParams struct { RequestMulticapture *string `form:"request_multicapture"` // Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. RequestOvercapture *string `form:"request_overcapture"` + // Request partial authorization on this PaymentIntent. + RequestPartialAuthorization *string `form:"request_partial_authorization"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure *string `form:"request_three_d_secure"` // When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). @@ -4154,6 +4165,18 @@ type PaymentIntentIncrementAuthorizationAsyncWorkflowsParams struct { Inputs *PaymentIntentIncrementAuthorizationAsyncWorkflowsInputsParams `form:"inputs"` } +// Configuration for any card payments attempted on this PaymentIntent. +type PaymentIntentIncrementAuthorizationPaymentMethodOptionsCardParams struct { + // Request partial authorization on this PaymentIntent. + RequestPartialAuthorization *string `form:"request_partial_authorization"` +} + +// Payment method-specific configuration for this PaymentIntent. +type PaymentIntentIncrementAuthorizationPaymentMethodOptionsParams struct { + // Configuration for any card payments attempted on this PaymentIntent. + Card *PaymentIntentIncrementAuthorizationPaymentMethodOptionsCardParams `form:"card"` +} + // The parameters used to automatically create a transfer after the payment is captured. // Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). type PaymentIntentIncrementAuthorizationTransferDataParams struct { @@ -4199,6 +4222,8 @@ type PaymentIntentIncrementAuthorizationParams struct { Expand []*string `form:"expand"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata map[string]string `form:"metadata"` + // Payment method-specific configuration for this PaymentIntent. + PaymentMethodOptions *PaymentIntentIncrementAuthorizationPaymentMethodOptionsParams `form:"payment_method_options"` // Text that appears on the customer's statement as the statement descriptor for a non-card or card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). StatementDescriptor *string `form:"statement_descriptor"` // The parameters used to automatically create a transfer after the payment is captured. @@ -4975,6 +5000,8 @@ type PaymentIntentPaymentMethodOptionsCard struct { RequestMulticapture PaymentIntentPaymentMethodOptionsCardRequestMulticapture `json:"request_multicapture"` // Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. RequestOvercapture PaymentIntentPaymentMethodOptionsCardRequestOvercapture `json:"request_overcapture"` + // Request partial authorization on this PaymentIntent. + RequestPartialAuthorization PaymentIntentPaymentMethodOptionsCardRequestPartialAuthorization `json:"request_partial_authorization"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"` // When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). From 148f6ab4ecd79226751fbeb54eafe278f55c4fc0 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 15:23:47 -0800 Subject: [PATCH 09/10] Update generated code (#1951) * Update generated code for v1341 * Update generated code for v1347 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- account.go | 53 +++++++-- api_version.go | 2 +- billing/creditgrant/client.go | 12 +- billing_creditbalancesummary.go | 2 +- billing_creditgrant.go | 33 +++--- billing_meterevent.go | 2 +- charge.go | 14 +-- checkout_session.go | 118 ++++++++++++++++++-- confirmationtoken.go | 8 +- customer.go | 2 +- dispute.go | 2 +- file.go | 1 + filelink.go | 2 +- fundinginstructions.go | 12 ++ identity_verificationreport.go | 2 +- identity_verificationsession.go | 4 +- invoice.go | 8 +- issuing_authorization.go | 45 +++++++- issuing_card.go | 4 +- issuing_cardholder.go | 2 +- paymentintent.go | 21 +++- paymentlink.go | 11 +- paymentmethod.go | 10 +- payout.go | 10 ++ person.go | 6 + refund.go | 4 + setupattempt.go | 4 +- setupintent.go | 9 +- subscription.go | 13 ++- subscription/client.go | 4 +- tax_calculation.go | 9 +- tax_calculationlineitem.go | 1 + tax_transaction.go | 6 +- taxid.go | 7 +- taxrate.go | 1 + testhelpers/issuing/authorization/client.go | 16 +++ testhelpersissuing_authorization.go | 18 +++ 38 files changed, 369 insertions(+), 111 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c626f7dd81..7ab08411da 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1319 \ No newline at end of file +v1347 \ No newline at end of file diff --git a/account.go b/account.go index 58ce96edd7..1c9c62e7ad 100644 --- a/account.go +++ b/account.go @@ -139,19 +139,48 @@ const ( AccountExternalAccountTypeCard AccountExternalAccountType = "card" ) -// If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`. +// This is typed as an enum for consistency with `requirements.disabled_reason`. +type AccountFutureRequirementsDisabledReason string + +// List of values that AccountFutureRequirementsDisabledReason can take +const ( + AccountFutureRequirementsDisabledReasonActionRequiredRequestedCapabilities AccountFutureRequirementsDisabledReason = "action_required.requested_capabilities" + AccountFutureRequirementsDisabledReasonListed AccountFutureRequirementsDisabledReason = "listed" + AccountFutureRequirementsDisabledReasonOther AccountFutureRequirementsDisabledReason = "other" + AccountFutureRequirementsDisabledReasonPlatformPaused AccountFutureRequirementsDisabledReason = "platform_paused" + AccountFutureRequirementsDisabledReasonRejectedFraud AccountFutureRequirementsDisabledReason = "rejected.fraud" + AccountFutureRequirementsDisabledReasonRejectedIncompleteVerification AccountFutureRequirementsDisabledReason = "rejected.incomplete_verification" + AccountFutureRequirementsDisabledReasonRejectedListed AccountFutureRequirementsDisabledReason = "rejected.listed" + AccountFutureRequirementsDisabledReasonRejectedOther AccountFutureRequirementsDisabledReason = "rejected.other" + AccountFutureRequirementsDisabledReasonRejectedPlatformFraud AccountFutureRequirementsDisabledReason = "rejected.platform_fraud" + AccountFutureRequirementsDisabledReasonRejectedPlatformOther AccountFutureRequirementsDisabledReason = "rejected.platform_other" + AccountFutureRequirementsDisabledReasonRejectedPlatformTermsOfService AccountFutureRequirementsDisabledReason = "rejected.platform_terms_of_service" + AccountFutureRequirementsDisabledReasonRejectedTermsOfService AccountFutureRequirementsDisabledReason = "rejected.terms_of_service" + AccountFutureRequirementsDisabledReasonRequirementsPastDue AccountFutureRequirementsDisabledReason = "requirements.past_due" + AccountFutureRequirementsDisabledReasonRequirementsPendingVerification AccountFutureRequirementsDisabledReason = "requirements.pending_verification" + AccountFutureRequirementsDisabledReasonUnderReview AccountFutureRequirementsDisabledReason = "under_review" +) + +// If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). type AccountRequirementsDisabledReason string // List of values that AccountRequirementsDisabledReason can take const ( - AccountRequirementsDisabledReasonFieldsNeeded AccountRequirementsDisabledReason = "fields_needed" - AccountRequirementsDisabledReasonListed AccountRequirementsDisabledReason = "listed" - AccountRequirementsDisabledReasonOther AccountRequirementsDisabledReason = "other" - AccountRequirementsDisabledReasonRejectedFraud AccountRequirementsDisabledReason = "rejected.fraud" - AccountRequirementsDisabledReasonRejectedListed AccountRequirementsDisabledReason = "rejected.listed" - AccountRequirementsDisabledReasonRejectedOther AccountRequirementsDisabledReason = "rejected.other" - AccountRequirementsDisabledReasonRejectedTermsOfService AccountRequirementsDisabledReason = "rejected.terms_of_service" - AccountRequirementsDisabledReasonUnderReview AccountRequirementsDisabledReason = "under_review" + AccountRequirementsDisabledReasonActionRequiredRequestedCapabilities AccountRequirementsDisabledReason = "action_required.requested_capabilities" + AccountRequirementsDisabledReasonListed AccountRequirementsDisabledReason = "listed" + AccountRequirementsDisabledReasonOther AccountRequirementsDisabledReason = "other" + AccountRequirementsDisabledReasonPlatformPaused AccountRequirementsDisabledReason = "platform_paused" + AccountRequirementsDisabledReasonRejectedFraud AccountRequirementsDisabledReason = "rejected.fraud" + AccountRequirementsDisabledReasonRejectedIncompleteVerification AccountRequirementsDisabledReason = "rejected.incomplete_verification" + AccountRequirementsDisabledReasonRejectedListed AccountRequirementsDisabledReason = "rejected.listed" + AccountRequirementsDisabledReasonRejectedOther AccountRequirementsDisabledReason = "rejected.other" + AccountRequirementsDisabledReasonRejectedPlatformFraud AccountRequirementsDisabledReason = "rejected.platform_fraud" + AccountRequirementsDisabledReasonRejectedPlatformOther AccountRequirementsDisabledReason = "rejected.platform_other" + AccountRequirementsDisabledReasonRejectedPlatformTermsOfService AccountRequirementsDisabledReason = "rejected.platform_terms_of_service" + AccountRequirementsDisabledReasonRejectedTermsOfService AccountRequirementsDisabledReason = "rejected.terms_of_service" + AccountRequirementsDisabledReasonRequirementsPastDue AccountRequirementsDisabledReason = "requirements.past_due" + AccountRequirementsDisabledReasonRequirementsPendingVerification AccountRequirementsDisabledReason = "requirements.pending_verification" + AccountRequirementsDisabledReasonUnderReview AccountRequirementsDisabledReason = "under_review" ) // How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. @@ -1442,8 +1471,8 @@ type AccountFutureRequirements struct { CurrentDeadline int64 `json:"current_deadline"` // Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. CurrentlyDue []string `json:"currently_due"` - // This is typed as a string for consistency with `requirements.disabled_reason`. - DisabledReason string `json:"disabled_reason"` + // This is typed as an enum for consistency with `requirements.disabled_reason`. + DisabledReason AccountFutureRequirementsDisabledReason `json:"disabled_reason"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*AccountFutureRequirementsError `json:"errors"` // Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. @@ -1484,7 +1513,7 @@ type AccountRequirements struct { CurrentDeadline int64 `json:"current_deadline"` // Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. CurrentlyDue []string `json:"currently_due"` - // If the account is disabled, this string describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). Can be `action_required.requested_capabilities`, `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.incomplete_verification`, `rejected.listed`, `rejected.other`, `rejected.terms_of_service`, `under_review`, or `other`. + // If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). DisabledReason AccountRequirementsDisabledReason `json:"disabled_reason"` // Fields that are `currently_due` and need to be collected again because validation or verification failed. Errors []*AccountRequirementsError `json:"errors"` diff --git a/api_version.go b/api_version.go index 839b7f9f2f..3eefda0919 100644 --- a/api_version.go +++ b/api_version.go @@ -7,5 +7,5 @@ package stripe const ( - apiVersion string = "2024-10-28.acacia" + apiVersion string = "2024-11-20.acacia" ) diff --git a/billing/creditgrant/client.go b/billing/creditgrant/client.go index 3540800bf5..f4b7b427c5 100644 --- a/billing/creditgrant/client.go +++ b/billing/creditgrant/client.go @@ -64,12 +64,12 @@ func (c Client) Update(id string, params *stripe.BillingCreditGrantParams) (*str return creditgrant, err } -// Expires a credit grant +// Expires a credit grant. func Expire(id string, params *stripe.BillingCreditGrantExpireParams) (*stripe.BillingCreditGrant, error) { return getC().Expire(id, params) } -// Expires a credit grant +// Expires a credit grant. func (c Client) Expire(id string, params *stripe.BillingCreditGrantExpireParams) (*stripe.BillingCreditGrant, error) { path := stripe.FormatURLPath("/v1/billing/credit_grants/%s/expire", id) creditgrant := &stripe.BillingCreditGrant{} @@ -77,12 +77,12 @@ func (c Client) Expire(id string, params *stripe.BillingCreditGrantExpireParams) return creditgrant, err } -// Voids a credit grant +// Voids a credit grant. func VoidGrant(id string, params *stripe.BillingCreditGrantVoidGrantParams) (*stripe.BillingCreditGrant, error) { return getC().VoidGrant(id, params) } -// Voids a credit grant +// Voids a credit grant. func (c Client) VoidGrant(id string, params *stripe.BillingCreditGrantVoidGrantParams) (*stripe.BillingCreditGrant, error) { path := stripe.FormatURLPath("/v1/billing/credit_grants/%s/void", id) creditgrant := &stripe.BillingCreditGrant{} @@ -90,12 +90,12 @@ func (c Client) VoidGrant(id string, params *stripe.BillingCreditGrantVoidGrantP return creditgrant, err } -// Retrieve a list of credit grants +// Retrieve a list of credit grants. func List(params *stripe.BillingCreditGrantListParams) *Iter { return getC().List(params) } -// Retrieve a list of credit grants +// Retrieve a list of credit grants. func (c Client) List(listParams *stripe.BillingCreditGrantListParams) *Iter { return &Iter{ Iter: stripe.GetIter(listParams, func(p *stripe.Params, b *form.Values) ([]interface{}, stripe.ListContainer, error) { diff --git a/billing_creditbalancesummary.go b/billing_creditbalancesummary.go index a26bfe9b3d..1b9fecbaf2 100644 --- a/billing_creditbalancesummary.go +++ b/billing_creditbalancesummary.go @@ -24,7 +24,7 @@ const ( // The billing credit applicability scope for which to fetch credit balance summary. type BillingCreditBalanceSummaryFilterApplicabilityScopeParams struct { - // The price type to which credit grants can apply to. We currently only support `metered` price type. + // The price type for which credit grants can apply. We currently only support the `metered` price type. PriceType *string `form:"price_type"` } diff --git a/billing_creditgrant.go b/billing_creditgrant.go index 9644869a0d..f96acf3a92 100644 --- a/billing_creditgrant.go +++ b/billing_creditgrant.go @@ -16,7 +16,7 @@ const ( BillingCreditGrantAmountTypeMonetary BillingCreditGrantAmountType = "monetary" ) -// The price type to which credit grants can apply to. We currently only support `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. +// The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. type BillingCreditGrantApplicabilityConfigScopePriceType string // List of values that BillingCreditGrantApplicabilityConfigScopePriceType can take @@ -24,7 +24,7 @@ const ( BillingCreditGrantApplicabilityConfigScopePriceTypeMetered BillingCreditGrantApplicabilityConfigScopePriceType = "metered" ) -// The category of this credit grant. This is for tracking purposes and will not be displayed to the customer. +// The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. type BillingCreditGrantCategory string // List of values that BillingCreditGrantCategory can take @@ -33,7 +33,7 @@ const ( BillingCreditGrantCategoryPromotional BillingCreditGrantCategory = "promotional" ) -// Retrieve a list of credit grants +// Retrieve a list of credit grants. type BillingCreditGrantListParams struct { ListParams `form:"*"` // Only return credit grants for this customer. @@ -65,7 +65,7 @@ type BillingCreditGrantAmountParams struct { // Specify the scope of this applicability config. type BillingCreditGrantApplicabilityConfigScopeParams struct { - // The price type to which credit grants can apply to. We currently only support `metered` price type. + // The price type for which credit grants can apply. We currently only support the `metered` price type. PriceType *string `form:"price_type"` } @@ -84,17 +84,17 @@ type BillingCreditGrantParams struct { ApplicabilityConfig *BillingCreditGrantApplicabilityConfigParams `form:"applicability_config"` // The category of this credit grant. Category *string `form:"category"` - // ID of the customer to whom the billing credits should be granted. + // ID of the customer to receive the billing credits. Customer *string `form:"customer"` - // The time when the billing credits become effective i.e when they are eligible to be used. Defaults to the current timestamp if not specified. + // The time when the billing credits become effective—when they're eligible for use. Defaults to the current timestamp if not specified. EffectiveAt *int64 `form:"effective_at"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` - // The time when the billing credits created by this credit grant will expire. If set to empty, the billing credits will never expire. + // The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. ExpiresAt *int64 `form:"expires_at"` - // Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format. + // Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format. Metadata map[string]string `form:"metadata"` - // A descriptive name shown in dashboard. + // A descriptive name shown in the Dashboard. Name *string `form:"name"` } @@ -112,7 +112,7 @@ func (p *BillingCreditGrantParams) AddMetadata(key string, value string) { p.Metadata[key] = value } -// Expires a credit grant +// Expires a credit grant. type BillingCreditGrantExpireParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. @@ -124,7 +124,7 @@ func (p *BillingCreditGrantExpireParams) AddExpand(f string) { p.Expand = append(p.Expand, &f) } -// Voids a credit grant +// Voids a credit grant. type BillingCreditGrantVoidGrantParams struct { Params `form:"*"` // Specifies which fields in the response should be expanded. @@ -150,7 +150,7 @@ type BillingCreditGrantAmount struct { Type BillingCreditGrantAmountType `json:"type"` } type BillingCreditGrantApplicabilityConfigScope struct { - // The price type to which credit grants can apply to. We currently only support `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. + // The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. PriceType BillingCreditGrantApplicabilityConfigScopePriceType `json:"price_type"` } type BillingCreditGrantApplicabilityConfig struct { @@ -160,20 +160,19 @@ type BillingCreditGrantApplicabilityConfig struct { // A credit grant is an API resource that documents the allocation of some billing credits to a customer. // // Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) -// end type BillingCreditGrant struct { APIResource Amount *BillingCreditGrantAmount `json:"amount"` ApplicabilityConfig *BillingCreditGrantApplicabilityConfig `json:"applicability_config"` - // The category of this credit grant. This is for tracking purposes and will not be displayed to the customer. + // The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. Category BillingCreditGrantCategory `json:"category"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` - // ID of the customer to whom the billing credits are granted. + // ID of the customer receiving the billing credits. Customer *Customer `json:"customer"` - // The time when the billing credits become effective i.e when they are eligible to be used. + // The time when the billing credits become effective—when they're eligible for use. EffectiveAt int64 `json:"effective_at"` - // The time when the billing credits will expire. If not present, the billing credits will never expire. + // The time when the billing credits expire. If not present, the billing credits don't expire. ExpiresAt int64 `json:"expires_at"` // Unique identifier for the object. ID string `json:"id"` diff --git a/billing_meterevent.go b/billing_meterevent.go index d256f7b4ac..b92524f143 100644 --- a/billing_meterevent.go +++ b/billing_meterevent.go @@ -13,7 +13,7 @@ type BillingMeterEventParams struct { EventName *string `form:"event_name"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` - // A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We'll enforce uniqueness within a rolling 24 hour period. + // A unique identifier for the event. If not provided, one will be generated. We strongly advise using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. Identifier *string `form:"identifier"` // The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). Payload map[string]string `form:"payload"` diff --git a/charge.go b/charge.go index bb260328d0..5ddab7f6a5 100644 --- a/charge.go +++ b/charge.go @@ -85,7 +85,7 @@ const ( ChargePaymentMethodDetailsCardMulticaptureStatusUnavailable ChargePaymentMethodDetailsCardMulticaptureStatus = "unavailable" ) -// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. +// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. type ChargePaymentMethodDetailsCardNetwork string // List of values that ChargePaymentMethodDetailsCardNetwork can take @@ -171,7 +171,7 @@ const ( ChargePaymentMethodDetailsCardThreeDSecureResultReasonRejected ChargePaymentMethodDetailsCardThreeDSecureResultReason = "rejected" ) -// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. +// Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. type ChargePaymentMethodDetailsCardPresentNetwork string // List of values that ChargePaymentMethodDetailsCardPresentNetwork can take @@ -841,7 +841,7 @@ type ChargePaymentMethodDetailsCard struct { AmountAuthorized int64 `json:"amount_authorized"` // Authorization code on the charge. AuthorizationCode string `json:"authorization_code"` - // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand PaymentMethodCardBrand `json:"brand"` // When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. CaptureBefore int64 `json:"capture_before"` @@ -872,7 +872,7 @@ type ChargePaymentMethodDetailsCard struct { // True if this payment was marked as MOTO and out of scope for SCA. MOTO bool `json:"moto"` Multicapture *ChargePaymentMethodDetailsCardMulticapture `json:"multicapture"` - // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Network ChargePaymentMethodDetailsCardNetwork `json:"network"` // If this card has network token credentials, this contains the details of the network token credentials. NetworkToken *ChargePaymentMethodDetailsCardNetworkToken `json:"network_token"` @@ -927,7 +927,7 @@ type ChargePaymentMethodDetailsCardPresentWallet struct { type ChargePaymentMethodDetailsCardPresent struct { // The authorized amount AmountAuthorized int64 `json:"amount_authorized"` - // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand PaymentMethodCardBrand `json:"brand"` // The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. BrandProduct string `json:"brand_product"` @@ -955,7 +955,7 @@ type ChargePaymentMethodDetailsCardPresent struct { IncrementalAuthorizationSupported bool `json:"incremental_authorization_supported"` // The last four digits of the card. Last4 string `json:"last4"` - // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Network ChargePaymentMethodDetailsCardPresentNetwork `json:"network"` // This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. NetworkTransactionID string `json:"network_transaction_id"` @@ -1078,7 +1078,7 @@ type ChargePaymentMethodDetailsInteracPresent struct { GeneratedCard string `json:"generated_card"` // The last four digits of the card. Last4 string `json:"last4"` - // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Network string `json:"network"` // This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. NetworkTransactionID string `json:"network_transaction_id"` diff --git a/checkout_session.go b/checkout_session.go index 79cc95de7b..0b93b9033a 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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` type CheckoutSessionCustomerDetailsTaxIDType string // List of values that CheckoutSessionCustomerDetailsTaxIDType can take @@ -171,6 +171,7 @@ const ( CheckoutSessionCustomerDetailsTaxIDTypeKRBRN CheckoutSessionCustomerDetailsTaxIDType = "kr_brn" CheckoutSessionCustomerDetailsTaxIDTypeKzBin CheckoutSessionCustomerDetailsTaxIDType = "kz_bin" CheckoutSessionCustomerDetailsTaxIDTypeLIUID CheckoutSessionCustomerDetailsTaxIDType = "li_uid" + CheckoutSessionCustomerDetailsTaxIDTypeLiVAT CheckoutSessionCustomerDetailsTaxIDType = "li_vat" CheckoutSessionCustomerDetailsTaxIDTypeMaVAT CheckoutSessionCustomerDetailsTaxIDType = "ma_vat" CheckoutSessionCustomerDetailsTaxIDTypeMdVAT CheckoutSessionCustomerDetailsTaxIDType = "md_vat" CheckoutSessionCustomerDetailsTaxIDTypeMXRFC CheckoutSessionCustomerDetailsTaxIDType = "mx_rfc" @@ -407,6 +408,42 @@ const ( CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsageOnSession CheckoutSessionPaymentMethodOptionsBoletoSetupFutureUsage = "on_session" ) +// Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession. +type CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorization string + +// List of values that CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorization can take +const ( + CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorizationIfAvailable CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorization = "if_available" + CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorizationNever CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorization = "never" +) + +// Request ability to [increment the authorization](https://stripe.com/payments/incremental-authorization) for this CheckoutSession. +type CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorization string + +// List of values that CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorization can take +const ( + CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorizationIfAvailable CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorization = "if_available" + CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorizationNever CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorization = "never" +) + +// Request ability to make [multiple captures](https://stripe.com/payments/multicapture) for this CheckoutSession. +type CheckoutSessionPaymentMethodOptionsCardRequestMulticapture string + +// List of values that CheckoutSessionPaymentMethodOptionsCardRequestMulticapture can take +const ( + CheckoutSessionPaymentMethodOptionsCardRequestMulticaptureIfAvailable CheckoutSessionPaymentMethodOptionsCardRequestMulticapture = "if_available" + CheckoutSessionPaymentMethodOptionsCardRequestMulticaptureNever CheckoutSessionPaymentMethodOptionsCardRequestMulticapture = "never" +) + +// Request ability to [overcapture](https://stripe.com/payments/overcapture) for this CheckoutSession. +type CheckoutSessionPaymentMethodOptionsCardRequestOvercapture string + +// List of values that CheckoutSessionPaymentMethodOptionsCardRequestOvercapture can take +const ( + CheckoutSessionPaymentMethodOptionsCardRequestOvercaptureIfAvailable CheckoutSessionPaymentMethodOptionsCardRequestOvercapture = "if_available" + CheckoutSessionPaymentMethodOptionsCardRequestOvercaptureNever CheckoutSessionPaymentMethodOptionsCardRequestOvercapture = "never" +) + // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. type CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure string @@ -963,10 +1000,11 @@ type CheckoutSessionSubmitType string // List of values that CheckoutSessionSubmitType can take const ( - CheckoutSessionSubmitTypeAuto CheckoutSessionSubmitType = "auto" - CheckoutSessionSubmitTypeBook CheckoutSessionSubmitType = "book" - CheckoutSessionSubmitTypeDonate CheckoutSessionSubmitType = "donate" - CheckoutSessionSubmitTypePay CheckoutSessionSubmitType = "pay" + CheckoutSessionSubmitTypeAuto CheckoutSessionSubmitType = "auto" + CheckoutSessionSubmitTypeBook CheckoutSessionSubmitType = "book" + CheckoutSessionSubmitTypeDonate CheckoutSessionSubmitType = "donate" + CheckoutSessionSubmitTypePay CheckoutSessionSubmitType = "pay" + CheckoutSessionSubmitTypeSubscribe CheckoutSessionSubmitType = "subscribe" ) // Indicates whether a tax ID is required on the payment page @@ -1043,6 +1081,12 @@ func (p *CheckoutSessionListParams) AddExpand(f string) { p.Expand = append(p.Expand, &f) } +// Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). +type CheckoutSessionAdaptivePricingParams struct { + // Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing). + Enabled *bool `form:"enabled"` +} + // Configure a Checkout Session that can be used to recover an expired session. type CheckoutSessionAfterExpirationRecoveryParams struct { // Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` @@ -1522,8 +1566,13 @@ type CheckoutSessionPaymentMethodOptionsAUBECSDebitParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// Additional fields for Mandate creation +type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptionsParams struct{} + // contains details about the Bacs Debit payment method options. type CheckoutSessionPaymentMethodOptionsBACSDebitParams struct { + // Additional fields for Mandate creation + MandateOptions *CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptionsParams `form:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1571,6 +1620,14 @@ type CheckoutSessionPaymentMethodOptionsCardInstallmentsParams struct { type CheckoutSessionPaymentMethodOptionsCardParams struct { // Installment options for card payments Installments *CheckoutSessionPaymentMethodOptionsCardInstallmentsParams `form:"installments"` + // Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession. + RequestExtendedAuthorization *string `form:"request_extended_authorization"` + // Request ability to [increment the authorization](https://stripe.com/payments/incremental-authorization) for this CheckoutSession. + RequestIncrementalAuthorization *string `form:"request_incremental_authorization"` + // Request ability to make [multiple captures](https://stripe.com/payments/multicapture) for this CheckoutSession. + RequestMulticapture *string `form:"request_multicapture"` + // Request ability to [overcapture](https://stripe.com/payments/overcapture) for this CheckoutSession. + RequestOvercapture *string `form:"request_overcapture"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure *string `form:"request_three_d_secure"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1695,6 +1752,8 @@ type CheckoutSessionPaymentMethodOptionsIDEALParams struct { // contains details about the Kakao Pay payment method options. type CheckoutSessionPaymentMethodOptionsKakaoPayParams struct { + // Controls when the funds will be captured from the customer's account. + CaptureMethod *string `form:"capture_method"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1733,6 +1792,8 @@ type CheckoutSessionPaymentMethodOptionsKonbiniParams struct { // contains details about the Korean card payment method options. type CheckoutSessionPaymentMethodOptionsKrCardParams struct { + // Controls when the funds will be captured from the customer's account. + CaptureMethod *string `form:"capture_method"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1779,8 +1840,10 @@ type CheckoutSessionPaymentMethodOptionsMultibancoParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } -// contains details about the Kakao Pay payment method options. +// contains details about the Naver Pay payment method options. type CheckoutSessionPaymentMethodOptionsNaverPayParams struct { + // Controls when the funds will be captured from the customer's account. + CaptureMethod *string `form:"capture_method"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1820,7 +1883,10 @@ type CheckoutSessionPaymentMethodOptionsP24Params struct { } // contains details about the PAYCO payment method options. -type CheckoutSessionPaymentMethodOptionsPaycoParams struct{} +type CheckoutSessionPaymentMethodOptionsPaycoParams struct { + // Controls when the funds will be captured from the customer's account. + CaptureMethod *string `form:"capture_method"` +} // contains details about the PayNow payment method options. type CheckoutSessionPaymentMethodOptionsPayNowParams struct { @@ -1875,10 +1941,18 @@ type CheckoutSessionPaymentMethodOptionsRevolutPayParams struct { } // contains details about the Samsung Pay payment method options. -type CheckoutSessionPaymentMethodOptionsSamsungPayParams struct{} +type CheckoutSessionPaymentMethodOptionsSamsungPayParams struct { + // Controls when the funds will be captured from the customer's account. + CaptureMethod *string `form:"capture_method"` +} + +// Additional fields for Mandate creation +type CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptionsParams struct{} // contains details about the Sepa Debit payment method options. type CheckoutSessionPaymentMethodOptionsSEPADebitParams struct { + // Additional fields for Mandate creation + MandateOptions *CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptionsParams `form:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1997,7 +2071,7 @@ type CheckoutSessionPaymentMethodOptionsParams struct { Mobilepay *CheckoutSessionPaymentMethodOptionsMobilepayParams `form:"mobilepay"` // contains details about the Multibanco payment method options. Multibanco *CheckoutSessionPaymentMethodOptionsMultibancoParams `form:"multibanco"` - // contains details about the Kakao Pay payment method options. + // contains details about the Naver Pay payment method options. NaverPay *CheckoutSessionPaymentMethodOptionsNaverPayParams `form:"naver_pay"` // contains details about the OXXO payment method options. OXXO *CheckoutSessionPaymentMethodOptionsOXXOParams `form:"oxxo"` @@ -2066,7 +2140,7 @@ func (p *CheckoutSessionSetupIntentDataParams) AddMetadata(key string, value str // When set, provides configuration for Checkout to collect a shipping address from a customer. type CheckoutSessionShippingAddressCollectionParams struct { // An array of two-letter ISO country codes representing which countries Checkout should provide as options for - // shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + // shipping locations. AllowedCountries []*string `form:"allowed_countries"` } @@ -2236,6 +2310,8 @@ type CheckoutSessionTaxIDCollectionParams struct { // Creates a Session object. type CheckoutSessionParams struct { Params `form:"*"` + // Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + AdaptivePricing *CheckoutSessionAdaptivePricingParams `form:"adaptive_pricing"` // Configure actions after a Checkout Session has expired. AfterExpiration *CheckoutSessionAfterExpirationParams `form:"after_expiration"` // Enables user redeemable promotion codes. @@ -2413,6 +2489,12 @@ func (p *CheckoutSessionExpireParams) AddExpand(f string) { p.Expand = append(p.Expand, &f) } +// Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). +type CheckoutSessionAdaptivePricing struct { + // Whether Adaptive Pricing is enabled. + Enabled bool `json:"enabled"` +} + // When set, configuration used to recover the Checkout Session on expiry. type CheckoutSessionAfterExpirationRecovery struct { // Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` @@ -2582,7 +2664,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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` Type CheckoutSessionCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` @@ -2733,7 +2815,9 @@ type CheckoutSessionPaymentMethodOptionsAUBECSDebit struct { // When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsAUBECSDebitSetupFutureUsage `json:"setup_future_usage"` } +type CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptions struct{} type CheckoutSessionPaymentMethodOptionsBACSDebit struct { + MandateOptions *CheckoutSessionPaymentMethodOptionsBACSDebitMandateOptions `json:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -2771,6 +2855,14 @@ type CheckoutSessionPaymentMethodOptionsCardInstallments struct { } type CheckoutSessionPaymentMethodOptionsCard struct { Installments *CheckoutSessionPaymentMethodOptionsCardInstallments `json:"installments"` + // Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession. + RequestExtendedAuthorization CheckoutSessionPaymentMethodOptionsCardRequestExtendedAuthorization `json:"request_extended_authorization"` + // Request ability to [increment the authorization](https://stripe.com/payments/incremental-authorization) for this CheckoutSession. + RequestIncrementalAuthorization CheckoutSessionPaymentMethodOptionsCardRequestIncrementalAuthorization `json:"request_incremental_authorization"` + // Request ability to make [multiple captures](https://stripe.com/payments/multicapture) for this CheckoutSession. + RequestMulticapture CheckoutSessionPaymentMethodOptionsCardRequestMulticapture `json:"request_multicapture"` + // Request ability to [overcapture](https://stripe.com/payments/overcapture) for this CheckoutSession. + RequestOvercapture CheckoutSessionPaymentMethodOptionsCardRequestOvercapture `json:"request_overcapture"` // We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. RequestThreeDSecure CheckoutSessionPaymentMethodOptionsCardRequestThreeDSecure `json:"request_three_d_secure"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3022,7 +3114,9 @@ type CheckoutSessionPaymentMethodOptionsSamsungPay struct { // Controls when the funds will be captured from the customer's account. CaptureMethod CheckoutSessionPaymentMethodOptionsSamsungPayCaptureMethod `json:"capture_method"` } +type CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptions struct{} type CheckoutSessionPaymentMethodOptionsSEPADebit struct { + MandateOptions *CheckoutSessionPaymentMethodOptionsSEPADebitMandateOptions `json:"mandate_options"` // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -3235,6 +3329,8 @@ type CheckoutSessionTotalDetails struct { // Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart) type CheckoutSession struct { APIResource + // Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + AdaptivePricing *CheckoutSessionAdaptivePricing `json:"adaptive_pricing"` // When set, provides configuration for actions to take if this Checkout Session expires. AfterExpiration *CheckoutSessionAfterExpiration `json:"after_expiration"` // Enables user redeemable promotion codes. diff --git a/confirmationtoken.go b/confirmationtoken.go index 6bf7f66ec4..6de95d0fbc 100644 --- a/confirmationtoken.go +++ b/confirmationtoken.go @@ -569,7 +569,7 @@ type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsC type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsCardPresent struct { // The authorized amount AmountAuthorized int64 `json:"amount_authorized"` - // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand string `json:"brand"` // The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. BrandProduct string `json:"brand_product"` @@ -603,7 +603,7 @@ type ConfirmationTokenPaymentMethodPreviewCardGeneratedFromPaymentMethodDetailsC Issuer string `json:"issuer"` // The last four digits of the card. Last4 string `json:"last4"` - // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Network string `json:"network"` // This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. NetworkTransactionID string `json:"network_transaction_id"` @@ -691,7 +691,7 @@ type ConfirmationTokenPaymentMethodPreviewCardWallet struct { VisaCheckout *ConfirmationTokenPaymentMethodPreviewCardWalletVisaCheckout `json:"visa_checkout"` } type ConfirmationTokenPaymentMethodPreviewCard struct { - // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand string `json:"brand"` // Checks on Card address and CVC if provided. Checks *ConfirmationTokenPaymentMethodPreviewCardChecks `json:"checks"` @@ -747,7 +747,7 @@ type ConfirmationTokenPaymentMethodPreviewCardPresentWallet struct { Type ConfirmationTokenPaymentMethodPreviewCardPresentWalletType `json:"type"` } type ConfirmationTokenPaymentMethodPreviewCardPresent struct { - // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand string `json:"brand"` // The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. BrandProduct string `json:"brand_product"` diff --git a/customer.go b/customer.go index c06b8edf75..53346b8178 100644 --- a/customer.go +++ b/customer.go @@ -194,7 +194,7 @@ func (p *CustomerListParams) AddExpand(f string) { // The customer's tax IDs. type CustomerTaxIDDataParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `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`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` diff --git a/dispute.go b/dispute.go index 76f31c6fc5..6a8701d706 100644 --- a/dispute.go +++ b/dispute.go @@ -402,7 +402,7 @@ type DisputePaymentMethodDetailsAmazonPay struct { DisputeType DisputePaymentMethodDetailsAmazonPayDisputeType `json:"dispute_type"` } type DisputePaymentMethodDetailsCard struct { - // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand string `json:"brand"` // The type of dispute opened. Different case types may have varying fees and financial impact. CaseType DisputePaymentMethodDetailsCardCaseType `json:"case_type"` diff --git a/file.go b/file.go index 1f7f73289c..3aa1e7f359 100644 --- a/file.go +++ b/file.go @@ -29,6 +29,7 @@ const ( FilePurposeDisputeEvidence FilePurpose = "dispute_evidence" FilePurposeDocumentProviderIdentityDocument FilePurpose = "document_provider_identity_document" FilePurposeFinanceReportRun FilePurpose = "finance_report_run" + FilePurposeFinancialAccountStatement FilePurpose = "financial_account_statement" FilePurposeIdentityDocument FilePurpose = "identity_document" FilePurposeIdentityDocumentDownloadable FilePurpose = "identity_document_downloadable" FilePurposeIssuingRegulatoryReporting FilePurpose = "issuing_regulatory_reporting" diff --git a/filelink.go b/filelink.go index 1bc091f951..4c5ae8608d 100644 --- a/filelink.go +++ b/filelink.go @@ -36,7 +36,7 @@ type FileLinkParams struct { // A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. ExpiresAt *int64 `form:"expires_at"` ExpiresAtNow *bool `form:"-"` // See custom AppendTo - // The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + // The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. File *string `form:"file"` // Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata map[string]string `form:"metadata"` diff --git a/fundinginstructions.go b/fundinginstructions.go index 8867648611..2657b80921 100644 --- a/fundinginstructions.go +++ b/fundinginstructions.go @@ -53,8 +53,14 @@ const ( // ABA Records contain U.S. bank account details per the ABA format. type FundingInstructionsBankTransferFinancialAddressABA struct { + AccountHolderAddress *Address `json:"account_holder_address"` + // The account holder name + AccountHolderName string `json:"account_holder_name"` // The ABA account number AccountNumber string `json:"account_number"` + // The account type + AccountType string `json:"account_type"` + BankAddress *Address `json:"bank_address"` // The bank name BankName string `json:"bank_name"` // The ABA routing number @@ -95,8 +101,14 @@ type FundingInstructionsBankTransferFinancialAddressSpei struct { // SWIFT Records contain U.S. bank account details per the SWIFT format. type FundingInstructionsBankTransferFinancialAddressSwift struct { + AccountHolderAddress *Address `json:"account_holder_address"` + // The account holder name + AccountHolderName string `json:"account_holder_name"` // The account number AccountNumber string `json:"account_number"` + // The account type + AccountType string `json:"account_type"` + BankAddress *Address `json:"bank_address"` // The bank name BankName string `json:"bank_name"` // The SWIFT code diff --git a/identity_verificationreport.go b/identity_verificationreport.go index f945716aaa..ec90020791 100644 --- a/identity_verificationreport.go +++ b/identity_verificationreport.go @@ -385,7 +385,7 @@ type IdentityVerificationReport struct { Selfie *IdentityVerificationReportSelfie `json:"selfie"` // Type of report. Type IdentityVerificationReportType `json:"type"` - // The configuration token of a Verification Flow from the dashboard. + // The configuration token of a verification flow from the dashboard. VerificationFlow string `json:"verification_flow"` // ID of the VerificationSession that created this report. VerificationSession string `json:"verification_session"` diff --git a/identity_verificationsession.go b/identity_verificationsession.go index fc6a866017..e838cff98d 100644 --- a/identity_verificationsession.go +++ b/identity_verificationsession.go @@ -154,7 +154,7 @@ type IdentityVerificationSessionParams struct { ReturnURL *string `form:"return_url"` // The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. Type *string `form:"type"` - // The ID of a Verification Flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. + // The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. VerificationFlow *string `form:"verification_flow"` } @@ -340,7 +340,7 @@ type IdentityVerificationSession struct { Type IdentityVerificationSessionType `json:"type"` // The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don't store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. URL string `json:"url"` - // The configuration token of a Verification Flow from the dashboard. + // The configuration token of a verification flow from the dashboard. VerificationFlow string `json:"verification_flow"` // The user's verified data. VerifiedOutputs *IdentityVerificationSessionVerifiedOutputs `json:"verified_outputs"` diff --git a/invoice.go b/invoice.go index 0f64cfae20..125ccde473 100644 --- a/invoice.go +++ b/invoice.go @@ -711,7 +711,7 @@ type InvoiceUpcomingCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceUpcomingCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `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`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -1281,7 +1281,7 @@ type InvoiceUpcomingLinesCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceUpcomingLinesCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `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`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -2346,7 +2346,7 @@ type InvoiceCreatePreviewCustomerDetailsTaxParams struct { // The customer's tax IDs. type InvoiceCreatePreviewCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `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`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -2915,7 +2915,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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` Type *TaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/issuing_authorization.go b/issuing_authorization.go index f7ae082fe3..4c9bdd3c55 100644 --- a/issuing_authorization.go +++ b/issuing_authorization.go @@ -40,6 +40,35 @@ const ( IssuingAuthorizationFleetServiceTypeSelfService IssuingAuthorizationFleetServiceType = "self_service" ) +// The method by which the fraud challenge was delivered to the cardholder. +type IssuingAuthorizationFraudChallengeChannel string + +// List of values that IssuingAuthorizationFraudChallengeChannel can take +const ( + IssuingAuthorizationFraudChallengeChannelSms IssuingAuthorizationFraudChallengeChannel = "sms" +) + +// The status of the fraud challenge. +type IssuingAuthorizationFraudChallengeStatus string + +// List of values that IssuingAuthorizationFraudChallengeStatus can take +const ( + IssuingAuthorizationFraudChallengeStatusExpired IssuingAuthorizationFraudChallengeStatus = "expired" + IssuingAuthorizationFraudChallengeStatusPending IssuingAuthorizationFraudChallengeStatus = "pending" + IssuingAuthorizationFraudChallengeStatusRejected IssuingAuthorizationFraudChallengeStatus = "rejected" + IssuingAuthorizationFraudChallengeStatusUndeliverable IssuingAuthorizationFraudChallengeStatus = "undeliverable" + IssuingAuthorizationFraudChallengeStatusVerified IssuingAuthorizationFraudChallengeStatus = "verified" +) + +// If the challenge is not deliverable, the reason why. +type IssuingAuthorizationFraudChallengeUndeliverableReason string + +// List of values that IssuingAuthorizationFraudChallengeUndeliverableReason can take +const ( + IssuingAuthorizationFraudChallengeUndeliverableReasonNoPhoneNumber IssuingAuthorizationFraudChallengeUndeliverableReason = "no_phone_number" + IssuingAuthorizationFraudChallengeUndeliverableReasonUnsupportedPhoneNumber IssuingAuthorizationFraudChallengeUndeliverableReason = "unsupported_phone_number" +) + // The type of fuel that was purchased. type IssuingAuthorizationFuelType string @@ -315,6 +344,16 @@ type IssuingAuthorizationFleet struct { ServiceType IssuingAuthorizationFleetServiceType `json:"service_type"` } +// Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. +type IssuingAuthorizationFraudChallenge struct { + // The method by which the fraud challenge was delivered to the cardholder. + Channel IssuingAuthorizationFraudChallengeChannel `json:"channel"` + // The status of the fraud challenge. + Status IssuingAuthorizationFraudChallengeStatus `json:"status"` + // If the challenge is not deliverable, the reason why. + UndeliverableReason IssuingAuthorizationFraudChallengeUndeliverableReason `json:"undeliverable_reason"` +} + // Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. type IssuingAuthorizationFuel struct { // [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. @@ -464,7 +503,7 @@ type IssuingAuthorization struct { AuthorizationMethod IssuingAuthorizationAuthorizationMethod `json:"authorization_method"` // List of balance transactions associated with this authorization. BalanceTransactions []*BalanceTransaction `json:"balance_transactions"` - // You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. + // You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. Card *IssuingCard `json:"card"` // The cardholder to whom this authorization belongs. Cardholder *IssuingCardholder `json:"cardholder"` @@ -474,6 +513,8 @@ type IssuingAuthorization struct { Currency Currency `json:"currency"` // Fleet-specific information for authorizations using Fleet cards. Fleet *IssuingAuthorizationFleet `json:"fleet"` + // Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. + FraudChallenges []*IssuingAuthorizationFraudChallenge `json:"fraud_challenges"` // Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. Fuel *IssuingAuthorizationFuel `json:"fuel"` // Unique identifier for the object. @@ -504,6 +545,8 @@ type IssuingAuthorization struct { // [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). Treasury *IssuingAuthorizationTreasury `json:"treasury"` VerificationData *IssuingAuthorizationVerificationData `json:"verification_data"` + // Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. + VerifiedByFraudChallenge bool `json:"verified_by_fraud_challenge"` // The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. Wallet IssuingAuthorizationWallet `json:"wallet"` } diff --git a/issuing_card.go b/issuing_card.go index 3fd7a3c851..425afaded7 100644 --- a/issuing_card.go +++ b/issuing_card.go @@ -374,7 +374,7 @@ type IssuingCardWallets struct { PrimaryAccountIdentifier string `json:"primary_account_identifier"` } -// You can [create physical or virtual cards](https://stripe.com/docs/issuing/cards) that are issued to cardholders. +// You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. type IssuingCard struct { APIResource // The brand of the card. @@ -383,7 +383,7 @@ type IssuingCard struct { CancellationReason IssuingCardCancellationReason `json:"cancellation_reason"` // An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. // - // Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) + // Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) Cardholder *IssuingCardholder `json:"cardholder"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` diff --git a/issuing_cardholder.go b/issuing_cardholder.go index 5d5de0b90f..48ab969733 100644 --- a/issuing_cardholder.go +++ b/issuing_cardholder.go @@ -323,7 +323,7 @@ type IssuingCardholderSpendingControls struct { // An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. // -// Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards#create-cardholder) +// Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) type IssuingCardholder struct { APIResource Billing *IssuingCardholderBilling `json:"billing"` diff --git a/paymentintent.go b/paymentintent.go index 806aa5027d..907bd9920b 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -392,6 +392,7 @@ const ( PaymentIntentPaymentMethodOptionsCardNetworkGirocard PaymentIntentPaymentMethodOptionsCardNetwork = "girocard" PaymentIntentPaymentMethodOptionsCardNetworkInterac PaymentIntentPaymentMethodOptionsCardNetwork = "interac" PaymentIntentPaymentMethodOptionsCardNetworkJCB PaymentIntentPaymentMethodOptionsCardNetwork = "jcb" + PaymentIntentPaymentMethodOptionsCardNetworkLink PaymentIntentPaymentMethodOptionsCardNetwork = "link" PaymentIntentPaymentMethodOptionsCardNetworkMastercard PaymentIntentPaymentMethodOptionsCardNetwork = "mastercard" PaymentIntentPaymentMethodOptionsCardNetworkUnionpay PaymentIntentPaymentMethodOptionsCardNetwork = "unionpay" PaymentIntentPaymentMethodOptionsCardNetworkUnknown PaymentIntentPaymentMethodOptionsCardNetwork = "unknown" @@ -2394,7 +2395,7 @@ type PaymentIntentParams struct { // // If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. PaymentMethod *string `form:"payment_method"` - // The ID of the payment method configuration to use with this PaymentIntent. + // The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. PaymentMethodConfiguration *string `form:"payment_method_configuration"` // If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear // in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) @@ -2402,7 +2403,7 @@ type PaymentIntentParams struct { PaymentMethodData *PaymentIntentPaymentMethodDataParams `form:"payment_method_data"` // Payment-method-specific configuration for this PaymentIntent. PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"` - // The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, it defaults to ["card"]. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + // The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). PaymentMethodTypes []*string `form:"payment_method_types"` // Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). RadarOptions *PaymentIntentRadarOptionsParams `form:"radar_options"` @@ -2780,8 +2781,14 @@ type PaymentIntentNextActionCashAppHandleRedirectOrDisplayQRCode struct { // ABA Records contain U.S. bank account details per the ABA format. type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressABA struct { + AccountHolderAddress *Address `json:"account_holder_address"` + // The account holder name + AccountHolderName string `json:"account_holder_name"` // The ABA account number AccountNumber string `json:"account_number"` + // The account type + AccountType string `json:"account_type"` + BankAddress *Address `json:"bank_address"` // The bank name BankName string `json:"bank_name"` // The ABA routing number @@ -2822,8 +2829,14 @@ type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSpei // SWIFT Records contain U.S. bank account details per the SWIFT format. type PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressSwift struct { + AccountHolderAddress *Address `json:"account_holder_address"` + // The account holder name + AccountHolderName string `json:"account_holder_name"` // The account number AccountNumber string `json:"account_number"` + // The account type + AccountType string `json:"account_type"` + BankAddress *Address `json:"bank_address"` // The bank name BankName string `json:"bank_name"` // The SWIFT code @@ -3070,7 +3083,7 @@ type PaymentIntentNextAction struct { WeChatPayRedirectToIOSApp *PaymentIntentNextActionWeChatPayRedirectToIOSApp `json:"wechat_pay_redirect_to_ios_app"` } -// Information about the payment method configuration used for this PaymentIntent. +// Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. type PaymentIntentPaymentMethodConfigurationDetails struct { // ID of the payment method configuration used. ID string `json:"id"` @@ -3832,7 +3845,7 @@ type PaymentIntent struct { OnBehalfOf *Account `json:"on_behalf_of"` // ID of the payment method used in this PaymentIntent. PaymentMethod *PaymentMethod `json:"payment_method"` - // Information about the payment method configuration used for this PaymentIntent. + // Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. PaymentMethodConfigurationDetails *PaymentIntentPaymentMethodConfigurationDetails `json:"payment_method_configuration_details"` // Payment-method-specific configuration for this PaymentIntent. PaymentMethodOptions *PaymentIntentPaymentMethodOptions `json:"payment_method_options"` diff --git a/paymentlink.go b/paymentlink.go index 0cb18df26b..f6dfc4f2a5 100644 --- a/paymentlink.go +++ b/paymentlink.go @@ -174,10 +174,11 @@ type PaymentLinkSubmitType string // List of values that PaymentLinkSubmitType can take const ( - PaymentLinkSubmitTypeAuto PaymentLinkSubmitType = "auto" - PaymentLinkSubmitTypeBook PaymentLinkSubmitType = "book" - PaymentLinkSubmitTypeDonate PaymentLinkSubmitType = "donate" - PaymentLinkSubmitTypePay PaymentLinkSubmitType = "pay" + PaymentLinkSubmitTypeAuto PaymentLinkSubmitType = "auto" + PaymentLinkSubmitTypeBook PaymentLinkSubmitType = "book" + PaymentLinkSubmitTypeDonate PaymentLinkSubmitType = "donate" + PaymentLinkSubmitTypePay PaymentLinkSubmitType = "pay" + PaymentLinkSubmitTypeSubscribe PaymentLinkSubmitType = "subscribe" ) // Type of the account referenced. @@ -512,7 +513,7 @@ type PaymentLinkRestrictionsParams struct { // Configuration for collecting the customer's shipping address. type PaymentLinkShippingAddressCollectionParams struct { // An array of two-letter ISO country codes representing which countries Checkout should provide as options for - // shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + // shipping locations. AllowedCountries []*string `form:"allowed_countries"` } diff --git a/paymentmethod.go b/paymentmethod.go index 35ecf2c17b..62385c72ec 100644 --- a/paymentmethod.go +++ b/paymentmethod.go @@ -18,7 +18,7 @@ const ( PaymentMethodAllowRedisplayUnspecified PaymentMethodAllowRedisplay = "unspecified" ) -// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. +// Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. type PaymentMethodCardBrand string // List of values that PaymentMethodCardBrand can take @@ -869,7 +869,7 @@ type PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresentWallet struct type PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent struct { // The authorized amount AmountAuthorized int64 `json:"amount_authorized"` - // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand string `json:"brand"` // The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. BrandProduct string `json:"brand_product"` @@ -903,7 +903,7 @@ type PaymentMethodCardGeneratedFromPaymentMethodDetailsCardPresent struct { Issuer string `json:"issuer"` // The last four digits of the card. Last4 string `json:"last4"` - // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Network string `json:"network"` // This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. NetworkTransactionID string `json:"network_transaction_id"` @@ -991,7 +991,7 @@ type PaymentMethodCardWallet struct { VisaCheckout *PaymentMethodCardWalletVisaCheckout `json:"visa_checkout"` } type PaymentMethodCard struct { - // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand PaymentMethodCardBrand `json:"brand"` // Checks on Card address and CVC if provided. Checks *PaymentMethodCardChecks `json:"checks"` @@ -1049,7 +1049,7 @@ type PaymentMethodCardPresentWallet struct { Type PaymentMethodCardPresentWalletType `json:"type"` } type PaymentMethodCardPresent struct { - // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand string `json:"brand"` // The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. BrandProduct string `json:"brand_product"` diff --git a/payout.go b/payout.go index 94b2d19f07..c7a63bcd55 100644 --- a/payout.go +++ b/payout.go @@ -178,6 +178,14 @@ func (p *PayoutReverseParams) AddMetadata(key string, value string) { p.Metadata[key] = value } +// A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. +type PayoutTraceID struct { + // Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`. + Status string `json:"status"` + // The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. + Value string `json:"value"` +} + // A `Payout` object is created when you receive funds from Stripe, or when you // initiate a payout to either a bank account or debit card of a [connected // Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, @@ -236,6 +244,8 @@ type Payout struct { StatementDescriptor string `json:"statement_descriptor"` // Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. Status PayoutStatus `json:"status"` + // A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. + TraceID *PayoutTraceID `json:"trace_id"` // Can be `bank_account` or `card`. Type PayoutType `json:"type"` } diff --git a/person.go b/person.go index 10f4464af9..b54922487d 100644 --- a/person.go +++ b/person.go @@ -236,6 +236,8 @@ type PersonDocumentsParams struct { // The relationship that this person has with the account's legal entity. type PersonRelationshipParams struct { + // Whether the person is the authorizer of the account's representative. + Authorizer *bool `form:"authorizer"` // Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. Director *bool `form:"director"` // Whether the person has significant responsibility to control, manage, or direct the organization. @@ -270,6 +272,8 @@ type PersonVerificationParams struct { // Filters on the list of people returned based on the person's relationship to the account's company. type PersonListRelationshipParams struct { + // A filter on the list of people returned based on whether these people are authorizers of the account's representative. + Authorizer *bool `form:"authorizer"` // A filter on the list of people returned based on whether these people are directors of the account's company. Director *bool `form:"director"` // A filter on the list of people returned based on whether these people are executives of the account's company. @@ -389,6 +393,8 @@ type PersonFutureRequirements struct { PendingVerification []string `json:"pending_verification"` } type PersonRelationship struct { + // Whether the person is the authorizer of the account's representative. + Authorizer bool `json:"authorizer"` // Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. Director bool `json:"director"` // Whether the person has significant responsibility to control, manage, or direct the organization. diff --git a/refund.go b/refund.go index fb658e2643..48853e3d8e 100644 --- a/refund.go +++ b/refund.go @@ -146,6 +146,8 @@ type RefundDestinationDetailsAlma struct{} type RefundDestinationDetailsAmazonPay struct{} type RefundDestinationDetailsAuBankTransfer struct{} type RefundDestinationDetailsBLIK struct { + // For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + NetworkDeclineCode string `json:"network_decline_code"` // The reference assigned to the refund. Reference string `json:"reference"` // Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. @@ -215,6 +217,8 @@ type RefundDestinationDetailsPix struct{} type RefundDestinationDetailsRevolut struct{} type RefundDestinationDetailsSofort struct{} type RefundDestinationDetailsSwish struct { + // For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + NetworkDeclineCode string `json:"network_decline_code"` // The reference assigned to the refund. Reference string `json:"reference"` // Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. diff --git a/setupattempt.go b/setupattempt.go index c94e310736..732db271af 100644 --- a/setupattempt.go +++ b/setupattempt.go @@ -207,7 +207,7 @@ type SetupAttemptPaymentMethodDetailsCardWallet struct { Type SetupAttemptPaymentMethodDetailsCardWalletType `json:"type"` } type SetupAttemptPaymentMethodDetailsCard struct { - // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand string `json:"brand"` // Check results by Card networks on Card address and CVC at the time of authorization Checks *SetupAttemptPaymentMethodDetailsCardChecks `json:"checks"` @@ -231,7 +231,7 @@ type SetupAttemptPaymentMethodDetailsCard struct { Issuer string `json:"issuer"` // The last four digits of the card. Last4 string `json:"last4"` - // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + // Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. Network string `json:"network"` // Populated if this authorization used 3D Secure authentication. ThreeDSecure *SetupAttemptPaymentMethodDetailsCardThreeDSecure `json:"three_d_secure"` diff --git a/setupintent.go b/setupintent.go index afe997f49b..736d49ceec 100644 --- a/setupintent.go +++ b/setupintent.go @@ -150,6 +150,7 @@ const ( SetupIntentPaymentMethodOptionsCardNetworkGirocard SetupIntentPaymentMethodOptionsCardNetwork = "girocard" SetupIntentPaymentMethodOptionsCardNetworkInterac SetupIntentPaymentMethodOptionsCardNetwork = "interac" SetupIntentPaymentMethodOptionsCardNetworkJCB SetupIntentPaymentMethodOptionsCardNetwork = "jcb" + SetupIntentPaymentMethodOptionsCardNetworkLink SetupIntentPaymentMethodOptionsCardNetwork = "link" SetupIntentPaymentMethodOptionsCardNetworkMastercard SetupIntentPaymentMethodOptionsCardNetwork = "mastercard" SetupIntentPaymentMethodOptionsCardNetworkUnionpay SetupIntentPaymentMethodOptionsCardNetwork = "unionpay" SetupIntentPaymentMethodOptionsCardNetworkUnknown SetupIntentPaymentMethodOptionsCardNetwork = "unknown" @@ -892,14 +893,14 @@ type SetupIntentParams struct { OnBehalfOf *string `form:"on_behalf_of"` // ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. PaymentMethod *string `form:"payment_method"` - // The ID of the payment method configuration to use with this SetupIntent. + // The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. PaymentMethodConfiguration *string `form:"payment_method_configuration"` // When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) // value in the SetupIntent. PaymentMethodData *SetupIntentPaymentMethodDataParams `form:"payment_method_data"` // Payment method-specific configuration for this SetupIntent. PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"` - // The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this array, it defaults to ["card"]. + // The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). PaymentMethodTypes []*string `form:"payment_method_types"` // The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). ReturnURL *string `form:"return_url"` @@ -1377,7 +1378,7 @@ type SetupIntentNextAction struct { VerifyWithMicrodeposits *SetupIntentNextActionVerifyWithMicrodeposits `json:"verify_with_microdeposits"` } -// Information about the payment method configuration used for this Setup Intent. +// Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. type SetupIntentPaymentMethodConfigurationDetails struct { // ID of the payment method configuration used. ID string `json:"id"` @@ -1560,7 +1561,7 @@ type SetupIntent struct { OnBehalfOf *Account `json:"on_behalf_of"` // ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. PaymentMethod *PaymentMethod `json:"payment_method"` - // Information about the payment method configuration used for this Setup Intent. + // Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. PaymentMethodConfigurationDetails *SetupIntentPaymentMethodConfigurationDetails `json:"payment_method_configuration_details"` // Payment method-specific configuration for this SetupIntent. PaymentMethodOptions *SetupIntentPaymentMethodOptions `json:"payment_method_options"` diff --git a/subscription.go b/subscription.go index 9b9dd1e4fb..822f0aa7ca 100644 --- a/subscription.go +++ b/subscription.go @@ -114,6 +114,7 @@ const ( SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkGirocard SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "girocard" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkInterac SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "interac" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkJCB SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "jcb" + SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkLink SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "link" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkMastercard SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "mastercard" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkUnionpay SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "unionpay" SubscriptionPaymentSettingsPaymentMethodOptionsCardNetworkUnknown SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork = "unknown" @@ -246,7 +247,7 @@ const ( // // A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. // -// A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. +// A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. // // If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). // @@ -362,7 +363,7 @@ type SubscriptionParams struct { OffSession *bool `form:"off_session"` // The account on behalf of which to charge, for each of the subscription's invoices. OnBehalfOf *string `form:"on_behalf_of"` - // If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment). + // If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). PauseCollection *SubscriptionPauseCollectionParams `form:"pause_collection"` // Only applies to subscriptions with `collection_method=charge_automatically`. // @@ -544,7 +545,7 @@ func (p *SubscriptionItemsParams) AddMetadata(key string, value string) { p.Metadata[key] = value } -// If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment). +// If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). type SubscriptionPauseCollectionParams struct { // The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. Behavior *string `form:"behavior"` @@ -855,7 +856,7 @@ type SubscriptionInvoiceSettings struct { Issuer *SubscriptionInvoiceSettingsIssuer `json:"issuer"` } -// If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment). +// If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). type SubscriptionPauseCollection struct { // The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. Behavior SubscriptionPauseCollectionBehavior `json:"behavior"` @@ -1076,7 +1077,7 @@ type Subscription struct { Object string `json:"object"` // The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. OnBehalfOf *Account `json:"on_behalf_of"` - // If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/billing/subscriptions/pause-payment). + // If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). PauseCollection *SubscriptionPauseCollection `json:"pause_collection"` // Payment settings passed on to invoices created by the subscription. PaymentSettings *SubscriptionPaymentSettings `json:"payment_settings"` @@ -1096,7 +1097,7 @@ type Subscription struct { // // A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. // - // A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. + // A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. // // If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). // diff --git a/subscription/client.go b/subscription/client.go index 6c3a4cc9ce..74c665d43c 100644 --- a/subscription/client.go +++ b/subscription/client.go @@ -75,7 +75,7 @@ func (c Client) Get(id string, params *stripe.SubscriptionParams) (*stripe.Subsc // The subscription moves from free to paid. // A trial starts or ends. // -// In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment). +// In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment). // // If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create). // @@ -98,7 +98,7 @@ func Update(id string, params *stripe.SubscriptionParams) (*stripe.Subscription, // The subscription moves from free to paid. // A trial starts or ends. // -// In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment). +// In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment). // // If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create). // diff --git a/tax_calculation.go b/tax_calculation.go index 7124a1dd6c..da296f495d 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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` type TaxCalculationCustomerDetailsTaxIDType string // List of values that TaxCalculationCustomerDetailsTaxIDType can take @@ -66,6 +66,7 @@ const ( TaxCalculationCustomerDetailsTaxIDTypeKRBRN TaxCalculationCustomerDetailsTaxIDType = "kr_brn" TaxCalculationCustomerDetailsTaxIDTypeKzBin TaxCalculationCustomerDetailsTaxIDType = "kz_bin" TaxCalculationCustomerDetailsTaxIDTypeLIUID TaxCalculationCustomerDetailsTaxIDType = "li_uid" + TaxCalculationCustomerDetailsTaxIDTypeLiVAT TaxCalculationCustomerDetailsTaxIDType = "li_vat" TaxCalculationCustomerDetailsTaxIDTypeMaVAT TaxCalculationCustomerDetailsTaxIDType = "ma_vat" TaxCalculationCustomerDetailsTaxIDTypeMdVAT TaxCalculationCustomerDetailsTaxIDType = "md_vat" TaxCalculationCustomerDetailsTaxIDTypeMXRFC TaxCalculationCustomerDetailsTaxIDType = "mx_rfc" @@ -160,6 +161,7 @@ const ( TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeRetailDeliveryFee TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "retail_delivery_fee" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeRST TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "rst" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeSalesTax TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "sales_tax" + TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeServiceTax TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "service_tax" TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxTypeVAT TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType = "vat" ) @@ -211,6 +213,7 @@ const ( TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeRetailDeliveryFee TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "retail_delivery_fee" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeRST TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "rst" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeSalesTax TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "sales_tax" + TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeServiceTax TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "service_tax" TaxCalculationTaxBreakdownTaxRateDetailsTaxTypeVAT TaxCalculationTaxBreakdownTaxRateDetailsTaxType = "vat" ) @@ -277,7 +280,7 @@ func (p *TaxCalculationListLineItemsParams) AddExpand(f string) { // The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness. type TaxCalculationCustomerDetailsTaxIDParams struct { - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `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`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -334,7 +337,7 @@ type TaxCalculationShippingCostParams struct { // The customer's tax IDs (for example, EU VAT numbers). type TaxCalculationCustomerDetailsTaxID struct { - // The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` Type TaxCalculationCustomerDetailsTaxIDType `json:"type"` // The value of the tax ID. Value string `json:"value"` diff --git a/tax_calculationlineitem.go b/tax_calculationlineitem.go index cfa83106e1..7474bca743 100644 --- a/tax_calculationlineitem.go +++ b/tax_calculationlineitem.go @@ -53,6 +53,7 @@ const ( TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeRetailDeliveryFee TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "retail_delivery_fee" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeRST TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "rst" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeSalesTax TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "sales_tax" + TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeServiceTax TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "service_tax" TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxTypeVAT TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType = "vat" ) diff --git a/tax_transaction.go b/tax_transaction.go index d27b3d3755..6ba87d3808 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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown` type TaxTransactionCustomerDetailsTaxIDType string // List of values that TaxTransactionCustomerDetailsTaxIDType can take @@ -66,6 +66,7 @@ const ( TaxTransactionCustomerDetailsTaxIDTypeKRBRN TaxTransactionCustomerDetailsTaxIDType = "kr_brn" TaxTransactionCustomerDetailsTaxIDTypeKzBin TaxTransactionCustomerDetailsTaxIDType = "kz_bin" TaxTransactionCustomerDetailsTaxIDTypeLIUID TaxTransactionCustomerDetailsTaxIDType = "li_uid" + TaxTransactionCustomerDetailsTaxIDTypeLiVAT TaxTransactionCustomerDetailsTaxIDType = "li_vat" TaxTransactionCustomerDetailsTaxIDTypeMaVAT TaxTransactionCustomerDetailsTaxIDType = "ma_vat" TaxTransactionCustomerDetailsTaxIDTypeMdVAT TaxTransactionCustomerDetailsTaxIDType = "md_vat" TaxTransactionCustomerDetailsTaxIDTypeMXRFC TaxTransactionCustomerDetailsTaxIDType = "mx_rfc" @@ -160,6 +161,7 @@ const ( TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeRetailDeliveryFee TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "retail_delivery_fee" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeRST TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "rst" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeSalesTax TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "sales_tax" + TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeServiceTax TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "service_tax" TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxTypeVAT TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType = "vat" ) @@ -318,7 +320,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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_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`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, 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 da1be58fac..5f06da7ef0 100644 --- a/taxid.go +++ b/taxid.go @@ -19,7 +19,7 @@ const ( TaxIDOwnerTypeSelf TaxIDOwnerType = "self" ) -// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `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`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `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 @@ -70,6 +70,7 @@ const ( TaxIDTypeKRBRN TaxIDType = "kr_brn" TaxIDTypeKzBin TaxIDType = "kz_bin" TaxIDTypeLIUID TaxIDType = "li_uid" + TaxIDTypeLiVAT TaxIDType = "li_vat" TaxIDTypeMaVAT TaxIDType = "ma_vat" TaxIDTypeMdVAT TaxIDType = "md_vat" TaxIDTypeMXRFC TaxIDType = "mx_rfc" @@ -124,7 +125,7 @@ type TaxIDParams struct { Customer *string `form:"-"` // Included in URL // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `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`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, or `za_vat` Type *string `form:"type"` // Value of the tax ID. Value *string `form:"value"` @@ -191,7 +192,7 @@ type TaxID struct { Object string `json:"object"` // The account or customer the tax ID belongs to. Owner *TaxIDOwner `json:"owner"` - // Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `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`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `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`, `tz_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `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/taxrate.go b/taxrate.go index 8b7f8bab9c..88e54fdae2 100644 --- a/taxrate.go +++ b/taxrate.go @@ -47,6 +47,7 @@ const ( TaxRateTaxTypeRetailDeliveryFee TaxRateTaxType = "retail_delivery_fee" TaxRateTaxTypeRST TaxRateTaxType = "rst" TaxRateTaxTypeSalesTax TaxRateTaxType = "sales_tax" + TaxRateTaxTypeServiceTax TaxRateTaxType = "service_tax" TaxRateTaxTypeVAT TaxRateTaxType = "vat" ) diff --git a/testhelpers/issuing/authorization/client.go b/testhelpers/issuing/authorization/client.go index 3aa469040c..8cb41bfa73 100644 --- a/testhelpers/issuing/authorization/client.go +++ b/testhelpers/issuing/authorization/client.go @@ -101,6 +101,22 @@ func (c Client) Increment(id string, params *stripe.TestHelpersIssuingAuthorizat return authorization, err } +// Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. +func Respond(id string, params *stripe.TestHelpersIssuingAuthorizationRespondParams) (*stripe.IssuingAuthorization, error) { + return getC().Respond(id, params) +} + +// Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. +func (c Client) Respond(id string, params *stripe.TestHelpersIssuingAuthorizationRespondParams) (*stripe.IssuingAuthorization, error) { + path := stripe.FormatURLPath( + "/v1/test_helpers/issuing/authorizations/%s/fraud_challenges/respond", + id, + ) + authorization := &stripe.IssuingAuthorization{} + err := c.B.Call(http.MethodPost, path, c.Key, params, authorization) + return authorization, err +} + // Reverse a test-mode Authorization. func Reverse(id string, params *stripe.TestHelpersIssuingAuthorizationReverseParams) (*stripe.IssuingAuthorization, error) { return getC().Reverse(id, params) diff --git a/testhelpersissuing_authorization.go b/testhelpersissuing_authorization.go index 1c0979d8ed..e746046a50 100644 --- a/testhelpersissuing_authorization.go +++ b/testhelpersissuing_authorization.go @@ -163,6 +163,10 @@ type TestHelpersIssuingAuthorizationParams struct { Fuel *TestHelpersIssuingAuthorizationFuelParams `form:"fuel"` // If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. IsAmountControllable *bool `form:"is_amount_controllable"` + // The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + MerchantAmount *int64 `form:"merchant_amount"` + // The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + MerchantCurrency *string `form:"merchant_currency"` // Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. MerchantData *TestHelpersIssuingAuthorizationMerchantDataParams `form:"merchant_data"` // Details about the authorization, such as identifiers, set by the card network. @@ -428,6 +432,20 @@ func (p *TestHelpersIssuingAuthorizationFinalizeAmountParams) AddExpand(f string p.Expand = append(p.Expand, &f) } +// Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. +type TestHelpersIssuingAuthorizationRespondParams struct { + Params `form:"*"` + // Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false). + Confirmed *bool `form:"confirmed"` + // Specifies which fields in the response should be expanded. + Expand []*string `form:"expand"` +} + +// AddExpand appends a new field to expand. +func (p *TestHelpersIssuingAuthorizationRespondParams) AddExpand(f string) { + p.Expand = append(p.Expand, &f) +} + // Increment a test-mode Authorization. type TestHelpersIssuingAuthorizationIncrementParams struct { Params `form:"*"` From c2787d852d6b362c4d885e3f6e9dc906194f08dd Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Wed, 20 Nov 2024 15:29:43 -0800 Subject: [PATCH 10/10] Bump version to 81.1.0 --- CHANGELOG.md | 21 +++++++++++++++++++++ VERSION | 2 +- stripe.go | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 639444149d..56aa5d48f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 81.1.0 - 2024-11-20 +* [#1951](https://github.com/stripe/stripe-go/pull/1951) This release changes the pinned API version to `2024-11-20.acacia`. + * Add support for `Respond` test helper method on resource `Issuing.Authorization` + * Add support for `Authorizer` on `AccountPersonsRelationshipParams` and `TokenPersonRelationshipParams` + * Change type of `AccountFutureRequirementsDisabledReason` and `AccountRequirementsDisabledReason` from `string` to `enum` + * Add support for `AdaptivePricing` on `CheckoutSessionParams` and `CheckoutSession` + * Add support for `MandateOptions` on `CheckoutSessionPaymentMethodOptionsBacsDebitParams`, `CheckoutSessionPaymentMethodOptionsBacsDebit`, `CheckoutSessionPaymentMethodOptionsSepaDebitParams`, and `CheckoutSessionPaymentMethodOptionsSepaDebit` + * Add support for `RequestExtendedAuthorization`, `RequestIncrementalAuthorization`, `RequestMulticapture`, and `RequestOvercapture` on `CheckoutSessionPaymentMethodOptionsCardParams` and `CheckoutSessionPaymentMethodOptionsCard` + * Add support for `CaptureMethod` on `CheckoutSessionPaymentMethodOptionsKakaoPayParams`, `CheckoutSessionPaymentMethodOptionsKrCardParams`, `CheckoutSessionPaymentMethodOptionsNaverPayParams`, `CheckoutSessionPaymentMethodOptionsPaycoParams`, and `CheckoutSessionPaymentMethodOptionsSamsungPayParams` + * Add support for new value `li_vat` on enums `CheckoutSessionCustomerDetailsTaxIdsType`, `InvoiceCustomerTaxIdsType`, `TaxCalculationCustomerDetailsTaxIdsType`, `TaxIdType`, and `TaxTransactionCustomerDetailsTaxIdsType` + * Add support for new value `subscribe` on enums `CheckoutSessionSubmitType` and `PaymentLinkSubmitType` + * Add support for new value `financial_account_statement` on enum `FilePurpose` + * Add support for `AccountHolderAddress`, `AccountHolderName`, `AccountType`, and `BankAddress` on `FundingInstructionsBankTransferFinancialAddressesAba`, `FundingInstructionsBankTransferFinancialAddressesSwift`, `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesAba`, and `PaymentIntentNextActionDisplayBankTransferInstructionsFinancialAddressesSwift` + * Add support for `MerchantAmount` and `MerchantCurrency` on `IssuingAuthorizationParams` + * Add support for `FraudChallenges` and `VerifiedByFraudChallenge` on `IssuingAuthorization` + * Add support for new value `link` on enums `PaymentIntentPaymentMethodOptionsCardNetwork`, `SetupIntentPaymentMethodOptionsCardNetwork`, and `SubscriptionPaymentSettingsPaymentMethodOptionsCardNetwork` + * Add support for `SubmitType` on `PaymentLinkParams` + * Add support for `TraceID` on `Payout` + * Add support for `NetworkDeclineCode` on `RefundDestinationDetailsBlik` and `RefundDestinationDetailsSwish` + * Add support for new value `service_tax` on enums `TaxCalculationLineItemTaxBreakdownTaxRateDetailsTaxType`, `TaxCalculationShippingCostTaxBreakdownTaxRateDetailsTaxType`, `TaxCalculationTaxBreakdownTaxRateDetailsTaxType`, `TaxRateTaxType`, and `TaxTransactionShippingCostTaxBreakdownTaxRateDetailsTaxType` + ## 81.0.0 - 2024-10-29 Historically, when upgrading webhooks to a new API version, you also had to upgrade your SDK version. Your webhook's API version needed to match the API version pinned by the SDK you were using to ensure successful deserialization of events. With the `2024-09-30.acacia` release, Stripe follows a [new API release process](https://stripe.com/blog/introducing-stripes-new-api-release-process). As a result, you can safely upgrade your webhook endpoints to any API version within a biannual release (like `acacia`) without upgrading the SDK. diff --git a/VERSION b/VERSION index 6a78467e89..1c3cffa48f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -81.0.0 +81.1.0 diff --git a/stripe.go b/stripe.go index 1e251be796..7d9b3c7b17 100644 --- a/stripe.go +++ b/stripe.go @@ -1386,7 +1386,7 @@ func StringSlice(v []string) []*string { // // clientversion is the binding version -const clientversion = "81.0.0" +const clientversion = "81.1.0" // defaultHTTPTimeout is the default timeout on the http.Client used by the library. // This is chosen to be consistent with the other Stripe language libraries and