Overview
Benji Hosted Connect is a fully hosted solution that allows you to connect your members to reward loyalty partners without integrating an SDK into your application. You send users to Benji Hosted Connect, which loads the Benji Connect SDK behind the scenes as a modal. You can also drive the flow entirely via redirect: create a token on your server, send the user to the Benji Hosted Connect URL withconnect_token, and optionally return them to your app using a Redirect URL configured in Pilot.
This approach is ideal for:
- Quick integration — Get started without any frontend code changes beyond linking or redirecting
- Server-side flows — Connect users through email campaigns or backend-generated URLs
- Multi-platform support — One Benji Hosted Connect URL pattern for web, mobile, and other platforms
How it works (high level)
- Create a connect token on your server using your partner API key (from Pilot Developer) and the fields your flow needs (
partnership_id,mode, optionaluser_external_id, optionalcustom_attributes, etc.). - Send the user to Benji Hosted Connect. Either:
- Use the
connect_urlfrom the Create Token response and append the token:<connect_url>?connect_token=<token>, or - Open the Benji Hosted Connect base URL for your partnership and pass
connect_token(and other query parameters below) as needed.
- Use the
- The user completes Connect (link, transfer, or redeem depending on mode) in the modal inside Benji Hosted Connect.
- If you configured a Redirect URL in Pilot, the browser is sent back to your URL with query parameters describing the outcome (see Redirect URL and query parameters).
- Use Exchange Token with the short-lived token from a successful flow when you need long-lived API access. Subscribe to webhooks for asynchronous lifecycle events.
Building the Benji Hosted Connect URL
After Create Token, you receive:token— Short-lived connect token used to initialize Connect.connect_url— Base URL for Benji Hosted Connect for this partnership (format may vary by environment).
state on the inbound URL; it is echoed back on the redirect.
Benji Hosted Connect query parameters
These parameters apply when the user lands on Benji Hosted Connect. Exact behavior is defined by the Benji Hosted Connect implementation; the following reflects the reference integration pattern.
* Token source: For production flows, prefer passing
connect_token from your server after Create Token, or rely on server-side token creation on Benji Hosted Connect when your integration supplies the right context.
Resolving the partnership
Benji Hosted Connect resolves which partnership to show by:- Path — e.g.
https://<host>/<partnershipId>(common for default hosted domains), or - Hostname — custom domain configured in Pilot for the partnership.
Redirect URL and query parameters
Configure where users return after Connect completes by setting Redirect URL (Optional) on the partnership Landing Page in Pilot (partnership campaign / landing page editor). If this URL is set:- Benji Hosted Connect redirects the user there after success or error (not only on success). Your app should read the
statusquery parameter. - Pilot (tooltips and labels next to Redirect URL) might not list every parameter. Benji Hosted Connect may append more than what you see in the UI. Use the table below as the integration contract when you parse the redirect URL in your app:
Redirects use absolute (
https://...) or relative URLs; query strings are merged appropriately.