Customer
The customer module gives you access to customer profiles, order history, and subscriptions. Use it to build account dashboards, order tracking pages, and subscription management UIs.Get Customer Profile
By Email
Not available. No route finds a customer by email from a storefront: the only email search needs a secret API key of the whole account, which must never ship to a browser. From 1.18.0,getByEmail() rejects with a TagadaError of code not_supported without sending a request (before, it always returned null). For the logged-in customer, use portal.getMe() or getProfile(customerId).
Update Email
email is saved, other fields are ignored. To change the name and phone of a logged-in customer, use portal.updateProfile.
Orders
List Orders
TagadaNotFoundError. The route sends every order at once: limit and offset slice them in the SDK, and total counts them all. Works from 1.18.0; earlier versions called a route that does not exist.
Get Single Order
Get an Order on the Thank-You Page
Accepted post-purchase offers create separate child orders, not extra lines on the main order — and they land asynchronously. The first fetch right after an accept usually misses them. PasswaitForRelatedOrders: true
and the SDK polls for you:
On timeout the latest snapshot is returned — it never throws. A customer who
declined every offer simply gets an order with an empty
relatedOrders after
timeoutMs. In React, prefer the useOrder hook
which renders the main order immediately and fills in the upsells in the
background. Worked example: Basic post-purchase.Subscriptions
List Subscriptions
[].
Get Single Subscription
TagadaNotFoundError when it is not there. Both work from 1.18.0; earlier versions called routes that do not exist.
Manage a Subscription
resumeSubscription, rescheduleSubscription, updateSubscriptionQuantity, swapSubscriptionProduct and updateSubscriptionPaymentMethod. They act for the customer logged in with the emailed code, and each one can be turned off by the store. The full list, the permissions and the errors are on Customer Portal.
React Hook
Full Hook API
useOrder — Thank-You Pages
useCustomer is for account dashboards (you have a customerId). On a
thank-you page you have an orderId from the URL — use useOrder. It
loads the order, renders it immediately, and keeps watching in the
background for the child orders created by accepted upsells:
watchRelatedOrders: true, the hook
refetches every 2s for up to 8s while relatedOrders is empty, then stops.
Upsell blocks pop in as soon as the child orders exist.
