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. API Basics

Authenticating the API

The API key is necessary to use authenticated endpoints of our API. The API key should be included in the Authorization HTTP header. The key should be prefixed by the string literal Bearer .

For example, Authorization: Bearer txn_cmp_F41bbUWxPR2FCPA3KK5t1NadFE9Ghn.

curl -X "POST" "https://api.sandbox.txn.pro/api/public/v1/invoices" \
     -H 'Content-Type: application/vnd.api+json' \
     -H 'Authorization: Bearer txn_cmp_F41bbUWxPR2FCPA3KK5t1NadFE9Ghn' \
     -d $'{
  "data": {
    "type": "invoices",
    "attributes": {
      "amountBilled": "1000",
      "billedCurrency": "EUR",
      "chargedCurrency": "USDT",
      "network": "TTRX:USDT",
      "reference": "37ac503d-4e1f-458e-8407-033ab8bd1e5c"
    }
  }
}'

Otherwise your will receive HTTP 401 Unauthorized:

{
  "errors": [
    {
      "status": 401,
      "title": "HTTP Token: Access denied.",
      "code": "unauthorized"
    }
  ]
}
PreviousDate and time formatNextWebhooks

Last updated 10 months ago

To create your API keys, please refer to the page in this documentation

Creating your API keys