Skip to content

Conversation

@mbroshi-stripe
Copy link
Contributor

@mbroshi-stripe mbroshi-stripe commented Nov 11, 2025

Why?

Stripe has updated how array parameters are handled in GET and DELETE methods to /v2 endpoints. Previously, the SDKs were serializing them with repeated parameter format (e.g., ?include=foo&include=bar) since that is was the API expected. While that format is still accepted, it is deprecated. Instead, we will serialize array parameters to use indexed format (e.g., ?include[0]=foo&include[1]=bar), which is the preferred method going forward. This aligns v2 behavior with v1 for consistency.

What?

  • Modified src/utils.ts to always use 'indices' arrayFormat in qs.stringify
  • Updated test expectations in test/utils.spec.ts to reflect new behavior

Changelog

  • Retrieve and List calls for /v2 endpoints now use indexed format (e.g., ?include[0]=foo&include[1]=bar) instead of repeated parameter format (e.g., ?include=foo&include=bar) when communicating with the Stripe API. This may break any unit tests that expect the latter behavior when setting up a mock server. Instead, they should now expect the former.

Updates v2 array parameter serialization to use indexed format
(?include[0]=foo&include[1]=bar) instead of repeated format
(?include=foo&include=bar), making it consistent with v1 behavior.

Modified src/utils.ts to always use 'indices' arrayFormat in
qs.stringify, and updated test expectations in test/utils.spec.ts
to reflect the new behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Committed-By-Agent: claude
@mbroshi-stripe mbroshi-stripe marked this pull request as ready for review November 11, 2025 17:06
@mbroshi-stripe mbroshi-stripe requested a review from a team as a code owner November 11, 2025 17:06
@mbroshi-stripe mbroshi-stripe requested review from xavdid-stripe and removed request for a team November 11, 2025 17:06
@mbroshi-stripe mbroshi-stripe enabled auto-merge (squash) November 17, 2025 17:51
@mbroshi-stripe mbroshi-stripe merged commit aec1f49 into master Nov 17, 2025
10 checks passed
@mbroshi-stripe mbroshi-stripe deleted the mbroshi/update-v2-array-params branch November 17, 2025 17:54
@stripe stripe deleted a comment Nov 18, 2025
@stripe stripe deleted a comment Nov 18, 2025
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