Checkout Flow
The checkout module manages the full session lifecycle — load a session, update the cart, apply promo codes, and handle shipping.Load a Checkout Session
A checkout session is typically created by the Node SDK on your server, then the token is passed to the frontend via URL parameter.Create a Checkout Session (Client-Side)
You can also create a session directly from the browser:Update Cart
Customer & Address
The SDK uses a two-step pattern: first set customer identity, then set the address. Under the hood, both are sent in a single atomic API call whenupdateAddress() is called.
Set Customer Info
updateCustomer() stores email, name, and phone in memory. No API call is made yet — the data is sent together with the address in the next step.
Set Address
updateAddress() sends customer info + address together in one atomic API call. The customer’s firstName, lastName, and phone are automatically included in the address fields.
- Shipped Product
- Digital Product
- Separate Billing
Combined Method
If you prefer a single explicit call:Address fields:
firstName, lastName, phone can be passed directly in the address object too — they override the values from updateCustomer().