Server to Server Overview
BudPay's Server to Server (S2S) integration gives you complete control over your payment flow. Build custom checkout experiences while accepting payments directly from cards, bank accounts, and mobile money wallets.
Why Use Server to Server?
- Full UI Control — Design your own checkout that matches your brand
- No Redirects — Keep customers within your application
- Advanced Features — 3D Secure, card tokenization, saved payment methods
Available Payment Methods
| Payment Method | Supported Currencies | Description |
|---|---|---|
| Cards (V1) | NGN | Visa, Mastercard, Verve with 3DS |
| Cards (V2) | USD, NGN, GHS, KES | International cards with Cybersource |
| Bank Transfer | NGN, USD, GHS, KES | Virtual account generation |
| Mobile Money | GHS, KES | M-Pesa, MTN, AirtelMoney |
⚠️
Note: Cards V1 is for NGN only. Use V2 for multi-currency support.
How It Works
- Collect Payment Info → Securely collect card/bank details in your UI
- Encrypt & Initialize → Encrypt data and send to BudPay API
- Authenticate → Handle 3DS/OTP if required
- Verify Payment → Always verify before fulfilling orders
Comparison: Hosted vs Server to Server
| Feature | Hosted Checkout | Server to Server |
|---|---|---|
| Setup Complexity | Low | High |
| UI Control | BudPay's interface | Full control |
| PCI Compliance | BudPay handles | Shared responsibility |
| Redirect Required | Yes | No |
Implementation Checklist
- Get your API keys from the dashboard (opens in a new tab)
- Choose your payment method(s)
- Implement card encryption (for card payments)
- Build your custom checkout form
- Handle 3DS/OTP authentication responses
- Verify transactions before fulfillment
- Set up webhooks for real-time notifications
Testing Your Integration
BudPay provides a comprehensive sandbox environment for testing:
Test Card Numbers:
| Card Type | Number | CVV | Expiry |
|---|---|---|---|
| Visa | 4242424242424242 | 123 | 12/25 |
| Visa (V2) | 4000000000001091 | 484 | 12/29 |
| Mastercard | 5123450000000008 | 100 | 12/25 |
| Verve | 5060990580000217499 | 123 | 12/25 |
Test Mobile Money Numbers:
- Kenya (M-Pesa):
254712345678 - Ghana (MTN):
233244000000
Remember: Always use test credentials in sandbox mode. Switch to live keys only when ready for production.
Security Best Practices
- Never store raw card data — use encryption or tokenization
- Use HTTPS for all API communication
- Secure API keys — never expose in frontend
- Validate webhooks to prevent fraud
- Always verify transactions server-side before fulfillment
API Endpoints
Cards V1 (NGN)
POST /api/s2s/test/encryption
POST /api/s2s/transaction/initialize
GET /api/v2/transaction/verify/:refCards V2 (Multi-Currency)
POST /api/s2s/test/encryption
POST /api/s2s/transaction/initialize
GET /api/verify-transaction/:referenceBank Transfer
POST /api/s2s/banktransfer/initialize
GET /api/v2/transaction/verify/:refMobile Money
GET /api/s2s/v2/momo/providers/:currency
POST /api/s2s/v2/momo/payment_request
GET /api/v2/transaction/verify/:ref