Skip to main content
GET
/
merchants
/
transactions
/
status
/
{transaction_id}
Check Transaction Status
curl --request GET \
  --url https://sandbox.dcash.africa/merchants/transactions/status/{transaction_id} \
  --header 'x-api-key: <api-key>'
{
  "transaction_id": "<string>",
  "reference_id": "<string>",
  "transaction_status": "<string>",
  "amount": "<string>",
  "currency": "<string>",
  "failure_reason": {}
}

Endpoint

GET /merchants/transactions/status/{transaction_id}

Description

Retrieves the current status of the specified transaction. This endpoint is useful when:
  • Your webhook notification was not received
  • You need to verify a transaction’s current state
  • You want to poll for transaction completion
  • You need to reconcile transactions

Path Parameters

transaction_id
string
required
ID of the transaction to check statusThis is the transaction_id returned when the transaction was initiated

Response

transaction_id
string
Unique identifier for the transaction
reference_id
string
Merchant-provided reference ID (if provided during transaction creation)
transaction_status
string
Current status of the transactionPossible values:
  • pending - Transaction is being processed
  • completed - Transaction completed successfully
  • failed - Transaction failed
amount
string
Transaction amount (returned as a string)
currency
string
Currency code (e.g., “USD”)
failure_reason
string | null
Reason for transaction failure (only present when transaction_status is “failed”, otherwise null)

Example Request

curl --request GET \
  --url https://sandbox.dcash.africa/merchants/transactions/status/skjr3 \
  --header 'x-api-key: YOUR_MERCHANT_API_KEY'

Example Response

{
  "transaction_id": "skjr3",
  "reference_id": "abcd",
  "transaction_status": "pending",
  "amount": "37.00",
  "currency": "USD",
  "failure_reason": null
}

Best Practices

Polling Strategy

If polling for status, use exponential backoff to avoid overwhelming the API

Webhook First

Always implement webhooks as the primary notification method. Use this endpoint as a fallback

Reference IDs

Use reference_id to match transactions to your internal systems

Error Handling

Handle all three status states (pending, completed, failed) appropriately
This endpoint does not require user authentication (no Authorization header), only your merchant API key.

Error Codes

CodeMessage
missing_api_keyplease provide an api key
invalid_api_keyapi key does not exist
transaction_not_foundtransaction not found
transaction_access_forbiddenyou are not allowed to view the status of this transaction
internal_server_errorinternal server error