For the complete documentation index, see llms.txt. This page is also available as Markdown.

Events

This page describes the different events that can trigger webhook notifications in Connect API.

Event structure

Certta webhooks follow the CloudEvents specification for the JSON event structure, a CNCF standard for describing event data in a common way. This standardized format makes it easier to integrate with your systems and ensures consistency across different event sources. Note that while the body follows the CloudEvents format, the CloudEvents HTTP headers are not included in the request.

Each webhook event follows this CloudEvents-compliant structure:

{
  "specversion": "1.0",
  "type": "COMMUNICATIONCREATEDEVENT",
  "source": "COMMUNICATION",
  "id": "01JZNK5ZQBNF623MB5KE64GNQB",
  "time": "2025-07-08T18:01:19.622Z",
  "datacontenttype": "application/json",
  "data": {
    "tenantId": "016e8f79-2399-4d35-90f9-c6f91b73189d",
    "channel": "sms",
    "externalId": "external-id",
    "notificationId": "01JZNK51YCZXT55TKF8M366QHJ",
    "system": "onboarding",
    "occurredOn": "2025-07-08T18:00:46.797Z"
  }
}
Field
Description

id

Unique identifier for the event

source

URI indicating where the event originated

specversion

CloudEvents specification version (currently 1.0)

type

Type of the event (see Event Types below)

time

Timestamp when the event occurred (ISO 8601 format)

datacontenttype

Media type of the data value (typically application/json)

data

Object containing event-specific data

Event types

Connect currently supports the following event types:

Communication

Event Type
Description

COMMUNICATIONCREATEDEVENT

A new communication has been created

COMMUNICATIONDELIVEREDEVENT

A communication has been delivered to the recipient

COMMUNICATIONREJECTEDEVENT

A communication was rejected

COMMUNICATIONNOTDELIVEREDEVENT

A communication was not delivered to the recipient

COMMUNICATIONSENTTODESTINATIONEVENT

A communication was sent to its destination

Transaction

Event Type
Description

TRANSACTIONPROCESSSTARTEDEVENT

A transaction created by Web Onboarding started processing after the user completed the onboarding flow

TRANSACTIONSTATUSUPDATEDEVENT

A transaction's status has been updated

TRANSACTIONDOCUMENTSCOPYREQUESTEDEVENT

A request for documents copy in a transaction was made

SmartAuth

Event Type
Description

FACEAUTHENTICATIONEVENT

A face authentication attempt has occurred

PROFILEUPDATEDEVENT

A profile's status has been updated

Event handling guidelines

Best practices for event consumers

  1. Event Type Validation: Always validate the event type before processing.

  2. Error Handling: Implement robust error handling for malformed events.

  3. Idempotent Processing: Process events idempotently using the event id to avoid duplicate processing.

  4. Field Presence Checks: Don't assume all fields will always be present in the event payload.

  5. Event Order: Don't rely on events arriving in chronological order.

Future event types

Certta is continuously expanding its event offerings. Check the documentation regularly for updates on newly supported event types. If you need events for specific state changes not currently available, contact Certta support.

Event examples

Communication event examples

COMMUNICATIONCREATEDEVENT

COMMUNICATIONREJECTEDEVENT

COMMUNICATIONSENTTODESTINATIONEVENT

COMMUNICATIONDELIVEREDEVENT

COMMUNICATIONNOTDELIVEREDEVENT

Common data fields in communication events

All communication events include these common fields in the data object:

Some events may include additional fields:

Field
Description

reason

Reason for rejection or failure (in REJECTED/NOTDELIVERED events)

Field
Description

tenantId

Identifier of the tenant associated with the communication

channel

Communication channel (e.g., "sms", "email", "whatsapp")

externalId

External identifier for the communication

notificationId

Unique identifier for the notification

system

System that originated the communication

occurredOn

Timestamp when the event occurred

Handling communication events

When processing communication events, consider the following best practices:

Transaction events

Transaction events provide real-time updates about the status and lifecycle of transactions in your system.

Transaction event examples

TRANSACTIONPROCESSSTARTEDEVENT

TRANSACTIONSTATUSUPDATEDEVENT

TRANSACTIONDOCUMENTSCOPYREQUESTEDEVENT

Common data fields in transaction events

Transaction events use the following fields in the data object. Fields described as optional are omitted when they do not apply:

Field
Description

tenantId

Identifier of the tenant associated with the transaction

report

Report identifier for legacy-flow compatibility. When no report is available, the value is 000000000000000000000000

id

Unique identifier for the transaction

status

Current business status of the transaction. See Transaction status values below

date

Timestamp when the event occurred

onboardingId

Identifier of the onboarding process that generated the transaction. Only present for transactions originating from Web Onboarding

templateId

Identifier of the query template used for this transaction, when available

customStatus

Optional merchant-defined custom status configured in Trust. Omitted when no custom status applies

Transaction status values

The status field represents the transaction's business result or processing state. It does not represent the webhook event lifecycle.

Value
Description

PROCESSING

The transaction is still being processed and its data may change

APPROVED

The transaction passed the configured validation rules

REPROVED

The transaction contains an irregularity or evidence of fraud

PENDING

The transaction requires a decision or manual action in Trust

PENDING_OCR

The document or its data could not be identified automatically and requires manual action

The event type describes what happened, while data.status describes the transaction's current business status. For example, a TRANSACTIONPROCESSSTARTEDEVENT or TRANSACTIONDOCUMENTSCOPYREQUESTEDEVENT may carry status: "PROCESSING".

Custom status values

customStatus is optional and does not have a global list of values. Its possible values are defined by each merchant's workflow configuration in Trust. Integrations must therefore treat it as a tenant-specific string and must not assume that values used by one tenant are available to another tenant.

When no merchant-defined status applies, customStatus is omitted from the event. Use status for the standard Connect transaction state and customStatus only for tenant-specific mapping.

Detailed validation reasons are not included in transaction event payloads. Use GET /transactions/{transactionId} with data.id to retrieve the complete transaction details.

Handling transaction events

When processing transaction events, consider the following best practices:

SmartAuth events

SmartAuth events provide information about authentication attempts and profile updates.

SmartAuth event examples

FACEAUTHENTICATIONEVENT

PROFILEUPDATEDEVENT

Data fields in SmartAuth events

FACEAUTHENTICATIONEVENT fields:

PROFILEUPDATEDEVENT fields:

Field
Description

tenantId

Identifier of the tenant associated with the profile

profileId

Unique identifier for the profile

type

Type of profile (PF for individual, PJ for company)

status

Current status of the profile

updatedAt

Timestamp when the profile was updated

cpf

Brazilian individual taxpayer registry identifier (when applicable)

cnpj

Brazilian company registry identifier (when applicable)

Field
Description

tenantId

Identifier of the tenant associated with the authentication

onboardingId

Identifier of the associated onboarding process

personId

Identifier of the person being authenticated

attemptId

Unique identifier for this authentication attempt

isMatch

Boolean indicating whether the face authentication was successful

date

Timestamp when the authentication occurred

Handling SmartAuth events

When processing SmartAuth events, consider the following best practices:

Last updated