Skip to main content
This API allows you to create and manage cryptocurrency addresses for receiving payments.

The crypto address object

id
string
Unique identifier with addr_ prefix (e.g., addr_abc123def456).
object
string
Always "crypto_address".
address
string
The cryptocurrency address.
currency
string
Currency code (e.g., BTC, ETH).
wallet_id
string
The wallet ID this address belongs to.
explorer
object
Blockchain explorer information.
created_at
string
When the address was created (ISO 8601).
updated_at
string
When the address was last updated (ISO 8601).

List crypto addresses

GET /v1/crypto_addresses
Retrieves a paginated list of all crypto addresses in your account. Addresses are ordered by creation date (newest first).
page
integer
default:"1"
Page number for pagination. Results are returned 25 items per page.
curl https://api.gettrxn.com/v1/crypto_addresses \
  -H "Authorization: Bearer $TRXN_TOKEN"
Response
{
  "crypto_addresses": [
    {
      "id": "addr_abc123def456",
      "object": "crypto_address",
      "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
      "currency": "BTC",
      "wallet_id": "wall_xyz789",
      "explorer": {
        "name": "Blockchain.com",
        "url": "https://www.blockchain.com/explorer/addresses/btc/bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
      },
      "created_at": "2025-01-25T12:00:00Z",
      "updated_at": "2025-01-25T12:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "pages": 3,
    "count": 67
  }
}

Get crypto address

GET /v1/crypto_addresses/:id
Retrieves a specific crypto address by ID.
id
string
required
The address’s ID (e.g., addr_abc123def456).
curl https://api.gettrxn.com/v1/crypto_addresses/addr_abc123def456 \
  -H "Authorization: Bearer $TRXN_TOKEN"
Response
{
  "id": "addr_abc123def456",
  "object": "crypto_address",
  "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
  "currency": "BTC",
  "wallet_id": "wall_xyz789",
  "explorer": {
    "name": "Blockchain.com",
    "url": "https://www.blockchain.com/explorer/addresses/btc/bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
  },
  "created_at": "2025-01-25T12:00:00Z",
  "updated_at": "2025-01-25T12:00:00Z"
}

Create crypto address

POST /v1/crypto_addresses
Creates a new crypto address in a wallet. The wallet can be either an account wallet or a customer wallet.
wallet_id
string
required
The wallet’s ID (e.g., wall_xyz789). Must belong to your account.
currency_code
string
required
The currency code (e.g., BTC, ETH). Must be a supported currency.
address
string
required
The cryptocurrency address. Validated based on the currency format.
curl -X POST https://api.gettrxn.com/v1/crypto_addresses \
  -H "Authorization: Bearer $TRXN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "wallet_id": "wall_xyz789",
    "currency_code": "BTC",
    "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
  }'
Response
{
  "id": "addr_new123abc456",
  "object": "crypto_address",
  "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
  "currency": "BTC",
  "wallet_id": "wall_xyz789",
  "explorer": {
    "name": "Blockchain.com",
    "url": "https://www.blockchain.com/explorer/addresses/btc/bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
  },
  "created_at": "2025-01-25T14:30:00Z",
  "updated_at": "2025-01-25T14:30:00Z"
}

Error responses

Wallet not found
{
  "error": {
    "type": "invalid_request_error",
    "code": "resource_not_found",
    "message": "Wallet not found",
    "param": "wallet_id"
  }
}
Unsupported currency
{
  "error": {
    "type": "invalid_request_error",
    "code": "resource_not_found",
    "message": "Currency not found: DOGE",
    "param": "currency_code"
  }
}
Duplicate address
{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_invalid",
    "message": "Address is already in use for this currency in your account",
    "param": "address"
  }
}

Delete crypto address

DELETE /v1/crypto_addresses/:id
Deletes a crypto address from your account.
Deleting an address will also delete any associated payment claims and transaction records.
id
string
required
The address’s ID (e.g., addr_abc123def456).
curl -X DELETE https://api.gettrxn.com/v1/crypto_addresses/addr_abc123def456 \
  -H "Authorization: Bearer $TRXN_TOKEN"
Returns 204 No Content on successful deletion.

Address validation

Addresses are validated based on their currency:
  • BTC: Validates Bitcoin address formats (legacy, SegWit, native SegWit).
  • ETH: Validates Ethereum address format (0x followed by 40 hex characters).

Supported currencies

CurrencyExplorer
BTCBlockchain.com
ETHEtherscan

Sandbox support

The API respects sandbox scoping. If your API token is associated with a sandbox, you can only access addresses created in that sandbox. Address uniqueness is enforced separately within each sandbox.