Instance Method


Completes the selection of a shipping contact with an update.


void completeShippingContactSelection(ApplePayShippingContactUpdate update);


This method must be called by onshippingcontactselected.

In Apple Pay JS API version 3, the parameter is an ApplePayShippingContactUpdate.

completeShippingContactSelection in Apple Pay JS version 1 and 2

In version 1 and 2 of the Apple Pay JS API, completeShippingContactSelection has the following parameters:

Table 1



The status of the shipping contact update. For valid values, see Apple Pay Status Codes.


A sequence of ApplePayShippingMethod dictionaries that represents shipping costs (if any).


An ApplePayLineItem dictionary representing the total price for the purchase. Set the label to the merchant’s name, and the amount to the total price. The amount must be greater than zero.


A sequence of ApplePayLineItem dictionaries. Use ApplePayLineItem dictionaries to represent all other costs or discounts. Do not use line items to represent the individual items purchased by the user. Instead, combine all the purchases into a single subtotal item. Use additional line items to represent other costs or discounts (tax, shipping, coupons, and so forth.). If you do not have any additional costs or discounts, do not use this argument. Set the newTotal argument with the total cost of all the purchased items, and either pass an empty array or null for newLineItems.

See Also

Handling Shipping Contact Updates


An event handler that is called when a shipping contact is selected in the payment sheet.


An event object that contains the shipping address selected by the user.


Updated transaction details resulting from a change in shipping contact, including any errors.