0Bit Documentation

Theme and co-brand the widget

Use the supported 0Gate theme and co-branding surfaces without styling inside the hosted iframe or exposing branding internals.

0Gate gives you two public presentation layers: a runtime light or dark theme for the hosted iframe, and partner co-branding tokens where your account is enabled for them. Everything outside the iframe is your product UI; everything inside the hosted checkout remains controlled by 0Gate.

Do not style inside the iframe

Do not inject CSS, scrape DOM nodes, depend on internal class names, or document private widget internals. Use the SDK theme and approved co-branding settings only.

Presentation layers

LayerControlled byWhat you can do
Page shellYour appLayout, container sizing, instructions, loading state, support links, and status pages.
0Gate iframe themeSDK configSet theme to light or dark; update it at runtime in browser embeds.
Co-branding tokens0Gate account settings/APIConfigure logo, brand name, and approved colors where enabled.
Hosted checkout internals0GateKYC, payment, quote, compliance, error, and terminal screens.

Set the iframe theme

Browser embed:

import { GateRamp } from '@0bit/gate/browser';

const ramp = new GateRamp({
  publishableKey: import.meta.env.VITE_GATE_PUBLISHABLE_KEY,
  clientSecret,
  theme: 'light',
});

await ramp.mount('#gate-checkout');
ramp.setTheme('dark');

React:

import { RampCheckout } from '@0bit/gate/react';

<RampCheckout
  publishableKey={import.meta.env.VITE_GATE_PUBLISHABLE_KEY}
  clientSecret={clientSecret}
  theme={mode}
/>;

Hosted redirect:

GateRamp.redirectToCheckout({
  publishableKey,
  clientSecret,
  theme: 'dark',
});

Co-branding

Co-branding is account-level configuration. Use it for approved brand tokens, not for arbitrary CSS.

TokenPublic use
brand_nameDisplay name shown in the hosted experience where supported.
logo_urlAbsolute HTTPS logo URL.
primary_colorMain approved brand color.
secondary_colorSecondary approved brand color.
accent_colorAccent approved brand color.

Keep exact schema in API reference

The co-branding endpoints and validation rules are API-reference content. This guide should explain the product boundary and when to use branding, not duplicate every request and response field.

Page shell pattern

Keep your page shell simple and product-owned. The shell can explain the action, show a loading state, and hold the iframe. It should not pretend to be the payment, compliance, or settlement engine.

export function GateCheckoutPanel({ clientSecret }: { clientSecret: string }) {
  return (
    <section className="checkout-panel">
      <header>
        <h1>Complete your checkout</h1>
        <p>0Gate will guide you through the secure hosted flow.</p>
      </header>
      <RampCheckout
        publishableKey={import.meta.env.VITE_GATE_PUBLISHABLE_KEY}
        clientSecret={clientSecret}
        theme="light"
        onSuccess={() => setView('processing')}
      />
    </section>
  );
}

Accessibility and UX checks

CheckGuidance
ContrastChoose page-shell colors that remain readable around both iframe themes.
HeightGive the widget enough vertical space to avoid cramped mobile steps.
LoadingShow a neutral loading state before onReady.
Error copyKeep customer-facing copy generic and support-oriented.
Status pagesMatch your brand, but read terminal state from your server.

On this page