Refunds

Refunds are currently only available for card payments. To refund customers that paid using other transaction methods, you will need to make payouts using the payouts API.

When you make a refund request, we refund the customer the exact or a fraction of the amount that was paid by the customer in the original transaction. The details are returned in the API response. The funds are debited from your merchant account and a refund request is created for processing. We will also make a callback to your webhook/callback URL set under your merchant account.

Partial refunds may not be available in some scenarios due to the nature of some of our third party providers. When partial refunds are not possible, the API will respond accordingly

Refund API

POST https://sandbox.dusupay.com/v1/refund

Headers

NameTypeDescription

secret-key*

String

SEC-*** Your Merchant secret key

Request Body

NameTypeDescription

api_key*

Merchant Account Public Key

internal_reference*

String

The internal reference of the transaction to refund. This is usually included in the API request responses or IPN's

amount

Integer

Add the amount if you want to do a partial refund. This amount should should be less or equal to the transaction amount in the previous transaction

{
    "code": 202,
    "status": "accepted",
    "message": "Refund Initiated Successfully",
    "data": {
        "id": 65205,
        "refund_amount": 1054,
        "refund_currency": "UGX",
        "transaction_fee": 0,
        "total_debit": 1054,
        "provider_id": "international_ugx",
        "merchant_reference": "hAkEROAdhIsHrEnB",
        "collection_reference": "DUSUPAYXYXYXYXYXYXYXYXYX",
        "internal_reference": "RFD-DUSUPAYXYXYXYXYXYXYXYXYX-3486003",
        "transaction_type": "refund",
        "transaction_status": "PENDING",
        "account_number": "4860610032773134",
        "message": "Request Initiated"
    }
}

Last updated