Skip to content

Conversation

mbroshi-stripe
Copy link
Contributor

@mbroshi-stripe mbroshi-stripe commented Aug 4, 2025

Why?

There were two issues opened recently in the V1Cards and V1BankAccounts services in the new stripe.Client:

  1. Missing .Metadata field for BankAccountCreateParams #2092
  2. Unable to create BankAccount #2093

In #2098, we addressed the second issue. This PR addresses the first, where a missing Metadata field was reported. The root cause turned out to be that when we generated code for V1Cards and V1BankAccounts as part of the new stripe.Client pattern, there were many missing parameter fields in the Create param structs. This PR adds the missing parameters, and handles them appropriately elsewhere in the code.

What?

  • Adds Customer and Account path parameters to BankAccount and Card params structs where they were missing.
  • Adds a corresponding if/else in the V1Cards and V1BankAccounts services to call the appropriate endpoints.
  • Adds many missing fields to both CardCreateParams and BankAccountCreateParams.
  • Adds serialization logic to the new missing fields to the corresponding AppendToAsCardSourceOrExternalAccount and AppendToAsSourceOrExternalAccount methods.

Changelog

  • Fixes bugs in V1Cards and V1BankAccounts services: ensures the new stripe.Client pattern supports all parameters previously available in client.API for those two services.

@mbroshi-stripe mbroshi-stripe requested a review from a team as a code owner August 4, 2025 16:20
@mbroshi-stripe mbroshi-stripe requested review from prathmesh-stripe and removed request for a team August 4, 2025 16:20
@jar-stripe
Copy link
Contributor

where many parameters were missing in the Create params.
how many is many? can you list out the specific params in the changelog entry?

@mbroshi-stripe
Copy link
Contributor Author

@jar-stripe There were 15 parameters missing from CardCreateParams and 6 missing from BankAccountCreateParams. I think it's pretty noisy to list them all out

@jar-stripe
Copy link
Contributor

@jar-stripe There were 15 parameters missing from CardCreateParams and 6 missing from BankAccountCreateParams. I think it's pretty noisy to list them all out

We've listed more in previous changelogs and migration guides. Is it useful to our customers to know the names of the paramters that are now there? if so, it's probably not too noisy to include them.

@mbroshi-stripe mbroshi-stripe changed the title More fixes for Card and BankAccount services Add missing parameters to Card and BankAccount services Aug 6, 2025
@mbroshi-stripe mbroshi-stripe merged commit 8caad57 into master Aug 6, 2025
11 checks passed
@mbroshi-stripe mbroshi-stripe deleted the mbroshi/bankaccount-and-card-fixes branch August 6, 2025 18:36
mbroshi-stripe added a commit that referenced this pull request Aug 27, 2025
* Update generated code (#2088)

* Update generated code for v1865 and 2025-07-30.basil

* Update generated code for v1868 and 2025-07-30.basil

* Update generated code for v1868 and 2025-07-30.basil

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>

* Bump version to 82.4.0

* Use Go 1.24 in CI (#2097)

* Bug fixes for `V1BankAccounts` and `V1Cards` services (#2098)

* Add tests

* Add hand-written fixes

* Fixed services

* Add missing parameters to Card and BankAccount services (#2102)

* Add tests

* Add generated code

* Bump version to 82.4.1

* add missing expand param in `get /v1/accounts/{account}/external_accounts` (#2107)

* add missing expand param in v1/external_accounts

* Revert accidential change

* Update generated code (#2101)

* Update generated code for v1882 and 2025-07-30.basil

* Update generated code for v1928 and 2025-08-27.basil

* Update generated code for v1930 and 2025-08-27.basil

* Update generated code for v1931 and 2025-08-27.basil

* Update generated code for v1932 and 2025-08-27.basil

* Update generated code for v1932 and 2025-08-27.basil

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: Ramya Rao <[email protected]>

* Add section on private preview SDKs in readme (#2108)

* Bump version to 82.5.0

* Trigger CI after workflow update

---------

Co-authored-by: stripe-openapi[bot] <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: Ramya Rao <[email protected]>
Co-authored-by: Michael Broshi <[email protected]>
Co-authored-by: Michael Broshi <[email protected]>
Co-authored-by: David Brownman <[email protected]>
Co-authored-by: Ramya Rao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants