Creating channel

POST /api/public/v1/channels

This endpoint creates channels.

XRP Channel Addresses Format:

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

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

Indicates the merchant’s currency account on the txn okatform, i.e. the account to which the deposit will be credited. Refer to supported currencies.

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 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

{
  "data": {
    "id": "60e05bc0-4690-4985-a08a-8acf00e48294",
    "type": "channels",
    "attributes": {
      "reference": "ecd05fb9-76e6-42e7-b86e-5a7e18f4da6d",
      "status": "enabled",
      "createdAt": "2024-09-25T08:35:07.034Z",
      "updatedAt": "2024-09-25T08:35:07.034Z",
      "payCurrency": "USDT",
      "targetCurrency": "USD",
      "localCurrency": "JPY",
      "address": "TJTuEYJ8P9to4Zhdw7zg55VPH3gzLaQDV6",
      "networkName": "Tron (TRC20)",
      "networkCode": "ttrx:usdt",
      "hostedPageUrl": "https://sandbox.txn.pro/redirect?channel_id=60e05bc0-4690-4985-a08a-8acf00e48294\u0026request_type=channel_hosted_page\u0026zone=eu"
    }
  },
  "meta": {},
  "jsonapi": {
    "version": "1.0"
  }
}

Response Body

Name
Type
Description

data.id

string

Channel ID.

data.type

string

Always channels.

data.attributes.targetCurrency

string

Indicates the merchant’s currency account on the txn okatform, i.e. the account to which the deposit will be credited. Refer to supported currencies.

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 currencies.

data.attributes.address

string

Channel address.

data.attributes.networkCode

string

Payment network code. Refer to supported networks.

data.attributes.networkName

string

Network name.

data.attributes.hostedPageUrl

sting

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.

Last updated