Txn.pro - API Documentation
Sandbox LoginChangelogStatus Page
  • Getting setup
    • Environments
    • Creating a Sandbox account
    • Back office user roles
    • Creating your API keys
    • Postman collection
  • API Basics
    • API specification
    • API status
    • Supported currencies
    • Date and time format
    • Authenticating the API
    • Webhooks
      • Verifying webhooks
      • Source IP addresses
      • Retrying schedule
    • Rate limits
  • Hosted pages
  • Accounts
    • Accounts concept
    • Listing accounts
    • Reading account
    • Listing account addresses
    • Creating account address
    • Listing account transactions
    • Reading account transaction
  • Exchange
    • Exchange concept
    • Supported currency pairs
    • Reading exchange rates
    • Exchange webhooks
    • Creating quote
    • Confirming quote
  • Invoices
    • Invoices concept
    • Invoice status flow
    • Invoices in cashier
    • Invoice limitations
    • Listing invoice currency pairs
    • Invoice webhooks
    • Creating invoice
    • Reading invoice
    • Listing invoices
    • Invoice refunds
  • Payouts
    • Payouts concept
    • Payout status flow
    • Payout limitations
    • Listing payout currency pairs
    • Validating addresses
    • Payout webhooks
    • Creating payout
    • Reading payout
    • Listing payouts
  • Mass Payouts
  • PAYMENT LINKS
    • Payment links concept
    • Creating payment link
    • Expiring payment link
    • Reading payment link
    • Listing payment links
  • CHANNELS
    • Channels concept
    • Channels deposit flow
    • Listing channel currency pairs
    • Channel webhooks
    • Creating channel
    • Reading channel
    • Updating channel
    • Listing channels
    • Listing channel deposits
    • Reading channel deposit
  • (BETA) Fiat Settlements
    • Important information
    • Bank withdrawal webhooks
    • Bank deposit webhooks
    • Listing bank accounts
    • Reading bank account
    • Previewing bank withdrawal
    • Creating bank withdrawal
    • Listing bank withdrawals
    • Reading bank withdrawal
    • Listing bank deposits
    • Reading bank deposit
Powered by GitBook
On this page
  1. Invoices

Listing invoices

GET /api/public/v1/invoices

This endpoint returns a list of invoices with pagination.

Headers

Name
Value

Content-Type

application/vnd.api+json

Authorization

Bearer <api_key>

URL Parameters

Name
Type
Description

order

string

Order in which the list of transactions should be returned. Can be created_at.

order_type

string

Order type. Can be either asc or desc.

page

number

Page for which you want to return transactions.

per_page

number

Number of transactions per page to return.

reference

number

Invoice reference.

Response Body

Name
Type
Description

data.id

string

Invoice ID.

data.type

string

Entity type returned. Always invoices.

data.attributes

object

Set of invoice attributes.

data.attributes.amountBilled

string

Invoice amount to display to end users. Determines the amount due after conversion.

data.attributes.amountCharged

string

Amount due. Determines the amount of cryptucurrency the end-user is required to pay.

data.attributes.targetAmount

string

Amount you receive into your target currency account.

data.attributes.billedCurrency

string

data.attributes.chargedCurrency

string

data.attributes.targetCurrency

string

data.attributes.chargedTargetRate

string

Charged currency to target currency exchange rate.

data.attributes.chargedTargetRateCurrency

string

Charged currency to target currency exchange rate.

data.attributes.reference

string

The custom reference ID to tie the invoice to end-user who pays. This can be anything you choose.

data.attributes.statusContext

string

data.attributes.network

string

data.attributes.networkName

string

Network name to display.

data.attributes.status

string

data.attributes.successRedirectUrl

string

URL your customer will be redirected from our hosted page to if the invoice completes.

data.attributes.unsuccessRedirectUrl

string

URL your customer will be redirected from our hosted page to if the invoice gets expired, cancelled or rejected.

data.attributes.paymentStatus

string

data.attributes.exchangeRate

string

Invoice exchange rate valid for 20 minutes.

data.attributes.expiresAt

string

Invoice expiry date and time.

data.attributes.createdAt

string

Date and time invoice was created at.

data.attributes.hostedPageUrl

string

Invoice hosted page.

included.type(addresses).attributes

object

Invocie receiving address. This is the address the end-user must send their crytpocurrency payment to.

included.type(invoiceTransactions).attributes.amountBilled

object

Invoice amount resulting from the invoice payment before the invoice processing fees. It is typically the amount you will want to credit to the account.

included.type(invoiceTransactions).attributes.billedChargedRate

object

Charged currency to billed currency exchange rate applied by Txn.

included.type(invoiceTransactions).attributes.billedChargedRateCurrency

object

Charged currency to billed currency exchange rate applied by Txn.

included.type(invoiceTransactions).attributes.transactionFee

object

Fee associated with the invoice represented in billedCurrency. For example, if the invoice is billed in TRY, the fee is also expressed in TRY.

included.type(invoiceTransactions).attributes.transactionFeeCurrency

object

Fee associated with the invoice represented in billedCurrency. For example, if the invoice is billed in TRY, the fee is also expressed in TRY.

included.type(invoiceTransactions).attributes.targetTransactionFee

object

Fee associated with the invoice represented in targetCurrency. For example, if the invoice target currency is EUR, the fee is also expressed in EUR.

included.type(invoiceTransactions).attributes.targetTransactionFeeCurrency

object

Fee associated with the invoice represented in targetCurrency. For example, if the invoice target currency is EUR, the fee is also expressed in EUR.

included.type(coinDeposits).attributes

object

Data related to cryptocurrency payment/s made by the end-user. In this object you will find a transaction hash txHash, transaction amount amount and transaction timestamp createdAt.

included.type(transactions).attributes

object

Data related to invoice entries on the merchant's currency account on Txn. Efectively, this will be the amount credited to your account on the Txn platform after the invoice processing fees.

included.type(exchangeQuotes).attributes

object

This exchange quote pertains to a currency conversion involving both the charged currency and the target currency.

Response

{
  "data": [
    {
      "id": "fe8ea84a-8490-4133-87e9-3209e6d1f7db",
      "type": "invoices",
      "attributes": {
        "amountBilled": "10000.00",
        "amountCharged": "283.417792",
        "targetAmount": "266.17",
        "billedCurrency": "TRY",
        "chargedCurrency": "USDT",
        "targetCurrency": "EUR",
        "chargedTargetRate": "0.948618",
        "chargedTargetRateCurrency": "EUR",
        "reference": "bc32c092-8979-4435-b176-ae1b790b1ca6",
        "statusContext": "full",
        "network": "ttrx:usdt",
        "networkName": "Tron (TRC20)",
        "status": "completed",
        "successRedirectUrl": "https://yahoo.com",
        "unsuccessRedirectUrl": "https://myspace.com",
        "paymentStatus": "on_time",
        "exchangeRate": "35.2836",
        "expiresAt": "2025-01-28T16:46:56.063Z",
        "createdAt": "2025-01-28T16:26:56.275Z",
        "hostedPageUrl": "https://sandbox.txn.pro/redirect?invoice_id=fe8ea84a-8490-4133-87e9-3209e6d1f7db\u0026request_type=invoice_hosted_page"
      },
      "relationships": {
        "address": {
          "data": {
            "type": "addresses",
            "id": "e4c1c999-52a5-470b-a8c4-e88d875eb3cf"
          }
        },
        "refundLinks": {
          "data": []
        },
        "invoiceTransactions": {
          "data": [
            {
              "type": "invoiceTransactions",
              "id": "89d6e25d-70ff-4d89-b784-0aac1df896a0"
            }
          ]
        },
        "coinDeposits": {
          "data": [
            {
              "type": "coinTransactions",
              "id": "32520a71-f71a-4878-97c1-41844cd96d9d"
            }
          ]
        }
      }
    }
  ],
  "included": [
    {
      "id": "e4c1c999-52a5-470b-a8c4-e88d875eb3cf",
      "type": "addresses",
      "attributes": {
        "label": "Tron (TRC20)",
        "value": "TSEC2CvHZ1MgiA8VhgWoRHpXSxPY6wndyW",
        "createdAt": "2025-01-28T15:19:00.020Z"
      },
      "relationships": {
        "account": {
          "meta": {
            "included": false
          }
        },
        "network": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "89d6e25d-70ff-4d89-b784-0aac1df896a0",
      "type": "invoiceTransactions",
      "attributes": {
        "amountBilled": "10000.00",
        "billedChargedRate": "35.2836",
        "billedChargedRateCurrency": "TRY",
        "consolidationFee": "0.00",
        "transactionFee": "100.00",
        "transactionFeeCurrency": "TRY",
        "targetTransactionFee": "2.69",
        "targetTransactionFeeCurrency": "EUR"
      },
      "relationships": {
        "txn": {
          "data": {
            "type": "transactions",
            "id": "89d6e25d-70ff-4d89-b784-0aac1df896a0"
          }
        },
        "exchangeQuote": {
          "data": {
            "type": "exchangeQuotes",
            "id": "a8a7da6c-f60c-4546-9036-bb0ca8da9d75"
          }
        },
        "invoice": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "32520a71-f71a-4878-97c1-41844cd96d9d",
      "type": "coinTransactions",
      "attributes": {
        "txHash": "1c378c68c5b78573e069642036747754ed7edbad0cd35d0fa734739243906f18",
        "currencyCode": "USDT",
        "createdAt": "2025-01-28T16:28:26.669Z",
        "state": "processed",
        "amount": "283.417792",
        "accountId": "e289de2b-37bd-4eff-b832-f754c31a2d95"
      },
      "relationships": {
        "network": {
          "meta": {
            "included": false
          }
        },
        "address": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "89d6e25d-70ff-4d89-b784-0aac1df896a0",
      "type": "transactions",
      "attributes": {
        "createdAt": "2025-01-28T16:38:38.363Z",
        "simplifiedState": "completed",
        "transactionType": "InvoiceTransaction",
        "amount": "266.17",
        "reference": "bc32c092-8979-4435-b176-ae1b790b1ca6"
      },
      "relationships": {
        "account": {
          "meta": {
            "included": false
          }
        },
        "transactionDetails": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "a8a7da6c-f60c-4546-9036-bb0ca8da9d75",
      "type": "exchangeQuotes",
      "attributes": {
        "expiresAt": "2025-01-28T16:39:08.437Z",
        "amountCharged": "283.417792",
        "amountReceived": "268.86",
        "rate": "0.948618",
        "exchangeFee": "0.00",
        "exchangeFeeCurrency": "EUR",
        "rateCurrency": "EUR",
        "accountChargedId": "e289de2b-37bd-4eff-b832-f754c31a2d95",
        "accountReceivedId": "13a85b45-8543-41c7-b963-394d4ea128ae",
        "amountChargedCurrency": "USDT",
        "amountReceivedCurrency": "EUR"
      },
      "relationships": {
        "exchangeOrder": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "meta": {
    "page": "1",
    "per_page": "1",
    "total": 2190
  },
  "jsonapi": {
    "version": "1.0"
  }
}
PreviousReading invoiceNextInvoice refunds

Last updated 3 months ago

Invoice currency to display to end users. Determines the currency due after conversion. Refer to currencies.

Crypto currency that customer must pay in. Refer to currencies.

Settlement currency. Refer to currencies.

Invoice status context. Refer to .

Network code. Refer to .

Invoice status. Refer to .

Invoice payment status. Refer to .

supported
supported
supported
Invoice status flow
Supported currencies
Invoice status flow
Invoice status flow