| Field | Type | Description |
|---|---|---|
| action | string | The event type (e.g., session.created, session.completed, session.expired). |
| type | string | The checkout type, always checkout.hosted for Hosted Checkout. |
| data | object | Event-specific data containing session or transaction details. |
Order Reference in WebhooksThe
external_id sent in the session creation request is visible in the Tonder dashboard as Order ID and in transaction reports as Business Transaction ID, but it is not returned in webhook payloads. To receive your order reference in a webhook, include it inside the metadata object — in addition to the existing external_id field — when creating the session. It will then be available under data.metadata in the webhook payload.Session Events
session.created
Sent when a new checkout session is successfully created. The table below describes the fields in thedata object for this event:
| Field | Type | Description |
|---|---|---|
| id | string | The unique session ID. |
| url | string | The checkout URL where the customer completes payment. |
| amount_total | number | Total charge amount. |
| currency | string | Currency code (e.g., “MXN”). |
| status | string | Session status, will be pending for this event. |
| payment_id | number | The payment transaction ID. |
| transaction_status | string | Transaction status, will be Pending for this event. |
| created_at | number | Unix timestamp in milliseconds when the session was created. |
| customer | object | Customer details including first_name, last_name, and email. |
| metadata | object | Custom key-value pairs sent by the merchant in the session request. |
View Full JSON Payload Example
View Full JSON Payload Example
session.completed
Sent when a session is successfully paid for and completed. This is the primary event for confirming a successful order. The table below describes the fields in thedata object for this event:
| Field | Type | Description |
|---|---|---|
| id | string | The unique session ID. |
| url | string | The checkout URL where the customer completed payment. |
| amount_total | number | Total charge amount. |
| currency | string | Currency code (e.g., “MXN”). |
| status | string | Session status, will be completed for this event. |
| payment_id | number | The payment transaction ID. |
| transaction_status | string | Transaction status, will be Success for this event. |
| paid_at | number | Unix timestamp in milliseconds when the payment was completed. |
| customer | object | Customer details including first_name, last_name, and email. |
| metadata | object | Custom key-value pairs sent by the merchant in the session request. |
View Full JSON Payload Example
View Full JSON Payload Example
session.expired
Sent when a pending session expires without a successful payment (e.g., the customer abandoned the checkout). The table below describes the fields in thedata object for this event:
| Field | Type | Description |
|---|---|---|
| id | string | The unique session ID. |
| url | string | The checkout URL that expired. |
| amount_total | number | Total charge amount. |
| currency | string | Currency code (e.g., “MXN”). |
| status | string | Session status, will be expired for this event. |
| payment_id | number | The payment transaction ID. |
| transaction_status | string | Transaction status, will be Expired for this event. |
| customer | object | Customer details including first_name, last_name, and email. |
| metadata | object | Custom key-value pairs sent by the merchant in the session request. |
View Full JSON Payload Example
View Full JSON Payload Example
Payment Transaction Events
payment.transaction
Sent when a payment transaction status changes (e.g., Pending, Success, Declined). A single session may have multiple payment.transaction events if the user retries.While
session.completed tells you the order is paid, payment.transaction gives you details about each attempt.data object for this event:
| Field | Type | Description |
|---|---|---|
| payment_id | string | The unique payment transaction ID. |
| session_id | string | The session ID this payment belongs to. |
| status | string | Transaction status (e.g., Pending, Success, Declined). |
| amount | number | Payment amount. |
| currency | string | Currency code (e.g., “MXN”). |
| payment_method_type | string | Payment method used (e.g., “card”). |
| created_at | string | ISO 8601 timestamp when the transaction was created. |
| card_details | object | Card information including brand and last4 digits. |
| customer | object | Customer details including name and email. |
| metadata | object | Custom key-value pairs sent by the merchant in the session request. |
View Full JSON Payload Example (Declined)
View Full JSON Payload Example (Declined)

