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
| Field | Value |
|---|---|
| Method | GET |
| Path | /v1/capabilities/eligibility |
| Area | Capabilities |
| Operation id | checkEligibility |
| Auth boundary | Secret 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 publishablepk_*key can only call embed-bootstrap. - Branch on
eligible, then onunavailable_reason— do not parse a display string. - Treat
eligible: falseas a normal, expected outcome, not a failure to retry in a loop. - Inspect
geo_sourceto know whether the decision was driven by your explicitcountry_codeor 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.
| Parameter | In | Required | Type | Use it for |
|---|---|---|---|---|
country_code | query | No | string (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. |
currency | query | No | string (ISO 4217) | Additionally check that this fiat is offered in the region. |
asset | query | No | string | Additionally 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.
| Field | Type | Description |
|---|---|---|
object | string | Always eligibility. |
country_code | string | null | Resolved ISO 3166-1 alpha-2 region, or null when none could be resolved. |
eligible | boolean | true only when the region is supported and every requested refinement passed. The single deciding failure is in unavailable_reason. |
supported | boolean | Whether the resolved region is an on/off-ramp corridor. |
default_currency | string | null | The region's default fiat (ISO 4217), or null. |
currency_supported | boolean | null | Whether the requested currency is offered in this region. null when no currency was supplied. |
asset_supported | boolean | null | Whether the requested asset exists and is active. null when no asset was supplied. |
geo_source | string | How country_code was resolved: explicit (query param), ip (edge header), or none (unresolved). |
unavailable_reason | string | null | Machine reason when eligible is false; null when eligible. See below. |
unavailable_reason values
The first failing gate wins, in precedence order region → currency → asset.
| Value | Meaning |
|---|---|
country_unresolved | No region could be resolved (no country_code and no usable IP). |
country_not_supported | The resolved region is not an on/off-ramp corridor. |
currency_not_supported | The requested currency is not offered in this region. |
asset_not_supported | The requested asset does not exist or is not active. |
null | Eligible — no failing gate. |
Examples
curl 'https://gate-api.0bit.app/v1/capabilities/eligibility?country_code=GB¤cy=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
}| Status | type | When it happens |
|---|---|---|
401 | unauthorized | Missing or invalid secret key. |
429 | rate_limited | Request throttled. Back off and retry. |
5xx | server_error | Transient 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.
Related pages
List supported countries
Read the full country corridor catalog.
List supported currencies
Read the supported fiat currencies for a region.
List supported assets
Read the crypto asset capability catalog.
Errors
Handle the unified error envelope, request ids, and retries.
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.