Retrieve a single transaction by its unique ID.
Path Parameters
The unique transaction ID (e.g., txn_a1b2c3d4e5f6).
Response
Unique identifier for the transaction.
ID of parent transaction if this is part of a distribution.
Unique reference identifier.
Transaction amount in major currency units.
Transaction amount in minor units as a big integer string.
String representation of the amount for display.
Precision multiplier used for amount calculations.
Exchange rate applied to the transaction.
Three-letter ISO currency code.
Human-readable description.
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
Cryptographic hash for integrity verification.
Whether overdraft was allowed.
Maximum allowed negative balance.
Whether this is an inflight transaction.
Whether transaction was processed synchronously.
Whether transaction is part of an atomic batch.
Source distributions if this is a multi-source transaction.
Destination distributions if this is a multi-destination transaction.
ISO 8601 timestamp when transaction was created.
ISO 8601 timestamp for scheduled processing.
ISO 8601 timestamp of effective date for accounting.
ISO 8601 timestamp when inflight transaction expires.
Custom key-value metadata.
Applied Transaction
Inflight Transaction
Distribution Transaction
Rejected Transaction
{
"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 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.