<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ProximityReader",
  "identifier" : "/documentation/ProximityReader/CustomerEngagementSession/updateShoppingCart(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ProximityReader"
    ],
    "preciseIdentifier" : "s:15ProximityReader25CustomerEngagementSessionC18updateShoppingCartyAA0cD0O0gH5TokenVAF0gH0VYaKF"
  },
  "title" : "updateShoppingCart(_:)"
}
-->

# updateShoppingCart(_:)

Updates the shopping cart on the customer’s device.

```
final func updateShoppingCart(_ shoppingCart: CustomerEngagement.ShoppingCart) async throws -> CustomerEngagement.ShoppingCartToken
```

## Parameters

`shoppingCart`

A structure of the shopping cart, consisting of shopping cart items and the summary.

## Return Value

[`CustomerEngagement.ShoppingCartToken`](/documentation/ProximityReader/CustomerEngagement/ShoppingCartToken) for making payment request using [`requestPayment(for:using:delegate:)`](/documentation/ProximityReader/CustomerEngagementSession/requestPayment(for:using:delegate:)).

## Discussion

This function can be called repeatedly as the shopping cart is populated,
and each update replaces the entire shopping cart.

When there isn’t any form, like a sign-up form being displayed, the screen defaults to
the current [`CustomerEngagement.ShoppingCart`](/documentation/ProximityReader/CustomerEngagement/ShoppingCart).

> Throws: ``doc://com.apple.ProximityReader/documentation/ProximityReader/CustomerEngagementSession/Error`` if the request fails.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)