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::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
stylewhen 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 /authanswers400with code20014and 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 thestyles: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
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:
- Idempotent. Repeating a
PUTor aDELETEhas 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
400with code20000and one message per invalid token. Nothing is saved. - Default protected. Your default style can’t be deleted or switched off directly (
400, code20015). To change it, make another style the default withPUT … {"is_default": true}. - Limited. An account can hold up to 20 styles (
400, code20016for a new one past the limit). - Scope required. A write with a token that lacks
styles:writeanswers403, code40012. - 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:
- The widget’s defaults.
- Your page’s
:root, which overrides the defaults. - The session’s style, which overrides both.
--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
Before and after

