> 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/getting-setup/sending-payment-notifications-to-slack.md).

# Sending payment notifications to Slack

Route Txn payment events straight into a Slack channel so your support team can act on them in real time — without watching the dashboard or building a backend.

You build a **Slack Workflow** that starts from a webhook and posts a formatted message to a channel. You then share that workflow's URL with Txn. From then on, Txn sends a notification to the channel whenever a relevant payment event occurs.

## When this is useful

The notifications are most valuable for events your support team needs to reach out about proactively. For example:

* **A payment arrives for an already-closed invoice.** When an end user pays again against an invoice that is already settled, Txn allocates the received funds to your account in the payment currency (for example, USDT received is credited to your USDT account) and sends a notification so support can reconcile the extra payment with the customer.
* **A payment is rejected on risk grounds.** When a deposit is placed on hold due to high-risk exposure, then rejected and refunded to the source address, a notification lets support follow up with the end user instead of waiting for them to report a missing payment.

## What you'll need

* A Slack workspace where you can create workflows in **Workflow Builder**.
* A channel for the notifications — for example, a private `customer-support` channel.

## Step 1 — Open Workflow Builder

In Slack, go to **More → Tools** ("Create and find workflows and apps") and create a new workflow. Give it a recognizable name such as `Txn Payment Alerts`.

<p align="center"><img src="/files/3LHCIDgYkqGEkf7YzMox" alt="" data-size="original"></p>

## Step 2 — Start the workflow from a webhook

Under **Start the workflow…**, choose an event, then select **From a webhook** ("Starts from a third-party event"). This makes the workflow run whenever Txn sends a web request to it.

{% hint style="warning" %}
Slack generates the **Web request URL** only after you save the trigger, and anyone with that URL can trigger the workflow. Treat it as a secret — share it only with Txn.
{% endhint %}

<p align="center"><img src="/files/nXxNygaWUxCI0qNhY4ur" alt=""></p>

## Step 3 — Define the data variables

On the webhook trigger, open **Set Up Variables** and add one variable for each field Txn sends in the notification payload. For every variable, set the **Data type** to **Text**.

<p align="center"><img src="/files/zRIuev9YLxezC2q3Ebi8" alt=""></p>

Txn sends a flat JSON payload. Create a variable for each key:

```json
{
  "network_name": "Example text",
  "transaction_type": "Example text",
  "tx_hash": "Example text",
  "description": "Example text",
  "address": "Example text",
  "reference": "Example text",
  "company_name": "Example text",
  "amount": "Example text"
}
```

| Variable key       | Data type | Description                                                    |
| ------------------ | --------- | -------------------------------------------------------------- |
| `network_name`     | Text      | The network the transaction settled on, e.g. `Tron (TRC20)`.   |
| `transaction_type` | Text      | The type of transaction (for example, a deposit).              |
| `tx_hash`          | Text      | The on-chain transaction hash.                                 |
| `description`      | Text      | Human-readable summary of what happened.                       |
| `address`          | Text      | The relevant wallet address (for example, the source address). |
| `reference`        | Text      | Your reference for the related invoice, payout, or channel.    |
| `company_name`     | Text      | Your merchant account name.                                    |
| `amount`           | Text      | The transaction amount, including currency.                    |

## Step 4 — Add a "Send a message to a channel" step

Under **Then, do these things**, add a step, open **Messages**, and choose **Send a message to a channel**.

<p align="center"><img src="/files/fiM8umNQ5pH0Sp2NHW4i" alt=""></p>

Select the destination channel (for example, `customer-support`). Then build the message: type each label, and use **Insert a variable** to drop in the matching webhook variable next to it.

<p align="center"><img src="/files/de0GAzQMptjOo8oPpCro" alt=""></p>

A message template that maps every variable to a labelled line:

```
Description: {description}
Merchant: {company_name}
Transaction Type: {transaction_type}
Merchant Reference: {reference}
Transaction Hash: {tx_hash}
Amount: {amount}
Address: {address}
Network: {network_name}
```

Save the step. Your workflow now starts from the webhook and posts to the channel.

<p align="center"><img src="/files/txti686DFn4l64pCf0w1" alt=""></p>

## Step 5 — Publish

Select **Finish Up**, confirm the workflow's name and permissions, and **Publish**.

<p align="center"><img src="/files/PHxtEJjjSw0JIFOpQtRi" alt=""></p>

After publishing, Slack confirms the workflow is live. You can optionally **Add to Channel** to surface it on the channel's Workflows tab.

<p align="center"><img src="/files/2bITEOggD7B7fJF8qNXM" alt=""></p>

## Step 6 — Share the URL with Txn

Open the webhook trigger again and copy the **Web request URL**. Share it with your **Txn implementation manager** or **Txn customer support**, who will configure Txn to send notifications to it.

Once configured, Txn posts a message to your channel each time a relevant payment event occurs.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.txn.io/getting-setup/sending-payment-notifications-to-slack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
