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 Util.php flattenParamsList to always use indexed format
  • Updated tests to expect indexed format for v2 arrays

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.

Change array parameter serialization for v2 endpoints to use indexed
format (e.g., ?include[0]=foo&include[1]=bar) instead of the repeated
parameter format (e.g., ?include=foo&include=bar). This aligns v2
behavior with v1 for consistency.

Changes:
- Modified Util.php flattenParamsList to always use indexed format
- Updated tests to expect indexed format for v2 arrays

🤖 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 16:14
@mbroshi-stripe mbroshi-stripe requested a review from a team as a code owner November 11, 2025 16:14
@mbroshi-stripe mbroshi-stripe requested review from prathmesh-stripe and removed request for a team November 11, 2025 16:14
@mbroshi-stripe mbroshi-stripe enabled auto-merge (squash) November 17, 2025 17:35
@mbroshi-stripe mbroshi-stripe merged commit 228f70b into master Nov 17, 2025
28 checks passed
@mbroshi-stripe mbroshi-stripe deleted the mbroshi/update-v2-array-params branch November 17, 2025 17:37
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