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
    • Reading exchange rates
    • Exchange webhooks
    • Creating quote
    • Confirming quote
    • Listing quotes
    • Reading 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

Reading invoice

GET /api/public/v1/invoices/:id

This endpoint returns details of a particular invoice by its ID.

Headers

Name
Value

Content-Type

application/vnd.api+json

Path Parameters

Name
Value

id

Invoice ID

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 will receive into your target currency account.

data.attributes.billedCurrency

string

data.attributes.chargedCurrency

string

data.attributes.targetCurrency

string

Settlement currency. This is the currency you will receive in your account after the payment is processed.

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

string

Invoice payment methods.

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(binanceOrders).attributes

object

Payment instructions for an off-chain payment via the Binance application.

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": "unpaid",
      "network": "ttrx:usdt",
      "networkName": "Tron (TRC20)",
      "paymentMethods": [
        "on_chain",
        "binance_pay"
      ],
      "status": "pending",
      "successRedirectUrl": "https://yahoo.com",
      "unsuccessRedirectUrl": "https://myspace.com",
      "paymentStatus": "expecting",
      "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": {
       "binanceOrder": {
        "data": {
          "type": "binanceOrders",
          "id": "5e623ab4-f0fc-43df-af01-b3208aa6af0b"
        }
      },
      "address": {
        "data": {
          "type": "addresses",
          "id": "e4c1c999-52a5-470b-a8c4-e88d875eb3cf"
        }
      },
      "refundLinks": {
        "meta": {
          "included": false
        }
      },
      "invoiceTransactions": {
        "meta": {
          "included": false
        }
      },
      "coinDeposits": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "included": [
    {
      "id": "5e623ab4-f0fc-43df-af01-b3208aa6af0b",
      "type": "binanceOrders",
      "attributes": {
        "deeplink": "bnc://app.binance.com/payment/secpay?tempToken=41wu19i6qX348MzHSdhyjNcbXC0xe8jA",
        "qrContent": "https://app.binance.com/qr/dplk1d9affed91d34e019653a3d627672478",
        "qrcodeLink": "https://public.bnbstatic.com/static/payment/20250606/18e063aa-9e98-4805-a861-68119e031ea7.jpg",
        "universalUrl": "https://app.binance.com/payment/secpay?linkToken=3104f0eab7ae49a998b10752421b2d99&_dp=Ym5jOi8vYXBwLmJpbmFuY2UuY29tL3BheW1lbnQvc2VjcGF5P3RlbXBUb2tlbj00MXd1MTlpNnFYMzQ4TXpIU2RoeWpOY2JYQzB4ZThqQQ"
      }
    },
    {
      "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
          }
        }
      }
    }
  ],
  "meta": {},
  "jsonapi": {
    "version": "1.0"
  }
}
PreviousCreating invoiceNextListing invoices

Last updated 3 days 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.

Invoice status context. Refer to .

Network code. Refer to .

Invoice status. Refer to .

Invoice payment status. Refer to .

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