BudPay

Popular Searches:
Payment Features

Refunds

The Refunds API allows you create and manage transaction refunds.

Create Refund

Initiate a refund on your integration

Endpoint: /refund
Method: POST

Header

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

Body Param

Param Type Required? Decription
reference string Yes Transaction reference
customer_note string No Customer reason
merchant_note string No Merchant reason

Sample Post

                            
                                curl https://api.budpay.com/api/v2/refund
                                -H "Authorization: Bearer YOUR_SECRET_KEY"
                                -H "Content-Type: application/json"
                                -d '{
                                    "reference": "BUD_4503320239329292929"
                                }'
                                -X POST
                            
                        

Sample Response

                            
                                {
                                    "success": true,
                                    "message": "Refund submitted and in progress",
                                    "data": {
                                        "refund_id": 9,
                                        "reference": "RF_shpfemttkvpvcoc",
                                        "status": "pending"
                                    }
                                }
                            
                        


List Refunds

List refunds available on your integration.

Endpoint: /refund
Method: GET

Header

Param Type Required? Decription
authorization string Yes Set value to Bearer SECRET_KEY

Sample Post

                            
                                curl https://api.budpay.com/api/v2/refund
                                -H "Authorization: Bearer YOUR_SECRET_KEY"
                                -X GET
                            
                        

Sample Response

                            
                                {
                                    "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
                                    }
                                }
                            
                        


Fetch Refund

Get details of a refund on your integration.

Endpoint: /refund/:reference
Method: GET

Header

Param Type Required? Decription
authorization string Yes Set value to Bearer SECRET_KEY

Path Param

Param Type Required? Decription
reference string Yes Identifier for transaction to be refunded (refund_reference)

Sample Post

                            
                                curl https://api.budpay.com/api/v2/refund/status/:{reference}
                                -H "Authorization: Bearer YOUR_SECRET_KEY"
                                -X GET
                            
                        

Sample Response

                            
                                {
                                    "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"
                                    }
                                }