Skip to main content
The widget’s look is driven by CSS custom properties (tokens). A theme is a set of values for those tokens, stored on your account as a style. Your account can hold several styles. One of them is the default, and you can pick a different one for each session. The widget applies the style at runtime, with no rebuild and no per-partner deploy.

How it works

Send your Ripio contact the values you want to change, or manage your styles yourself. Anything you leave out keeps its default. A minimal theme is small:
The widget receives the theme when it starts. It writes the tokens as custom properties on :root, and they inherit into its Shadow DOM.
Styles live on your account, and your server picks one per session with the style field of POST /auth. There’s no query parameter for it, so an end user can’t switch it from the browser. You can also override tokens yourself at the document level; see Overriding tokens from your page.

Several styles on one account

Use several styles when one account opens the widget from more than one place that needs its own look. For example, a web home banking and a mobile app that each carry their own brand. Every style shares the same account: the same users, balances, limits, currency and webhooks. Only the look changes. Each style has a slug: 1 to 50 lowercase letters, digits or hyphens, starting with a letter or digit. One style can be the default.
  • Picking a style. Send its slug as style when you request the session code:
  • No style. The session uses your default style. If your account has no style at all, the widget uses Ripio’s default theme.
  • Unknown slug. POST /auth answers 400 with code 20014 and starts no session, so a typo shows up during your integration instead of in front of your users.
  • Style deleted mid-session. If you delete a style while sessions that picked it are still open, those sessions switch to your default style. They don’t end.

Managing your styles through the API

Your server can create, update and delete your styles itself, server-to-server. These endpoints use a partner token instead of a session. 1. Request a partner token with your credentials. Writing needs the styles:write scope; a token without it can only read. Endpoint: https://b2b-crypto-widget-api.sandbox.ripio.com/api/v1/partner/token Method: POST · Content-Type: application/json
Send it as Authorization: Bearer <partner-token> on the calls below. It lasts 15 minutes. Like client_secret, it must never reach the browser. 2. Call the styles endpoints: The PUT body:
Every endpoint answers a style, or a list of them, in this shape:
  • Idempotent. Repeating a PUT or a DELETE has the same effect, so you can retry either one safely.
  • Validated. A token outside the supported list, or a value outside its accepted kind, answers 400 with code 20000 and one message per invalid token. Nothing is saved.
  • Default protected. Your default style can’t be deleted or switched off directly (400, code 20015). To change it, make another style the default with PUT … {"is_default": true}.
  • Limited. An account can hold up to 20 styles (400, code 20016 for a new one past the limit).
  • Scope required. A write with a token that lacks styles:write answers 403, code 40012.
  • Takes effect on new sessions. A change applies the next time the widget starts with a new session code. Open sessions keep the style they started with until they renew.

Supported tokens

These are the tokens your account theme can set. Any other name is rejected when the theme is loaded, so a theme built on these keeps working as the widget’s internals change. Brand Setting --ripio-color-primary alone is enough for a coherent theme: the hover and the tinted backgrounds are derived from it. Set them explicitly only when your brand guide defines them. Surfaces and text Status and neutrals Shapes and spacing Typography

Accepted values

Each token accepts one kind of value. Anything else is rejected, including CSS functions, url(), @import, comments and anything that isn’t a plain value.

Fonts

The widget ships and serves its own fonts, so you don’t load anything and your page’s CSP doesn’t need a third-party font host. --ripio-font-family accepts one of: The widget only downloads the family it’s using. If your brand needs a typeface that isn’t on the list, talk to your Ripio contact: fonts are added to the widget, never loaded from your side.

Overriding tokens from your page

You can also set tokens yourself with CSS custom properties on your page’s :root. The order of precedence is:
  1. The widget’s defaults.
  2. Your page’s :root, which overrides the defaults.
  3. The session’s style, which overrides both.
From your page you can reach the design system’s other tokens as well: per-component tokens such as --ripio-btn-*, --ripio-input-*, --ripio-card-*, --ripio-chip-*, --ripio-toast-* and --ripio-overlay-*, and the radius, shadow and type scales. They belong to the design system and may be renamed as it evolves, so prefer the supported tokens where they’re enough.

What not to override

The design-system primitives (--violet-*, --gray-*, --error-*, --warning-*, --success-*) and the transaction status-chip tokens --st-* are internal. They’re the raw palette the semantic tokens are built from, they aren’t part of the contract, and they can change without notice. Override the semantic layer instead.
Theming only repaints the widget. It can’t reposition, resize or hide anything inside it. The widget’s own classes, such as .btn-primary, live inside its Shadow DOM and your page’s selectors can’t reach them: use the tokens.

Before and after

The widget with Ripio's default theme
The same widget with a partner's brand theme applied