Basket Transfer
Shoppers can build a Mealz basket in a No Supplier app (recipe site / partner), then transfer it to an affiliated retailer app or website to finish shopping. Both sides must wire their part — there is no automatic sync without that handoff.
No-supplier app Retailer app / site
───────────────── ──────────────────
AddToCart / Supplier Selector
→ user confirms transfer
→ Mealz opens URL with
transferred_basket_token ──► Deep link / universal link
→ open Catalog MyMeals with
basketTransferUrl
→ products sync into retailer cart
| Side | What you do |
|---|---|
| No Supplier | Host Add to Cart (+ Supplier Selector). When the user confirms transfer, MealzUIKit opens the retailer URL outside your app. Do not block that handoff. |
| Retailer | Handle the incoming link, open FeatureRoute.Catalog.MyMeals(basketTransferUrl = …), keep basket sync registered so products land in your cart. |
This is not the same as redirectToCart (open your in-app cart while browsing Mealz) or day-to-day basket sync. Transfer is a cross-app handoff from an affiliated No Supplier experience into your retailer app.
SSR background:
No Supplier — emit
There is no separate startTransfer API. After the shopper adds recipes and confirms transfer in Mealz UI:
- SSR builds a retailer URL that includes
transferred_basket_token(plus affiliate / POS params Mealz configures with you). - The WebView navigates toward that URL.
- MealzUIKit detects
transferred_basket_tokenand opens it externally (AndroidACTION_VIEW/ iOS universal link or browser) so the retailer app or site takes over.
The process is fully handled by the library, so no action is required on your side.
Retailer — receive
Accept a basket built on an affiliated No Supplier app/site and merge products into your retailer cart via the usual basket synchronizer.
Typical incoming link (exact shape is configured with Mealz):
https://your-app-or-web-host/…?affiliate=AFFILIATE&transferred_basket_token=TOKEN&point_of_sale_ext_id=STORE_EXT_ID
To achieve this, follow these steps:
- Declare / handle the deep link (App Links, universal links, custom scheme, …) and keep the full incoming URL (query params matter).
- Ensure MealzUIKit is started, store / user are set as for a normal retailer session, and
BasketSynchronizationManager.registerRetailerBasketSynchronizeris already registered. - Open catalog My Meals with
basketTransferUrlset to that incoming URL — Mealz forwards its query params into the WebView load. - Transferred lines arrive through
updateBasketlike normal Mealz adds; callnotifyRetailerBasketChangedas usual after you apply them.
CatalogViewController.companion.get(
route: FeatureRoute.Catalog.CatalogMyMeals(
showTabSelector: false,
defaultSelectedTab: nil,
basketTransferUrl: incomingTransferUrl, // full deep-link URL
extraParameters: [:]
),
stateContent: nil,
navigationCallback: CatalogNavigationCallback(
redirectToLogIn: { /* */ },
redirectToStoreLocator: { /* */ },
redirectToCart: { /* your cart — products land via basket sync */ },
exit: { /* */ },
goToHomeCatalog: nil
)
)