github stripe/stripe-go v85.0.0

latest releases: v85.1.0-alpha.1, v85.1.0-beta.1
5 hours ago

This release changes the pinned API version to 2026-03-25.dahlia and contains breaking changes (prefixed with ⚠️ below). There's also a detailed migration guide to simplify your upgrade process.

Please review details for the breaking changes and alternatives in the Stripe API changelog before upgrading.

  • ⚠️ Breaking change: #2301 Make unmarshalJSONVerbose unexported and context-aware

    • Unexported BackendImplementation.UnmarshalJSONVerbose (now unmarshalJSONVerbose) and added a context.Context parameter for proper context propagation in error logging.
  • ⚠️ Breaking change: #2324 Fix MinimumBalanceByCurrency map value type to support clearing

    • MinimumBalanceByCurrency changed from map[string]int64 to map[string]*int64 on BalanceSettingsPaymentsPayoutsParams and BalanceSettingsUpdatePaymentsPayoutsParams. This field now supports clearing a value in the map by assigning null to the map key.
  • ⚠️ Breaking change: #2320 Throw an error when using the wrong webhook parsing method

  • ⚠️ Breaking change: #2310 Regenerate with decimal_string enabled for v2 APIs

    • V2 API decimal fields changed type from string to float64 with json:",string" and form:",high_precision" struct tags. Code that passes these fields as string will need to use float64 instead. Affected fields:
      • V2CoreAccountIdentityIndividualRelationship: PercentOwnership
      • V2CoreAccountPersonRelationship: PercentOwnership
      • Params: V2CoreAccountIdentityIndividualRelationshipParams, V2CoreAccountCreateIdentityIndividualRelationshipParams, V2CoreAccountUpdateIdentityIndividualRelationshipParams, V2CoreAccountTokenIdentityIndividualRelationshipParams, V2CoreAccountTokenCreateIdentityIndividualRelationshipParams, V2CoreAccountsPersonRelationshipParams, V2CoreAccountsPersonCreateRelationshipParams, V2CoreAccountsPersonUpdateRelationshipParams, V2CoreAccountsPersonTokenRelationshipParams, V2CoreAccountsPersonTokenCreateRelationshipParams
  • ⚠️ Breaking change: #2309 Drop support for Go < 1.22

  • ⚠️ Breaking change: #2179 [Breaking] Update List and Search methods with stripe.Client to return a struct

    • List and Search methods using stripe.Client now return a struct instead of Seq2. This is a backwards incompatible change, and you will need to add an additional call to .All(ctx) in your for loop. E.g.
    -for c, err := range sc.V1Customers.List(ctx, nil) {
    +for c, err := range sc.V1Customers.List(ctx, nil).All(ctx) {
    	// handle err
    	// do something
    }
    • For manual pagination use cases, you can access the API call's error by calling list.Err(), a page's data using list.Data(), and its metadata by calling list.Meta().
  • ⚠️ Breaking change: #2260 Fix typo in V2RawError struct field name

    • Fixes misspelling in V2RawError.UserMesage --> V2RawError.UserMessage
  • #2263 Add helpers in preparation for BatchJobs public preview support

  • #2322 Add UnsetFields for clearing field values in v1 and v2 API requests

    • Added UnsetFields field and AddUnsetField method to Params for explicitly clearing field values in API requests. For v2 JSON requests, listed fields are sent as "field": null. For v1 form requests, listed fields are sent as field= (empty string).
    • Nested params structs with emptyable fields carry their own UnsetFields slice, enabling clearing of nested fields (e.g. params.CancellationDetails.AddUnsetField(...)).
    • Generated UnsetField string enum types provide type-safe constants for each clearable field (e.g. SubscriptionUpdateParamsUnsetFieldDescription).

See the changelog for more details.

Don't miss a new stripe-go release

NewReleases is sending notifications on new releases.