Repository navigation
feat: bind React payment elements to individual widget instances - #25
Merged
ArushKapoorJuspay merged 2 commits intoNov 25, 2026
Merged
Conversation
5 of 10 tasks
ArushKapoorJuspay
force-pushed
the
feat/multi-widget-support
branch
2 times, most recently
from
November 23, 2026 16:12
1124cf3 to
19d08db
Compare
ArushKapoorJuspay
force-pushed
the
feat/multi-widget-support
branch
from
November 23, 2026 16:21
19d08db to
7236160
Compare
sakksham7
approved these changes
Nov 25, 2026
AbhishekChorotiya
approved these changes
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Support multiple React payment widgets by registering callbacks and routing the existing
ref.current.confirmPayment()method through the widget mounted by that component.crypto.randomUUID(), stored in a ref. Retain the random fallback when the API is unavailable and preserve explicitly supplied IDs.sdk_not_readyerror when confirmation is called before initialization completes, avoiding a null result that breaks merchant error handling.How did you test it?
randomUUID()available, missing, and throwing.Screen.Recording.2026-11-23.at.9.28.58.PM.mov
Screen.Recording.2026-11-23.at.9.23.53.PM.mov
Screen.Recording.2026-11-23.at.8.51.34.PM.mov
Screen.Recording.2026-11-23.at.8.51.04.PM.mov
Usage Notes
Requires the companion SDK changes: juspay/hyperswitch-web#1887. The existing
ref.current.confirmPayment()signature remains unchanged; confirmation now targets the component's own widget.Pass payment-method restrictions through
options.allowedPaymentMethods:To show all eligible wallets, omit
paymentMethodTypes:Only methods returned by the backend and eligible for the current environment can render. Omitting the allowlist or passing
nullallows all available methods; an empty array allows none.paymentMethodTypes: []excludes that family. Updates replace the previous allowlist, including its nested type arrays.Version Update
package.jsonandpackage-lock.jsonto2.12.0following semantic versioning.Checklist
npm run re:buildand verified the build artifacts.