Flitt ID API reference¶
Flitt ID lets you identify a customer through their bank (TBC or Bank of Georgia): you get a token, create a session, send the customer to the widget link, and receive the verified person's data by callback and by an S2S request.
| Service | Address |
|---|---|
| Flitt ID API | https://id.flitt.com |
| Token service | https://portal.flitt.com/authorizer |
You also need application_id and private_key from Flitt. See Get started.
Identification flow¶
sequenceDiagram
participant S as Your server
participant T as Token service
participant F as Flitt ID
participant C as Customer
S->>T: 1. Request a company token
T->>S: 2. token (valid about an hour)
S->>F: 3. POST /flitt-id/verifications
F->>S: 4. widget_id, verification_url
S->>C: 5. Open verification_url (redirect or iframe)
C->>F: 6. Consent, bank, identity confirmed at the bank
F->>S: 7. Callback to callback_url
C->>S: 8. Customer returns to return_url
S->>F: 9. GET /flitt-id/verifications/{widget_id}/result
F->>S: 10. Status and the person's data
- Your server requests a company token from the token service.
- The token service returns the token (valid about an hour).
- Your server creates a session:
POST https://id.flitt.com/flitt-id/verifications. - Flitt ID returns
widget_idand a single-useverification_url. - You open
verification_urlfor the customer (redirect or iframe). - The customer accepts the consent, picks a bank and confirms their identity at the bank.
- Flitt ID sends the outcome callback to your
callback_url. - The customer returns to your
return_url. - Your server requests the result:
GET https://id.flitt.com/flitt-id/verifications/{widget_id}/result. - Flitt ID returns the status and the person's data.
Steps 7 and 8 are independent and may come in any order.
Pay attention
Decide on the callback or the S2S result, never on the return_url parameters:
the customer can come back before the callback arrives.
Authorization: company token¶
Every request to the Flitt ID API carries the header Authorization: Token <token>.
The token service issues the token against a signature made with your private_key.
A token lives about an hour (expires_in, seconds) and identifies your company:
sessions and results are visible only to the company the token was issued to.
Token request¶
POST https://portal.flitt.com/authorizer/token/application/get, Content-Type: application/json
| Field | Value |
|---|---|
application_id |
Your company ID from Flitt (digits) |
date |
Current time: 2026-11-19 14:03:12.123456, RFC 3339 or unix seconds |
signature |
hex(sha512(private_key + "|" + application_id + "|" + date)) |
{
"request_id": "…",
"token": "…",
"expires_in": 3602
}
All three fields are always present and never null.
{
"error_code": 403,
"error_message": "Incorrect signature",
"request_id": "…"
}
Examples with built-in libraries only (Python 3, PHP with cURL, .NET 6+, Node.js 18+):
import hashlib
import json
import urllib.request
from datetime import datetime, timezone
TOKEN_URL = "https://portal.flitt.com/authorizer"
APPLICATION_ID = "1234"
PRIVATE_KEY = "<private_key>"
def get_flitt_id_token() -> str:
date = datetime.now(timezone.utc).isoformat()
signature = hashlib.sha512(
f"{PRIVATE_KEY}|{APPLICATION_ID}|{date}".encode("utf-8")
).hexdigest()
body = json.dumps({
"application_id": APPLICATION_ID,
"date": date,
"signature": signature,
}).encode("utf-8")
request = urllib.request.Request(
f"{TOKEN_URL}/token/application/get",
data=body,
headers={"Content-Type": "application/json"},
method="POST",
)
with urllib.request.urlopen(request, timeout=20) as response:
return json.load(response)["token"]
<?php
const TOKEN_URL = 'https://portal.flitt.com/authorizer';
const APPLICATION_ID = '1234';
const PRIVATE_KEY = '<private_key>';
function getFlittIdToken(): string
{
$date = gmdate(DATE_ATOM);
$signature = hash('sha512', PRIVATE_KEY . '|' . APPLICATION_ID . '|' . $date);
$ch = curl_init(TOKEN_URL . '/token/application/get');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'application_id' => APPLICATION_ID,
'date' => $date,
'signature' => $signature,
]),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 20,
]);
$response = json_decode(curl_exec($ch), true);
return $response['token'];
}
using System.Globalization;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
static class FlittId
{
const string TokenUrl = "https://portal.flitt.com/authorizer";
const string ApplicationId = "1234";
const string PrivateKey = "<private_key>";
static readonly HttpClient Http =
new() { Timeout = TimeSpan.FromSeconds(20) };
public static async Task<string> GetTokenAsync()
{
var date = DateTimeOffset.UtcNow.ToString(
"yyyy-MM-dd'T'HH:mm:sszzz", CultureInfo.InvariantCulture);
var hash = SHA512.HashData(
Encoding.UTF8.GetBytes($"{PrivateKey}|{ApplicationId}|{date}"));
var signature = Convert.ToHexString(hash).ToLowerInvariant();
var body = JsonSerializer.Serialize(
new { application_id = ApplicationId, date, signature });
var response = await Http.PostAsync($"{TokenUrl}/token/application/get",
new StringContent(body, Encoding.UTF8, "application/json"));
response.EnsureSuccessStatusCode();
var text = await response.Content.ReadAsStringAsync();
using var json = JsonDocument.Parse(text);
return json.RootElement.GetProperty("token").GetString()!;
}
}
const crypto = require('crypto');
const TOKEN_URL = 'https://portal.flitt.com/authorizer';
const APPLICATION_ID = '1234';
const PRIVATE_KEY = '<private_key>';
async function getFlittIdToken() {
const date = new Date().toISOString().slice(0, 19) + '+00:00';
const signature = crypto
.createHash('sha512')
.update(`${PRIVATE_KEY}|${APPLICATION_ID}|${date}`)
.digest('hex');
const response = await fetch(`${TOKEN_URL}/token/application/get`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ application_id: APPLICATION_ID, date, signature }),
signal: AbortSignal.timeout(20000),
});
if (!response.ok) throw new Error(`Token request failed: ${response.status}`);
return (await response.json()).token;
}
Rules:
- Cache the token and reuse it until it expires. On a
401from Flitt ID, request a new token and retry the call once. - Build a new
dateandsignaturefor every token request. A signature is accepted only once, and only whendateis within 5 minutes of the server clock (403 Signature already used/Incorrect date). private_keynever leaves your server and never reaches the browser: request tokens server-side only.
Create an identification session¶
POST https://id.flitt.com/flitt-id/verifications creates a session and returns a single-use widget link
(verification_url) that you open for the customer. Every parameter is optional; an empty body {} is valid.
Headers¶
| Header | Required | Description |
|---|---|---|
Authorization |
yes | Token <token> from Authorization |
Content-Type |
yes | application/json |
Idempotency-Key |
no | Your request key. A retry with the same key and body within 24 hours returns the same session instead of creating a new one |
X-Trace-Id |
no | Your identifier for log searches. Without it Flitt ID creates one and returns it in the same header |
Body parameters¶
Every URL must be https, at most 2048 characters, on your registered domains;
otherwise the response is 400 <parameter>_not_allowed.
| Parameter | Type | Default | Description |
|---|---|---|---|
callback_url |
URL | — | Where to send the outcome callback. Without it there are no callbacks; the outcome is available via the S2S request only |
return_url |
URL | — | Where to return the customer when they finish. widget_id, status and trace_id are appended to it. Without it the customer stays on the widget result screen |
back_url |
URL | — | Target of the widget's Back button: leaving without completing identification |
wait_final_status |
bool | true |
true: after the bank the customer waits in the widget for the outcome and goes to return_url with the final status.false: the customer goes to return_url right away with status provider_returned; the outcome arrives by callback |
provider |
tbc | bog |
— | Send the customer straight to this bank, skipping selection. It must be enabled for your company, otherwise 400 provider_not_enabled. The customer cannot switch bank |
allow_provider_reselection |
bool | false |
true: a customer who closes the bank window goes back to bank selection.false: the session ends failed with error_code = provider_window_closed |
ciba_flow_enabled |
bool | false |
Offer confirmation in the bank app (CIBA) for the banks enabled for your company |
company_name |
string, up to 200 | your company name | Name shown in the widget consent. Control characters are removed and whitespace is collapsed |
language |
en | ka |
en |
Widget language |
hide_language_switcher |
bool | false |
Hide the language switcher |
dark_mode |
bool | false |
Dark widget theme |
open_in_iframe |
bool | false |
The widget opens in an iframe on your site (the site must be on your registered domains) |
external_user_ref |
string, up to 256 | — | Your customer or application identifier, stored with the session |
metadata |
object, up to 16 KB | {} |
Your data for the session. Stored with the session, not returned in the callback or the result |
Request and response examples
POST /flitt-id/verifications HTTP/1.1
Host: id.flitt.com
Authorization: Token 7f3c…
Content-Type: application/json
Idempotency-Key: order-10452-attempt-1
{
"callback_url": "https://shop.ge/api/flitt-id/callback",
"return_url": "https://shop.ge/kyc/done",
"back_url": "https://shop.ge/kyc",
"external_user_ref": "client-10452",
"company_name": "Shop LLC",
"language": "ka",
"ciba_flow_enabled": true
}
{
"widget_id": "wid_3b0c…",
"verification_url": "https://<widget>/wid_3b0c…?token=…&lang=ka",
"status": "created",
"expires_at": "2026-11-20T12:03:12Z",
"error_code": null
}
Response¶
Success is 200 with the customer link. Store widget_id: it ties the callback and the S2S request to your session.
"Present" says whether the key is always in the body; "Null" says whether its value can be null.
| Field | Type | Present | Null | Description |
|---|---|---|---|---|
widget_id |
string | always | no | Session identifier (wid_…) |
verification_url |
string | always | no | Widget link. Single use: the first browser to open it owns the session (reloading in that browser works); another browser gets verification_link_already_used |
status |
string | always | no | Always created |
expires_at |
string, ISO 8601 | always | no | When the session expires (24 hours by default). An unfinished session moves to expired and a callback is sent |
error_code |
string | always | yes | Always null on success |
The X-Trace-Id response header is always set.
Errors¶
Error body: {"detail": "<code>"}; for 422, detail is a list of invalid fields.
| HTTP | detail |
What to do |
|---|---|---|
| 400 | return_url_not_allowed, back_url_not_allowed, callback_url_not_allowed |
The URL is not https or not on your domains: fix the URL or ask Flitt to add the domain |
| 400 | provider_not_enabled |
The bank is not enabled for your company |
| 401 | authorization_token_required, invalid_auth_token |
Header missing or token expired: get a new token |
| 403 | company_not_configured |
Flitt ID is not set up for your application_id: contact Flitt support |
| 409 | idempotency_key_conflict |
Same Idempotency-Key with a different body: use a new key |
| 409 | idempotency_request_in_flight |
The first request with this key is still running: retry in a second |
| 422 | list of fields | Wrong type, length or value of a parameter; metadata_too_large means metadata is over 16 KB |
| 429 | — | Rate limit, or too many failed authorizations from one IP: retry later |
| 503 | token_check_unavailable |
The token service is unavailable: retry with the same Idempotency-Key |
Callback and signature verification¶
When a session reaches an outcome, Flitt ID sends a POST to callback_url.
Accept the callback only after verifying its signature, and answer 2xx within 60 seconds.
Any other answer or a timeout is retried: up to 5 attempts in total, waiting 30, 60, 90 and 120 seconds between them.
Headers¶
| Header | Description |
|---|---|
X-Flitt-Id-Signature |
HMAC-SHA256 as lowercase hex (64 characters) |
X-Flitt-Id-Company-Id |
Your application_id |
X-Flitt-Id-Callback-Id |
Callback UUID. Retries keep the same value — use it to drop duplicates |
X-Trace-Id |
Identifier to quote when contacting support |
Verifying the signature¶
The signed string is four parts joined with \n; the key is your private_key:
flitt-id-callback-v1
<X-Flitt-Id-Company-Id>
<X-Flitt-Id-Callback-Id>
<raw request body bytes, exactly as received>
- Take the body as raw bytes before parsing JSON. Re-serialized JSON produces a different signature.
- Check that
X-Flitt-Id-Company-Idis yourapplication_id. - Compute HMAC-SHA256 and compare it with the header in constant time. On mismatch answer
401and do not use the data. - Match
widget_idfrom the body to your session and skip anX-Flitt-Id-Callback-Idyou have already processed.
import hashlib
import hmac
PRIVATE_KEY = "<private_key>"
COMPANY_ID = "1234"
def flitt_id_callback_is_valid(raw_body: bytes, headers) -> bool:
company_id = headers.get("X-Flitt-Id-Company-Id", "")
callback_id = headers.get("X-Flitt-Id-Callback-Id", "")
signature = headers.get("X-Flitt-Id-Signature", "")
if company_id != COMPANY_ID:
return False
signed = b"\n".join([
b"flitt-id-callback-v1",
company_id.encode("ascii"),
callback_id.encode("ascii"),
raw_body,
])
expected = hmac.new(PRIVATE_KEY.encode("utf-8"), signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature)
<?php
const PRIVATE_KEY = '<private_key>';
const COMPANY_ID = '1234';
function flittIdCallbackIsValid(string $rawBody): bool
{
$companyId = $_SERVER['HTTP_X_FLITT_ID_COMPANY_ID'] ?? '';
$callbackId = $_SERVER['HTTP_X_FLITT_ID_CALLBACK_ID'] ?? '';
$signature = $_SERVER['HTTP_X_FLITT_ID_SIGNATURE'] ?? '';
if ($companyId !== COMPANY_ID) {
return false;
}
$signed = "flitt-id-callback-v1\n$companyId\n$callbackId\n$rawBody";
$expected = hash_hmac('sha256', $signed, PRIVATE_KEY);
return hash_equals($expected, $signature);
}
// $rawBody = file_get_contents('php://input');
using System.Security.Cryptography;
using System.Text;
static class FlittIdCallback
{
const string PrivateKey = "<private_key>";
const string CompanyId = "1234";
public static bool IsValid(
byte[] rawBody, string companyId, string callbackId, string signature)
{
if (companyId != CompanyId) return false;
using var hmac = IncrementalHash.CreateHMAC(
HashAlgorithmName.SHA256, Encoding.UTF8.GetBytes(PrivateKey));
hmac.AppendData(Encoding.ASCII.GetBytes(
$"flitt-id-callback-v1\n{companyId}\n{callbackId}\n"));
hmac.AppendData(rawBody);
var expected = Convert.ToHexString(hmac.GetHashAndReset())
.ToLowerInvariant();
return CryptographicOperations.FixedTimeEquals(
Encoding.ASCII.GetBytes(expected),
Encoding.ASCII.GetBytes(signature));
}
}
// companyId, callbackId, signature: values of the X-Flitt-Id-Company-Id,
// X-Flitt-Id-Callback-Id and X-Flitt-Id-Signature headers
const crypto = require('crypto');
const PRIVATE_KEY = '<private_key>';
const COMPANY_ID = '1234';
function flittIdCallbackIsValid(rawBody, headers) {
const companyId = headers['x-flitt-id-company-id'] || '';
const callbackId = headers['x-flitt-id-callback-id'] || '';
const signature = headers['x-flitt-id-signature'] || '';
if (companyId !== COMPANY_ID) return false;
const expected = crypto
.createHmac('sha256', PRIVATE_KEY)
.update(`flitt-id-callback-v1\n${companyId}\n${callbackId}\n`)
.update(rawBody)
.digest();
const actual = Buffer.from(signature, 'hex');
return actual.length === expected.length
&& crypto.timingSafeEqual(actual, expected);
}
// Express: add express.raw({ type: '*/*' }) to the callback route, then call
// flittIdCallbackIsValid(req.body, req.headers)
Callback body¶
One callback is sent per session, when it reaches a final status.
| Field | Type | Present | Null | Description |
|---|---|---|---|---|
widget_id |
string | always | no | Session identifier |
status |
string | always | no | verified, failed or expired |
final |
bool | always | no | Always true |
trace_id |
string | always | no | Identifier to quote when contacting support |
error_code |
string | always | yes | null for verified; the reason for failed and expired |
result |
object | always | yes | Object for verified. For failed either null or an object with empty subject_data and raw_provider_response: null. null for expired |
The result object is the same as in the S2S result, except that the callback has no created_at and no additional_docs.
Callback examples
{
"widget_id": "wid_3b0c…",
"status": "verified",
"final": true,
"trace_id": "…",
"error_code": null,
"result": {
"provider": "bog",
"bank": "bog",
"flow_type": "authorization_code",
"status": "verified",
"subject_data": {
"first_name": "Ana",
"last_name": "Beridze",
"personal_number": "01001001001",
"birth_date": "1990-04-12"
},
"raw_provider_response": {},
"terms": {
"company_type": "external",
"company_name": "Shop LLC",
"company_consent_accepted": true,
"accepted_at": "2026-11-19T12:04:01Z"
}
}
}
{
"widget_id": "wid_3b0c…",
"status": "expired",
"final": true,
"trace_id": "…",
"error_code": "session_expired",
"result": null
}
S2S result¶
GET https://id.flitt.com/flitt-id/verifications/{widget_id}/result with the same Authorization: Token <token>
returns the current status and the person's data. Call it after a callback or after the customer returns to return_url,
and as a fallback poll when a callback did not arrive.
A session of another company or an unknown widget_id returns 404 identity_session_not_found.
Response example
{
"widget_id": "wid_3b0c…",
"status": "verified",
"final": true,
"trace_id": "…",
"expires_at": "2026-11-20T12:03:12Z",
"error_code": null,
"result": {
"provider": "bog",
"bank": "bog",
"flow_type": "authorization_code",
"status": "verified",
"subject_data": {
"first_name": "Ana",
"last_name": "Beridze",
"personal_number": "01001001001"
},
"raw_provider_response": {},
"additional_docs": {},
"created_at": "2026-11-19T12:06:40Z",
"terms": {
"company_type": "external",
"company_name": "Shop LLC",
"company_consent_accepted": true,
"accepted_at": "2026-11-19T12:04:01Z"
}
}
}
Response fields¶
| Field | Type | Present | Null | Description |
|---|---|---|---|---|
widget_id |
string | always | no | Session identifier |
status |
string | always | no | Current status (Statuses) |
final |
bool | always | no | true once the status will not change any more |
trace_id |
string | always | no | Identifier to quote when contacting support |
expires_at |
string, ISO 8601 | always | no | When the session expires |
error_code |
string | always | yes | null unless the status is failed or expired |
result |
object | always | yes | Object when status is verified; null in every other status |
Statuses¶
status |
final |
Meaning |
|---|---|---|
created, terms_accepted, method_selected, redirected_to_provider, provider_returned, processing |
false | The customer is still going through identification |
verified |
true | Identity confirmed by the bank |
failed |
true | Not passed; the reason is in error_code, e.g. provider_window_closed, ciba_expired |
expired |
true | The customer did not finish before expires_at (error_code = session_expired) |
cancelled |
true | The session was cancelled |
result fields¶
| Field | Type | Present | Null | Description |
|---|---|---|---|---|
provider |
string | always | no | tbc or bog |
bank |
string | always | no | Same value as provider |
flow_type |
string | always | no | authorization_code (bank sign-in) or ciba (confirmation in the bank app) |
status |
string | always | no | Result status, verified |
subject_data |
object | always | no | The person's data (subject_data fields) |
raw_provider_response |
object | always | yes | The bank's response as is; its format depends on the bank |
terms |
object | always | yes | Consent record (terms fields) |
login_hint |
object | only when flow_type = ciba |
yes | What the customer entered to start CIBA, e.g. {"type": "msisdn", "value": "+995…"}; not verified by the bank |
created_at |
string, ISO 8601 | S2S only | no | When the result was received |
additional_docs |
object | S2S only | no | Reserved, always {} |
terms fields¶
| Field | Type | Present | Null | Description |
|---|---|---|---|---|
company_name |
string | always | yes | Name the customer saw in the consent |
company_consent_accepted |
bool | always | no | The customer ticked the consent checkbox |
terms_version |
string | always | no | Version of the consent text |
accepted_at |
string, ISO 8601 | always | no | When the consent was given |
terms can contain other keys. Ignore them.
subject_data fields¶
When subject_data is not empty, every key below is present. Dates are YYYY-MM-DD. Which values are filled depends on the bank.
| Field | Type | Null | Description |
|---|---|---|---|
first_name, last_name |
string | yes | First and last name |
personal_number |
string | yes | Personal number |
bank_subject |
string | yes | The person's identifier at the bank |
birth_date |
string | yes | Date of birth |
birth_country, birth_place |
string | yes | Place of birth |
gender |
string | no | male, female, other or unknown |
citizenship_country |
string | yes | Citizenship |
phone, email |
string | yes | Contacts, when the bank returns them |
document_type, document_number |
string | yes | Identity document |
document_issue_date, document_expiry_date |
string | yes | Document issue and expiry dates |
document_issuer_country, document_issuer_name |
string | yes | Who issued the document |
home_address, actual_address |
string | yes | Registered and actual address |
provider_specific |
object | no | Extra fields of the bank, may be {} |