- Enrollment — a one-time setup where the customer links their bank account and registers a biometric credential.
- Payment — creating and authorizing payments using the registered biometric credential.
All examples use the sandbox environment (https://api.sandbox.trio.com.br). In production, usehttps://api.trio.com.br.
Endpoints
For complete endpoint documentation, see the Biometrics API Reference.
Step 1: Device Setup
Before interacting with the biometrics API, you need to identify the customer’s device. Collect the device information using a fingerprinting library such as FingerprintJS and send it to the API.Create Device
load_enrollments parameter, when set to true, includes the device’s existing enrollments in the response. This is useful to determine if the customer already has an active enrollment and can skip directly to the payment flow.
If the device already exists (matched by fingerprint and counterparty_tax_number), the existing device is returned.
For complete request and response details, see the Find or Create Device API reference.
Step 2: List Participants
Retrieve the list of available banking participants (institutions) that support biometric enrollment. You can optionally load enrollment information for each participant to determine which flow the customer needs.Option A: Participants with enrollments (recommended)
A single request that returns participants with enrollment data attached. Enrolled participants appear first in the list.enrolled?— whether the customer has an active enrollment with this participantenrollment— the enrollment details (if enrolled)
- Has enrollment → proceed to Payment Creation
- No enrollment → proceed to Enrollment Registration
Option B: Separate requests
You can also fetch participants and enrollments independently:GET /biometrics/participants?device_id={device_id}— list all participantsGET /biometrics/enrollments?device_id={device_id}— list existing enrollments
Participants are synchronized hourly with the Open Finance environment, and unstable participants are proactively disabled. If you choose to cache the participant list, be aware it may become out of sync.For details, see List Enrollments.
Step 3: Enrollment Registration
When a customer selects a participant and has no active enrollment, you need to create one. This is a one-time process per participant.3.1 Create Enrollment
device_id— the device ID from Step 1participant_id— the participant chosen by the customerreturn_to_url— where to redirect after biometric registration is completeexternal_id— (optional) your internal referenceaccount_info— (optional) suggested bank account. The bank may accept or ignore this suggestion. If the bank returns a different account, the enrollment will be blocked
redirect_url. Redirect the customer to this URL to start the bank authorization flow.
For complete details, see the Create Enrollment API reference.
3.2 Bank Authorization
After redirecting, the customer authorizes the enrollment in their banking app. During this step:- The customer is redirected to their bank
- The customer authorizes the biometric enrollment
- The bank redirects the customer to Trio’s whitelabel biometric registration page
- The customer registers their biometric credential (fingerprint or face)
- After completion, the customer is redirected to your
return_to_url
The biometric registration (WebAuthn) is restricted to Trio’s domain due to security requirements, so this step is handled automatically through a whitelabel page.
3.3 Enrollment Webhooks
Listen for enrollment status webhooks with the categorypix_biometrics_enrollment:
Authorized — the enrollment is ready for payments:
authorized webhook, the enrollment is complete and you can create payments.
Enrollment Lifecycle
Step 4: Create Payment
Once the customer has an active enrollment, you can create payments that will be authorized using their biometric credential.4.1 Create Payment from Enrollment
Using theenrollment_id from the active enrollment, create a payment:
entity_id— your entity IDvirtual_account_id— the virtual account that will receive the fundsamount— amount in cents (e.g.,1500= BRL 15.00)description— payment description
external_id— your internal reference for reconciliation
4.2 Get Authorization Options
Retrieve the FIDO authorization options needed for the WebAuthn authentication:public_key_encoded value — a JSON-encoded string with the WebAuthn publicKeyCredentialRequestOptions. You will pass this to the auth widget in the next step.
For details, see the Get Authorization Options API reference.
Step 5: Authorize Payment with Biometrics
To authorize the payment, the customer must perform a WebAuthn authentication using Trio’s auth widget iframe. This iframe overlay handles thecredentials.get WebAuthn operation on Trio’s domain.
5.1 Set Up the Auth Widget
Embed the iframe positioned over a button element in your page:
The allow attribute is required for WebAuthn to work inside the iframe.
5.2 Communication Protocol
The widget communicates viapostMessage. All messages from the widget include source: "trio-biometrics-sdk".
1. Wait for the iframe to load:
e.data.credential.
5.3 Send the Authorization
Take the credential from the widget response and send it to authorize the payment:Payment Webhooks
After creating a payment, you will receiveinitiation_document webhooks for each status change. You can also listen to Pix cash-in webhooks for the final settlement confirmation.
All payment webhooks share the same initiation_document category and include the full payment data. The type field indicates the current status.
Payment Lifecycle
Webhook Examples
initiation_document — created
initiation_document — awaiting_consent
The payment is waiting for the customer to authorize via biometrics (WebAuthn).initiation_document — awaiting_payment
Biometric authorization is complete. The bank is processing the payment.initiation_document — settled
Payment completed successfully. Funds have been transferred.End-to-End Flow Summary
Steps 4a–4c only happen once per participant. After enrollment, the customer goes directly from step 5 onwards for subsequent payments.

