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)
From a landing / cart page, create a session and send the shopper to your checkout. Pin the variant you sell — do not pick “whatever is in the catalog”:/checkout, read both query names (sessionToken from createSessionUrl, token from a Tagada-hosted redirect):
createSession() is the same call without building the URL. It also returns checkoutUrl — that one is the Tagada-hosted checkout, not your page.
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().Promo Codes
What each total means
All amounts are in minor units (cents) intotals.currency.
total is the same number the hosted checkout shows and the order is charged for — do not recompute it client-side.
Shipping
React Hook
null and use
createSessionUrl on the CTA:
