On Shipping Address Change
Shipping address change event
Last verified 2026-09-27
Is this helpful?
Stripe
4105 articles
paymentRequest.on(event: string, handler: function) The shippingaddresschange event is emitted from a PaymentRequest whenever the customer selects a new address in the browser's payment interface. - event The name of the event. In this case, shippingaddresschange. - handler handler(event) => void is a callback function that you provide that will be called when the event is fired. When called it will be passed an event object with the following properties: - updateWith updateWith(updateDetails) => void is a Stripe.js provided function that is called with an UpdateDetails object to merge your updates into the current PaymentRequest object. Note that if you subscribe to shippingaddresschange events, then you must call updateWith within 30 seconds. - shippingAddress The customer's selected shipping address. 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 - country Two-letter country code, capitalized. Valid two-letter country codes are specified by the related setting alpha-2. - addressLine An array of address line items. For example, 185 Berry St., Suite 500, P.O. Box 12345, etc. - region The most coarse subdivision of a country. Depending on the country, this might correspond to a state, a province, an oblast, a prefecture, or something else along these lines. - city The name of a city, town, village, etc. - postalCode The postal code or ZIP code, also known as PIN code in India. - recipient The name of the recipient. This might be a person, a business name, or contain "care of" (c/o) instructions. - phone The phone number of the recipient. Note that this might be different from any phone number you collect with requestPayerPhone. - sortingCode The sorting code as used in, for example, France. Not present on Apple platforms. - dependentLocality A logical subdivision of a city. Can be used for things like neighborhoods, boroughs, districts, or UK dependent localities. Not present on Apple platforms. ### Example title Handle 'shippingaddresschange' event Is this helpful?