---
title: "updateShoppingCart(_:)"
framework: proximityreader
role: symbol
role_heading: Instance Method
path: "proximityreader/customerengagementsession/updateshoppingcart(_:)"
---

# updateShoppingCart(_:)

Updates the shopping cart on the customer’s device.

## Declaration

```swift
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.

## Mentioned in

Adding support for Tap to Share to your app

## Return Value

Return Value CustomerEngagement.ShoppingCartToken for making payment request using requestPayment(for:using:delegate:).

## Discussion

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. note: CustomerEngagementSession.Error if the request fails.

## See Also

### Updating the customer status and cart

- [updateStatus(_:)](proximityreader/customerengagementsession/updatestatus(_:).md)
