Enrollment Links

Enrollment links let employees connect their own cards on a page Astrada hosts: creating personal and team links, what the person sees, and the limits.

For: developers

An enrollment link lets people connect their own cards on a page Astrada hosts, so you need no SDK page of your own for them. A link opens one subaccount, and every card enrolled through it joins that subaccount. Astrada switches enrollment links on per account; until then the endpoints below answer 409 with ENROLLMENT_LINKS_NOT_ENABLED.

How a link works

Your backend creates the link and hears what was enrolled:

Two kinds of link

  • Personal link. One link for one employee.
    • Your backend creates it with POST /enrollment-links, kind: "cardholder" and your API client. The customerReferenceId you send (a UUID, such as the employee it is for) is carried by every card enrolled through the link.
    • A personal link is used up by the first session that completes something, and allows at most 5 session starts before that.
    • It expires after 7 days unless you set expiresInHours.
  • Team link. One link to share with a team.
    • Your backend creates it with POST /enrollment-links and kind: "team" (14 days and 50 session starts by default, maxUses up to 500), or Unified Enrollment SDK v2 creates it with POST /subaccounts/{subaccountId}/team-link when an admin presses Invite your team on an ending: the admin sees a link to copy.
    • A session that ends from Invite your team always ends with next: "invite-team" on onSuccess and on the closed event: right away when enrollment links are off for the account, from Done on the link screen, or when the link can't be made. teamLink ({ id, url, expiresAt }) comes with it only when a link was made.
    • A page with bulkEnrollment: "forced" never offers Invite your team.
Clip: an admin page on You're all set! The admin presses Invite your team; the team link screen shows the link, the date it works until, and that American Express cards connect through the bank login instead; the admin presses Copy link and it changes to Link copied.

An admin makes a team link and copies it (8 s).

What the person sees

Link pages carry card enrollment only: no bulk enrollment and no bank step. A person who opens a working link goes through these screens:

  1. The start page. The link opens enroll.html under /unified/v2/ on the SDK host (sdk.astrada.co, or sdk.sandbox.astrada.co in sandbox), with the link's secret after #. The page strips the secret from the address before it makes any request.
    • It names your platform (the brand profile's name, else the link's platformName, else your account's name) and the employer (the link's organizationName, when you send one). Once Astrada has set a brand profile for your account, the page header shows your logo and name, with "Powered by Astrada" under them, and the page's buttons take your accent color (Your brand on the hosted page).
    • The consent text is Astrada's.
The hosted start page with Astrada's logo in the header, the heading "Connect your company card", the sentence "Lumen Freight uses Astrada to connect your Vertex Industries company card", a black Get started button and Astrada's privacy line.

The start page a link opens. A personal link and a team link look the same here.

  1. Get started. The person presses Get started. A team link first asks the person to prove they're human.
  2. The card form. The page runs the SDK as an employee page (persona: "cardholder") for the link's subaccount, so it opens on the card form. The card form's heading is the page's only heading. Because a link cannot pass terms, the card form shows only the network consent box.
The card form on the hosted page under the Lumen Freight header: heading "Enter the card you use for work", the test card filled in, one consent box ticked, a blue Connect button.

The card form on a hosted link page, with a brand profile.

  1. "You're done". The page's "You're done" is its one ending: the SDK's success screen closes as it opens, because a link session never offers Connect another company card and the screen has nothing but Done.
Clip: the hosted link page with the Lumen Freight header. The person presses Get started, the card form opens, they type test card 4242 4242 4242 4242, a name, the security code and expiry, scroll down, tick the consent box and press Connect; the checklist runs and the page says You're done.

A link from start page to You're done, with a brand profile (15 s).

Your brand on the hosted page

The hosted page can show your platform's name, logo and accent color. These come from a brand profile that Astrada sets on your account. No API call sets it, and no field you send when you create a link changes the look.

The start page twice. Left, no brand profile: Astrada's logo and a black Get started button. Right, with a profile: the Lumen Freight logo and name over "Powered by Astrada", and a blue Get started button.

The same link without and with a brand profile.

What a brand profile holds

PartWhat it does on the pageRules
Display nameShown in the header beside the logo. Also used everywhere the page and the card form name your platform, in place of any platformName you send.Required. 1 to 60 characters: letters, digits, spaces and . , & ' ’ ( ) - _ + ! # @, with at least one letter or digit.
LogoShown in the header, left of the name. Drawn 36 px tall and at most 160 px wide.Optional. A PNG file, not SVG, JPEG or a link to an image. At most 512 x 512 pixels and 32 KB. Astrada removes metadata and animation from the file.
Accent colorFills the page's buttons (Get started, Start again) and the card form's Connect button. The text on them stays white.Optional. One hex color, such as #1765cc. White text on it must have a contrast ratio of at least 4.5:1, or Astrada can't set it.

The header always keeps "Powered by Astrada" under your name.

The name is written beside the logo, so send a logo without your name in it, such as a square mark. A logo that already holds the name shows it twice.

Four page headers: Astrada's logo with no brand profile; "Lumen Freight" alone over "Powered by Astrada"; a square logo beside the name; a logo that already holds the name, so "Lumen Freight" shows twice.

What the header shows for each kind of profile. The name is always written beside the logo.

Who sets it

Only Astrada sets a brand profile. Before setting one, Astrada checks it against the company name and domain in your contract. To set one or change it, ask your Astrada contact and send:

  • the display name,
  • the logo as a PNG file, if you want one,
  • the accent color as a hex value, if you want one.

A change replaces the whole profile, so send every part you want to keep. Astrada can also remove the profile.

One profile covers your whole account: every subaccount and every link, including team links made from Invite your team. You can't set a different brand per subaccount or per link.

Without a brand profile

The header shows Astrada's logo and the buttons are black. The page still names your platform in its sentences. The name comes from the link's platformName, or your account's name when the link has none. The link's organizationName names the employer in the start screen's sentence and in the browser tab ("Connect your company card · Vertex Industries").

You send on POST /enrollment-linksWithout a brand profileWith a brand profile
platformNameNames your platform in the page's sentences and on the card formIgnored on the page; the profile's display name is used
organizationNameNames the employer on the start screen and in the tabThe same

Where it shows

The header and the accent color stay the same from the start screen to the ending.

The card form twice, without and with a brand profile. The words are the same; with the profile the header shows the Lumen Freight logo and name and the Connect button is blue.

The card form without and with a brand profile.

The hosted page's ending under the Lumen Freight header: a green tick, "You're done", "Your card is connected to Lumen Freight. You can close this page."

The page's one ending.

  • The logo shows only in the page header. The card form itself shows no logo.
  • The card form names your platform in two places: "Lumen Freight never sees your full card number" and "To stop sharing, ask Lumen Freight to remove this card".
  • A link that no longer works when it is opened shows Astrada's header, even when your account has a brand profile. The page can't read your brand for a link that is expired, used up or revoked.
Two messages under Astrada's header, both headed "This link no longer works": "This link has expired. Ask your company for a new one." and "This link was already used. Ask your company for a new one."

What a person sees when a link has expired or was used up. Astrada's header shows even when your account has a brand profile.

What never changes

  • The words on the page, including the headings, the start screen's sentence and the messages. Only the names in them change.
  • The consent text on the card form. It is Astrada's and the card network's. A link has no terms of your own, so the card form shows only the network consent box.
  • "Powered by Astrada", the privacy line and its link to Astrada's Privacy Policy.
  • Fonts, the page background, and every color except the accent.
  • The language. The page follows the person's browser and is in English today.

How this differs from setStyle

On your own page, you style the SDK yourself: setStyle sets its colors and the logo option in open() puts your logo on the card (Visual Customization). The hosted page runs the SDK for you, so neither reaches it. There, the brand profile is the only way to change the look, and it changes only the header and the button color.

Your own SDK pageHosted page
Who sets the lookYou, in your page's codeAstrada, from your account's brand profile
ColorsEvery variable setStyle acceptsThe accent color, on the primary buttons only
LogoOn the card, from open()In the page header, beside your name
WordscompanyName, statusLabels, your termsFixed; only the platform and employer names change

Before you create links

  • POST /enrollment-links needs subaccounts:write, so call it from your backend with your API client, never from a browser token. POST /subaccounts/{subaccountId}/team-link takes the SDK token's card-subscriptions:write, or an API client's subaccounts:write.
  • Both calls answer 409 with CARD_ENROLLMENT_OFF when card enrollment is off on the subaccount (enrollmentPolicy.cardEnrollment is false), because the hosted page has nothing else to offer.
  • Both calls answer 429 with RATE_LIMITED once your account has created 2,000 links in a UTC day, team links included. POST /subaccounts/{subaccountId}/team-link also stops at 20 links a day for one subaccount.
  • POST /subaccounts/{subaccountId}/team-link makes a new link on every call. A new link does not revoke an older one, so a link an admin already shared keeps working when they press Invite your team again. Each link ends at its own expiry, when its session starts are used up, or when it is revoked.
  • The response's url is the only place the secret is returned. Store or send it then; later reads such as GET /enrollment-links/{linkId} do not show it. POST /enrollment-links/{linkId}/revoke ends a link.
  • A session lasts 60 minutes; GET /enrollment-links/{linkId} lists each session with the ids the page reported. The cardsubscription webhooks stay the source of truth for what was enrolled.

When a link can't be used: Hosted enrollment link errors.


Did this page help you?