Skip to main content

Branding

The colors and font of the hosted transaction page can be configured to match your brand. Branding can be set on two levels:

  • Account branding applies to transactions of all clients in the account. Contact your account manager to enable this for a client.
  • Client branding applies to transactions created with the client.

Client branding takes precedence over account branding. If the client branding is deleted, the account branding is used, or the default branding if no account branding is set.

Set branding​

Setting branding replaces the existing branding. Properties that are omitted are cleared.

Request​

Request
POST https://api.cm.com/identity-hub/v1/branding/account (account branding)
POST https://api.cm.com/identity-hub/v1/branding (client branding)
Request headers
Content-Type: application/json
Authorization: Bearer GENERATED_TOKEN_HERE
Request body
{
"primaryColor": "#0f62fe",
"primaryButtonTextColor": "#ffffff",
"backgroundColor": "#f4f4f4",
"textColor": "#161616",
"fontFamily": "Open Sans",
"fontWeights": "400;700"
}

Parameters​

PropertyTypeRequiredDescription
primaryColorstringNoThe color of buttons, links and highlights, as a 6-digit hex color such as #0f62fe. Lighter and darker shades are derived from it.
primaryButtonTextColorstringNoThe text color of primary buttons, as a 6-digit hex color.
backgroundColorstringNoThe page background color, as a 6-digit hex color.
textColorstringNoThe text color, as a 6-digit hex color.
fontFamilystringWhen fontWeights is setThe name of a Google Fonts family. Maximum length is 100 characters.
fontWeightsstringNoThe font weights to load, separated by ; in ascending order (e.g. 400;700), or a range for variable fonts (e.g. 100..900). Only the regular (400) weight is loaded when omitted.

Get branding​

Request
GET https://api.cm.com/identity-hub/v1/branding/account (account branding)
GET https://api.cm.com/identity-hub/v1/branding (client branding)
Request headers
Authorization: Bearer GENERATED_TOKEN_HERE
Response body
{
"primaryColor": "#2f7d4f",
"primaryButtonTextColor": "#ffffff",
"backgroundColor": "#f4f4f4",
"textColor": "#161616",
"fontFamily": "Open Sans",
"fontWeights": "400;600"
}

All properties are null when no branding has been set.

Delete branding​

Request
DELETE https://api.cm.com/identity-hub/v1/branding/account (account branding)
DELETE https://api.cm.com/identity-hub/v1/branding (client branding)
Request headers
Authorization: Bearer GENERATED_TOKEN_HERE

A 204 status code is returned, also when no branding has been set.