> For a complete page index, fetch https://docs.transak.com/llms.txt # Biometrics Details POST https://api-gateway-stg.transak.com/kyc/v2/reliance/biometrics Content-Type: application/json Submit the user's biometric media for the KYC Reliance biometric step. At least one of **selfie** or **liveness** must be provided — both are accepted but neither is individually required. Complete the [Identity Details](/api/whitelabel/kyc-reliance-api/kyc-reliance-identity-details) and [Document Details](/api/whitelabel/kyc-reliance-api/kyc-reliance-document-details) steps before calling this endpoint. | Field | Required | Accepted formats | Max size | |-------|----------|------------------|----------| | **selfie** | At least one of selfie or liveness | `JPEG`, `PNG`, `WEBP` | Approximately **5 MB** after decoding | | **liveness** | At least one of selfie or liveness | `MP4` | Approximately **20 MB** after decoding | Reference: https://docs.transak.com/api/whitelabel/kyc-reliance-api/kyc-reliance-biometrics-details ## Request ### Headers - `x-user-ip` (string, required) — End user's originating IP. More details [here](/guides/mandatory-security-changes#user-ip-header-in-apis) - `x-api-key` (string, required) — Partner API Key present in Transak Dashboard. - `x-access-token` (string, optional) — Your Partner Access Token. Please refer [here](/guides/how-to-create-partner-access-token) for a tutorial on generating your access token. Note: This is applicable only for [Auth Reliance Flows](/features/auth-reliance) - `x-user-identifier` (string, optional) — our authenticated user Email Id address. Note: This is applicable only for [Auth Reliance Flows](/features/auth-reliance) - `authorization` (string, optional) — Authorization token is the accessToken received from the API -` api/v2/auth/verify` Note: This is not applicable for [Auth Reliance Flows](/features/auth-reliance) ### Body (application/json) This endpoint expects a BiometricsRequest. - `selfie` (string, optional) — Selfie image as a base64-encoded data URI. **Supported formats:** JPEG, PNG, WEBP. Maximum size approximately **5 MB** after decoding. - `liveness` (string, optional) — Liveness video as a base64-encoded data URI. **Supported format:** MP4 only. Maximum size approximately **20 MB** after decoding. ## Response ### 200 Success — biometrics processed - `data` (KycRelianceSuccessResponseData, required) ## Errors ### 400 Bad Request Error Bad Request — validation or processing failure - `Kyc-reliance-biometrics-detailsRequestBadRequestError` ### 401 Unauthorized Error Unauthorized — invalid token or user not onboarded - `error` (ErrorEnvelopeError, required) ### 404 Not Found Error Not Found — KYC request does not exist for this user/session - `error` (ErrorEnvelopeError, required) ## Types ### KycRelianceSuccessResponseData - `status` (string, required) — Step or flow status (e.g. `INITIALIZED` after identity or document steps, `SUBMITTED` after biometrics, or terminal outcomes such as `DONE` / `FAILED` as returned by the API). - `kycType` (string, required) — KYC flow type returned for the initialized request. ### ErrorEnvelope - `error` (ErrorEnvelopeError, required) ### KycRelianceFlatError - `statusCode` (integer, required) - `errorCode` (integer, required) - `message` (string, required) ### ErrorEnvelopeError - `statusCode` (integer, required) - `message` (string, required) - `error` (string, optional) — HTTP error title (e.g. `Bad Request`). - `errorCode` (integer, optional) ## Examples **Request** ```json { "selfie": "", "liveness": "" } ``` **Response** ```json { "data": { "status": "SUBMITTED", "kycType": "STANDARD" } } ``` **SDK Code** ```python Submitted Biometrics Details import requests url = "https://api-gateway-stg.transak.com/kyc/v2/reliance/biometrics" payload = { "selfie": "", "liveness": "" } headers = { "x-api-key": "", "x-user-ip": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Submitted Biometrics Details const url = 'https://api-gateway-stg.transak.com/kyc/v2/reliance/biometrics'; const options = { method: 'POST', headers: {'x-api-key': '', 'x-user-ip': '', 'Content-Type': 'application/json'}, body: '{"selfie":"","liveness":""}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Submitted Biometrics Details package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api-gateway-stg.transak.com/kyc/v2/reliance/biometrics" payload := strings.NewReader("{\n \"selfie\": \"\",\n \"liveness\": \"\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("x-user-ip", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Submitted Biometrics Details require 'uri' require 'net/http' url = URI("https://api-gateway-stg.transak.com/kyc/v2/reliance/biometrics") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["x-user-ip"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"selfie\": \"\",\n \"liveness\": \"\"\n}" response = http.request(request) puts response.read_body ``` ```java Submitted Biometrics Details import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api-gateway-stg.transak.com/kyc/v2/reliance/biometrics") .header("x-api-key", "") .header("x-user-ip", "") .header("Content-Type", "application/json") .body("{\n \"selfie\": \"\",\n \"liveness\": \"\"\n}") .asString(); ``` ```php Submitted Biometrics Details request('POST', 'https://api-gateway-stg.transak.com/kyc/v2/reliance/biometrics', [ 'body' => '{ "selfie": "", "liveness": "" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', 'x-user-ip' => '', ], ]); echo $response->getBody(); ``` ```csharp Submitted Biometrics Details using RestSharp; var client = new RestClient("https://api-gateway-stg.transak.com/kyc/v2/reliance/biometrics"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("x-user-ip", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"selfie\": \"\",\n \"liveness\": \"\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Submitted Biometrics Details import Foundation let headers = [ "x-api-key": "", "x-user-ip": "", "Content-Type": "application/json" ] let parameters = [ "selfie": "", "liveness": "" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-gateway-stg.transak.com/kyc/v2/reliance/biometrics")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```