Authorize payment with biometrics
curl --request POST \
--url http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"fido_assertion": {
"id": "credential_id_example",
"raw_id": "raw_credential_id_example",
"response": {
"authenticator_data": "authenticator_data_example",
"client_data_JSON": "client_data_json_example",
"signature": "signature_example",
"user_handle": "user_handle_example"
},
"type": "public-key"
},
"riskSignals": null
}
'import requests
url = "http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize"
payload = {
"fido_assertion": {
"id": "credential_id_example",
"raw_id": "raw_credential_id_example",
"response": {
"authenticator_data": "authenticator_data_example",
"client_data_JSON": "client_data_json_example",
"signature": "signature_example",
"user_handle": "user_handle_example"
},
"type": "public-key"
},
"riskSignals": None
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fido_assertion: {
id: 'credential_id_example',
raw_id: 'raw_credential_id_example',
response: {
authenticator_data: 'authenticator_data_example',
client_data_JSON: 'client_data_json_example',
signature: 'signature_example',
user_handle: 'user_handle_example'
},
type: 'public-key'
},
riskSignals: null
})
};
fetch('http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fido_assertion' => [
'id' => 'credential_id_example',
'raw_id' => 'raw_credential_id_example',
'response' => [
'authenticator_data' => 'authenticator_data_example',
'client_data_JSON' => 'client_data_json_example',
'signature' => 'signature_example',
'user_handle' => 'user_handle_example'
],
'type' => 'public-key'
],
'riskSignals' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize"
payload := strings.NewReader("{\n \"fido_assertion\": {\n \"id\": \"credential_id_example\",\n \"raw_id\": \"raw_credential_id_example\",\n \"response\": {\n \"authenticator_data\": \"authenticator_data_example\",\n \"client_data_JSON\": \"client_data_json_example\",\n \"signature\": \"signature_example\",\n \"user_handle\": \"user_handle_example\"\n },\n \"type\": \"public-key\"\n },\n \"riskSignals\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"fido_assertion\": {\n \"id\": \"credential_id_example\",\n \"raw_id\": \"raw_credential_id_example\",\n \"response\": {\n \"authenticator_data\": \"authenticator_data_example\",\n \"client_data_JSON\": \"client_data_json_example\",\n \"signature\": \"signature_example\",\n \"user_handle\": \"user_handle_example\"\n },\n \"type\": \"public-key\"\n },\n \"riskSignals\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fido_assertion\": {\n \"id\": \"credential_id_example\",\n \"raw_id\": \"raw_credential_id_example\",\n \"response\": {\n \"authenticator_data\": \"authenticator_data_example\",\n \"client_data_JSON\": \"client_data_json_example\",\n \"signature\": \"signature_example\",\n \"user_handle\": \"user_handle_example\"\n },\n \"type\": \"public-key\"\n },\n \"riskSignals\": null\n}"
response = http.request(request)
puts response.read_body{
"data": {
"amount": {
"amount": 1000,
"currency": "BRL"
},
"description": "Payment description example",
"end_to_end_id": "E12345678202607252301s6AO2vwTrlD",
"external_id": "external_id_example",
"id": "019f9fbf-2cd7-160a-b0ae-3b02f310bcc8",
"inserted_at": "2026-07-26T00:00:00Z",
"status": "pending",
"transaction_date": "2026-07-26",
"updated_at": "2026-07-26T00:00:00Z",
"virtual_account_id": "019f9fbf-2cd7-ae17-3015-a65b66719fc0"
}
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}Biometrics
Authorize payment
Authorizes a payment using a FIDO assertion.
POST
/
biometrics
/
enrollments
/
{enrollment_id}
/
payments
/
{payment_id}
/
authorize
Authorize payment with biometrics
curl --request POST \
--url http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"fido_assertion": {
"id": "credential_id_example",
"raw_id": "raw_credential_id_example",
"response": {
"authenticator_data": "authenticator_data_example",
"client_data_JSON": "client_data_json_example",
"signature": "signature_example",
"user_handle": "user_handle_example"
},
"type": "public-key"
},
"riskSignals": null
}
'import requests
url = "http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize"
payload = {
"fido_assertion": {
"id": "credential_id_example",
"raw_id": "raw_credential_id_example",
"response": {
"authenticator_data": "authenticator_data_example",
"client_data_JSON": "client_data_json_example",
"signature": "signature_example",
"user_handle": "user_handle_example"
},
"type": "public-key"
},
"riskSignals": None
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fido_assertion: {
id: 'credential_id_example',
raw_id: 'raw_credential_id_example',
response: {
authenticator_data: 'authenticator_data_example',
client_data_JSON: 'client_data_json_example',
signature: 'signature_example',
user_handle: 'user_handle_example'
},
type: 'public-key'
},
riskSignals: null
})
};
fetch('http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fido_assertion' => [
'id' => 'credential_id_example',
'raw_id' => 'raw_credential_id_example',
'response' => [
'authenticator_data' => 'authenticator_data_example',
'client_data_JSON' => 'client_data_json_example',
'signature' => 'signature_example',
'user_handle' => 'user_handle_example'
],
'type' => 'public-key'
],
'riskSignals' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize"
payload := strings.NewReader("{\n \"fido_assertion\": {\n \"id\": \"credential_id_example\",\n \"raw_id\": \"raw_credential_id_example\",\n \"response\": {\n \"authenticator_data\": \"authenticator_data_example\",\n \"client_data_JSON\": \"client_data_json_example\",\n \"signature\": \"signature_example\",\n \"user_handle\": \"user_handle_example\"\n },\n \"type\": \"public-key\"\n },\n \"riskSignals\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"fido_assertion\": {\n \"id\": \"credential_id_example\",\n \"raw_id\": \"raw_credential_id_example\",\n \"response\": {\n \"authenticator_data\": \"authenticator_data_example\",\n \"client_data_JSON\": \"client_data_json_example\",\n \"signature\": \"signature_example\",\n \"user_handle\": \"user_handle_example\"\n },\n \"type\": \"public-key\"\n },\n \"riskSignals\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.trio.com.br/biometrics/enrollments/{enrollment_id}/payments/{payment_id}/authorize")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fido_assertion\": {\n \"id\": \"credential_id_example\",\n \"raw_id\": \"raw_credential_id_example\",\n \"response\": {\n \"authenticator_data\": \"authenticator_data_example\",\n \"client_data_JSON\": \"client_data_json_example\",\n \"signature\": \"signature_example\",\n \"user_handle\": \"user_handle_example\"\n },\n \"type\": \"public-key\"\n },\n \"riskSignals\": null\n}"
response = http.request(request)
puts response.read_body{
"data": {
"amount": {
"amount": 1000,
"currency": "BRL"
},
"description": "Payment description example",
"end_to_end_id": "E12345678202607252301s6AO2vwTrlD",
"external_id": "external_id_example",
"id": "019f9fbf-2cd7-160a-b0ae-3b02f310bcc8",
"inserted_at": "2026-07-26T00:00:00Z",
"status": "pending",
"transaction_date": "2026-07-26",
"updated_at": "2026-07-26T00:00:00Z",
"virtual_account_id": "019f9fbf-2cd7-ae17-3015-a65b66719fc0"
}
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}{
"errors": [
{
"detail": "null value where string expected",
"source": {
"pointer": "/data/attributes/petName"
},
"title": "Invalid value"
}
]
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
Enrollment ID
ITP Document ID (payment)
Body
application/json
FIDO assertion
Response
Payment
Response schema for a biometric payment
A biometric payment initiation
Show child attributes
Show child attributes
Example:
{
"amount": { "amount": 1000, "currency": "BRL" },
"description": "Payment description example",
"end_to_end_id": null,
"external_id": "external_id_example",
"id": "019f9fbf-2cb3-a8d4-9ebe-0c7781f37117",
"inserted_at": "2026-07-26T00:00:00Z",
"status": "pending",
"transaction_date": null,
"updated_at": "2026-07-26T00:00:00Z",
"virtual_account_id": "019f9fbf-2cb4-4e0d-1e20-2d6b9b27dbf0"
}
⌘I

