Skip to content

Migration guide for v75

pakrym-stripe edited this page Aug 16, 2023 · 5 revisions
  • This release changes the pinned API version to 2023-08-16. Please read the API Upgrade Guide and carefully review the API changes before upgrading stripe-go.

Metadata & Expand request parameters

Metadata and Expand fields were added to individual Params classes. Expand, AddExpand, Metadata and AddMetadata on embedded Params struct were deprecated.

Before:

params := &stripe.AccountParams{
          Params: stripe.Params{
            Expand: []*string{stripe.String("business_profile")},
            Metadata: map[string]string{
              "order_id": "6735",
            },
          },
}

After:

params := &stripe.AccountParams{
          Expand: []*string{stripe.String("business_profile")},
          Metadata: map[string]string{
                    "order_id": "6735",
          },
}

You don't have to change your calls to AddMetadata and AddExpand

Before/After:

params.AddMetadata("order_id", "6735") 
params.AddExpand("business_profile")

Removals and deprecations

  • ⚠️Remove support for AvailableOn on BalanceTransactionListParams
    • Use of this parameter is discouraged. You may use .AddExtra if sending the parameter is still required.
  • ⚠️Remove support for Destination on Charge
    • Please use TransferData or OnBehalfOf instead.
  • ⚠️Remove support for AlternateStatementDescriptors and Dispute on Charge
    • Use of these parameters is discouraged.
  • ⚠️Remove support for ShippingRates on CheckoutSessionParams
    • Please use ShippingParams instead.
  • ⚠️Remove support for Coupon and TrialFromPlan on CheckoutSessionSubscriptionDataParams
  • ⚠️Remove support for value charge_refunded from enum DisputeStatus
  • ⚠️Remove support for BLIK on MandatePaymentMethodDetails, PaymentMethodParams, SetupAttemptPaymentMethodDetails, SetupIntentConfirmPaymentMethodOptionsParams, SetupIntentPaymentMethodOptionsParams, and SetupIntentPaymentMethodOptions
    • These fields were mistakenly released.
  • ⚠️Remove support for ACSSDebit, AUBECSDebit, Affirm, BACSDebit, CashApp, SEPADebit, and Zip on PaymentMethodParams
    • These fields were empty hashes.
  • ⚠️Remove support for Country on PaymentMethodLink
    • This field was not fully operational.
  • ⚠️Remove support for Recurring on PriceParams
    • This property should be set on create only.
  • ⚠️Remove support for Attributes, Caption, and DeactivateOn on ProductParams and Product
    • These fields are not fully operational.
  • ⚠️ Remove deprecated excluded_territory, jurisdiction_unsupported, vat_exempt taxability reasons:
    • CheckoutSessionShippingCostTaxTaxabilityReasonExcludedTerritory
    • CheckoutSessionShippingCostTaxTaxabilityReasonJurisdictionUnsupported
    • CheckoutSessionShippingCostTaxTaxabilityReasonVATExempt
    • CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonExcludedTerritory
    • CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonJurisdictionUnsupported
    • CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReasonVATExempt
    • CreditNoteShippingCostTaxTaxabilityReasonExcludedTerritory
    • CreditNoteShippingCostTaxTaxabilityReasonJurisdictionUnsupported
    • CreditNoteShippingCostTaxTaxabilityReasonVATExempt
    • InvoiceShippingCostTaxTaxabilityReasonExcludedTerritory
    • InvoiceShippingCostTaxTaxabilityReasonJurisdictionUnsupported
    • InvoiceShippingCostTaxTaxabilityReasonVATExempt
    • LineItemTaxTaxabilityReasonExcludedTerritory
    • LineItemTaxTaxabilityReasonJurisdictionUnsupported
    • LineItemTaxTaxabilityReasonVATExempt
    • QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonExcludedTerritory
    • QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonJurisdictionUnsupported
    • QuoteComputedRecurringTotalDetailsBreakdownTaxTaxabilityReasonVATExempt
    • QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonExcludedTerritory
    • QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonJurisdictionUnsupported
    • QuoteComputedUpfrontTotalDetailsBreakdownTaxTaxabilityReasonVATExempt
    • QuoteTotalDetailsBreakdownTaxTaxabilityReasonExcludedTerritory
    • QuoteTotalDetailsBreakdownTaxTaxabilityReasonJurisdictionUnsupported
    • QuoteTotalDetailsBreakdownTaxTaxabilityReasonVATExempt
  • ⚠️ Remove deprecated error code constant ErrorCodeCardDeclinedRateLimitExceeded, prefer ErrorCodeCardDeclineRateLimitExceeded.
  • ⚠️ Remove deprecated error code constant ErrorCodeInvalidSwipeData.
  • ⚠️ Remove deprecated error code constant ErrorCodeInvoicePamentIntentRequiresAction prefer ErrorCodeInvoicePaymentIntentRequiresAction.
  • ⚠️ Remove deprecated error code constant ErrorCodeSepaUnsupportedAccount, prefer ErrorCodeSEPAUnsupportedAccount.
  • ⚠️ Remove deprecated error code constant ErrorCodeSkuInactive, prefer ErrorCodeSKUInactive.
  • ⚠️ Remove deprecated error code constant ErrorCodeinstantPayoutsLimitExceeded, prefer ErrorCodeInstantPayoutsLimitExceeded.