Documentation v1.0

Refunds


The Refunds API allows you create and manage transaction refunds

Create Refund

Initiate a refund on your integration
POST /refund

Headers

Param Required Description
authorization
string
Yes Set value to Bearer SECRET_KEY
content-type
string
Yes Set value to application/json

Body Param

Param Required Description
reference
string
Yes Transaction reference
customer_note
string
(Optional) Customer reason
merchant_note
string
(Optional) Merchant reason
{
    "success": true,
    "message": "Refund submitted and in progress",
    "data": {
        "refund_id": 9,
        "reference": "RF_shpfemttkvpvcoc",
        "status": "pending"
    }
}
curl https://budpay.ng/api/v1/refund
-H "Authorization: Bearer YOUR_SECRET_KEY"
-H "Content-Type: application/json"
-d '{
    "id": 104
}'
-X POST

List Refunds

List refunds available on your integration.

GET /refund

Headers

Param Required Description
authorization
string
Yes Set value to Bearer SECRET_KEY
{
    "status": true,
    "message": "Refund retrieved",
    "data": [
        {
            "id": 7,
            "transaction_id": 104,
            "refund_reference": "RF_9hfate2gdjvpgtu",
            "amount": "120",
            "deducted_amount": "0",
            "currency": "NGN",
            "channel": "Interswitch",
            "domain": "test",
            "fully_deducted": 1,
            "refunded_by": "self",
            "refunded_at": "2022-05-13 02:11:27",
            "expected_at": null,
            "settlement": null,
            "merchant_note": "Refund for transaction 620a5cdb14084",
            "customer_note": "Refund for transaction 620a5cdb14084",
            "status": "pending",
            "created_at": "2022-05-13T01:11:27.000000Z",
            "updated_at": "2022-05-13T01:11:27.000000Z"
        },
        {
            "id": 6,
            "transaction_id": 14,
            "refund_reference": "RF_onogspznfu962jm",
            "amount": "1",
            "deducted_amount": "0",
            "currency": "NGN",
            "channel": "demo",
            "domain": "test",
            "fully_deducted": 1,
            "refunded_by": "self",
            "refunded_at": "2022-05-13 02:08:59",
            "expected_at": null,
            "settlement": null,
            "merchant_note": "Refund for transaction 61f1d5d73bfaf",
            "customer_note": "Refund for transaction 61f1d5d73bfaf",
            "status": "pending",
            "created_at": "2022-05-13T01:08:59.000000Z",
            "updated_at": "2022-05-13T01:08:59.000000Z"
        },
        {
            "id": 9,
            "transaction_id": 105,
            "refund_reference": "RF_shpfemttkvpvcoc",
            "amount": "250",
            "deducted_amount": "0",
            "currency": "NGN",
            "channel": "Interswitch",
            "domain": "test",
            "fully_deducted": 1,
            "refunded_by": "self",
            "refunded_at": "2022-05-30 18:11:55",
            "expected_at": null,
            "settlement": null,
            "merchant_note": "Refund for transaction 620a5ed386d5c",
            "customer_note": "Refund for transaction 620a5ed386d5c",
            "status": "pending",
            "created_at": "2022-05-30T17:11:55.000000Z",
            "updated_at": "2022-05-30T17:11:55.000000Z"
        }
    ],
    "meta": {
        "total": 3
    }
}
curl https://budpay.ng/api/v1/refund
-H "Authorization: Bearer YOUR_SECRET_KEY"
-X GET

Fetch Refund

Get details of a refund on your integration.

GET /refund/:reference

Headers

Param Required Description
authorization
string
Yes Set value to Bearer SECRET_KEY

Path Param

Param Required Description
reference
string
Yes Identifier for transaction to be refunded
{
    "success": true,
    "message": "Refund Fetched Successfully",
    "data": {
        "id": 9,
        "transaction_id": 105,
        "refund_reference": "RF_shpfemttkvpvcoc",
        "amount": "250",
        "deducted_amount": "0",
        "currency": "NGN",
        "channel": "Interswitch",
        "domain": "test",
        "fully_deducted": 1,
        "refunded_by": "self",
        "refunded_at": "2022-05-30 18:11:55",
        "expected_at": null,
        "settlement": null,
        "merchant_note": "Refund for transaction 620a5ed386d5c",
        "customer_note": "Refund for transaction 620a5ed386d5c",
        "status": "pending",
        "response": null,
        "created_at": "2022-05-30T17:11:55.000000Z",
        "updated_at": "2022-05-30T17:11:55.000000Z"
    }
}
curl https://budpay.ng/api/v1/refund/:reference
-H "Authorization: Bearer YOUR_SECRET_KEY"
-X GET