Skip to main content

Get Transaction API

Get Transaction by ID

Retrieves detailed information about a specific transaction using its ID.

  • URL: /v1/payment/transaction/:id

  • Method: GET

  • Auth Required: Yes

  • URL Parameters:

    • :id: The transaction ID to look up
  • Success Response:

    {
    "status": 200,
    "message": "success",
    "data": {
    "type": "transaction_status",
    "timestamp": "2025-02-17T15:30:45Z",
    "reference_id": "abc12345678990",
    "status": "",
    "amount": "1000.0000000",
    "client_id": "10302571",
    "currency": "UGX",
    "sender_account": "256711111111",
    "receiver_account": "10302571",
    "transaction_id": "52e017d8-4f10-4037-8510-edee463c7f9f",
    "meta": "Payment processed successfully"
    }
    }

Get Transaction by Reference ID

Retrieves detailed information about a specific transaction using its reference ID.

  • URL: /payment/transactionReferenceId/:id

  • Method: GET

  • Auth Required: Yes

  • URL Parameters:

    • :id: The reference ID to look up
  • Success Response:

    {
    "status": 200,
    "message": "success",
    "data": {
    "type": "transaction_status",
    "timestamp": "2025-02-17T15:30:45Z",
    "reference_id": "abc12345678990",
    "status": "",
    "amount": "1000.0000000",
    "client_id": "10302571",
    "currency": "UGX",
    "sender_account": "256711111111",
    "receiver_account": "10302571",
    "transaction_id": "52e017d8-4f10-4037-8510-edee463c7f9f",
    "meta": "Payment processed successfully"
    }
    }
  • Error Response:

    {
    "status": 404,
    "message": "Transaction not found",
    "data": null
    }

Response Fields

  • type: Type of the response (transaction_status)
  • timestamp: Transaction timestamp in ISO format
  • reference_id: Client reference identifier for the transaction
  • status: Current status of the transaction
  • amount: Transaction amount with precision up to 7 decimal places
  • client_id: Identifier of the client
  • currency: Currency code of the transaction
  • sender_account: Account that initiated the transaction
  • receiver_account: Account that received the transaction
  • transaction_id: Unique identifier for the transaction
  • meta: Additional information about the transaction

Transaction Status

The status field indicates the current state of the transaction. Common status values include:

  • Empty string: Transaction is being processed
  • SUCCESS: Transaction completed successfully
  • PENDING: Transaction is in progress
  • failed: Transaction failed to complete
  • INITIATED: Transaction has been started

Error Cases

  • If the transaction ID or reference ID doesn't exist, a 404 error will be returned
  • If the client doesn't have permission to view the transaction, a 403 error will be returned
  • If the authentication token is invalid or expired, a 401 error will be returned