cTrader Invite
cTrader Invite enables brokers to implement affiliate and referral programmes with multi-level tracking and attribution reporting.
Prerequisites
Important
Before implementing cTrader Invite, ensure completion of:
- Setup actions: Infrastructure & connectivity, authentication of API calls
- Contracts: Broker identification, screen URL conventions
- Identity options: Either SSO user creation and authorisation or One-time token handoff
Implementation flows
There are two possible trader attribution flows.
- Flow 1 (New partner) outlines a case in which a trader is attributed to an entirely new partner.
- Flow 2 (Existing partner) describes attributing a trader to a partner who has already been registered as a partner in the broker's client area for some time but has not yet created a cTrader ID.
- Flow 1: New partner
- Flow 2: Existing partner
The flow proceeds through the following stages:
- The user (User 1) registers as a partner in the broker's CRM. If they do not have a cTID, they first pass the User creation flow.
- The broker's backend registers a new partner either at the account level or the user level. The mechanism for registering a new partner is left entirely to the broker's choice.
- The broker's backend issues a referral link containing a unique partner identifier of User 1; this identifier is later used to set the
partnerIdparameter. - The broker's backend sends a request to set the
partnerIdparameter (PUT /oauth2/ctid/referral) to the cTrader backend. - On success, the cTrader backend assigns User 1 the provided
partnerIdeither at the account level (via thectidTraderAccountIdparameter) or the user level (via theuserIdparameter). Depending on the level, the cTrader backend returns either thectidTraderAccountIdor theuserIdto the broker's backend (PUT /oauth2/ctid/referral). - The cTrader backend sends the
partnerIdof User 1 back to the cTrader application. - User 1 generates a cTrader link inside the cTrader application (for example, by sharing a direct link to a Copy strategy).
- The cTrader application generates the link requested by User 1; this link contains the
partnerIdof User 1. - The cTrader application displays the requested link to User 1.
- User 1 shares the cTrader link with User 2.
- User 2 clicks on the cTrader link provided by User 1.
- For User 2, the cTrader application opens a predefined URL to the login/signup screen. This URL contains the
partnerIdof User 1 as a query parameter. - User 2 fills out the signup form; afterward, the web browser sends a request for user creation to the broker's backend containing the
partnerId. - The broker's backend successfully creates a user; the User creation flow is continued further.
- When the User creation flow is completed, User 2 is attributed to User 1.
- User 1 logs into the broker's client area and opens a page containing a list of their referrals.
- The broker's client area successfully fetches data about the referrals of User 1 and displays this information on the requested page.
- User 1 sees User 2 among their referrals.
The flow proceeds through the following stages:
- User 1, having already registered as a partner inside the broker's client area some time ago, requests to create a new cTID.
- The cTrader application opens a predefined URL to the login/signup screen. As User 1 is a first-time cTrader user, this screen displays appropriate information for a signup action.
- User 1 fully completes the User creation flow.
- The broker's backend recognises that User 1 is an existing partner and provides a new referral link containing a unique
partnerId. - The broker's backend sends a request to the cTrader backend to set a new
partnerId(PUT /oauth2/ctid/referral). - The cTrader backend assigns the new
partnerIdto User 1 either at the account or the user level. As part of the same call (PUT /oauth2/ctid/referral), it returns either auserIdor actidTraderAccountId. - User 1 generates a cTrader link inside the cTrader application (for example, by sharing a direct link to a Copy strategy).
- The cTrader application generates the link requested by User 1; this link contains the
partnerIdof User 1. - The cTrader application displays the requested link to User 1.
- User 1 shares the cTrader link with User 2.
- User 2 clicks on the cTrader link provided by User 1.
- For User 2, the cTrader application opens a predefined URL to the login/signup screen. This URL contains the
partnerIdof User 1 as a query parameter. - User 2 fills out the signup form; afterward, the web browser sends a request for user creation to the broker's backend containing the
partnerId. - The broker's backend successfully creates a user; the User creation flow is continued further.
- When the User creation flow is completed, User 2 is attributed to User 1.
- User 1 logs into the broker's client area and opens a page containing a list of their referrals.
- The broker's client area successfully fetches data about the referrals of User 1 and displays this information on the requested page.
- User 1 sees User 2 among their referrals.
Endpoints used
PUT /oauth2/ctid/referral— set a partner identifierGET /oauth2/ctid/referral— read a partner identifierDELETE /oauth2/ctid/referral— delete a partner identifier