0Bit Documentation

Check 0Gate eligibility

GET /capabilities/eligibility - Probe region, currency, and asset eligibility before starting a hosted flow.

0Gate is the primary public integration path for hosted payment, ramp, and swap experiences. Keep secret-key operations on your server and hand only browser-safe values to the widget.

Endpoint

FieldValue
MethodGET
Path/v1/capabilities/eligibility
AreaCapabilities
Operation idcheckEligibility
Auth boundarySecret key from your server.

Use it for

Answer "can a user in this region use the ramp — optionally for a given currency and asset?" before you create a session or lock a quote. Use it to decide whether to show the buy/sell entry point, a waitlist, or an unsupported-region notice.

This endpoint is read-only and never a money path. An unsupported or unresolved region returns eligible: false with a machine-readable unavailable_reason rather than an error, so you can branch client-side instead of catching exceptions.

Production rules

  • Keep secret keys on your server. This endpoint requires an sk_* key; a publishable pk_* key can only call embed-bootstrap.
  • Branch on eligible, then on unavailable_reason — do not parse a display string.
  • Treat eligible: false as a normal, expected outcome, not a failure to retry in a loop.
  • Inspect geo_source to know whether the decision was driven by your explicit country_code or the caller's IP region.
  • Treat examples and placeholder values as fake data only.

Request

This is a GET with no body. The currency and asset parameters are optional refinements.

ParameterInRequiredTypeUse it for
country_codequeryNostring (ISO 3166 alpha-2)The region to probe. Overrides the IP-derived country. When omitted, the region is resolved from the request's edge geo.
currencyqueryNostring (ISO 4217)Additionally check that this fiat is offered in the region.
assetqueryNostringAdditionally check that this crypto asset exists and is active.

How the region is resolved

An explicit country_code always wins. When it is absent, the region is resolved from the request's edge geo (cf-ipcountry). When neither yields a usable region, country_code comes back null with geo_source: "none" and unavailable_reason: "country_unresolved".

Response

Always 200. Returns a single eligibility object.

FieldTypeDescription
objectstringAlways eligibility.
country_codestring | nullResolved ISO 3166-1 alpha-2 region, or null when none could be resolved.
eligiblebooleantrue only when the region is supported and every requested refinement passed. The single deciding failure is in unavailable_reason.
supportedbooleanWhether the resolved region is an on/off-ramp corridor.
default_currencystring | nullThe region's default fiat (ISO 4217), or null.
currency_supportedboolean | nullWhether the requested currency is offered in this region. null when no currency was supplied.
asset_supportedboolean | nullWhether the requested asset exists and is active. null when no asset was supplied.
geo_sourcestringHow country_code was resolved: explicit (query param), ip (edge header), or none (unresolved).
unavailable_reasonstring | nullMachine reason when eligible is false; null when eligible. See below.

unavailable_reason values

The first failing gate wins, in precedence order region → currency → asset.

ValueMeaning
country_unresolvedNo region could be resolved (no country_code and no usable IP).
country_not_supportedThe resolved region is not an on/off-ramp corridor.
currency_not_supportedThe requested currency is not offered in this region.
asset_not_supportedThe requested asset does not exist or is not active.
nullEligible — no failing gate.

Examples

curl 'https://gate-api.0bit.app/v1/capabilities/eligibility?country_code=GB&currency=GBP&asset=USDC' \
  -H "Authorization: Bearer sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
{
  "object": "eligibility",
  "country_code": "GB",
  "eligible": true,
  "supported": true,
  "default_currency": "GBP",
  "currency_supported": true,
  "asset_supported": true,
  "geo_source": "explicit",
  "unavailable_reason": null
}
{
  "object": "eligibility",
  "country_code": "ZZ",
  "eligible": false,
  "supported": false,
  "default_currency": null,
  "currency_supported": null,
  "asset_supported": null,
  "geo_source": "explicit",
  "unavailable_reason": "country_not_supported"
}
{
  "object": "eligibility",
  "country_code": null,
  "eligible": false,
  "supported": false,
  "default_currency": null,
  "currency_supported": null,
  "asset_supported": null,
  "geo_source": "none",
  "unavailable_reason": "country_unresolved"
}

Errors

This endpoint does not return a 4xx for an unsupported or unresolved region — it answers with eligible: false. The unified envelope (with an X-Request-Id response header) applies only to the cases below. Branch on code/type/statusCode, not on the free-form message.

{
  "type": "unauthorized",
  "code": "unauthorized",
  "message": "Example auth error using fake data.",
  "request_id": "req_test_000000000123",
  "doc_url": null,
  "statusCode": 401
}
StatustypeWhen it happens
401unauthorizedMissing or invalid secret key.
429rate_limitedRequest throttled. Back off and retry.
5xxserver_errorTransient server or upstream failure. Retry with backoff.

Ineligible is not an error

An unsupported or unresolved region returns 200 with eligible: false and a machine unavailable_reason — never a 4xx/5xx. Reserve error handling for the statuses above.

Public boundary

This reference covers partner-scoped capability discovery. Internal operations, administrative routes, settlement venues and providers, and unsupported availability claims are outside the public API contract.

On this page