> For the complete documentation index, see [llms.txt](https://docs.txn.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.txn.io/exchange/exchange-webhooks.md).

# Exchange webhooks

Txn currently sends an exchange webhook only when an exchange quote completes — other lifecycle events may be added in future. The payload mirrors the [Read quote](https://docs.txn.io/exchange/reading-quote.md) endpoint response, with the `orders`, `transactions` and `accounts` entities in `included[]`; the **Response Body** table on that page describes every field.

For configuring webhook URLs, retry behaviour, source IPs, and signature verification, see the general [Webhooks](https://docs.txn.io/api-basics/webhooks.md) section.

{% tabs %}
{% tab title="Exchange Webhook" %}

```json
{
  "data": {
    "attributes": {
      "accountChargedId": "e289de2b-37bd-4eff-b832-f754c31a2d95",
      "accountReceivedId": "13a85b45-8543-41c7-b963-394d4ea128ae",
      "amountCharged": "10.0",
      "amountChargedCurrency": "USDT",
      "amountReceived": "8.75",
      "amountReceivedCurrency": "EUR",
      "exchangeFee": "0.04",
      "exchangeFeeCurrency": "EUR",
      "expiresAt": "2026-11-04T12:30:22.188Z",
      "rate": "0.8786049",
      "rateCurrency": "EUR",
      "status": "completed"
    },
    "id": "dca974be-b1e7-4b8e-bce7-739d0cc27a6d",
    "relationships": {
      "accountCharged": {
        "data": {
          "id": "e289de2b-37bd-4eff-b832-f754c31a2d95",
          "type": "accounts"
        }
      },
      "accountReceived": {
        "data": {
          "id": "13a85b45-8543-41c7-b963-394d4ea128ae",
          "type": "accounts"
        }
      },
      "author": {
        "meta": {
          "included": false
        }
      },
      "exchangeOrder": {
        "data": {
          "id": "d4b4eb01-4bb4-403f-92ce-afcfaeff9761",
          "type": "orders"
        }
      },
      "transactions": {
        "data": [
          {
            "id": "ab60f5ce-e8f8-4aa5-becc-4b5908a5c756",
            "type": "transactions"
          },
          {
            "id": "7246190b-58ec-469f-b967-b27b237fdc19",
            "type": "transactions"
          }
        ]
      }
    },
    "type": "exchangeQuotes"
  },
  "included": [
    {
      "attributes": {
        "baseCode": "USDT",
        "quantity": "10.0",
        "quoteCode": "EUR"
      },
      "id": "d4b4eb01-4bb4-403f-92ce-afcfaeff9761",
      "type": "orders"
    },
    {
      "attributes": {
        "accountId": "13a85b45-8543-41c7-b963-394d4ea128ae",
        "amount": "8.75",
        "balance": null,
        "createdAt": "2026-11-04T12:29:53.007Z",
        "currency": "EUR",
        "reference": null,
        "simplifiedState": "completed",
        "transactionType": "ExchangeTransaction"
      },
      "id": "ab60f5ce-e8f8-4aa5-becc-4b5908a5c756",
      "relationships": {
        "account": {
          "meta": {
            "included": false
          }
        },
        "author": {
          "meta": {
            "included": false
          }
        },
        "transactionDetails": {
          "meta": {
            "included": false
          }
        }
      },
      "type": "transactions"
    },
    {
      "attributes": {
        "accountId": "e289de2b-37bd-4eff-b832-f754c31a2d95",
        "amount": "-10.000000",
        "balance": null,
        "createdAt": "2026-11-04T12:29:53.029Z",
        "currency": "USDT",
        "reference": null,
        "simplifiedState": "completed",
        "transactionType": "ExchangeTransaction"
      },
      "id": "7246190b-58ec-469f-b967-b27b237fdc19",
      "relationships": {
        "account": {
          "meta": {
            "included": false
          }
        },
        "author": {
          "meta": {
            "included": false
          }
        },
        "transactionDetails": {
          "meta": {
            "included": false
          }
        }
      },
      "type": "transactions"
    },
    {
      "attributes": {
        "balance": "306064.429778",
        "bankDepositAvailable": false,
        "bankReference": "BDR4180381621673581",
        "bankWithdrawalAvailable": false,
        "currencyCode": "USDT",
        "currencyType": "crypto",
        "label": "master",
        "master": true,
        "totalBalance": null,
        "transferAvailable": true
      },
      "id": "e289de2b-37bd-4eff-b832-f754c31a2d95",
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        },
        "txnBankCredentials": {
          "meta": {
            "included": false
          }
        }
      },
      "type": "accounts"
    },
    {
      "attributes": {
        "balance": "39270.58",
        "bankDepositAvailable": true,
        "bankReference": "BDR6421088115176062",
        "bankWithdrawalAvailable": true,
        "currencyCode": "EUR",
        "currencyType": "fiat",
        "label": "master",
        "master": true,
        "totalBalance": null,
        "transferAvailable": true
      },
      "id": "13a85b45-8543-41c7-b963-394d4ea128ae",
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        },
        "txnBankCredentials": {
          "meta": {
            "included": false
          }
        }
      },
      "type": "accounts"
    }
  ],
  "meta": {}
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.txn.io/exchange/exchange-webhooks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
