> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# refreshClientSession

```ts TS theme={"dark"}
refreshClientSession(): Promise<Boolean>
```

Update the checkout with the latest client session.

## Overview

When working with dynamic client sessions, merchants must call `refreshClientSession` to ensure the Headless Checkout has access to the most recent session changes. This method synchronizes the client-side representation with server-side updates.

## Usage Guidelines

* Call `refreshClientSession` immediately after updating the client session via `PATCH /client-session`
* Ensures access to the latest session modifications for payment processing
* Returns a boolean indicating the refresh operation's success

## Important Limitations

* This method only updates the client session data (currency, amount, etc.) in the SDK
* It does not refresh the list of available payment methods or saved payment methods
* **It's critical to call this method **after updating the client session** to avoid payment declines** especially for certain payment methods that are frontend-driven (Apple Pay, Google Pay, PayPal, and Klarna)
* Some payment methods have specific limitations:
  * PayPal does not support currency updates and may require a complete SDK reload

## Example

```ts TS theme={"dark"}
// After you've updated the client session via the API endpoint
// PATCH /client-session

// Initialize Headless Checkout
const headless = await Primer.createHeadless(clientToken, options);

// Refresh client session to access the latest changes
const success = await headless.refreshClientSession();
```

For complete information on how to update a client session, see our [Manage client sessions](/api-reference/v2.4/api-reference/client-session-api/update-client-session) documentation.

## Platform Support

This method is currently available on the Web SDK. Mobile platforms (iOS, Android, React Native) require re-initializing the checkout to refresh the client session.
