BudPay

Popular Searches:
Accept Payment

Fetch transaction

Fetch Single Transaction

Endpoint: /transaction/:id
Method: GET

Header

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

Query Param

Param Type Required? Decription
id integer Yes An ID for the transaction to fetch

Sample Post

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

Sample Response

                            
                                {
                                    "status": true,
                                    "message": "Transactions retrieved",
                                    "data": {
                                        "id": 4,
                                        "domain": "test",
                                        "status": "pending",
                                        "reference": "61e46a7a0e69011",
                                        "amount": "2",
                                        "gateway_response": null,
                                        "paid_at": "2022-01-18 13:47:02",
                                        "created_at": "2022-01-16T18:56:58.000000Z",
                                        "channel": "card",
                                        "currency": "USD",
                                        "ip_address": "197.211.43.98"
                                    },
                                    "log": {
                                        "time_spent": 192,
                                        "attempts": 1,
                                        "authentication": null,
                                        "errors": 0,
                                        "success": true,
                                        "channel": "card",
                                        "history": [
                                            {
                                            "type": "action",
                                            "message": "Attempted to pay with card",
                                            "time": 191
                                            },
                                            {
                                            "type": "success",
                                            "message": "Successfully paid with card",
                                            "time": 192
                                            }
                                        ]
                                    },
                                    "fees": null,
                                    "customer": {
                                        "id": 1,
                                        "customer_code": "cus78359iu54riej",
                                        "first_name": "Budpay",
                                        "last_name": "Checkout",
                                        "email": "budpay@checkout",
                                        "phone": null,
                                        "metadata": ""
                                    },
                                    "plan": null,
                                    "paid_at": "2022-01-18 13:47:02",
                                    "created_at": "2022-01-16T18:56:58.000000Z",
                                    "requested_amount": "2"
                                }
                            
                        


Query Transaction

Endpoint: /transaction_query/{search}
Method: GET

Header

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

Query Param

Param Type Required? Decription
search string Yes reference / sessionid / account number/ card pan

Sample Post

                            
                                curl https://api.budpay.com/api/v2/transaction_query/{search}
                                -H "Authorization: Bearer YOUR_SECRET_KEY"
                                -X GET
                            
                        

Sample Response

                            
                            {
                                "status": true,
                                "message": "Transactions retrieved",
                                "data": [
                                    {
                                        "id": 1404612,
                                        "currency": "NGN",
                                        "amount": "550",
                                        "reference": "BUD_1673600359168063493",
                                        "ip_address": null,
                                        "channel": "transfer",
                                        "type": "transaction",
                                        "domain": "live",
                                        "fees": "50",
                                        "plan": null,
                                        "requested_amount": "500",
                                        "status": "success",
                                        "card_attempt": 0,
                                        "split_code": null,
                                        "message": null,
                                        "gateway": "Wema",
                                        "transfer_details": null,
                                        "webhook_status": "sent",
                                        "webhook_url": "https://webhook.site/6809bce0-6760-4e63-b3fd-1e545cec8958",
                                        "webhook_response": "",
                                        "metadata": "",
                                        "created_at": "2023-01-13T08:59:26.000000Z",
                                        "paid_at": "2023-01-13 10:06:29",
                                        "customer": {
                                            "id": 627321,
                                            "first_name": "Francis",
                                            "last_name": "Obadiah",
                                            "email": "francis@budpay.com",
                                            "phone": "",
                                            "domain": "live",
                                            "customer_code": "CUS_0q2htds3kf3zzrb",
                                            "metadata": "{}",
                                            "status": "active"
                                        }
                                    }
                                ]
                            }
                            
                        


Fetch All Transactions

Endpoint: /transaction
Method: GET

Header

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

Query Param

Param Type Required? Decription
amount integer No Filter transactions by amount. Specify the amount
currency string No Filter transactions by currency.
status string No Filter transactions by status ('failed', 'pending', 'success', 'abandoned')
customer integer No Specify an ID for the customer whose transactions you want to retrieve
from_date datetime No A timestamp from which to start listing transaction e.g. 2022-09-21
to_date datetime No A timestamp at which to stop listing transaction e.g. 2022-09-21
paginate integer No Number of Transactions per page. Default is 20 if not set.

Sample Post

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

Sample Response

                            
                                {
                                    "status": true,
                                    "message": "Transactions retrieved",
                                    "data": [
                                        {
                                            "id": 44,
                                            "currency": "NGN",
                                            "amount": "2000",
                                            "reference": "16434005201755524296",
                                            "ip_address": null,
                                            "channel": null,
                                            "domain": "test",
                                            "fees": null,
                                            "plan": null,
                                            "requested_amount": "2000",
                                            "status": "success",
                                            "gateway": null,
                                            "created_at": "2022-01-28T20:08:40.000000Z",
                                            "paid_at": "2022-01-28 20:11:51",
                                            "customer": {
                                                "id": 3,
                                                "first_name": null,
                                                "last_name": null,
                                                "email": "customer@email.com",
                                                "phone": null,
                                                "customer_code": "CUS_3hqlcizuoffygev",
                                                "domain": "test",
                                                "metadata": "{}",
                                                "status": "active"
                                            }
                                        },
                                        {
                                            "id": 45,
                                            "currency": "NGN",
                                            "amount": "2300",
                                            "reference": "1643400746693960617",
                                            "ip_address": null,
                                            "channel": null,
                                            "domain": "test",
                                            "fees": null,
                                            "plan": null,
                                            "requested_amount": "2300",
                                            "status": "success",
                                            "gateway": null,
                                            "created_at": "2022-01-28T20:12:26.000000Z",
                                            "paid_at": "2022-01-28 20:14:30",
                                            "customer": {
                                                "id": 3,
                                                "first_name": null,
                                                "last_name": null,
                                                "email": "customer@email.com",
                                                "phone": null,
                                                "customer_code": "CUS_3hqlcizuoffygev",
                                                "domain": "test",
                                                "metadata": "{}",
                                                "status": "active"
                                            }
                                        },
                                        {
                                            "id": 46,
                                            "currency": "NGN",
                                            "amount": "300",
                                            "reference": "1643446267206306434",
                                            "ip_address": null,
                                            "channel": "card",
                                            "domain": "test",
                                            "fees": null,
                                            "plan": null,
                                            "requested_amount": "300",
                                            "status": "success",
                                            "gateway": "Interswitch",
                                            "created_at": "2022-01-29T08:51:07.000000Z",
                                            "paid_at": "2022-01-29 19:52:58",
                                            "customer": {
                                                "id": 3,
                                                "first_name": null,
                                                "last_name": null,
                                                "email": "customer@email.com",
                                                "phone": null,
                                                "customer_code": "CUS_3hqlcizuoffygev",
                                                "domain": "test",
                                                "metadata": "{}",
                                                "status": "active"
                                            }
                                        },
                                        {
                                            "id": 47,
                                            "currency": "NGN",
                                            "amount": "20000",
                                            "reference": "61e469c330c2bb",
                                            "ip_address": null,
                                            "channel": null,
                                            "domain": "test",
                                            "fees": null,
                                            "plan": null,
                                            "requested_amount": "20000",
                                            "status": "pending",
                                            "gateway": null,
                                            "created_at": "2022-01-29T23:57:40.000000Z",
                                            "paid_at": null,
                                            "customer": {
                                                "id": 4,
                                                "first_name": null,
                                                "last_name": null,
                                                "email": "customer1@budpay.com",
                                                "phone": null,
                                                "customer_code": "CUS_ig2yjfnhtphlgt0",
                                                "domain": "test",
                                                "metadata": "{}",
                                                "status": "active"
                                            }
                                        },
                                        {
                                            "id": 48,
                                            "currency": "NGN",
                                            "amount": "20000",
                                            "reference": "61e469c330c2bc",
                                            "ip_address": null,
                                            "channel": null,
                                            "domain": "test",
                                            "fees": null,
                                            "plan": null,
                                            "requested_amount": "20000",
                                            "status": "pending",
                                            "gateway": null,
                                            "created_at": "2022-01-31T16:22:03.000000Z",
                                            "paid_at": null,
                                            "customer": {
                                                "id": 4,
                                                "first_name": null,
                                                "last_name": null,
                                                "email": "customer1@budpay.com",
                                                "phone": null,
                                                "customer_code": "CUS_ig2yjfnhtphlgt0",
                                                "domain": "test",
                                                "metadata": "{}",
                                                "status": "active"
                                            }
                                        }
                                    ],
                                    "total_count": 5
                                }