Configuring an inline Trustbadge variant

Starting now, you can choose from new Trustbadge variants: The inline variants give you even more flexibility in how the Trustbadge appears in your shop. These new formats integrate seamlessly into your existing design and the user experience you have created. They can be placed anywhere on your shop’s page – from your header to your footer and everywhere in between.

You can fully customise the new Horizontal and Card variants – colours, sizes, content – everything is adjustable. They are mobile-optimised and offer a maximised view that displays up to 20 reviews and the Buyer Protection details directly in your shop – no redirection needed.

Variants_EN.png

How to retrieve your Channel ID

Each of your sales channels registered with Trusted Shops has its own Channel ID. You need this ID to configure and customize the inline variants of the Trustbadge.

  1. Log in to the eTrusted Control Centre.
  2. In the navigation, click on Home (house icon) and select the desired sales channel.
    01_EN.png
  3. Look at the URL in your browser’s address bar. It will follow this pattern: https://app.etrusted.com/home?channels={Channel-ID}
Example:
02_EN.png
https://app.etrusted.com/home?channels=chl-f8c8c9c3-93ff-48dd-8219-XXXXX
Here chl-f8c8c9c3-93ff-48dd-8219-XXXXX is the Channel ID. The Channel ID always starts with the prefix chl-.
  1. Copy the Channel ID from the URL and store it for later use.

Configuring your desired inline Trustbadge variant

After successfully authenticated: Authentication

PUT https://trustbadge-config-api.trustedshops.com/config/

Use this endpoint to configure your inline Trustbadge variant for a specific channel. By sending a PUT request with the desired Trustbadge settings (e.g. type, theme, display options) in the request payload, you define how the Trustbadge should appear on your website.

The API responds with a unique Integration ID. This ID must be inserted into the provided code snippet, which you then embed into your website’s HTML to render the Trustbadge according to your configuration.

Sample request payload in JSON

{
  "channelId": "YOUR_CHANNEL_ID",
  "config": {
    "version": "1.0",
    "widgets": [
      {
        "type": "inline-card",
        "displayRating": true,
        "showReviewCount": true,
        "showGradeDescription": false,
        "starDisplay": "five",
        "fillColor": "#FFD700",
        "dropShadow": false,
        "theme": "light",
        "width": "300px",
        "starColors": {
          "lightActiveFill": "#000000",
          "lightBackgroundFill": "#CCCCCC",
          "darkActiveFill": "#FFFF00",
          "darkBackgroundFill": "#EEEEEE"
        }
      }
    ]
  }
}

Body Params

Name Type Required Description
channelId string yes Unique channel identifier for which the Trustbadge configuration is submitted. See documentation on how to retrieve your Channel ID.
config object yes Wrapper object containing the configuration details.
version string yes Version of the configuration schema.
widgets array yes List of Trustbadge configurations.
type string yes Trustbadge variant (inline-card or inline-horizontal).
displayRating boolean yes Whether to show the star ratings.
showReviewCount boolean yes Whether to show the number of collected reviews.
showGradeDescription boolean yes Whether to show a textual grade description (e.g. “Excellent”).
starDisplay string yes In which format should the star ratings be displayed: one (single star) or five (five stars)?
fillColor string no Hex color code for the background colour. In light mode, If not defined, the default is light blue #F1F5FE.
dropShadow boolean yes Whether to apply a shadow to the Trustbadge.
theme string yes Visual theme of the Trustbadge (light, dark, or system).
width string no Only for type inline-card. Defines the width of the Trustbadge (e.g. “300px”).
starColors object no Object defining the star colours for light and dark mode.
lightActiveFill string no Hex color code for the colour of the filled star ratings in light theme (e.g. "#FFD700").
lightBackgroundFill string no Hex color code for the colour of the unfilled star ratings in light theme (e.g. "#E0E0E0").
darkActiveFill string no Hex color code for the colour of the filled star ratings in dark theme (e.g. "#FFA500").
darkBackgroundFill string no Hex color code for the colour of the unfilled star ratings in dark theme (e.g. "#404040").

Headers

Header Type Required Description
Authorization string yes An authorization header containing meta information, see OAuth2.

Sample response payload in JSON

{
  "success": true,
  "data": {
    "id": 24,
    "createdAt": "2025-08-28 13:17:19.772",
    "updatedAt": "2025-08-28 13:17:19.772",
    "shopId": 15547,
    "config": {
      "version": "1.0",
      "widgets": [
        {
          "type": "inline-horizontal",
          "theme": "light",
          "fillColor": "#FFD700",
          "dropShadow": false,
          "starDisplay": "five",
          "displayRating": true,
          "showReviewCount": false,
          "showGradeDescription": true
        }
      ]
    },
    "integrationId": "int-3efc5feb-1e13-4783-xxx-xxxxxx"
  }
}

With the help of the API response, you can double-check the configuration you just sent.

In addition, you will find your Integration ID within the "integrationId" parameter.

Example:
Within the sample response payload int-3efc5feb-1e13-4783-xxx-xxxxxx is the Integration ID. The Integration ID always starts with the prefix int-.

Copy the Integration ID and store it for later use.

Embedding the Trustbadge with your Integration ID

Once you have customized your Trustbadge configuration and received your Integration ID from the API response, you can embed the Trustbadge into your website.

Integration code snippet for type inline-card:

<minimized-trustbadge-inline-card></minimized-trustbadge-inline-card>

<script
  type="module"
  src="https://widgets.trustedshops.com/integration/integration.js"
  data-integration-id="YOUR_INTEGRATION_ID">
</script>

Integration code snippet for type inline-horizontal:

<minimized-trustbadge-inline-horizontal></minimized-trustbadge-inline-horizontal>

<script
  type="module"
  src="https://widgets.trustedshops.com/integration/integration.js"
  data-integration-id="YOUR_INTEGRATION_ID">
</script>
  1. Choose the correct code snippet according to your widget type.
  2. Replace YOUR_INTEGRATION_ID in the attribute data-integration-id with the Integration ID you received from the API.
  3. Copy the complete, adjusted code snippet.
  4. Paste the <script> tag into the <head> or at the end of the <body> of your HTML document.
  5. Place the Trustbadge element (<minimized-trustbadge-inline-card> or <minimized-trustbadge-inline-horizontal>) exactly at the position in your website’s HTML where you want the Trustbadge to appear.

The Trustbadge is now embedded and will render according to your configuration.

Defining data transfer for the Trustcard

An important functionality of the Trustbadge is the Trustcard. The Trustcard opens on your website after the checkout. Using the Trustcard, your customers can give their consent to receiving a Review Invite and/or protect their order with the Buyer Protection.

In order for the Trustcard to open at the right time, the Trustbadge must be able to recognise the order confirmation page. For this, you have to integrate a DIV element into the template of the order confirmation page.

Here is how to integrate the DIV element: Defining data transfer for the Trustcard

Updating an existing inline Trustbadge configuration

To update an already embedded Trustbadge, send another PUT request to the API – this time including the Integration ID in the endpoint URL:

PUT https://trustbadge-config-api.trustedshops.com/config/{Integration-ID}

Request

  • Use the same request structure as when creating the initial configuration.
  • Adjust only the parameters you want to change (e.g. theme, fillColor, width).
  • Important: the update request overwrites the previous settings. If you have a two widgets setup, you should have the two widget types in the request.

Response

The API responds with the updated configuration object and the same Integration ID.

Important

  • The Integration ID does not change when updating a configuration.
  • The Trustbadge on your website will automatically render with the new configuration, but it may take up to one minute until the changes become visible.
  • You do not need to change the integration code in your website.

Adding a second widget type to your channel

To add a second widget type to the same channel, send another PUT request to the API – this time including the Integration ID in the endpoint URL. In the body you need the description of the first widget and add the widget description of the second one.

PUT https://trustbadge-config-api.trustedshops.com/config/{Integration-ID}

{
  "channelId": "YOUR_CHANNEL_ID",
  "config": {
    "version": "1.0",
    "widgets": [
      {
        "type": "inline-card",
        "displayRating": true,
        "showReviewCount": true,
        "showGradeDescription": false,
        "starDisplay": "five",
        "fillColor": "#FFD700",
        "dropShadow": false,
        "theme": "light",
        "width": "300px",
        "starColors": {
          "lightActiveFill": "#000000",
          "lightBackgroundFill": "#CCCCCC",
          "darkActiveFill": "#FFFF00",
          "darkBackgroundFill": "#EEEEEE"
        }
      },
      {
        "type": "inline-horizontal",
        "displayRating": true,
        "showReviewCount": true,
        "showGradeDescription": false,
        "starDisplay": "five",
        "fillColor": "#FFD700",
        "dropShadow": false,
        "theme": "light",
        "starColors": {
          "lightActiveFill": "#000000",
          "lightBackgroundFill": "#CCCCCC",
          "darkActiveFill": "#FFFF00",
          "darkBackgroundFill": "#EEEEEE"
        }
      }
    ]
  }
}

Request

  • Add the parameters for the second widget of a different type.
  • The update request overwrites the previous settings. If you have two widgets setup, you should have the two widget types in the request.

Response

The API responds with the updated configuration object and the same Integration ID.

Important

  • The Integration ID does not change when adding a second widget type.
  • Insert the additional Trustbadge element (<minimized-trustbadge-inline-card> or <minimized-trustbadge-inline-horizontal>) at the desired position.
  • Do not duplicate or modify the <script> tag – it must only exist once.
  • You can create only one Trustbadge configuration per type and channel / integration ID. This means: one inline-card and one inline-horizontal configuration per channel. However, each Trustbadge widget can be embedded multiple times at different positions on your website. 

0 out of 0 found this helpful