API Reference
Integrate Vaendora into your custom application using our REST API. This guide covers authentication, endpoints, and webhooks.
REST API
Standard HTTP endpoints for all operations
API Keys
Secure authentication using API keys
Webhooks
Real-time notifications for events
Test Mode
Test integrations without real money
Authentication
All API requests require authentication using your API key:
Getting Your API Keys
- Log in to your Vaendora dashboard
- Go to Settings → API Keys
- Copy your Merchant ID and API Key
Using API Keys
Include your API key in the request header:
Authorization: Bearer YOUR_API_KEY X-Merchant-ID: YOUR_MERCHANT_ID
Test vs Live Keys
- Test API Key - Use for development and testing. Transactions are simulated.
- Live API Key - Use for production. Real money is transferred.
Keep Keys Secret
Base URL
All API requests use the following base URL:
https://api.vaendora.comAPI Endpoints
Initialize Payment
Create a new payment request:
{
"merchant_id": "your-merchant-id",
"amount": 5000,
"currency": "NGN",
"customer_email": "customer@example.com",
"customer_name": "John Doe",
"order_id": "ORDER-123",
"callback_url": "https://yoursite.com/payment-complete",
"test_mode": false
}Response
{
"success": true,
"data": {
"payment_reference": "VPY-1234567890-ABCDEF",
"payment_url": "https://app.vaendora.com/wc-pay/VPY-1234567890-ABCDEF",
"amount": 5000,
"expires_in": 1800
}
}Verify Payment
Check the status of a payment:
Response
{
"success": true,
"data": {
"reference": "VPY-1234567890-ABCDEF",
"status": "completed",
"amount": 5000,
"amount_paid": 5000,
"fee": 75,
"net_amount": 4925,
"customer_name": "John Doe",
"paid_at": "2024-01-15T10:30:00Z"
}
}Payment Status Values
| Status | Description |
|---|---|
pending | Awaiting customer payment |
completed | Payment received and verified |
failed | Payment failed or was rejected |
expired | Payment window expired |
Webhooks
Receive real-time notifications when payment events occur:
Setting Up Webhooks
Configure Webhook URL
When initializing a payment, include a callback_url parameter.
Receive Notifications
Vaendora will POST to your URL when the payment status changes.
Verify and Process
Verify the webhook signature and update your order status.
Webhook Payload
{
"event": "payment.completed",
"data": {
"reference": "VPY-1234567890-ABCDEF",
"order_id": "ORDER-123",
"status": "completed",
"amount": 5000,
"amount_paid": 5000,
"customer_name": "John Doe",
"paid_at": "2024-01-15T10:30:00Z"
},
"timestamp": "2024-01-15T10:30:05Z"
}Webhook Events
payment.completed- Payment was successfulpayment.failed- Payment failedpayment.expired- Payment window expired
Verifying Webhooks
Always verify webhook authenticity:
- Check the
X-Vaendora-Signatureheader - Compare with your calculated HMAC signature
- Verify the timestamp to prevent replay attacks
Always Verify
Error Handling
API errors return appropriate HTTP status codes:
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid API key |
| 404 | Not Found - Resource doesn't exist |
| 500 | Server Error - Contact support |
Error Response Format
{
"success": false,
"error": "Invalid API key",
"code": "INVALID_API_KEY"
}Rate Limits
API requests are rate limited to ensure fair usage:
- 100 requests per minute per API key
- Rate limit headers are included in responses
- Exceeded limits return HTTP 429
Testing
Use test mode for development:
- Set
test_mode: truein payment requests - Use your Test API Key
- Payments can be simulated without real money
- Test references start with
VPY-TEST
API Support
Need help with integration?
- Email: support@vaendora.com
- Include your Merchant ID and relevant request details