⚙️
DusuPay API Documentation
  • Introduction
  • Getting Started
    • Registration
    • Error Handling
    • Authentication
    • Merchant Account Credentials
      • Generate Secret Key
      • Regenerate Security Keys
    • Supported Countries/Regions
    • Transaction Limits
    • Sandbox Test Accounts
    • DusuPay Public Keys
  • Utility Functions
    • Balance Inquiry
    • Payment Options
    • Payout Bank Codes
    • Mobile Money Operator Prefixes
    • Handling Notifications/Callbacks
      • Callback Events
    • Transaction Status Verification
  • Funds Collection
    • Getting Started
    • Mobile Money Collection
      • Mobile Money - Direct Charge
      • Mobile Money - Hosted Page
    • NGN Bank Transfers
    • ZAR Bank Collections
    • Card Payments
      • Hosted Payment Page
      • Direct Card Payment (S2S)
  • Payouts/Disbursements
    • Getting Started
    • Mobile Money Payouts
    • Bank Account Transfers
  • Callbacks
    • HMAC Signature Verification
    • RSA Signature Verification
  • Appendix
    • Merchant Account Transfers
    • Availing Payout Funds
    • Sub Account Transfers
    • Funds Settlement
    • Transaction Audit Logs
    • Cross Currency Transactions
Powered by GitBook
On this page
  • Get Transaction Status
  • Sample Transaction Status Request
  • Transaction Status Descriptions
  1. Utility Functions

Transaction Status Verification

In some situations, the merchant account might to confirm the status of the transaction. This document resource describes the process of retrieving the transaction details (status inclusive)

Whenever we get the final transaction status from the processor (telecom/bank/card processor), we'll send the notifications to your designated callback URLs and these requests will be retried using the exponential back-off strategy. This guarantees that even when your URL is unreachable OR the http request fails, there will be automated retries at different intervals. Our belief is that; if we don't have the final status yet, checking status from the merchant side doesn't help. However, if status check is crucial for your workflow, please note the following.

  1. Status check requests will be denied if they're done less than 2 minutes from the time the transaction was initiated.

  2. We recommend that an interval of 5 minutes is implemented between status check requests for the same transaction.

Get Transaction Status

GET https://sandboxapi.dusupay.com/data/transaction/verify/{reference}

Returns the transaction details and the parameter data.transaction_status holds the current status of the transaction. Replace {reference} with the merchant reference that was used prior when initiating the transaction.

Headers

Name
Type
Description

public-key*

String

The merchant account Public Key

Sample Transaction Status Request

curl https://sandboxapi.dusupay.com/data/transaction/verify/MCTREFT2WMNWZ23SBN6Y \
   -H "Accept: application/json" \
   -H "x-api-version: 1" \
   -H "public-key: your-public-key"
{
    "code": 200,
    "status": "success",
    "message": "Request completed successfully.",
    "data": {
        "id": 20760,
        "merchant_reference": "MCTREFT2WMNWZ23SBN6Y",
        "internal_reference": "DUSUPAYRMGRXNNYBWATKJ",
        "transaction_type": "COLLECTION",
        "request_currency": "UGX",
        "transaction_amount": 2000000,
        "transaction_currency": "UGX",
        "transaction_charge": 60000,
        "transaction_account": "256787008803",
        "charge_customer": false,
        "total_credit": 1940000,
        "provider_code": "mtn_ug",
        "request_amount": 2000000,
        "customer_name": "JOHN DOE",
        "transaction_status": "COMPLETED",
        "status_message": "Transaction Completed Successfully"
    }
}
{
    "code": 404,
    "status": "error",
    "message": "Transaction with reference: MCTREF2BUBWGEVDZ47DQFH1 Not Found. Contact Support",
    "data": {}
}
{
    "code": 403,
    "status": "error",
    "message": "Status check denied. Try again after 2 minutes.",
    "data": {}
}
{
    "code": 429,
    "status": "error",
    "message": "Request Failed. Too many requests in a short time.",
    "data": {}
}

Transaction Status Descriptions

Status
Description

PENDING

The transaction has been logged on the DusuPay platform, awaiting escalation to the last mile processor (telecom, bank, card processor etc)

PROCESSING

The transaction is currently being processed and the DusuPay platform is waiting for the final status from the last mile processor

FAILED

The transaction is failed. Reason for failure will always be in the data.status_message parameter.

COMPLETED

The transaction was processed successfully.

CANCELLED

The transaction was cancelled. This is usually done by the customer.

PreviousCallback EventsNextGetting Started

Last updated 8 months ago