- 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. The device must support biometric authentication for this flow to work. You can verify this on the frontend before proceeding: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. Each participant represents a bank the customer can enroll with. By providing thedevice_id from Step 1, the response also indicates whether the customer already has an active enrollment with each participant — so you can determine the next step:
- Already enrolled → skip to Payment Creation
- Not enrolled → proceed to Enrollment Registration
device_id, only the participant list is returned (no enrollment info). You can also fetch enrollments separately via List Enrollments and match them on your end — useful if you want to cache the participant list (which is the same for every user) and only fetch enrollments per device.
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 complete response details, see the List Participants API reference.
Step 3: Enrollment Registration
When a customer selects a participant and has no active enrollment for that device, you need to create one. This is a one-time process per participant per device_id.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. The initiation document works similarly to a QR code — it’s the initiation method for a Pix transaction. It carries all the status updates and will ultimately trigger a regular Pix transaction webhook as well.
To validate the settlement, you should listen to Pix cash-in webhooks, as they are the ones that actually confirm SPI has processed the transaction.
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.

