#asif_70741
1 messages · Page 1 of 1 (latest)
Hello
Let's back up
Why do you want to create a PaymentMethod separately from confirmPayment() to begin with?
i want to pass in zip code from my own field instead of using stripe's zip field.
For that I am seeing i need to pass payment_method_data but when i pass payment_method_data the stripe portal shows as payment_method not being linked to it
Hmm yeah I don't really understand. As you noted, you want to pass the Zip into payment_method_data but what do you mean by:
the stripe portal shows as payment_method not being linked to it
Are you hiding the postal code field in Payment Element when you do this?
Or are you still collecting postal code via that field as well?
That's right i use the elements by the following code how would i disable zip info on the stripe element?
const elements = useElements();
You pass fields.billingDetails.address.postalCode: 'never' when you create your Payment Element: https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-address-postalCode