Skip to main content
GET
/
transactions
/
:id
curl -X GET https://api.blnkfinance.com/transactions/txn_a1b2c3d4e5f6 \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "transaction_id": "txn_a1b2c3d4e5f6",
  "source": "bln_src123",
  "destination": "bln_dst456",
  "reference": "order-12345",
  "amount": 100.50,
  "precise_amount": "10050",
  "precision": 100,
  "rate": 1.0,
  "currency": "USD",
  "description": "Payment for order #12345",
  "status": "APPLIED",
  "hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "allow_overdraft": false,
  "overdraft_limit": 0,
  "inflight": false,
  "skip_queue": false,
  "atomic": false,
  "created_at": "2024-01-15T10:30:00Z",
  "effective_date": "2024-01-15T10:30:00Z",
  "meta_data": {
    "customer_id": "cust_123",
    "order_id": "order-12345"
  }
}
Retrieve a single transaction by its unique ID.

Path Parameters

id
string
required
The unique transaction ID (e.g., txn_a1b2c3d4e5f6).

Response

transaction_id
string
Unique identifier for the transaction.
parent_transaction
string
ID of parent transaction if this is part of a distribution.
source
string
Source balance ID.
destination
string
Destination balance ID.
reference
string
Unique reference identifier.
amount
number
Transaction amount in major currency units.
precise_amount
string
Transaction amount in minor units as a big integer string.
amount_string
string
String representation of the amount for display.
precision
number
Precision multiplier used for amount calculations.
rate
number
Exchange rate applied to the transaction.
currency
string
Three-letter ISO currency code.
description
string
Human-readable description.
status
string
Current transaction status:
  • QUEUED - Pending processing
  • APPLIED - Successfully processed
  • SCHEDULED - Scheduled for future processing
  • INFLIGHT - Pending commitment
  • VOID - Voided inflight transaction
  • COMMIT - Committed inflight transaction
  • REJECTED - Failed validation or processing
hash
string
Cryptographic hash for integrity verification.
allow_overdraft
boolean
Whether overdraft was allowed.
overdraft_limit
number
Maximum allowed negative balance.
inflight
boolean
Whether this is an inflight transaction.
skip_queue
boolean
Whether transaction was processed synchronously.
atomic
boolean
Whether transaction is part of an atomic batch.
sources
array
Source distributions if this is a multi-source transaction.
destinations
array
Destination distributions if this is a multi-destination transaction.
created_at
string
ISO 8601 timestamp when transaction was created.
scheduled_for
string
ISO 8601 timestamp for scheduled processing.
effective_date
string
ISO 8601 timestamp of effective date for accounting.
inflight_expiry_date
string
ISO 8601 timestamp when inflight transaction expires.
meta_data
object
Custom key-value metadata.
{
  "transaction_id": "txn_a1b2c3d4e5f6",
  "source": "bln_src123",
  "destination": "bln_dst456",
  "reference": "order-12345",
  "amount": 100.50,
  "precise_amount": "10050",
  "precision": 100,
  "rate": 1.0,
  "currency": "USD",
  "description": "Payment for order #12345",
  "status": "APPLIED",
  "hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "allow_overdraft": false,
  "overdraft_limit": 0,
  "inflight": false,
  "skip_queue": false,
  "atomic": false,
  "created_at": "2024-01-15T10:30:00Z",
  "effective_date": "2024-01-15T10:30:00Z",
  "meta_data": {
    "customer_id": "cust_123",
    "order_id": "order-12345"
  }
}
curl -X GET https://api.blnkfinance.com/transactions/txn_a1b2c3d4e5f6 \
  -H "Authorization: Bearer YOUR_API_KEY"

Error Responses

error
string
Error message describing what went wrong.

Common Errors

400 Bad Request
{
  "error": "id is required. pass id in the route /:id"
}
Returned when the transaction ID is missing from the URL path. 400 Bad Request
{
  "error": "transaction not found"
}
Returned when no transaction exists with the specified ID.

Use Cases

Check Transaction Status

Poll this endpoint to monitor transaction processing:
async function waitForTransaction(txnId) {
  let status = 'QUEUED';
  
  while (status === 'QUEUED' || status === 'SCHEDULED') {
    const txn = await getTransaction(txnId);
    status = txn.status;
    
    if (status === 'APPLIED') {
      console.log('Transaction completed');
      return txn;
    }
    
    await new Promise(resolve => setTimeout(resolve, 1000));
  }
}

Verify Transaction Details

Retrieve full transaction details for reconciliation:
def reconcile_transaction(reference):
    # First get by reference
    txn = get_transaction_by_reference(reference)
    
    # Then get full details by ID
    full_txn = get_transaction(txn['transaction_id'])
    
    # Verify amounts match
    assert full_txn['amount'] == expected_amount
    assert full_txn['status'] == 'APPLIED'

Retrieve Distribution Details

Get parent and child transaction relationships:
async function getFullDistribution(parentId) {
  const parent = await getTransaction(parentId);
  
  if (parent.destinations) {
    // Fetch all child transactions
    const children = await Promise.all(
      parent.destinations.map(d => 
        getTransaction(d.transaction_id)
      )
    );
    
    return { parent, children };
  }
}

Monitor Inflight Transactions

Check inflight status and expiry:
def check_inflight_expiry(txn_id):
    txn = get_transaction(txn_id)
    
    if txn['inflight']:
        expiry = datetime.fromisoformat(txn['inflight_expiry_date'])
        now = datetime.now(timezone.utc)
        
        if now > expiry:
            print(f"Transaction {txn_id} has expired")
        else:
            remaining = (expiry - now).total_seconds()
            print(f"Expires in {remaining} seconds")

Response Field Details

Amount Fields

The response includes three amount representations:
  • amount (number): Float representation in major units (e.g., 100.50)
  • precise_amount (string): Exact value in minor units (e.g., "10050")
  • amount_string (string): Formatted display string
Always use precise_amount for calculations to avoid floating-point errors.

Status Field

The status field indicates the transaction lifecycle stage:
  • QUEUED: Created and waiting for processing
  • APPLIED: Successfully processed and balances updated
  • SCHEDULED: Waiting for scheduled_for date
  • INFLIGHT: Funds reserved, awaiting commit/void
  • COMMIT: Inflight transaction committed (becomes APPLIED)
  • VOID: Inflight transaction cancelled
  • REJECTED: Failed validation or processing

Hash Field

The hash is a cryptographic hash of the transaction data used for:
  • Integrity verification
  • Detecting tampering
  • Audit trails
The hash is automatically generated when the transaction is created.

Build docs developers (and LLMs) love