You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the API docs for Payment Element, it mentions the defaultValues and fields options for prefilling or hiding fields in the Payment Element. This works for a Payment Element initiated with a Payment Intent already created, but not for a Payment Element initiated with no Payment Intent already created. The prefilled fields and hidden fields provided are simply ignored. For example:
Has a different outcome depending on whether the payment intent was created or not:
Is it intentional? There are valid use cases for initiating the Payment Element with prefilled fields even where we don't want to create an intent yet.
Environment
No response
Reproduction
No response
The text was updated successfully, but these errors were encountered:
What happened?
In the API docs for Payment Element, it mentions the defaultValues and fields options for prefilling or hiding fields in the Payment Element. This works for a Payment Element initiated with a Payment Intent already created, but not for a Payment Element initiated with no Payment Intent already created. The prefilled fields and hidden fields provided are simply ignored. For example:
defaultValues: { billingDetails: { name: "My Name", email: "[email protected]" } }
Has a different outcome depending on whether the payment intent was created or not:
Is it intentional? There are valid use cases for initiating the Payment Element with prefilled fields even where we don't want to create an intent yet.
Environment
No response
Reproduction
No response
The text was updated successfully, but these errors were encountered: