Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Listing invoice currencies and networks

Two lookups return the currencies and networks available for invoices across the platform. Use them to build a currency and network selector in your own interface: the currencies lookup gives you the codes and symbols to display, the networks lookup gives you the network codes to send. Neither reflects your account's configuration — to see which combinations are enabled for you, use Listing invoice currency pairs.

To build a selector:

  1. Call Listing invoice currencies and offer the entries with crypto: true as payment options.

  2. Call Listing invoice networks and group the entries by currencyCode. Show name to the customer and pass code as the network parameter of Create invoice, together with the currency code as chargedCurrency.

Both lookups are paginated and return up to 50 entries per page by default.

Listing invoice currencies

GET /api/public/v1/invoices/currencies

Returns the cryptocurrencies that have at least one network enabled for invoices, plus all fiat currencies. Fiat currencies are listed because an invoice can be denominated in them (billedCurrency); a customer cannot pay with them.

Headers

Name
Value

Content-Type

application/vnd.api+json

Authorization

Bearer <api_key>

URL Parameters

Name
Type
Description

page

integer

Page number, starting from 1. Defaults to 1.

per_page

integer

Entries per page. Defaults to 50, maximum 100.

cURL

curl "https://api.sandbox.txn.io/api/public/v1/invoices/currencies" \
     -H 'Content-Type: application/vnd.api+json' \
     -H 'Authorization: Bearer <api_key>'

Response Body

Name
Type
Description

data[].id

string

Currency code. Same as code.

data[].type

string

Always currencies.

data[].attributes.code

string

Currency code.

data[].attributes.crypto

boolean

true for cryptocurrencies, false for fiat.

data[].attributes.symbol

string

Display symbol for the currency.

data[].attributes.subunitToUnit

number

Number of smallest units in one whole unit (e.g. 100000000 for BTC, 100 for EUR).

data[].relationships.networks

object

Placeholder only; network objects are not included in this response. Use the networks lookup below.

meta.page

number

Current page.

meta.per_page

number

Entries per page.

meta.total

number

Total number of currencies.

Response

The sample is shortened to three entries.

Listing invoice networks

GET /api/public/v1/invoices/networks

Returns the networks enabled for invoice payments. currencyCode tells you which currency each network carries, so a currency such as USDT appears once per network it is available on.

Headers

Name
Value

Content-Type

application/vnd.api+json

Authorization

Bearer <api_key>

URL Parameters

Name
Type
Description

page

integer

Page number, starting from 1. Defaults to 1.

per_page

integer

Entries per page. Defaults to 50, maximum 100.

cURL

Response Body

Name
Type
Description

data[].id

string

Network ID.

data[].type

string

Always network.

data[].attributes.code

string

Network code. Pass it as the network parameter in [Create invoice](creating-invoice.md).

data[].attributes.name

string

Human-readable network name, suitable for display.

data[].attributes.currencyCode

string

Code of the currency carried on this network.

meta.page

number

Current page.

meta.per_page

number

Entries per page.

meta.total

number

Total number of networks.

Response

The sample is shortened to three entries.

Network codes in the Sandbox environment differ from those in Production — testnet networks are prefixed (tbtc, ttrx:usdt, hteth). Read the codes from the environment you are calling rather than hard-coding them. See Supported currencies.

Last updated