Hosted Connect is a preview. The sandbox host is
https://trdrsco-connect-sandbox.fly.dev. Production access and the final public host require
approval before launch.Before you start
- Create a Venue key with
connect:managein your sandbox back office. - Add the exact website origin under Developers → Connect websites. Paths and wildcards are not accepted.
- Keep the Venue key on your server. Only the short-lived Connect token goes to the browser.
1. Create a session on your server
This route must run on your backend. Replace the venue id and email with the trader opening Connect.server.js
2. Open Connect in the browser
Import the browser module, request a token from your backend, and callopen(). The SDK creates and
removes the iframe for you.
index.html
Events
Calling
close() removes the iframe. Calling open() again needs a new session token after the old
session completes or expires.
Redirect instead of an iframe
Useconnect.redirect() when an embedded dialog does not fit your application, such as a small
mobile web view. Connect returns to the current page after the hosted flow.
Read the result from your backend
The browser event is for interface feedback. Your backend can read the authoritative session result:Security rules
- Never put a Venue key in JavaScript, HTML, a mobile bundle, or a Connect URL.
- Register exact origins.
https://app.example.comandhttps://admin.example.comare different origins. - Create the session for the signed-in trader’s real email. A different TRDRS user cannot claim it.
- Treat
connectedas interface feedback and confirm important work from your backend. - Use a fresh idempotency key when you intentionally create a new session.