#DankFarrik - Payment Request Button
1 messages · Page 1 of 1 (latest)
Hello! Can you provide more details?
Here is the address as is added in Google Pay
And here is what I'm receiving from shippingaddresschange:
As you can see the postal code gets trimmed and it removes the second half after the space
Yep, that's normal: https://stripe.com/docs/js/payment_request/events/on_shipping_address_change#payment_request_on_shipping_address_change-handler-shippingAddress
To maintain privacy, browsers may anonymize the shipping address by removing sensitive information that is not necessary to calculate shipping costs. Depending on the country, some fields can be missing or partially redacted. For example, the shipping address in the U.S. may only contain a city, state, and ZIP code. The full shipping address appears in the PaymentResponse object after the purchase is confirmed in the browser’s payment interface
You should get enough to calculate new shipping costs, but nothing more until the payment is confirmed by the customer.
I know it's normal to remove the street address, but only half a postal code is getting rejected as it's not proper formatting for that country. This is not happening with the PayNow button for example:
Typically the Apple Pay and Google Pay behavior is more strict when it comes to privacy specifics. Do you get the full postal code as expected after the payment is confirmed?
Unfortunately I'm not able to complete a payment since our shipping rates endpoints are rejecting these trimmed postal codes. I can try to modify it on the fly and attempt to complete a payment to find out though, give me a few minutes.
And thanks again as always for your help and patience!
Ok, I can see the full postal on 'paymentmethod'. Wow, so I guess we will have to figure out how to generate shipping rates with only half a postal code for those international locations then.
Yep.