Skip to main content

Get transaction

Fetch a complete transaction record by its UUID. The transaction must belong to your account.
GET /api/v1/transactions/:transactionId

Authentication

x-api-key: your_api_key
x-api-secret: your_api_secret

Path parameters

transactionId
string
required
UUID of the transaction to retrieve.

Example request

cURL
curl --request GET \
  --url https://api.hyparrow.com/api/v1/transactions/3fa85f64-5717-4562-b3fc-2c963f66afa6 \
  --header 'x-api-key: your_api_key' \
  --header 'x-api-secret: your_api_secret'

Example response

200 OK
{
  "success": true,
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "clientId": "7e9a1b2c-3d4e-5f60-a7b8-c9d0e1f2a3b4",
    "customerId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "invoiceId": null,
    "subscriptionId": null,
    "productId": null,
    "receiptId": null,
    "type": "card_payment",
    "status": "completed",
    "amount": 500000,
    "currency": "NGN",
    "reference": "TXN-20240401-001",
    "description": "",
    "provider": "interswitch",
    "providerRef": "",
    "channel": "card",
    "responseCode": "00",
    "responseMessage": "Approved by Financial Institution",
    "interswitchReference": "ISW-TXN-2024042310300001",
    "senderName": null,
    "senderAccountNumber": null,
    "senderBankCode": null,
    "errorMessage": null,
    "request": {
      "customerId": "HYP_abc123def456gh78",
      "amount": "5000",
      "currency": "NGN",
      "transactionRef": "TXN-20240401-001"
    },
    "response": {
      "responseCode": "00",
      "message": "Approved by Financial Institution",
      "paymentId": "FBN|WEB|MX26070|23-04-2024|589928|000020"
    },
    "metadata": {},
    "completedAt": "2024-04-23T10:30:00Z",
    "createdAt": "2024-04-23T10:29:45Z",
    "updatedAt": "2024-04-23T10:30:00Z"
  }
}

Response fields

data.id
string
Unique transaction UUID.
data.clientId
string
UUID of the API client that owns this transaction.
data.customerId
string
UUID of the customer associated with this transaction. null if not linked to a customer.
data.invoiceId
string
UUID of the linked invoice. null if this is not an invoice payment.
data.subscriptionId
string
UUID of the linked subscription. null if this is not a subscription payment.
data.productId
string
UUID of the linked product. null if not applicable.
data.type
string
Transaction type. One of: virtual_account, bank_transfer, bill_payment, card_payment, account_inquiry, credit, debit, invoice_payment, product_purchase, subscription_payment, verification_payment, opay_payment, ussd_payment.
data.status
string
Transaction status: pending, processing, completed, success, failed, or canceled.
data.amount
integer
Transaction amount in the smallest currency unit (kobo for NGN). Divide by 100 to get naira.
data.currency
string
3-letter ISO 4217 currency code (e.g. "NGN").
data.reference
string
Your unique transaction reference.
data.provider
string
Payment provider that processed the transaction.
data.channel
string
Payment channel used (e.g. "card", "virtual_account").
data.responseCode
string
Final processor response code. "00" = approved.
data.responseMessage
string
Human-readable processor response message.
data.interswitchReference
string
Interswitch’s internal reference for the transaction, when applicable.
data.request
object
Sanitised copy of the original request payload (card data is never stored).
data.response
object
Raw response received from the payment processor.
data.errorMessage
string
Error message if the transaction failed. null on success.
data.senderName
string
Sender’s name for inbound bank transfers.
data.senderAccountNumber
string
Sender’s account number for inbound bank transfers.
data.senderBankCode
string
Sender’s bank code for inbound bank transfers.
data.completedAt
string
ISO 8601 timestamp of when the transaction completed. null if not yet complete.
data.createdAt
string
ISO 8601 timestamp of when the transaction was created.
data.updatedAt
string
ISO 8601 timestamp of the last update.
data.metadata
object
Arbitrary key-value metadata stored with the transaction.