Base URL
Authentication
Transaction API supports two authentication methods:JWT Authentication
Most endpoints require JWT authentication via theAuthorization header:
API Key Authentication
Some endpoints use API key authentication:public- For payment creation (pk_*)secret- For merchant operations (sk_*)any- For webhook logs (either key type)
Response Format
All responses follow this format:Error Codes
| Code | Status | Description |
|---|---|---|
UNAUTHORISED | 401 | Invalid or missing authentication |
NOT_FOUND | 404 | Resource not found |
VALIDATION_INVALID | 400 | Invalid input data |
INVALID_CREDENTIALS | 401 | Invalid login credentials |
DUPLICATE_ENTRY | 400 | Duplicate resource detected |
EMAIL_ALREADY_REGISTERED | 400 | Email already exists |
MERCHANT_NOT_FOUND | 404 | Merchant not found |
PAYMENT_NOT_FOUND | 404 | Payment not found |
PRODUCT_NOT_FOUND | 404 | Product not found |
PRICE_NOT_FOUND | 404 | Price not found |
CUSTOMER_NOT_FOUND | 404 | Customer not found |
INSUFFICIENT_BALANCE | 400 | Insufficient wallet balance |
RATE_LIMITED | 429 | Too many requests |
ID Formats
All entity IDs use prefixed formats:| Entity | Format | Example | Length |
|---|---|---|---|
| Customer | cus_ + 16 chars | cus_V6n6SN2KnsIFCuQU | 20 |
| Product | prod_ + 16 chars | prod_X4dUuzsMaruQ4UsX | 21 |
| Price | price_ + 16 chars | price_i62wKFQ8sGnLxQ5G | 22 |
| Payment | pay_ + 16 chars | pay_abc123def456 | 19 |
| Merchant | UUID | a086a795-a411-4160-81e4-44e92dbc02bf | 36 |
Rate Limits
- Authentication endpoints: 5 requests per minute
- Payment creation: 10 requests per minute
- Other endpoints: 100 requests per minute