diff --git a/CHANGELOG.md b/CHANGELOG.md index ef480e0796..b0c1dbea0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 78.2.0 - 2024-04-16 +* [#1847](https://github.com/stripe/stripe-go/pull/1847) Update generated code + * Add support for new resource `Entitlements.ActiveEntitlementSummary` + * Add support for `Balances` and `PayoutsList` on `AccountSessionComponentsParams` and `AccountSessionComponents` + * Add support for new value `entitlements.active_entitlement_summary.updated` on enum `EventType` + * Remove support for `Config` on `ForwardingRequestParams` and `ForwardingRequest`. This field is no longer used by the Forwarding Request API. + * Add support for `CaptureMethod` on `PaymentIntentConfirmPaymentMethodOptionsRevolutPayParams`, `PaymentIntentPaymentMethodOptionsRevolutPayParams`, and `PaymentIntentPaymentMethodOptionsRevolutPay` + * Add support for `Swish` on `PaymentMethodConfigurationParams` and `PaymentMethodConfiguration` + ## 78.2.0-beta.1 - 2024-04-11 * [#1843](https://github.com/stripe/stripe-go/pull/1843) Update generated code for beta * Add support for `Get` method on resources `Entitlements.ActiveEntitlement` and `Entitlements.Feature` diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b0d6e12ba5..e0b2735086 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v951 \ No newline at end of file +v972 \ No newline at end of file diff --git a/accountsession.go b/accountsession.go index b4afc9ffdb..6a9b244ca4 100644 --- a/accountsession.go +++ b/accountsession.go @@ -34,6 +34,24 @@ type AccountSessionComponentsAccountOnboardingParams struct { Features *AccountSessionComponentsAccountOnboardingFeaturesParams `form:"features"` } +// The list of features enabled in the embedded component. +type AccountSessionComponentsBalancesFeaturesParams struct { + // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + EditPayoutSchedule *bool `form:"edit_payout_schedule"` + // Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + InstantPayouts *bool `form:"instant_payouts"` + // Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + StandardPayouts *bool `form:"standard_payouts"` +} + +// Configuration for the balances embedded component. +type AccountSessionComponentsBalancesParams struct { + // Whether the embedded component is enabled. + Enabled *bool `form:"enabled"` + // The list of features enabled in the embedded component. + Features *AccountSessionComponentsBalancesFeaturesParams `form:"features"` +} + // The list of features enabled in the embedded component. type AccountSessionComponentsCapitalFinancingPromotionFeaturesParams struct{} type AccountSessionComponentsCapitalFinancingPromotionParams struct { @@ -43,6 +61,17 @@ type AccountSessionComponentsCapitalFinancingPromotionParams struct { Features *AccountSessionComponentsCapitalFinancingPromotionFeaturesParams `form:"features"` } +// The list of features enabled in the embedded component. +type AccountSessionComponentsCapitalOverviewFeaturesParams struct{} + +// Configuration for the capital overview embedded component. +type AccountSessionComponentsCapitalOverviewParams struct { + // Whether the embedded component is enabled. + Enabled *bool `form:"enabled"` + // The list of features enabled in the embedded component. + Features *AccountSessionComponentsCapitalOverviewFeaturesParams `form:"features"` +} + // The list of features enabled in the embedded component. type AccountSessionComponentsDocumentsFeaturesParams struct{} @@ -54,6 +83,8 @@ type AccountSessionComponentsDocumentsParams struct { Features *AccountSessionComponentsDocumentsFeaturesParams `form:"features"` } type AccountSessionComponentsFinancialAccountFeaturesParams struct { + // Whether to allow external accounts to be linked for money transfer. + ExternalAccountCollection *bool `form:"external_account_collection"` // Whether to allow money movement features. MoneyMovement *bool `form:"money_movement"` } @@ -175,13 +206,50 @@ type AccountSessionComponentsPayoutsParams struct { Features *AccountSessionComponentsPayoutsFeaturesParams `form:"features"` } +// The list of features enabled in the embedded component. +type AccountSessionComponentsPayoutsListFeaturesParams struct{} + +// Configuration for the payouts list embedded component. +type AccountSessionComponentsPayoutsListParams struct { + // Whether the embedded component is enabled. + Enabled *bool `form:"enabled"` + // The list of features enabled in the embedded component. + Features *AccountSessionComponentsPayoutsListFeaturesParams `form:"features"` +} + +// The list of features enabled in the embedded component. +type AccountSessionComponentsTaxRegistrationsFeaturesParams struct{} + +// Configuration for the tax registrations embedded component. +type AccountSessionComponentsTaxRegistrationsParams struct { + // Whether the embedded component is enabled. + Enabled *bool `form:"enabled"` + // The list of features enabled in the embedded component. + Features *AccountSessionComponentsTaxRegistrationsFeaturesParams `form:"features"` +} + +// The list of features enabled in the embedded component. +type AccountSessionComponentsTaxSettingsFeaturesParams struct{} + +// Configuration for the tax settings embedded component. +type AccountSessionComponentsTaxSettingsParams struct { + // Whether the embedded component is enabled. + Enabled *bool `form:"enabled"` + // The list of features enabled in the embedded component. + Features *AccountSessionComponentsTaxSettingsFeaturesParams `form:"features"` +} + // Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). type AccountSessionComponentsParams struct { // Configuration for the account management embedded component. AccountManagement *AccountSessionComponentsAccountManagementParams `form:"account_management"` // Configuration for the account onboarding embedded component. - AccountOnboarding *AccountSessionComponentsAccountOnboardingParams `form:"account_onboarding"` + AccountOnboarding *AccountSessionComponentsAccountOnboardingParams `form:"account_onboarding"` + // Configuration for the balances embedded component. + Balances *AccountSessionComponentsBalancesParams `form:"balances"` CapitalFinancingPromotion *AccountSessionComponentsCapitalFinancingPromotionParams `form:"capital_financing_promotion"` + // Configuration for the capital overview embedded component. + CapitalOverview *AccountSessionComponentsCapitalOverviewParams `form:"capital_overview"` // Configuration for the documents embedded component. Documents *AccountSessionComponentsDocumentsParams `form:"documents"` // Configuration for the financial account component. @@ -200,6 +268,12 @@ type AccountSessionComponentsParams struct { Payments *AccountSessionComponentsPaymentsParams `form:"payments"` // Configuration for the payouts embedded component. Payouts *AccountSessionComponentsPayoutsParams `form:"payouts"` + // Configuration for the payouts list embedded component. + PayoutsList *AccountSessionComponentsPayoutsListParams `form:"payouts_list"` + // Configuration for the tax registrations embedded component. + TaxRegistrations *AccountSessionComponentsTaxRegistrationsParams `form:"tax_registrations"` + // Configuration for the tax settings embedded component. + TaxSettings *AccountSessionComponentsTaxSettingsParams `form:"tax_settings"` } // Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. @@ -236,6 +310,19 @@ type AccountSessionComponentsAccountOnboarding struct { Enabled bool `json:"enabled"` Features *AccountSessionComponentsAccountOnboardingFeatures `json:"features"` } +type AccountSessionComponentsBalancesFeatures struct { + // Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + EditPayoutSchedule bool `json:"edit_payout_schedule"` + // Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + InstantPayouts bool `json:"instant_payouts"` + // Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + StandardPayouts bool `json:"standard_payouts"` +} +type AccountSessionComponentsBalances struct { + // Whether the embedded component is enabled. + Enabled bool `json:"enabled"` + Features *AccountSessionComponentsBalancesFeatures `json:"features"` +} type AccountSessionComponentsCapitalFinancingPromotionFeatures struct{} type AccountSessionComponentsCapitalFinancingPromotion struct { // Whether the embedded component is enabled. @@ -300,15 +387,23 @@ type AccountSessionComponentsPayouts struct { Enabled bool `json:"enabled"` Features *AccountSessionComponentsPayoutsFeatures `json:"features"` } +type AccountSessionComponentsPayoutsListFeatures struct{} +type AccountSessionComponentsPayoutsList struct { + // Whether the embedded component is enabled. + Enabled bool `json:"enabled"` + Features *AccountSessionComponentsPayoutsListFeatures `json:"features"` +} type AccountSessionComponents struct { AccountManagement *AccountSessionComponentsAccountManagement `json:"account_management"` AccountOnboarding *AccountSessionComponentsAccountOnboarding `json:"account_onboarding"` + Balances *AccountSessionComponentsBalances `json:"balances"` CapitalFinancingPromotion *AccountSessionComponentsCapitalFinancingPromotion `json:"capital_financing_promotion"` Documents *AccountSessionComponentsDocuments `json:"documents"` NotificationBanner *AccountSessionComponentsNotificationBanner `json:"notification_banner"` PaymentDetails *AccountSessionComponentsPaymentDetails `json:"payment_details"` Payments *AccountSessionComponentsPayments `json:"payments"` Payouts *AccountSessionComponentsPayouts `json:"payouts"` + PayoutsList *AccountSessionComponentsPayoutsList `json:"payouts_list"` } // An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components. diff --git a/api_version.go b/api_version.go index 4333ff2618..5cd7b0256b 100644 --- a/api_version.go +++ b/api_version.go @@ -8,5 +8,5 @@ package stripe const ( apiVersion string = "2024-04-10" - previewVersion string = "2024-03-20.preview-v2" + previewVersion string = "2024-04-11.preview-v2" ) diff --git a/billing_meter.go b/billing_meter.go index 251edc94a8..7ef2c1fb1b 100644 --- a/billing_meter.go +++ b/billing_meter.go @@ -23,7 +23,7 @@ const ( BillingMeterDefaultAggregationFormulaSum BillingMeterDefaultAggregationFormula = "sum" ) -// The time window to pre-aggregate usage events for, if any. +// The time window to pre-aggregate meter events for, if any. type BillingMeterEventTimeWindow string // List of values that BillingMeterEventTimeWindow can take @@ -65,11 +65,11 @@ type BillingMeterCustomerMappingParams struct { // The default settings to aggregate a meter's events with. type BillingMeterDefaultAggregationParams struct { - // Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value, or `last` to use the last event's value. + // Specifies how events are aggregated. Allowed values are `count` to count the number of events and `sum` to sum each event's value. Formula *string `form:"formula"` } -// Fields that specify how to calculate a usage event's value. +// Fields that specify how to calculate a meter event's value. type BillingMeterValueSettingsParams struct { // The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used". EventPayloadKey *string `form:"event_payload_key"` @@ -84,13 +84,13 @@ type BillingMeterParams struct { DefaultAggregation *BillingMeterDefaultAggregationParams `form:"default_aggregation"` // The meter's name. DisplayName *string `form:"display_name"` - // The name of the usage event to record usage for. Corresponds with the `event_name` field on usage events. + // The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. EventName *string `form:"event_name"` - // The time window to pre-aggregate usage events for, if any. + // The time window to pre-aggregate meter events for, if any. EventTimeWindow *string `form:"event_time_window"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` - // Fields that specify how to calculate a usage event's value. + // Fields that specify how to calculate a meter event's value. ValueSettings *BillingMeterValueSettingsParams `form:"value_settings"` } @@ -124,7 +124,7 @@ func (p *BillingMeterReactivateParams) AddExpand(f string) { } type BillingMeterCustomerMapping struct { - // The key in the usage event payload to use for mapping the event to a customer. + // The key in the meter event payload to use for mapping the event to a customer. EventPayloadKey string `json:"event_payload_key"` // The method for mapping a meter event to a customer. Type BillingMeterCustomerMappingType `json:"type"` @@ -138,7 +138,7 @@ type BillingMeterStatusTransitions struct { DeactivatedAt int64 `json:"deactivated_at"` } type BillingMeterValueSettings struct { - // The key in the usage event payload to use as the value for this meter. + // The key in the meter event payload to use as the value for this meter. EventPayloadKey string `json:"event_payload_key"` } @@ -151,9 +151,9 @@ type BillingMeter struct { DefaultAggregation *BillingMeterDefaultAggregation `json:"default_aggregation"` // The meter's name. DisplayName string `json:"display_name"` - // The name of the usage event to record usage for. Corresponds with the `event_name` field on usage events. + // The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. EventName string `json:"event_name"` - // The time window to pre-aggregate usage events for, if any. + // The time window to pre-aggregate meter events for, if any. EventTimeWindow BillingMeterEventTimeWindow `json:"event_time_window"` // Unique identifier for the object. ID string `json:"id"` diff --git a/billing_meterevent.go b/billing_meterevent.go index dc1c21ae88..d256f7b4ac 100644 --- a/billing_meterevent.go +++ b/billing_meterevent.go @@ -15,9 +15,9 @@ type BillingMeterEventParams struct { 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. Identifier *string `form:"identifier"` - // The payload of the event. This must contain a field with the event's numerical value and a field to map the event to a customer. + // The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). Payload map[string]string `form:"payload"` - // The time of the event. Measured in seconds since the Unix epoch. + // The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified. Timestamp *int64 `form:"timestamp"` } @@ -40,7 +40,7 @@ type BillingMeterEvent struct { Livemode bool `json:"livemode"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` - // The payload of the event. + // The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). Payload map[string]string `json:"payload"` // The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. Timestamp int64 `json:"timestamp"` diff --git a/billing_metereventsummary.go b/billing_metereventsummary.go index a82eacf3b9..93e16b3196 100644 --- a/billing_metereventsummary.go +++ b/billing_metereventsummary.go @@ -12,11 +12,11 @@ type BillingMeterEventSummaryListParams struct { ID *string `form:"-"` // Included in URL // The customer for which to fetch event summaries. Customer *string `form:"customer"` - // The timestamp from when to stop aggregating usage events (exclusive). + // The timestamp from when to stop aggregating meter events (exclusive). EndTime *int64 `form:"end_time"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` - // The timestamp from when to start aggregating usage events (inclusive). + // The timestamp from when to start aggregating meter events (inclusive). StartTime *int64 `form:"start_time"` // Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. ValueGroupingWindow *string `form:"value_grouping_window"` @@ -30,19 +30,19 @@ func (p *BillingMeterEventSummaryListParams) AddExpand(f string) { // A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much // usage was accrued by a customer for that period. type BillingMeterEventSummary struct { - // Aggregated value of all the events within start_time (inclusive) and end_time (inclusive). The aggregation strategy is defined on meter via `default_aggregation``. + // Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. AggregatedValue float64 `json:"aggregated_value"` - // End timestamp for this usage summary (inclusive). + // End timestamp for this event summary (inclusive). EndTime int64 `json:"end_time"` // Unique identifier for the object. ID string `json:"id"` // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. Livemode bool `json:"livemode"` - // The meter associated with this usage summary. + // The meter associated with this event summary. Meter string `json:"meter"` // String representing the object's type. Objects of the same type share the same value. Object string `json:"object"` - // Start timestamp for this usage summary (inclusive). + // Start timestamp for this event summary (inclusive). StartTime int64 `json:"start_time"` } diff --git a/checkout_session.go b/checkout_session.go index 8783fed72d..0da5206f80 100644 --- a/checkout_session.go +++ b/checkout_session.go @@ -550,6 +550,18 @@ const ( CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsageOffSession CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage = "off_session" ) +// Indicates that you intend to make future payments with this PaymentIntent's payment method. +// +// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. +// +// When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). +type CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage string + +// List of values that CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage can take +const ( + CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsageNone CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage = "none" +) + // Indicates that you intend to make future payments with this PaymentIntent's payment method. // // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. @@ -708,6 +720,25 @@ const ( CheckoutSessionRedirectOnCompletionNever CheckoutSessionRedirectOnCompletion = "never" ) +// Controls which payment methods are eligible to be redisplayed to returning customers. Corresponds to `allow_redisplay` on the payment method. +type CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter string + +// List of values that CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter can take +const ( + CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilterAlways CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter = "always" + CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilterLimited CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter = "limited" + CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilterUnspecified CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter = "unspecified" +) + +// Enable customers to choose if they wish to save their payment method for future use. +type CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave string + +// List of values that CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave can take +const ( + CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSaveDisabled CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave = "disabled" + CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSaveEnabled CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave = "enabled" +) + // The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. type CheckoutSessionShippingCostTaxTaxabilityReason string @@ -1192,6 +1223,12 @@ func (p *CheckoutSessionPaymentIntentDataParams) AddMetadata(key string, value s p.Metadata[key] = value } +// This parameter allows you to set some attributes on the payment method created during a Checkout session. +type CheckoutSessionPaymentMethodDataParams struct { + // Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout. + AllowRedisplay *string `form:"allow_redisplay"` +} + // Additional fields for Mandate creation type CheckoutSessionPaymentMethodOptionsACSSDebitMandateOptionsParams struct { // A URL for custom mandate text to render during confirmation step. @@ -1455,6 +1492,16 @@ type CheckoutSessionPaymentMethodOptionsLinkParams struct { SetupFutureUsage *string `form:"setup_future_usage"` } +// contains details about the Mobilepay payment method options. +type CheckoutSessionPaymentMethodOptionsMobilepayParams struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + SetupFutureUsage *string `form:"setup_future_usage"` +} + // contains details about the OXXO payment method options. type CheckoutSessionPaymentMethodOptionsOXXOParams struct { // The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. @@ -1633,6 +1680,8 @@ type CheckoutSessionPaymentMethodOptionsParams struct { Konbini *CheckoutSessionPaymentMethodOptionsKonbiniParams `form:"konbini"` // contains details about the Link payment method options. Link *CheckoutSessionPaymentMethodOptionsLinkParams `form:"link"` + // contains details about the Mobilepay payment method options. + Mobilepay *CheckoutSessionPaymentMethodOptionsMobilepayParams `form:"mobilepay"` // contains details about the OXXO payment method options. OXXO *CheckoutSessionPaymentMethodOptionsOXXOParams `form:"oxxo"` // contains details about the P24 payment method options. @@ -1666,6 +1715,14 @@ type CheckoutSessionPhoneNumberCollectionParams struct { Enabled *bool `form:"enabled"` } +// Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. +type CheckoutSessionSavedPaymentMethodOptionsParams struct { + // Controls which payment methods are eligible to be redisplayed to returning customers. Corresponds to `allow_redisplay` on the payment method. + AllowRedisplayFilters []*string `form:"allow_redisplay_filters"` + // Enable customers to choose if they wish to save their payment method for future use. + PaymentMethodSave *string `form:"payment_method_save"` +} + // A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. type CheckoutSessionSetupIntentDataParams struct { // An arbitrary string attached to the object. Often useful for displaying to users. @@ -1939,6 +1996,8 @@ type CheckoutSessionParams struct { PaymentMethodCollection *string `form:"payment_method_collection"` // The ID of the payment method configuration to use with this Checkout session. PaymentMethodConfiguration *string `form:"payment_method_configuration"` + // This parameter allows you to set some attributes on the payment method created during a Checkout session. + PaymentMethodData *CheckoutSessionPaymentMethodDataParams `form:"payment_method_data"` // Payment-method-specific configuration. PaymentMethodOptions *CheckoutSessionPaymentMethodOptionsParams `form:"payment_method_options"` // A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. @@ -1964,6 +2023,8 @@ type CheckoutSessionParams struct { // payment method's app or site. This parameter is required if ui_mode is `embedded` // and redirect-based payment methods are enabled on the session. ReturnURL *string `form:"return_url"` + // Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + SavedPaymentMethodOptions *CheckoutSessionSavedPaymentMethodOptionsParams `form:"saved_payment_method_options"` // A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. SetupIntentData *CheckoutSessionSetupIntentDataParams `form:"setup_intent_data"` // When set, provides configuration for Checkout to collect a shipping address from a customer. @@ -2467,6 +2528,14 @@ type CheckoutSessionPaymentMethodOptionsLink struct { // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). SetupFutureUsage CheckoutSessionPaymentMethodOptionsLinkSetupFutureUsage `json:"setup_future_usage"` } +type CheckoutSessionPaymentMethodOptionsMobilepay struct { + // Indicates that you intend to make future payments with this PaymentIntent's payment method. + // + // Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + // + // When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + SetupFutureUsage CheckoutSessionPaymentMethodOptionsMobilepaySetupFutureUsage `json:"setup_future_usage"` +} type CheckoutSessionPaymentMethodOptionsOXXO struct { // The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. ExpiresAfterDays int64 `json:"expires_after_days"` @@ -2581,6 +2650,7 @@ type CheckoutSessionPaymentMethodOptions struct { Klarna *CheckoutSessionPaymentMethodOptionsKlarna `json:"klarna"` Konbini *CheckoutSessionPaymentMethodOptionsKonbini `json:"konbini"` Link *CheckoutSessionPaymentMethodOptionsLink `json:"link"` + Mobilepay *CheckoutSessionPaymentMethodOptionsMobilepay `json:"mobilepay"` OXXO *CheckoutSessionPaymentMethodOptionsOXXO `json:"oxxo"` P24 *CheckoutSessionPaymentMethodOptionsP24 `json:"p24"` PayNow *CheckoutSessionPaymentMethodOptionsPayNow `json:"paynow"` @@ -2597,6 +2667,14 @@ type CheckoutSessionPhoneNumberCollection struct { Enabled bool `json:"enabled"` } +// Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. +type CheckoutSessionSavedPaymentMethodOptions struct { + // Controls which payment methods are eligible to be redisplayed to returning customers. Corresponds to `allow_redisplay` on the payment method. + AllowRedisplayFilters []CheckoutSessionSavedPaymentMethodOptionsAllowRedisplayFilter `json:"allow_redisplay_filters"` + // Enable customers to choose if they wish to save their payment method for future use. + PaymentMethodSave CheckoutSessionSavedPaymentMethodOptionsPaymentMethodSave `json:"payment_method_save"` +} + // When set, provides configuration for Checkout to collect a shipping address from a customer. type CheckoutSessionShippingAddressCollection struct { // An array of two-letter ISO country codes representing which countries Checkout should provide as options for @@ -2793,6 +2871,8 @@ type CheckoutSession struct { RedirectOnCompletion CheckoutSessionRedirectOnCompletion `json:"redirect_on_completion"` // Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. ReturnURL string `json:"return_url"` + // Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + SavedPaymentMethodOptions *CheckoutSessionSavedPaymentMethodOptions `json:"saved_payment_method_options"` // The ID of the SetupIntent for Checkout Sessions in `setup` mode. SetupIntent *SetupIntent `json:"setup_intent"` // When set, provides configuration for Checkout to collect a shipping address from a customer. diff --git a/customer.go b/customer.go index 163ccc2de7..f70622a223 100644 --- a/customer.go +++ b/customer.go @@ -202,6 +202,8 @@ type CustomerTaxIDDataParams struct { type CustomerListPaymentMethodsParams struct { ListParams `form:"*"` Customer *string `form:"-"` // Included in URL + // This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + AllowRedisplay *string `form:"allow_redisplay"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. diff --git a/dispute.go b/dispute.go index 2710023b14..a5e38a28a0 100644 --- a/dispute.go +++ b/dispute.go @@ -388,8 +388,6 @@ type DisputeEvidenceDetails struct { // The number of times evidence has been submitted. Typically, you may only submit evidence once. SubmissionCount int64 `json:"submission_count"` } - -// Card specific dispute details. type DisputePaymentMethodDetailsCard struct { // Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. Brand string `json:"brand"` @@ -397,7 +395,6 @@ type DisputePaymentMethodDetailsCard struct { NetworkReasonCode string `json:"network_reason_code"` } type DisputePaymentMethodDetails struct { - // Card specific dispute details. Card *DisputePaymentMethodDetailsCard `json:"card"` // Payment method type. Type DisputePaymentMethodDetailsType `json:"type"` diff --git a/forwarding_request.go b/forwarding_request.go index be258de5aa..a513c005f1 100644 --- a/forwarding_request.go +++ b/forwarding_request.go @@ -58,8 +58,6 @@ type ForwardingRequestRequestParams struct { // Creates a ForwardingRequest object. type ForwardingRequestParams struct { Params `form:"*"` - // The Forwarding Config used when making the forwarded request. The config specifes the HTTP method, merchant credentials, connection settings, and supported destination URLs. - Config *string `form:"config"` // Specifies which fields in the response should be expanded. Expand []*string `form:"expand"` // The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. @@ -121,9 +119,9 @@ type ForwardingRequestResponseDetails struct { Status int64 `json:"status"` } -// Instructs Stripe to make a request on your behalf using the destination URL and HTTP method in the config. -// A config is set up for each destination URL by Stripe at the time of onboarding. Stripe verifies requests with -// your credentials in the config, and injects card details from the payment_method into the request. +// Instructs Stripe to make a request on your behalf using the destination URL. The destination URL +// is activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials +// provided during onboarding, and injects card details from the payment_method into the request. // // Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers, // before storing the request and response data in the forwarding Request object, which are subject to a @@ -139,8 +137,6 @@ type ForwardingRequestResponseDetails struct { // Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). type ForwardingRequest struct { APIResource - // The Forwarding Config used when making the forwarded request. The config specifes the HTTP method, merchant credentials, connection settings, and supported destination URLs. - Config string `json:"config"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // Unique identifier for the object. diff --git a/invoice.go b/invoice.go index 4d5c66fcf8..b9d342be98 100644 --- a/invoice.go +++ b/invoice.go @@ -1717,6 +1717,8 @@ type InvoiceUpcomingParams struct { // If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. SubscriptionTrialEnd *int64 `form:"subscription_trial_end"` SubscriptionTrialEndNow *bool `form:"-"` // See custom AppendTo + // Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + SubscriptionTrialFromPlan *bool `form:"subscription_trial_from_plan"` } // AddExpand appends a new field to expand. @@ -2926,6 +2928,8 @@ type InvoiceUpcomingLinesParams struct { // If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. SubscriptionTrialEnd *int64 `form:"subscription_trial_end"` SubscriptionTrialEndNow *bool `form:"-"` // See custom AppendTo + // Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + SubscriptionTrialFromPlan *bool `form:"subscription_trial_from_plan"` } // AddExpand appends a new field to expand. diff --git a/issuing_transaction.go b/issuing_transaction.go index 692eecddae..18998ddc71 100644 --- a/issuing_transaction.go +++ b/issuing_transaction.go @@ -20,13 +20,14 @@ const ( IssuingTransactionPurchaseDetailsFuelTypeUnleadedSuper IssuingTransactionPurchaseDetailsFuelType = "unleaded_super" ) -// The units for `volume_decimal`. One of `us_gallon` or `liter`. +// The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. type IssuingTransactionPurchaseDetailsFuelUnit string // List of values that IssuingTransactionPurchaseDetailsFuelUnit can take const ( IssuingTransactionPurchaseDetailsFuelUnitLiter IssuingTransactionPurchaseDetailsFuelUnit = "liter" IssuingTransactionPurchaseDetailsFuelUnitUSGallon IssuingTransactionPurchaseDetailsFuelUnit = "us_gallon" + IssuingTransactionPurchaseDetailsFuelUnitOther IssuingTransactionPurchaseDetailsFuelUnit = "other" ) // The nature of the transaction. @@ -145,7 +146,7 @@ type IssuingTransactionPurchaseDetailsFlight struct { type IssuingTransactionPurchaseDetailsFuel struct { // The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. Type IssuingTransactionPurchaseDetailsFuelType `json:"type"` - // The units for `volume_decimal`. One of `us_gallon` or `liter`. + // The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. Unit IssuingTransactionPurchaseDetailsFuelUnit `json:"unit"` // The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. UnitCostDecimal float64 `json:"unit_cost_decimal,string"` diff --git a/paymentintent.go b/paymentintent.go index 87e8c027af..63ee95b009 100644 --- a/paymentintent.go +++ b/paymentintent.go @@ -1426,6 +1426,8 @@ type PaymentIntentPaymentMethodDataParams struct { AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *PaymentMethodAlipayParams `form:"alipay"` + // This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + AllowRedisplay *string `form:"allow_redisplay"` // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. AmazonPay *PaymentMethodAmazonPayParams `form:"amazon_pay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. diff --git a/paymentmethod.go b/paymentmethod.go index b47d0edc04..c22edebe84 100644 --- a/paymentmethod.go +++ b/paymentmethod.go @@ -497,6 +497,8 @@ type PaymentMethodParams struct { AfterpayClearpay *PaymentMethodAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *PaymentMethodAlipayParams `form:"alipay"` + // This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + AllowRedisplay *string `form:"allow_redisplay"` // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. AmazonPay *PaymentMethodAmazonPayParams `form:"amazon_pay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. diff --git a/paymentmethodconfiguration.go b/paymentmethodconfiguration.go index f4cd6cbdb7..4a03512f2d 100644 --- a/paymentmethodconfiguration.go +++ b/paymentmethodconfiguration.go @@ -652,6 +652,25 @@ const ( PaymentMethodConfigurationSofortDisplayPreferenceValueOn PaymentMethodConfigurationSofortDisplayPreferenceValue = "on" ) +// The account's display preference. +type PaymentMethodConfigurationSwishDisplayPreferencePreference string + +// List of values that PaymentMethodConfigurationSwishDisplayPreferencePreference can take +const ( + PaymentMethodConfigurationSwishDisplayPreferencePreferenceNone PaymentMethodConfigurationSwishDisplayPreferencePreference = "none" + PaymentMethodConfigurationSwishDisplayPreferencePreferenceOff PaymentMethodConfigurationSwishDisplayPreferencePreference = "off" + PaymentMethodConfigurationSwishDisplayPreferencePreferenceOn PaymentMethodConfigurationSwishDisplayPreferencePreference = "on" +) + +// The effective display preference value. +type PaymentMethodConfigurationSwishDisplayPreferenceValue string + +// List of values that PaymentMethodConfigurationSwishDisplayPreferenceValue can take +const ( + PaymentMethodConfigurationSwishDisplayPreferenceValueOff PaymentMethodConfigurationSwishDisplayPreferenceValue = "off" + PaymentMethodConfigurationSwishDisplayPreferenceValueOn PaymentMethodConfigurationSwishDisplayPreferenceValue = "on" +) + // The account's display preference. type PaymentMethodConfigurationUSBankAccountDisplayPreferencePreference string @@ -1143,6 +1162,18 @@ type PaymentMethodConfigurationSofortParams struct { DisplayPreference *PaymentMethodConfigurationSofortDisplayPreferenceParams `form:"display_preference"` } +// Whether or not the payment method should be displayed. +type PaymentMethodConfigurationSwishDisplayPreferenceParams struct { + // The account's preference for whether or not to display this payment method. + Preference *string `form:"preference"` +} + +// Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. +type PaymentMethodConfigurationSwishParams struct { + // Whether or not the payment method should be displayed. + DisplayPreference *PaymentMethodConfigurationSwishDisplayPreferenceParams `form:"display_preference"` +} + // Whether or not the payment method should be displayed. type PaymentMethodConfigurationUSBankAccountDisplayPreferenceParams struct { // The account's preference for whether or not to display this payment method. @@ -1260,6 +1291,8 @@ type PaymentMethodConfigurationParams struct { SEPADebit *PaymentMethodConfigurationSEPADebitParams `form:"sepa_debit"` // Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. Sofort *PaymentMethodConfigurationSofortParams `form:"sofort"` + // Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + Swish *PaymentMethodConfigurationSwishParams `form:"swish"` // Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-debit) for more details. USBankAccount *PaymentMethodConfigurationUSBankAccountParams `form:"us_bank_account"` // WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. @@ -1715,6 +1748,19 @@ type PaymentMethodConfigurationSofort struct { Available bool `json:"available"` DisplayPreference *PaymentMethodConfigurationSofortDisplayPreference `json:"display_preference"` } +type PaymentMethodConfigurationSwishDisplayPreference struct { + // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + Overridable bool `json:"overridable"` + // The account's display preference. + Preference PaymentMethodConfigurationSwishDisplayPreferencePreference `json:"preference"` + // The effective display preference value. + Value PaymentMethodConfigurationSwishDisplayPreferenceValue `json:"value"` +} +type PaymentMethodConfigurationSwish struct { + // Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + Available bool `json:"available"` + DisplayPreference *PaymentMethodConfigurationSwishDisplayPreference `json:"display_preference"` +} type PaymentMethodConfigurationUSBankAccountDisplayPreference struct { // For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. Overridable bool `json:"overridable"` @@ -1821,6 +1867,7 @@ type PaymentMethodConfiguration struct { RevolutPay *PaymentMethodConfigurationRevolutPay `json:"revolut_pay"` SEPADebit *PaymentMethodConfigurationSEPADebit `json:"sepa_debit"` Sofort *PaymentMethodConfigurationSofort `json:"sofort"` + Swish *PaymentMethodConfigurationSwish `json:"swish"` USBankAccount *PaymentMethodConfigurationUSBankAccount `json:"us_bank_account"` WeChatPay *PaymentMethodConfigurationWeChatPay `json:"wechat_pay"` Zip *PaymentMethodConfigurationZip `json:"zip"` diff --git a/setupintent.go b/setupintent.go index 477d845c1e..5f33333860 100644 --- a/setupintent.go +++ b/setupintent.go @@ -557,6 +557,8 @@ type SetupIntentPaymentMethodDataParams struct { AfterpayClearpay *SetupIntentPaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *SetupIntentPaymentMethodDataAlipayParams `form:"alipay"` + // This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + AllowRedisplay *string `form:"allow_redisplay"` // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. AmazonPay *SetupIntentPaymentMethodDataAmazonPayParams `form:"amazon_pay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. @@ -1191,6 +1193,8 @@ type SetupIntentConfirmPaymentMethodDataParams struct { AfterpayClearpay *SetupIntentConfirmPaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *SetupIntentConfirmPaymentMethodDataAlipayParams `form:"alipay"` + // This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + AllowRedisplay *string `form:"allow_redisplay"` // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. AmazonPay *SetupIntentConfirmPaymentMethodDataAmazonPayParams `form:"amazon_pay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. @@ -1528,13 +1532,13 @@ type SetupIntentPaymentMethodOptions struct { // // Create a SetupIntent when you're ready to collect your customer's payment credentials. // Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. -// The SetupIntent transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides +// The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides // you through the setup process. // // Successful SetupIntents result in payment credentials that are optimized for future payments. // For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through -// [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) during payment method collection -// to streamline later [off-session payments](https://stripe.com/docs/payments/setup-intents). +// [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection +// to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). // If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), // it automatically attaches the resulting payment method to that Customer after successful setup. // We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on @@ -1542,7 +1546,7 @@ type SetupIntentPaymentMethodOptions struct { // // By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. // -// Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents) +// Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) type SetupIntent struct { APIResource // ID of the Connect application that created the SetupIntent. diff --git a/testhelpers_confirmationtoken.go b/testhelpers_confirmationtoken.go index 7f78ac1b3a..0d9d3c25ad 100644 --- a/testhelpers_confirmationtoken.go +++ b/testhelpers_confirmationtoken.go @@ -219,6 +219,8 @@ type TestHelpersConfirmationTokenPaymentMethodDataParams struct { AfterpayClearpay *TestHelpersConfirmationTokenPaymentMethodDataAfterpayClearpayParams `form:"afterpay_clearpay"` // If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. Alipay *TestHelpersConfirmationTokenPaymentMethodDataAlipayParams `form:"alipay"` + // This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + AllowRedisplay *string `form:"allow_redisplay"` // If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. AmazonPay *TestHelpersConfirmationTokenPaymentMethodDataAmazonPayParams `form:"amazon_pay"` // If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. diff --git a/testhelpersissuing_authorization.go b/testhelpersissuing_authorization.go index 4ef19070cc..c5225edc31 100644 --- a/testhelpersissuing_authorization.go +++ b/testhelpersissuing_authorization.go @@ -138,7 +138,7 @@ type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFlightParams struct { type TestHelpersIssuingAuthorizationCapturePurchaseDetailsFuelParams struct { // The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. Type *string `form:"type"` - // The units for `volume_decimal`. One of `us_gallon` or `liter`. + // The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. Unit *string `form:"unit"` // The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. UnitCostDecimal *float64 `form:"unit_cost_decimal,high_precision"` diff --git a/testhelpersissuing_transaction.go b/testhelpersissuing_transaction.go index ed63664fe1..e8781be3ee 100644 --- a/testhelpersissuing_transaction.go +++ b/testhelpersissuing_transaction.go @@ -76,7 +76,7 @@ type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFlightParams type TestHelpersIssuingTransactionCreateForceCapturePurchaseDetailsFuelParams struct { // The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. Type *string `form:"type"` - // The units for `volume_decimal`. One of `us_gallon` or `liter`. + // The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. Unit *string `form:"unit"` // The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. UnitCostDecimal *float64 `form:"unit_cost_decimal,high_precision"` @@ -192,7 +192,7 @@ type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFlightParam type TestHelpersIssuingTransactionCreateUnlinkedRefundPurchaseDetailsFuelParams struct { // The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. Type *string `form:"type"` - // The units for `volume_decimal`. One of `us_gallon` or `liter`. + // The units for `volume_decimal`. One of `liter`, `us_gallon`, or `other`. Unit *string `form:"unit"` // The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. UnitCostDecimal *float64 `form:"unit_cost_decimal,high_precision"`