Integration
API Basics

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:

Built-in API Tester

Every endpoint in our docs includes an interactive tester. Try requests, see live responses, and copy working code without leaving the browser.

APIs Collection

Download our complete APIs Collection for Postman. Import and start testing all 40+ endpoints instantly.

Test & Live Modes

Switch seamlessly between test and live environments. Use test keys during development, swap to live keys when you are ready to go.

Predictable JSON

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/json
⚠️

Keep 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/json

HTTP Methods

MethodWhat it doesExample
POSTCreate something newInitialize a payment, create a transfer
GETRetrieve informationFetch transaction details, list banks
PUTUpdate existing dataUpdate customer info
DELETERemove a resourceDelete 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

FieldTypeWhat it tells you
successBooleanDid the request succeed?
messageStringA human-readable summary or error description
dataObject/ArrayThe actual payload: your transaction, customer, or list

Status Codes

We use standard HTTP codes so you always know what happened:

Success

CodeMeaning
200All good. Your request succeeded
201Created. A new resource was made

For payment verification, always check the data.status field, not just the HTTP code.

Client Errors

CodeWhat went wrong
400Bad request. Check your parameters
401Unauthorized. Invalid or missing API key
404Not found. The resource does not exist
422Validation failed. See error details in response

Server Errors

CodeWhat happened
500Something went wrong on our end. Retry shortly
502We are upgrading. Try again in a moment
503High traffic. Give us a second
504Request 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:

  1. Navigate to any API endpoint page
  2. Scroll to the "Try it out" section
  3. Enter your test API key
  4. Modify any parameters
  5. Click "Send Request"
  6. 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:

Download our complete APIs Collection

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 success field
  • Handle errors gracefully with user-friendly messages

What is Next?