Transactions Overview
BudPay's Transaction API provides tools to manage, track, and verify payment transactions. Monitor payment status, retrieve transaction details, and maintain visibility over your payment operations.
What are Transactions?
A transaction represents a payment operation processed through BudPay. Every payment attempt creates a transaction record with payment details, customer information, and processing status.
Transaction Lifecycle: Initiated → Processing → Completed/Failed
Key Features
| Feature | Description | Link |
|---|---|---|
| Verify Transaction | Confirm payment status before fulfilling orders | Learn More → |
| Fetch Transaction | Get comprehensive transaction data and logs | Learn More → |
| Search Transaction | Find transactions by reference, session ID, or account | Learn More → |
| List Transactions | View paginated lists with filtering options | Learn More → |
Transaction Statuses
| Status | Description | Action |
|---|---|---|
success | Payment completed successfully | Fulfill order immediately |
pending | Payment initiated but not completed | Wait for completion |
failed | Payment declined or failed | Request new payment |
abandoned | Customer left without paying | Send reminder (optional) |
Only fulfill orders when status is success. Always verify via API before delivering value.
Payment Channels
- Card: Visa, Mastercard, Verve (with 3D Secure)
- Bank Transfer: Virtual accounts, direct transfers
- Mobile Money: M-Pesa, MTN, AirtelMoney, Vodafone Cash
Security Best Practices
- Always verify server-side before fulfilling orders
- Validate amounts match your expected values
- Check for duplicates to prevent double-processing
- Store API keys securely in environment variables
- Use webhooks for real-time notifications
Security: Never trust client-side callbacks alone. Always verify transactions via API.
API Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/api/v2/transaction | GET | List all transactions |
/api/v2/transaction/:id | GET | Fetch specific transaction |
/api/v2/transaction/verify/:reference | GET | Verify transaction status |
/api/v2/transaction_query/:search | GET | Search transactions |
Testing
Use sandbox environment with test API keys:
Test Cards:
- Success:
5060990580000217938| CVV:123| PIN:1234 - Declined:
5060990580000217946| CVV:123| PIN:1234
Test Mode: Transactions marked as domain: "test", no real money processed.
Next Steps
- List Transactions - View all transactions
- Verify Transaction - Verify payments
- Fetch Transaction - Get details
- Search Transaction - Find transactions
- Transaction Statement - Generate reports