Type updates to fix reduced actions in form sdk#672
Merged
alic-stripe merged 3 commits intostripe:masterfrom Apr 27, 2026
Merged
Type updates to fix reduced actions in form sdk#672alic-stripe merged 3 commits intostripe:masterfrom
alic-stripe merged 3 commits intostripe:masterfrom
Conversation
| }); | ||
| }); | ||
|
|
||
| // Mirrors the pay-server runtime transform that strips 5 client-only |
Contributor
There was a problem hiding this comment.
Should we be referencing 'pay-server` in OSS?
Contributor
|
@ashkan-stripe can we pls beef up the PR description now/later to be more descriptive? |
Contributor
rvolyar-stripe
left a comment
There was a problem hiding this comment.
@ashkan-stripe left two comments/questions
|
|
||
| const CheckoutFormExample = ({layout}) => { | ||
| const checkoutState = useCheckout(); | ||
| const checkoutState = useCheckoutForm(); |
Contributor
There was a problem hiding this comment.
Do we want to also update examples/hooks/11-Custom-Checkout.js to reference useCheckoutElements()?
Contributor
Author
There was a problem hiding this comment.
good catch! updated ✅
| }; | ||
|
|
||
| /** | ||
| * @deprecated Prefer the provider-specific hooks: |
Contributor
There was a problem hiding this comment.
I think as a consumer, it would be nice to see:
- since what version is this deprecated
- when will it be removed
- what is the alternative ✅
Contributor
Author
There was a problem hiding this comment.
good suggestion, updated ✅
rvolyar-stripe
approved these changes
Apr 27, 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.
Summary & motivation
stripe-js v9.3.1 removed 5 action methods from
initCheckoutFormSdk()(the Form SDK now exposes 7 actions instead of 12). This PR updates react-stripe-js to reflect that.What changed
useCheckoutElements()for use inside<CheckoutElementsProvider>. Returns the full 12-action surface.useCheckoutForm()for use inside<CheckoutFormProvider>. Returns the narrower 7-action surface, so calling one of the removed methods is now a compile-time error.useCheckout()via JSDoc. It still works and points users at the new hooks. It now aliasesuseCheckoutElements()so behavior is consistent.@stripe/stripe-jspeer dependency floor to>=9.3.1 <10.0.0since we now reference types introduced in 9.3.1.What does not change
<CheckoutElementsProvider>+useCheckout()integrations keep working exactly as they do today. No code changes required for Elements consumers.API review
Copy this template or link to an API review issue.
Testing & documentation