Antom, leading provider of tailored payment solutions

onShippingAddressChange()

Callback function triggered when the user changes the shipping address in PayPal Checkout.

Parameters

Parameter
Type
Required
Description
Object
No
Raw data returned by PayPal.

data

Parameter
Type
Required
Description
orderId
string
No
Current order.
Object
No
Newly selected address.
Object
No
Error messages that PayPal can display on the Checkout UI.

shippingAddress

Parameter
Type
Required
Description
city
string
No
City.
state
string
No
State or province.
countryCode
string
No
ISO 3166-1 alpha-2 country code.
postalCode
string
No
Postal code.

errors

Error code
Message
ADDRESS_ERROR
"Your order can't be shipped to this address." (Your order can't be shipped to this address.)
COUNTRY_ERROR
"Your order can't be shipped to this country." (Your order can't be shipped to this country/region.)
STATE_ERROR
"Your order can't be shipped to this state." (Your order can't be shipped to this state/province.)