-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next major release changes #1512
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…atch stripe-go API version. (#1495)
r? @dcr-stripe ## Summary Update `ErrorType` values based on https://stripe.com/docs/api/errors#errors-type. Remove associated struct definitions and remove them as possible typed errors for `ResponseToError` Update `ErrorCode` values based on https://stripe.com/docs/error-codes. ## Changelog -⚠️ Remove deprecated `ErrorType` values and associated struct definitions: - `"api_connection_error"`, `APIConnectionError` - `"authentication_error"`, `AuthenticationError` - `"more_permissions_required"`, `PermissionError` - `"rate_limit_error`, `RateLimitError` -⚠️ Remove deprecated `ErrorCode` values: - `"account_already_exists"` - `"order_creation_failed"` - `"order_required_settings"` - `"order_status_invalid"` - `"order_upstream_timeout"` - `"upstream_order_creation_failed"` - Add new `ErrorCode` values: - `"account_error_country_change_requires_additional_steps"` - `"account_information_mismatch"` - `"acss_debit_session_incomplete"` - `"bank_account_bad_routing_numbers"` - `"billing_invalid_mandate"` - `"cardholder_phone_number_required"` - `"clearing_code_unsupported"` - `"country_code_invalid"` - `"debit_not_authorized"` - `"instant_payouts_limit_exceeded"` - `"insufficient_funds"` - `"intent_invalid_state"` - `"intent_verification_method_missing"` - `"invoice_no_payment_method_types"` - `"invoice_on_behalf_of_not_editable"` - `"no_account"` - `"payment_intent_konbini_rejected_confirmation_number"` - `"payment_intent_mandate_invalid"` - `"payment_intent_payment_attempt_expired"` - `"payment_method_bank_account_already_verified"` - `"payment_method_bank_account_blocked"` - `"payment_method_billing_details_address_missing"` - `"payment_method_currency_mismatch"` - `"payment_method_invalid_parameter"` - `"payment_method_invalid_parameter_testmode"` - `"payment_method_microdeposit_failed"` - `"payment_method_microdeposit_verification_amounts_invalid"` - `"payment_method_microdeposit_verification_amounts_mismatch"` - `"payment_method_microdeposit_verification_attempts_exceeded"` - `"payment_method_microdeposit_verification_descriptor_code_mismatch"` - `"payment_method_microdeposit_verification_timeout"` - `"payment_method_provider_decline"` - `"payment_method_provider_timeout"` - `"payment_method_unsupported_type"` - `"platform_account_required"` - `"refer_to_customer"` - `"refund_disputed_payment"` - `"return_intent_already_processed"` - `"setup_intent_setup_attempt_expired"` - `"terminal_location_country_unsupported"` - `"transfer_source_balance_parameters_mismatch"`
# Changelog "⚠️ " symbol highlights breaking changes. ### Added - Add `CheckoutSessionSetupIntentDataParams.Metadata`. - Add Invoice `UpcomingLines` method. - Add `ShippingCost` and `ShippingDetails` properties to `CheckoutSession` resource. - Add `CheckoutSessionShippingCostTax` and `CheckoutSessionShippingCost` classes - Add `IssuingCardCancellationReasonDesignRejected` constant to `IssuingCardCancellationReason`. - Add `Validate` field to `Customer` resource. - Add `Validate` field to `PaymentSourceParams`. - Add `SetupAttemptPaymentMethodDetailsCardThreeDSecureResultExempted` constant in `SetupAttemptPaymentMethodDetailsCardThreeDSecureResult`. - Add `SKUPackageDimensionsParams` and `SKUPackageDimensions`. - Add dedicated structs for different payment sources and transfers. - Add `Subscription.DeleteDiscount` methods. - Add `SubscriptionItemUsageRecordSummariesParams` - Add `UsageRecordSummary` `UsageRecordSummaries`, and `UsageRecordSummaryList` methods in `SubscriptionItem` - Add `SubscriptionSchedulePhaseBillingCycleAnchor`, `SubscriptionSchedulePhaseBillingCycleAnchorAutomatic`, and `SubscriptionSchedulePhaseBillingCycleAnchorPhaseStart` - Add `SubscriptionSchedulePhaseInvoiceSettings` and `SubscriptionSchedulePhaseInvoiceSettingsParams ` - `TerminalLocation` `UnmarshalJSON` - make `TerminalLocation` expandable ###⚠️ Changed - Rename files to be consistent with the library's naming conventions. - `fee.go` to `applicationfee.go` - `fee/client.go` to `applicationfee/client.go` - `sub.go` to `subscription.go` - `sub/client.go` to `subscription/client.go` - `subitem.go` to `subscriptionitem.go` - `subitem/client.go` to `subscriptionitem/client.go` - `subschedule.go` to `subscriptionschedule.go` - `subschedule/client.go` to `subscriptionschedule/client.go` - `reversal.go` to `transferreversal.go` - `reversal/client.go` to `transferreversal/client.go` - Change resource names on `client#API` to be plural to be consistent with the library's naming conventions: - Rename structs, fields, enums, and methods to be consistent with the library's naming conventions and with the other Stripe SDKs. - `Ach` to `ACH` - `Acss` to `ACSS` - `Bic` to `BIC` - `Eps` to `EPS` - `FEDEX` to `FedEx` - `Iban` to `IBAN` - `Ideal` to `IDEAL` - `Sepa` to `SEPA` - `Wechat` to `WeChat` - `ExternalAccount` to `AccountExternalAccount` - `InvoiceLine` to `InvoiceLineItem` - `Person` structs/enums to use `Person` prefix - and others (see Migration guide) - Change types of various fields in `Account`, `ApplicationFee`, `BalanceTransaction`, `BillingPortalConfiguration`, `Card`, `Charge`, `Customer`, `Discount`, `Invoice`, `Issuing Card`, `Issuing Dispute `, `Mandate `, `PaymentIntent`, `PaymentMethod`, `Payout`, `Plan `, `Plan `, `Refund`, `SetupIntent`, `Source`, `Source`, `Subscription`, `SubscriptionItem`, `SubscriptionSchedule`, `Terminal ConnectionToken`, `Terminal Location`, `Terminal Reader `, `Topup`, and `Transfer` (see Migration guide). - Move `BalanceTransaction` iterator from `balance.go` to `balancetransaction.go` - Fix `BalanceTransactionSource` `UnmarshalJSON` for when `BalanceTransactionSource.Type == "transfer_reversal"` (previously, we were checking if `Type == "reversal"`, which was always false) - For BankAccount and Card client methods, check that exactly one of `params.Account` and `params.Customer` is set (previously they could both be set, but only one would be used, and it was different between BankAccount and Card) - Replace `CardVerification` with field-specific enums (with the same values) - Move `Del` from `discount/client.go` to `customer/client.go` and rename to `DeleteDiscount` - Move `DelSub` from `discount/client.go` to `subscription/client.go` and rename to `DeleteDiscount` - Add separate parameter struct for CreditNote `ListPreviewLines` (renamed to `PreviewLines`) method (`[CreditNoteLineItemListPreviewParams -> CreditNotePreviewParams].Lines` `CreditNoteLineParams` -> `CreditNotePreviewLineParams`) - Replace `FeeRefundParams.ApplicationFee` with `FeeRefundParams.Fee` and `FeeRefundParams.ID` - Add separate parameter struct for Invoice `GetNext` (renamed to `Upcoming`) method (`InvoiceUpcomingParams`, and nested params `InvoiceUpcomingLinesInvoiceItemPriceDataParams`, `InvoiceUpcomingLinesInvoiceItemDiscountParams`, `InvoiceUpcomingLinesDiscountParams`, `InvoiceUpcomingLinesInvoiceItemPeriodParams`). `Upcoming`-only fields `Coupon`, `CustomerDetails`, `InvoiceItems`, `Subscription`, `SubscriptionBillingCycleAnchor`, `Schedule`, `SubscriptionBillingCycleAnchor`, `SubscriptionBillingCycleAnchorNow`, `SubscriptionBillingCycleAnchorUnchanged`, `SubscriptionCancelAt`, `SubscriptionCancelAtPeriodEnd`, `SubscriptionCancelNow`, `SubscriptionDefaultTaxRates`, `SubscriptionItems`, `SubscriptionProrationBehavior`, `SubscriptionProrationDate`, `SubscriptionStartDate`, `SubscriptionTrialEnd`, `SubscriptionTrialEndNow`, and `SubscriptionTrialFromPlan` are removed from `InvoiceParams`. - Add separate structs for `BillingDetails` and `BillingDetailsParams`: `PaymentMethodBillingDetails`, `PaymentMethodBillingDetailsParams` - Add separate structs for `PaymentMethodCardNetwork`: `PaymentMethodCardNetworksAvailable`, `PaymentMethodCardNetworksPreferred` ### Deprecated - The `SKU` resource has been deprecated. This will be replaced by https://stripe.com/docs/api/orders_v2. ###⚠️ Removed - Remove `AccountCapability` enum definition. This was not referenced in the library. - Remove `UnmarshalJSON` for resources that are not expandable: `BillingPortalSession`, `Capability`, `CheckoutSession`, `FileLink`, `InvoiceItem`, `LineItem`, `Person`, `WebhookEndpoint` - Remove `AccountRejectReason` (was only referenced in `account/client_test.go`, actual `AccountRejectParams.Reason` is `*string`) - Remove `AccountParams.RequestedCapabilities` (use Capabilities instead: https://stripe.com/docs/connect/account-capabilities) - Remove `AccountSettingsParams.Dashboard` and `AccountSettingsDashboardParams` (Note: `Dashboard` are still available on `AccountSettings`, but it's not available as parameters for any of the methods) - Remove `AccountCompany.RegistrationNumber` (Note: `RegistrationNumber` is still available on `AccountCompanyParams`, but is not returned in the response) - Remove `BalanceTransactionStatus`. It was meant to be an enum, but none of the enum values were defined, so it was just an alias for string. - Remove `CardParams.AccountType`. `AccountType` does not exist on any client method for Card. It does on BankAccount, which is similar. - Remove `id` param from CheckoutSessions `ListLineItems`. Use `CheckoutSessionListLineItemsParams.Session` instead. - Remove `CheckoutSessionLineItemPriceDataRecurringParams.AggregateUsage`, `CheckoutSessionLineItemPriceDataRecurringParams.TrialPeriodDays`, and `CheckoutSessionLineItemPriceDataRecurringParams.UsageType` - Remove `CheckoutSessionPaymentIntentDataParams.Params`, `CheckoutSessionSetupIntentDataParams.Params`, `CheckoutSessionSubscriptionDataParams.Params`. `Params` should only be embedded in root method struct, and has extraneous fields not applicable to child/sub structs. - Remove `CheckoutSessionTotalDetailsBreakdownTax.TaxRate`. Use `CheckoutSessionTotalDetailsBreakdownTax.Rate` - Remove `CheckoutSessionTotalDetailsBreakdownTax.Deleted` - Remove `CustomerParams.Token` - Remove `Discount` `APIResource` embed - Remove `DiscountParams` - Remove `FilePurposeFoundersStockDocument` (`"founders_stock_document"` option for `File.Purpose`) - Remove `InvoiceParams.Paid`. Use `invoice.status` to check for status. `invoice.status` is a read-only field. - Remove `InvoiceParams.SubscriptionPlan` and `InvoiceParams.SubscriptionQuantity` (note: these would have been on `InvoiceUpcomingParams`) - Remove `InvoiceListLinesParams.Customer` and `InvoiceListLinesParams.Subscription` (these are not available for Invoice `ListLines`, but are available for `List`) - Remove `IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity` and `IssuingAuthorizationRequestHistoryViolatedAuthorizationControlName` (unused enums) - Remove `IssuingCardSpendingControlsParams.SpendingLimitsCurrency`. `issuing_card` has `currency`, and `issuing_card.spending_controls.spending_limits.amount` will use that currency - Remove `IssuingDisputeEvidenceServiceNotAsDescribed.ProductDescription`, `IssuingDisputeEvidenceServiceNotAsDescribed.ProductType`, `IssuingDisputeEvidenceServiceNotAsDescribedParams.ProductDescription`, `IssuingDisputeEvidenceServiceNotAsDescribedParams.ProductType`, and `IssuingDisputeEvidenceServiceNotAsDescribedProductType`. `issuing_dispute.evidence.service_not_as_described` does not have `product_description` or `product_type`. `issuing_dispute.evidence.canceled` does. - Remove `LineItemTax.TaxRate`. Use `LineItemTax.Rate` instead. - Remove `LineItem.Deleted` - Remove `LoginLink.RedirectURL` - Remove `PaymentIntentOffSession` (unused enum) - Remove `PaymentIntentConfirmParams.PaymentMethodTypes` - Remove `PaymentMethodFPX.TransactionID` - Remove `Payout.BankAccount` and `Payout.Card` (These fields were never populated, use `PayoutDestination.BankAccount` and `PayoutDestination.Card` instead) - Remove `PlanParams.ProductID`. Use `PlanParams.Product.ID` instead. - Remove `Shipping` and `ShippingRate` properties from `CheckoutSession` resource. Please use `ShippingCost` and `ShippingDetails` properties instead. - Remove `DefaultCurrency` property from `Customer` resource. Please use `Currency` property instead. - Remove `Updated` and `UpdatedBy` from `RadarValueList` - Remove `Name` from `RadarValueListItem` - Remove `ReviewReasonType` type from `Review` resource. Use `ReviewReason` instead - Remove `SetupIntentCancellationReasonFailedInvoice` and `SetupIntentCancellationReasonFraudulent` values from `SetupIntentCancellationReason` - Remove `SigmaScheduledQueryRun.Query`. The field was invalid - Remove `SKUParams.Description` and `SKU.Description` - Remove `SourceMandateAcceptanceStatus`, `SourceMandateAcceptanceStatusAccepted`, `SourceMandateAcceptanceStatusRefused`, `SourceMandateNotificationMethod`, `SourceMandateNotificationMethodEmail`, `SourceMandateNotificationMethodManual`, and `SourceMandateNotificationMethodNone` - Remove `Source.TypeData` and SourceParams and replace with payment method-specific fields (AUBECSDebit, Bancontact, Card, CardPresent, EPS, Giropay, IDEAL, Klarna, Multibanco, P24, SEPACreditTransfer, SEPADebit, Sofort, ThreeDSecure, Wechat) and `Source.AppendTo` method - Remove `SourceTransaction.CustomerData`. The field was deprecated - Remove `SourceTransaction.TypeData` and `SourceTransaction.UnmarshalJSON`. Use payment specific fields - Remove `ACHCreditTransfer`, `CHFCreditTransfer`, `GBPCreditTransfer`, `PaperCheck`, and `SEPACreditTransfer` - Remove `SubscriptionPaymentBehavior`, `SubscriptionPaymentBehaviorAllowIncomplete`, `SubscriptionPaymentBehaviorErrorIfIncomplete`, and `SubscriptionPaymentBehaviorPendingIfIncomplete` - Remove `SubscriptionProrationBehavior`, `SubscriptionProrationBehaviorAlwaysInvoice`, `SubscriptionProrationBehaviorCreateProrations`, and `SubscriptionProrationBehaviorNone` - Remove `SubscriptionStatusAll` - Remove `SubscriptionParams.Card`, `SubscriptionParams.Plan`, and `SubscriptionParams.Quantity` - Remove `Subscription.Plan` and `Subscription.Quantity` - Remove `SubscriptionItemParams.ID`. The field was deprecated - Remove `SubscriptionSchedulePhaseAddInvoiceItemPriceDataRecurringParams` and `SubscriptionSchedulePhaseAddInvoiceItemPriceDataParams` - Remove `Del` method on `TaxRate` - Remove `TerminalReaderGetParams`. Use `TerminalReaderParams` instead. - Remove `TerminalReaderList.Location` and `TerminalReaderList.Status` (Not available for the list, but is available for individual `TerminalReader`s in `TerminalReaderList.Data`) - Remove `Token.Email` and `TokenParams.Email` - Remove `TopupParams.SetSource` - Remove `WebhookEndpointListParams.Created` and `WebhookEndpointListParams.CreatedRange` (use `StartingAfter` from `ListParams`) - Remove `WebhookEndpoint.Connected`
dcr-stripe
approved these changes
Aug 1, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but we should include the changelog entry from #1495
pakrym-stripe
approved these changes
Aug 1, 2022
kamil-stripe
approved these changes
Aug 1, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog
Major version release for API version 2022-08-01. Default API version changed to "2022-08-01".
Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-go/wiki/Migration-guide-for-v73. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
"⚠️ " symbol highlights breaking changes.
Added
CheckoutSessionSetupIntentDataParams.Metadata
.UpcomingLines
method.ShippingCost
andShippingDetails
properties toCheckoutSession
resource.CheckoutSessionShippingCostTax
andCheckoutSessionShippingCost
classesIssuingCardCancellationReasonDesignRejected
constant toIssuingCardCancellationReason
.Validate
field toCustomer
resource.Validate
field toPaymentSourceParams
.SetupAttemptPaymentMethodDetailsCardThreeDSecureResultExempted
constant inSetupAttemptPaymentMethodDetailsCardThreeDSecureResult
.SKUPackageDimensionsParams
andSKUPackageDimensions
.Subscription.DeleteDiscount
methods.SubscriptionItemUsageRecordSummariesParams
UsageRecordSummary
UsageRecordSummaries
, andUsageRecordSummaryList
methods inSubscriptionItem
SubscriptionSchedulePhaseBillingCycleAnchor
,SubscriptionSchedulePhaseBillingCycleAnchorAutomatic
, andSubscriptionSchedulePhaseBillingCycleAnchorPhaseStart
SubscriptionSchedulePhaseInvoiceSettings
andSubscriptionSchedulePhaseInvoiceSettingsParams
TerminalLocation
UnmarshalJSON
- makeTerminalLocation
expandableRename files to be consistent with the library's naming conventions.
fee.go
toapplicationfee.go
fee/client.go
toapplicationfee/client.go
sub.go
tosubscription.go
sub/client.go
tosubscription/client.go
subitem.go
tosubscriptionitem.go
subitem/client.go
tosubscriptionitem/client.go
subschedule.go
tosubscriptionschedule.go
subschedule/client.go
tosubscriptionschedule/client.go
reversal.go
totransferreversal.go
reversal/client.go
totransferreversal/client.go
Change resource names on
client#API
to be plural to be consistent with the library's naming conventions:Rename structs, fields, enums, and methods to be consistent with the library's naming conventions and with the other Stripe SDKs.
Ach
toACH
Acss
toACSS
Bic
toBIC
Eps
toEPS
FEDEX
toFedEx
Iban
toIBAN
Ideal
toIDEAL
Sepa
toSEPA
Wechat
toWeChat
ExternalAccount
toAccountExternalAccount
InvoiceLine
toInvoiceLineItem
Person
structs/enums to usePerson
prefixChange types of various fields in
Account
,ApplicationFee
,BalanceTransaction
,BillingPortalConfiguration
,Card
,Charge
,Customer
,Discount
,Invoice
,Issuing Card
,Issuing Dispute
,Mandate
,PaymentIntent
,PaymentMethod
,Payout
,Plan
,Plan
,Refund
,SetupIntent
,Source
,Source
,Subscription
,SubscriptionItem
,SubscriptionSchedule
,Terminal ConnectionToken
,Terminal Location
,Terminal Reader
,Topup
, andTransfer
(see Migration guide).Update the Webhook
ConstructEvent,
ConstructEventIgnoringTolerance
andConstructEventWithTolerance
functions to return an error when the webhook event's API version does not match the stripe-go library API version.Update
ErrorType
andErrorCode
values.Move
BalanceTransaction
iterator frombalance.go
tobalancetransaction.go
Fix
BalanceTransactionSource
UnmarshalJSON
for whenBalanceTransactionSource.Type == "transfer_reversal"
(previously, we were checking ifType == "reversal"
, which was always false)For BankAccount and Card client methods, check that exactly one of
params.Account
andparams.Customer
is set (previously they could both be set, but only one would be used, and it was different between BankAccount and Card)Replace
CardVerification
with field-specific enums (with the same values)Move
Del
fromdiscount/client.go
tocustomer/client.go
and rename toDeleteDiscount
Move
DelSub
fromdiscount/client.go
tosubscription/client.go
and rename toDeleteDiscount
Add separate parameter struct for CreditNote
ListPreviewLines
(renamed toPreviewLines
) method ([CreditNoteLineItemListPreviewParams -> CreditNotePreviewParams].Lines
CreditNoteLineParams
->CreditNotePreviewLineParams
)Replace
FeeRefundParams.ApplicationFee
withFeeRefundParams.Fee
andFeeRefundParams.ID
Add separate parameter struct for Invoice
GetNext
(renamed toUpcoming
) method (InvoiceUpcomingParams
, and nested paramsInvoiceUpcomingLinesInvoiceItemPriceDataParams
,InvoiceUpcomingLinesInvoiceItemDiscountParams
,InvoiceUpcomingLinesDiscountParams
,InvoiceUpcomingLinesInvoiceItemPeriodParams
).Upcoming
-only fieldsCoupon
,CustomerDetails
,InvoiceItems
,Subscription
,SubscriptionBillingCycleAnchor
,Schedule
,SubscriptionBillingCycleAnchor
,SubscriptionBillingCycleAnchorNow
,SubscriptionBillingCycleAnchorUnchanged
,SubscriptionCancelAt
,SubscriptionCancelAtPeriodEnd
,SubscriptionCancelNow
,SubscriptionDefaultTaxRates
,SubscriptionItems
,SubscriptionProrationBehavior
,SubscriptionProrationDate
,SubscriptionStartDate
,SubscriptionTrialEnd
,SubscriptionTrialEndNow
, andSubscriptionTrialFromPlan
are removed fromInvoiceParams
.Add separate structs for
BillingDetails
andBillingDetailsParams
:PaymentMethodBillingDetails
,PaymentMethodBillingDetailsParams
Add separate structs for
PaymentMethodCardNetwork
:PaymentMethodCardNetworksAvailable
,PaymentMethodCardNetworksPreferred
Deprecated
SKU
resource has been deprecated. This will be replaced by https://stripe.com/docs/api/orders_v2.AccountCapability
enum definition. This was not referenced in the library.UnmarshalJSON
for resources that are not expandable:BillingPortalSession
,Capability
,CheckoutSession
,FileLink
,InvoiceItem
,LineItem
,Person
,WebhookEndpoint
AccountRejectReason
(was only referenced inaccount/client_test.go
, actualAccountRejectParams.Reason
is*string
)AccountParams.RequestedCapabilities
(use Capabilities instead: https://stripe.com/docs/connect/account-capabilities)AccountSettingsParams.Dashboard
andAccountSettingsDashboardParams
(Note:Dashboard
are still available onAccountSettings
, but it's not available as parameters for any of the methods)AccountCompany.RegistrationNumber
(Note:RegistrationNumber
is still available onAccountCompanyParams
, but is not returned in the response)BalanceTransactionStatus
. It was meant to be an enum, but none of the enum values were defined, so it was just an alias for string.CardParams.AccountType
.AccountType
does not exist on any client method for Card. It does on BankAccount, which is similar.id
param from CheckoutSessionsListLineItems
. UseCheckoutSessionListLineItemsParams.Session
instead.CheckoutSessionLineItemPriceDataRecurringParams.AggregateUsage
,CheckoutSessionLineItemPriceDataRecurringParams.TrialPeriodDays
, andCheckoutSessionLineItemPriceDataRecurringParams.UsageType
CheckoutSessionPaymentIntentDataParams.Params
,CheckoutSessionSetupIntentDataParams.Params
,CheckoutSessionSubscriptionDataParams.Params
.Params
should only be embedded in root method struct, and has extraneous fields not applicable to child/sub structs.CheckoutSessionTotalDetailsBreakdownTax.TaxRate
. UseCheckoutSessionTotalDetailsBreakdownTax.Rate
CheckoutSessionTotalDetailsBreakdownTax.Deleted
CustomerParams.Token
Discount
APIResource
embedDiscountParams
FilePurposeFoundersStockDocument
("founders_stock_document"
option forFile.Purpose
)InvoiceParams.Paid
. Useinvoice.status
to check for status.invoice.status
is a read-only field.InvoiceParams.SubscriptionPlan
andInvoiceParams.SubscriptionQuantity
(note: these would have been onInvoiceUpcomingParams
)InvoiceListLinesParams.Customer
andInvoiceListLinesParams.Subscription
(these are not available for InvoiceListLines
, but are available forList
)IssuingAuthorizationRequestHistoryViolatedAuthorizationControlEntity
andIssuingAuthorizationRequestHistoryViolatedAuthorizationControlName
(unused enums)IssuingCardSpendingControlsParams.SpendingLimitsCurrency
.issuing_card
hascurrency
, andissuing_card.spending_controls.spending_limits.amount
will use that currencyIssuingDisputeEvidenceServiceNotAsDescribed.ProductDescription
,IssuingDisputeEvidenceServiceNotAsDescribed.ProductType
,IssuingDisputeEvidenceServiceNotAsDescribedParams.ProductDescription
,IssuingDisputeEvidenceServiceNotAsDescribedParams.ProductType
, andIssuingDisputeEvidenceServiceNotAsDescribedProductType
.issuing_dispute.evidence.service_not_as_described
does not haveproduct_description
orproduct_type
.issuing_dispute.evidence.canceled
does.LineItemTax.TaxRate
. UseLineItemTax.Rate
instead.LineItem.Deleted
LoginLink.RedirectURL
PaymentIntentOffSession
(unused enum)PaymentIntentConfirmParams.PaymentMethodTypes
PaymentMethodFPX.TransactionID
Payout.BankAccount
andPayout.Card
(These fields were never populated, usePayoutDestination.BankAccount
andPayoutDestination.Card
instead)PlanParams.ProductID
. UsePlanParams.Product.ID
instead.Shipping
andShippingRate
properties fromCheckoutSession
resource. Please useShippingCost
andShippingDetails
properties instead.DefaultCurrency
property fromCustomer
resource. Please useCurrency
property instead.Updated
andUpdatedBy
fromRadarValueList
Name
fromRadarValueListItem
ReviewReasonType
type fromReview
resource. UseReviewReason
insteadSetupIntentCancellationReasonFailedInvoice
andSetupIntentCancellationReasonFraudulent
values fromSetupIntentCancellationReason
SigmaScheduledQueryRun.Query
. The field was invalidSKUParams.Description
andSKU.Description
SourceMandateAcceptanceStatus
,SourceMandateAcceptanceStatusAccepted
,SourceMandateAcceptanceStatusRefused
,SourceMandateNotificationMethod
,SourceMandateNotificationMethodEmail
,SourceMandateNotificationMethodManual
, andSourceMandateNotificationMethodNone
Source.TypeData
and SourceParams and replace with payment method-specific fields (AUBECSDebit, Bancontact, Card, CardPresent, EPS, Giropay, IDEAL, Klarna, Multibanco, P24, SEPACreditTransfer, SEPADebit, Sofort, ThreeDSecure, Wechat) andSource.AppendTo
methodSourceTransaction.CustomerData
. The field was deprecatedSourceTransaction.TypeData
andSourceTransaction.UnmarshalJSON
. Use payment specific fields - RemoveACHCreditTransfer
,CHFCreditTransfer
,GBPCreditTransfer
,PaperCheck
, andSEPACreditTransfer
SubscriptionPaymentBehavior
,SubscriptionPaymentBehaviorAllowIncomplete
,SubscriptionPaymentBehaviorErrorIfIncomplete
, andSubscriptionPaymentBehaviorPendingIfIncomplete
SubscriptionProrationBehavior
,SubscriptionProrationBehaviorAlwaysInvoice
,SubscriptionProrationBehaviorCreateProrations
, andSubscriptionProrationBehaviorNone
SubscriptionStatusAll
SubscriptionParams.Card
,SubscriptionParams.Plan
, andSubscriptionParams.Quantity
Subscription.Plan
andSubscription.Quantity
SubscriptionItemParams.ID
. The field was deprecatedSubscriptionSchedulePhaseAddInvoiceItemPriceDataRecurringParams
andSubscriptionSchedulePhaseAddInvoiceItemPriceDataParams
Del
method onTaxRate
TerminalReaderGetParams
. UseTerminalReaderParams
instead.TerminalReaderList.Location
andTerminalReaderList.Status
(Not available for the list, but is available for individualTerminalReader
s inTerminalReaderList.Data
)Token.Email
andTokenParams.Email
TopupParams.SetSource
WebhookEndpointListParams.Created
andWebhookEndpointListParams.CreatedRange
(useStartingAfter
fromListParams
)WebhookEndpoint.Connected