0Bit Documentation

Check supported countries

Use documented capability checks to decide which countries can see a supported product flow.

Country support is the first discovery check for hosted ramp flows. The audited country capability endpoint is part of 0Gate, so the implementation example below is 0Gate-shaped. Other product surfaces should use only their documented capability objects and approval status.

Country support is not final eligibility

A supported country does not prove a specific currency, asset, payment method, payout method, or user is eligible. Combine country support with the later capability checks before creating a 0Gate session.

Product scope

SurfaceWhat to check
0GateCountry support before creating a hosted payment, on-ramp, off-ramp, or swap session.
0BasePayment method, settlement currency, and network capability objects where the product is approved.
0PoolsEntitlement and liquidity availability, not a public country matrix.
0LinkReview-only routing boundaries; do not publish country availability claims.

Decision flow

Implementation shape

  1. Resolve the country from your own account profile, billing profile, or an explicit user selection where you have one.
  2. Call the 0Gate country capability check from your server with secret-key credentials.
  3. Store the decision with your checkout attempt or quote preview record.
  4. Disable unavailable flows before the browser receives a hosted session secret.
  5. Re-check when the user changes region, currency, asset, or flow.
type CountryAvailability = {
  countryCode: string;
  supported: boolean;
  checkedAt: string;
};

async function canShowGateFlow(input: { accountId: string; countryCode: string }) {
  const country = await gateCapabilities.country(input.countryCode);

  await availabilityChecks.record({
    accountId: input.accountId,
    kind: 'country',
    value: input.countryCode,
    supported: country.supported,
  });

  return {
    canContinue: country.supported,
    next: country.supported ? 'check_currency_asset_method' : 'show_unavailable',
  };
}

Public-safe UI states

StateShowAvoid
SupportedContinue to currency, asset, method, and eligibility checks."0Gate is legally available for every user in this country."
UnsupportedA neutral unavailable message and a support path.Provider names, compliance rules, or internal region reasoning.
UnknownAsk the user to choose a country or fall back to manual review.Guessing from browser locale alone.
ChangedClear downstream selections and re-run checks.Reusing an old method or asset result after country changes.

Guardrails

  • Keep supported-country copy dynamic. Do not hardcode permanent availability claims.
  • Do not infer customer residency from IP alone when your product already owns a stronger profile.
  • Do not create a hosted session for a flow you already know is unavailable.
  • Do not log full customer identity data inside capability-check records.

On this page