0BitDeveloper Docs
0Bit public documentation

Flow-locked embeds

Mount the Gate iframe directly in on-ramp or off-ramp mode.

Flow-locked embeds use the same Gate iframe while hiding the buy and sell selector. Prefer setting flow on the server-created GateSession so the browser cannot change the commercial intent.

const session = await gate.sessions.create({
  amount: '100.00',
  currency: 'BRL',
  flow: 'on_ramp',
  return_url: 'https://partner.example/gate/complete',
}, { idempotencyKey });

The browser package also provides convenience factories:

import {
  createGateOnRamp,
  createGateOffRamp,
} from '@0bit/gate/browser';

const ramp = createGateOnRamp({
  environment: 'sandbox',
  publishableKey: 'pk_test_...',
  clientSecret: session.client_secret,
});

await ramp.mount('#gate');

Factory names map to on_ramp and off_ramp. They do not create a separate API or custom user interface: KYC, payment, payout, wallet, and compliance screens remain inside the Gate widget.