API Basics
Build powerful payment experiences with BudPay's simple, predictable, and well-documented APIs. Whether you are collecting payments, sending payouts, or managing customers, our APIs are designed to get you up and running in minutes.
Easy to Integrate. Easy to Test.
We built BudPay APIs with developers in mind. Here is what makes integration effortless:
Every endpoint in our docs includes an interactive tester. Try requests, see live responses, and copy working code without leaving the browser.
Download our complete APIs Collection for Postman. Import and start testing all 40+ endpoints instantly.
Switch seamlessly between test and live environments. Use test keys during development, swap to live keys when you are ready to go.
All requests and responses use clean JSON. Every response includes success, message, and data fields. No surprises.
Authentication
Authenticate your requests with a simple Bearer token. Include your secret key in the Authorization header:
Authorization: Bearer YOUR_SECRET_KEY
Content-Type: application/jsonKeep your keys safe. Never expose your secret key in client-side code. Always make API calls from your secure backend server.
For Payouts and Bills Payment endpoints, include an additional encryption header:
Authorization: Bearer YOUR_SECRET_KEY
Encryption: Signature_HMAC-SHA-512
Content-Type: application/jsonHTTP Methods
| Method | What it does | Example |
|---|---|---|
POST | Create something new | Initialize a payment, create a transfer |
GET | Retrieve information | Fetch transaction details, list banks |
PUT | Update existing data | Update customer info |
DELETE | Remove a resource | Delete saved cards |
Request & Response Format
Every request and response uses JSON. Here is what a typical exchange looks like:
Your Request:
{
"email": "customer@example.com",
"amount": "10000",
"currency": "NGN",
"reference": "BUD_1234567890"
}Our Response:
{
"success": true,
"message": "Transaction initialized successfully",
"data": {
"id": 1404612,
"reference": "BUD_1234567890",
"amount": "10000",
"status": "success"
}
}Understanding the Response
| Field | Type | What it tells you |
|---|---|---|
success | Boolean | Did the request succeed? |
message | String | A human-readable summary or error description |
data | Object/Array | The actual payload: your transaction, customer, or list |
Status Codes
We use standard HTTP codes so you always know what happened:
Success
| Code | Meaning |
|---|---|
200 | All good. Your request succeeded |
201 | Created. A new resource was made |
For payment verification, always check the data.status field, not just the HTTP code.
Client Errors
| Code | What went wrong |
|---|---|
400 | Bad request. Check your parameters |
401 | Unauthorized. Invalid or missing API key |
404 | Not found. The resource does not exist |
422 | Validation failed. See error details in response |
Server Errors
| Code | What happened |
|---|---|
500 | Something went wrong on our end. Retry shortly |
502 | We are upgrading. Try again in a moment |
503 | High traffic. Give us a second |
504 | Request timed out. Retry the request |
Common Errors & Quick Fixes
Missing Fields
{
"success": false,
"message": "Validation error",
"errors": {
"email": ["The email field is required"],
"amount": ["The amount field is required"]
}
}Fix: Include all required parameters in your request.
Authentication Failed
{
"success": false,
"message": "Authentication failed"
}Fix: Double-check your API key and ensure it is in the Authorization header.
Duplicate Reference
{
"success": false,
"message": "Reference already existed"
}Fix: Generate a unique reference for every transaction.
Invalid Signature
{
"success": false,
"message": "Invalid Signature. Intrusion detected. Failed [A.A.E.101]"
}Fix: For Payout and Bills endpoints, ensure you are generating the HMAC-SHA-512 signature correctly with your secret key.
Service Unavailable
{
"success": false,
"message": "Service currently not available"
}Fix: Wait a few moments and retry. Check our status page if the issue persists.
Try It Right Now
Built-in API Tester
Every endpoint in our documentation includes an interactive tester. No setup needed, just:
- Navigate to any API endpoint page
- Scroll to the "Try it out" section
- Enter your test API key
- Modify any parameters
- Click "Send Request"
- Copy the working code in your preferred language
Here is a live example. Try fetching the bank list:
Use test keys when using the API tester in the docs. Save your live keys for production.
APIs Collection for Postman
Prefer testing in Postman? We have got you covered:
40+ endpoints, organized by category, ready to import. Get the collection →
Your First API Call
Ready to try? Here is a quick test using cURL:
curl -X GET https://api.budpay.com/api/v2/bank_list/NGN \
-H "Authorization: Bearer YOUR_SECRET_KEY"Or initialize your first payment:
curl -X POST https://api.budpay.com/api/v2/transaction/initialize \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "customer@example.com",
"amount": "10000",
"currency": "NGN",
"callback": "https://yourwebsite.com/callback"
}'Best Practices
Security First
- Never expose secret keys in frontend code
- Store keys in environment variables
- Validate webhooks before processing
Build for Reliability
- Use unique references for every transaction
- Implement retries with exponential backoff
- Log everything: requests and responses
Verify, Do Not Assume
- Always verify transaction status via API
- Check both HTTP status and
successfield - Handle errors gracefully with user-friendly messages