Skip to main content
onShippingAddressChanged is invoked every time the shopper selects or changes the shipping address in the wallet’s payment sheet, including the wallet’s default address when the sheet opens. The SDK delivers the redacted address and applies what you return live on the sheet: new totals, shipping options, or an error that blocks the payment until the shopper picks another address. Overriding it is optional. Without it, the wallet flow behaves exactly as without callbacks.

Supported wallets

Payment flows only. The callback is not raised for cards or any other payment method.

What you receive

Wallets redact the address until the payment is authorized, so any of the address fields may be absent.

What you return

A ShippingUpdate, or null (nil on iOS) to keep what the sheet already displays. Every field of the update is optional: leave one out to keep its current value. Amounts are ShippingAmount values: value in the major unit of currency (12.34 for USD 12.34). currency must match the checkout session currency; a mismatch invalidates the whole update. deliveryEstimate is a from and to pair of YYYY-MM-DD dates, rendered next to the option on iOS 15 and later.

Timing

On iOS the SDK sets no deadline of its own, so the only time limit is the wallet’s: the sheet stays open while you answer. If you never answer, the wallet’s own deadline applies, the sheet is dismissed and the transaction ends as cancelled.

Signature

Web wires it inside externalButtons on the transaction config. The SDK calls it from every Apple Pay and Google Pay button it renders, including the ones you mount with getPaymentMethodsViews(). Return the update, or null to keep what the sheet shows. A handler that throws also keeps the current values.