#bchirlinn
1 messages · Page 1 of 1 (latest)
Hello! Yep, that's correct. You can get the provided zip code (if there is one) on the Payment Method that's eventually generated later, but you can't get it from the Payment Element itself.
If you do ask for it yourself you can turn it off in the Payment Element and provide it in billing_details instead: https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-address-postalCode
o so I can get it off the method but only if I'm saving it for future usage? My specific use case is I'm using the react CardElement to capture a user's card information and was hoping to avoid having to dupe the zipcode field essentially
This has nothing to do with future usage.
You can avoid the duplicate zip code field by doing what I indicated above.
ok thanks
You create your own zip code field, you turn off the zip code field in the Payment Element, then you pass the zip code you collect when confirming.
This is where you would provide the zip code when confirming: https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details