0BitDeveloper Docs
0Bit public documentation

SDKs overview

Gate Node, browser, React, and Python integration surfaces.

The Gate repository contains these package names:

Runtime Package / import
Node server @0bit/gate
Browser @0bit/gate/browser
React @0bit/gate/react
Python 0bit-gate, imported from zerobit.gate

The Node and Python clients expose session creation/retrieval/cancellation, embed bootstrap, and webhook verification. Use the OpenAPI contract or generated HTTP samples for Gate operations not represented by an SDK resource.

Node server

import { GateClient } from '@0bit/gate';

const gate = new GateClient({
  apiKey: process.env.GATE_SECRET_KEY,
  baseUrl: 'https://gate-api-sandbox.0bit.app',
});

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

baseUrl must be an origin with no path, query, fragment, or credentials.

Browser

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

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

await ramp.mount('#gate');

The browser constructor rejects secret-key prefixes.

React

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

<RampCheckout
  environment="sandbox"
  publishableKey="pk_test_..."
  clientSecret={session.client_secret}
  onSuccess={result => console.log(result)}
/>

Python

from zerobit.gate import GateClient

gate = GateClient(api_key="sk_test_...", base_url="https://gate-api-sandbox.0bit.app")
session = gate.sessions.create({
    "amount": "100.00",
    "currency": "BRL",
    "return_url": "https://partner.example/gate/complete",
})

The canonical API contract is openapi/gate.yaml. Generated snippets cover all 37 callable operations without adding a version path.