> 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/channels/creating-channel.md).

# Creating channel

<mark style="color:green;">`POST`</mark> `/api/public/v1/channels`

This endpoint creates channels.

**XRP Channel Addresses Format:**

For XRP channels, addresses are returned in the following format:

```css
rwCQVZLSMNY6DgMH61317qvH3nHYqm68PF?dt=xyz
```

where `xyz` is a unique destination tag generated for each channel.

A destination tag acts like a reference number in bank transfers, identifying the intended beneficiary of the transaction.

**Displaying Channel Deposit Addresses:**

* When showing the deposit address to your customers, separate the address and the destination tag, and ensure both are clearly viewable and copyable

**Headers**

| Name          | Value                      |
| ------------- | -------------------------- |
| Content-Type  | `application/vnd.api+json` |
| Authorization | `Bearer <api_key>`         |

**Body**

| Name                            | Type   | Required | Description                                                                                                                                                                                                                                                                               |
| ------------------------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| data.type                       | string | yes      | Always `channels`.                                                                                                                                                                                                                                                                        |
| data.attributes.targetCurrency  | string | yes      | Specifies the merchant’s currency account on the txn platform to which the deposit will be credited. Must be a tradable fiat or cryptocurrency listed on the [Supported currencies](https://docs.txn.io/api-basics/supported-currencies) page — display fiat currencies are not accepted. |
| data.attributes.targetAccountId | string | no       | Specifies the ID of the account to which the channel payments should be credited. Can be a master or subaccount ID. If not present, payments will be credited to your master account by default.                                                                                          |
| data.attributes.localCurrency   | string | no       | Currency to display to end users, e.g. their local currency in which they hold a balance on the merchant’s platform. This field is optional and can be different from the `targetCurrency` value.                                                                                         |
| data.attributes.payNetwork      | string | yes      | Payment network code. Refer to [supported](https://docs.txn.io/api-basics/supported-currencies) networks.                                                                                                                                                                                 |
| data.attributes.reference       | string | no       | The custom reference ID to tie the channel and its deposits to end-user who pays. This can be anything you choose. Must be a unique value for each channel you create.                                                                                                                    |
| data.attributes.status          | string | yes      | Channel status. Can be either `enabled` or `disabled`. If `enabled`, deposits get processed and credited to the merchant's account as normal. If `disabled`, deposits do not get credited to the merchant's account.                                                                      |

**Response**

{% tabs %}
{% tab title="HTTP 200" %}

```json
{
  "data": {
    "id": "ace25dae-dc26-4fdc-9a7a-6561237f340b",
    "type": "channels",
    "attributes": {
      "address": "TUbpY2zUNFDcpacgNzoJczT4x8ctV2mmLn",
      "createdAt": "2026-05-26T09:44:53.750Z",
      "hostedPageUrl": "https://sandbox.txn.io/redirect?channel_id=ace25dae-dc26-4fdc-9a7a-6561237f340b&request_type=channel_hosted_page&zone=eu",
      "localCurrency": "TRY",
      "network": "ttrx:usdt",
      "networkCode": "ttrx:usdt",
      "networkName": "Tron (TRC20)",
      "payCurrency": "USDT",
      "reference": "docs-try-eur-example-001",
      "status": "enabled",
      "targetCurrency": "EUR",
      "updatedAt": "2026-05-26T09:44:53.750Z"
    },
    "relationships": {
      "targetAccount": {
        "data": {
          "id": "13a85b45-8543-41c7-b963-394d4ea128ae",
          "type": "accounts"
        }
      }
    }
  },
  "included": [
    {
      "id": "13a85b45-8543-41c7-b963-394d4ea128ae",
      "type": "accounts",
      "attributes": {
        "balance": "38270.61",
        "bankDepositAvailable": true,
        "bankReference": "BDR6421088115176062",
        "bankWithdrawalAvailable": true,
        "currencyCode": "EUR",
        "currencyType": "fiat",
        "label": "master",
        "master": true,
        "totalBalance": null,
        "transferAvailable": true
      },
      "relationships": {
        "company": { "meta": { "included": false } },
        "networks": { "meta": { "included": false } },
        "txnBankCredentials": { "meta": { "included": false } }
      }
    }
  ],
  "meta": {},
  "jsonapi": {
    "version": "1.0"
  }
}
```

{% endtab %}

{% tab title="HTTP 422" %}

```json
{
  "errors": [
    {
      "title": "Reference must be unique within company",
      "detail": "Reference must be unique within company",
      "code": "reference must be unique within company"
    }
  ]
}
```

Duplicate reference.
{% endtab %}
{% endtabs %}

**Response Body**

| Name                                  | Type   | Description                                                                                                                                                                                                                                                                               |
| ------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| data.id                               | string | Channel ID.                                                                                                                                                                                                                                                                               |
| data.type                             | string | Always `channels`.                                                                                                                                                                                                                                                                        |
| data.attributes.targetCurrency        | string | Specifies the merchant’s currency account on the txn platform to which the deposit will be credited. Must be a tradable fiat or cryptocurrency listed on the [Supported currencies](https://docs.txn.io/api-basics/supported-currencies) page — display fiat currencies are not accepted. |
| data.attributes.localCurrency         | string | Currency to display to end users, e.g. their local currency in which they hold a balance on the merchant’s platform. This field is optional and can be different from the `targetCurrency` value.                                                                                         |
| data.attributes.payCurrency           | string | Crypto currency that customer must pay in. Refer to [supported](/api-basics/supported-currencies.md) currencies.                                                                                                                                                                          |
| data.attributes.address               | string | Channel address.                                                                                                                                                                                                                                                                          |
| data.attributes.networkCode           | string | Payment network code. Refer to [supported](https://docs.txn.io/api-basics/supported-currencies) networks.                                                                                                                                                                                 |
| data.attributes.network               | string | Alias for `networkCode`. Refer to [supported](https://docs.txn.io/api-basics/supported-currencies) networks.                                                                                                                                                                              |
| data.attributes.networkName           | string | Network name.                                                                                                                                                                                                                                                                             |
| data.attributes.hostedPageUrl         | string | Channel redirect URL hosted by Txn.                                                                                                                                                                                                                                                       |
| data.attributes.reference             | string | The custom reference ID to tie the channel and its deposits to end-user who pays.                                                                                                                                                                                                         |
| data.attributes.status                | string | Channel status. Can be either `enabled` or `disabled`. If `enabled`, deposits get processed and credited to the merchant’s account as normal. If `disabled`, deposits do not get credited to the merchant’s account.                                                                      |
| data.attributes.createdAt             | string | Timestamp when a channel was created.                                                                                                                                                                                                                                                     |
| data.attributes.updatedAt             | string | Timestamp when a channel was last updated.                                                                                                                                                                                                                                                |
| data.relationships.targetAccount      | object | Reference to the account the channel is credited to. The full account entity is returned in `included[]`.                                                                                                                                                                                 |
| included\[].type(accounts).attributes | object | The target account the channel payments are credited to. Includes standard account fields: `currencyCode`, `balance`, `bankWithdrawalAvailable`, `bankDepositAvailable`, `transferAvailable`, etc.                                                                                        |


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.txn.io/channels/creating-channel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
