This API allows you to view and manually create cryptocurrency transactions for your account.
The crypto transaction object
Unique identifier with trxn_ prefix (e.g., trxn_abc123def456).
Always "crypto_transaction".
Transaction amount (string to preserve precision).
Blockchain transaction hash.
Source of the transaction: manual_entry or blockchain.
When the transaction occurred (ISO 8601).
Currency code (e.g., BTC, ETH).
Sending address ID. May be null.
Sending address. May be null.
Transaction allocations to invoices. Show allocation properties
Unique identifier for the allocation.
Invoice ID this allocation applies to.
allocations[].amount_applied
Amount applied to the invoice.
When the allocation was created (ISO 8601).
When the record was created (ISO 8601).
When the record was last updated (ISO 8601).
List crypto transactions
GET /v1/crypto_transactions
Retrieves a paginated list of all crypto transactions in your account. Transactions are ordered by timestamp (newest first).
Page number for pagination. Results are returned 25 items per page.
curl https://api.gettrxn.com/v1/crypto_transactions \
-H "Authorization: Bearer $TRXN_TOKEN "
{
"crypto_transactions" : [
{
"id" : "trxn_abc123def456" ,
"object" : "crypto_transaction" ,
"amount" : "0.5" ,
"transaction_id" : "0x1234567890abcdef..." ,
"transaction_source" : "manual_entry" ,
"timestamp" : "2025-01-25T12:00:00Z" ,
"currency" : "BTC" ,
"from_address_id" : "addr_xyz789" ,
"from_address" : "bc1q..." ,
"to_address_id" : "addr_abc123" ,
"to_address" : "bc1q..." ,
"allocations" : [
{
"id" : "alloc_123" ,
"invoice_id" : "inv_456" ,
"amount_applied" : "0.25" ,
"created_at" : "2025-01-25T12:30:00Z"
}
],
"created_at" : "2025-01-25T12:00:00Z" ,
"updated_at" : "2025-01-25T12:00:00Z"
}
],
"pagination" : {
"page" : 1 ,
"pages" : 3 ,
"count" : 67
}
}
Get crypto transaction
GET /v1/crypto_transactions/:id
Retrieves a specific crypto transaction by ID, including its allocations.
The transaction’s ID (e.g., trxn_abc123def456).
curl https://api.gettrxn.com/v1/crypto_transactions/trxn_abc123def456 \
-H "Authorization: Bearer $TRXN_TOKEN "
{
"id" : "trxn_abc123def456" ,
"object" : "crypto_transaction" ,
"amount" : "0.5" ,
"transaction_id" : "0x1234567890abcdef..." ,
"transaction_source" : "manual_entry" ,
"timestamp" : "2025-01-25T12:00:00Z" ,
"currency" : "BTC" ,
"from_address_id" : "addr_xyz789" ,
"from_address" : "bc1q..." ,
"to_address_id" : "addr_abc123" ,
"to_address" : "bc1q..." ,
"allocations" : [
{
"id" : "alloc_123" ,
"invoice_id" : "inv_456" ,
"amount_applied" : "0.25" ,
"created_at" : "2025-01-25T12:30:00Z"
}
],
"created_at" : "2025-01-25T12:00:00Z" ,
"updated_at" : "2025-01-25T12:00:00Z"
}
Create crypto transaction
POST /v1/crypto_transactions
Creates a new crypto transaction manually. This is useful for recording transactions that were not automatically detected by the system.
The receiving address ID (e.g., addr_abc123). Must belong to your account.
The transaction amount (as a string to preserve precision).
The currency code (e.g., BTC, ETH).
The blockchain transaction hash/ID.
The transaction timestamp (ISO 8601 format). Defaults to current time.
The sending address ID (e.g., addr_xyz789).
curl -X POST https://api.gettrxn.com/v1/crypto_transactions \
-H "Authorization: Bearer $TRXN_TOKEN " \
-H "Content-Type: application/json" \
-d '{
"to_address_id": "addr_abc123",
"amount": "0.5",
"currency_code": "BTC",
"transaction_id": "0x1234567890abcdef...",
"timestamp": "2025-01-25T12:00:00Z"
}'
{
"id" : "trxn_new123abc456" ,
"object" : "crypto_transaction" ,
"amount" : "0.5" ,
"transaction_id" : "0x1234567890abcdef..." ,
"transaction_source" : "manual_entry" ,
"timestamp" : "2025-01-25T12:00:00Z" ,
"currency" : "BTC" ,
"from_address_id" : null ,
"from_address" : null ,
"to_address_id" : "addr_abc123" ,
"to_address" : "bc1q..." ,
"allocations" : [],
"created_at" : "2025-01-25T14:30:00Z" ,
"updated_at" : "2025-01-25T14:30:00Z"
}
Error responses
{
"error" : {
"type" : "invalid_request_error" ,
"code" : "resource_not_found" ,
"message" : "Crypto address not found" ,
"param" : "to_address_id"
}
}
{
"error" : {
"type" : "invalid_request_error" ,
"code" : "resource_not_found" ,
"message" : "Currency not found: DOGE" ,
"param" : "currency_code"
}
}
The allocation object
Field Type Description idstring Unique identifier for the allocation. invoice_idstring Invoice ID this allocation applies to. amount_appliedstring Amount applied to the invoice. created_atstring When the allocation was created (ISO 8601).
Sandbox support
The API respects sandbox scoping. If your API token is associated with a sandbox, you can only access transactions created in that sandbox. Manually created transactions will be isolated from production data.