Get Recent Completed Transactions With Order Details
Returns a paginated list of completed transactions with their associated order details.
This endpoint combines data from both the transactions and orders tables.
Authentication & Authorization
- Requires Bearer token authentication
- Without
user_idparameter: Returns ALL completed transactions for ALL users - With
user_idparameter: Returns completed transactions for the specified user only
Usage Examples
Get all completed transactions (all users)
GET /api/v1/auth/transactions/completed?page_id=1&page_size=10
Returns all completed transactions across all users, ordered by creation date (most recent first).
Get completed transactions for a specific user
GET /api/v1/auth/transactions/completed?page_id=1&page_size=10&user_id=682e85d1-50c8-4242-bc78-21309ca34bc7
Returns completed transactions filtered by the specified user_id.
Response Fields
The response includes:
- Transaction fields:
user_id,from_wallet_id,to_wallet_id,status,to_address,token_type,token_symbol,usd_value,transaction_hash,fee - Order fields:
vendor_id,offer_id,usdt_amount,fiat_amount,fiat_currency,wallet_address,order_status,payment_method,payment_txn_id,blockchain_txn_hash,completed_at,mpesa_receipt_number,payment_phone_number,order_type,escrow_wallet_address,escrow_network,escrow_reference,deposit_tx_hash,deposit_confirmations,deposit_detected_at
Note: Nullable fields (e.g., to_address, transaction_hash, payment_txn_id, completed_at) are omitted from the response when null, or included as null when explicitly set to null.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Page number (1-indexed)
x >= 1Number of items per page
5 <= x <= 50Optional user ID filter. If provided, returns transactions for that specific user only. If omitted, returns all completed transactions for all users.
Response
Successfully retrieved completed transactions with order details