TS
Overview
When updating client sessions dynamically, merchants must callrefreshClientSession
to ensure the Universal 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 viaPATCH /client-session
- Ensures the checkout UI displays the correct updated information (currency, amount, etc.)
- Returns a boolean indicating the refresh operation’s success
Important Limitations
- This method only updates the client session data (currency, amount, etc.) in the checkout
- 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