Skip to content

Conversation

davidme-stripe
Copy link
Collaborator

@davidme-stripe davidme-stripe commented Jul 24, 2025

Summary

Fixes parameter mismatch where Android native expects 2 arguments but only received 1, causing "got 3 arguments, expected 4" error.

The issue was in handleNextActionForSetup which had platform-specific conditional logic that omitted the returnURL parameter for Android, while both iOS and Android native implementations expect the same parameters.

Changes

  • Remove platform-specific logic in handleNextActionForSetup to consistently pass both setupIntentClientSecret and returnURL parameters
  • Add NoWebhookSetupScreen example (under "Finalize setup on the server") for testing setup flows that require next action handling
  • Add /setup-without-webhooks server endpoint for setup testing

Test plan

  • Manually tested the fix resolves the Android parameter mismatch
  • New example screen allows testing of handleNextActionForSetup flows

Fixes #1960

🤖 Generated with Claude Code

…droid

Resolves parameter mismatch where Android native expects 2 arguments but
only received 1, causing "got 3 arguments, expected 4" error.

The issue was in handleNextActionForSetup which had platform-specific
conditional logic that omitted the returnURL parameter for Android, while
both iOS and Android native implementations expect the same parameters.

Changes:
- Remove platform-specific logic in handleNextActionForSetup
- Always pass both setupIntentClientSecret and returnURL parameters
- Add NoWebhookSetupScreen example for testing setup flows
- Add /setup-without-webhooks server endpoint for setup testing

Fixes #1960

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

Co-Authored-By: Claude <[email protected]>
@davidme-stripe davidme-stripe enabled auto-merge (squash) July 24, 2025 04:04
@davidme-stripe davidme-stripe merged commit 1593381 into master Jul 29, 2025
10 checks passed
@davidme-stripe davidme-stripe deleted the fix/android-handle-next-action-setup-params branch July 29, 2025 12:23
Appchoose-GitHub-Bot pushed a commit to appchoose/stripe-react-native that referenced this pull request Aug 20, 2025
# [0.51.0](v0.50.0...v0.51.0) (2025-08-20)

### Bug Fixes

* ensure handleNextActionForSetup passes returnURL parameter on Android ([stripe#2021](https://github.com/appchoose/stripe-react-native/issues/2021)) ([1593381](1593381)), closes [stripe#1960](https://github.com/appchoose/stripe-react-native/issues/1960)
* Make currencyCode optional for setup mode on Android to match iOS behavior ([stripe#2018](https://github.com/appchoose/stripe-react-native/issues/2018)) ([b6bacff](b6bacff))

### Features

* add support for Billie ([stripe#1956](https://github.com/appchoose/stripe-react-native/issues/1956)) ([a644bcb](a644bcb))
* **minor:** release version ([ffca8b0](ffca8b0))
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.

Android handleNextAction got 3 arguments, expected 4
2 participants