API v2 Overview
API v2 is the latest version of the EasySlip Developer API, offering improved features, better error handling, and a standardized response format.
Base URL
https://api.easyslip.com/v2Key Features
Standardized Response Format
All responses follow a consistent structure:
Success Response:
{
"success": true,
"data": { ... },
"message": "Operation completed successfully"
}Error Response:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message"
}
}Account Matching
Match slip receiver against your registered bank accounts:
{
"payload": "QR_PAYLOAD",
"matchAccount": true
}Response includes matched account details:
{
"matchedAccount": {
"bank": {
"nameTh": "กสิกรไทย",
"nameEn": "KASIKORNBANK",
"code": "004",
"shortCode": "KBANK"
},
"nameTh": "บริษัท ตัวอย่าง จำกัด",
"nameEn": "EXAMPLE CO., LTD.",
"type": "JURISTIC",
"bankNumber": "123-4-56789-0"
}
}Amount Validation
Verify that slip amount matches expected amount:
{
"payload": "QR_PAYLOAD",
"matchAmount": 1500.50
}Response includes validation result:
{
"amountInOrder": 1500.50,
"amountInSlip": 1500.50,
"isAmountMatched": true
}Multi-Branch Support
Create multiple API branches with:
- Separate API keys per branch
- Per-branch quota tracking
- Different IP restrictions
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/verify/bank | POST | Verify bank slip |
/info | GET | Get application information |
/health | GET | Health check |
Authentication
API v2 requires HMAC-SHA256 signature authentication. For verification and info endpoints, use your branch UUID as X-API-Key. Each request must include the following headers:
| Header | Description |
|---|---|
X-API-Key | Your branch UUID (e.g., a1b2c3d4-e5f6-7890-abcd-ef1234567890) |
X-Timestamp | Unix timestamp (seconds) |
X-Nonce | UUID v4, unique per request |
X-Signature | HMAC-SHA256 signature |
TIP
HMAC authentication is required for all API endpoints. The signature is computed using your B2B client secret key.
See Authentication Guide for implementation details and code examples.
Quick Examples
See Authentication Guide for complete request examples with HMAC signature headers.
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
MISSING_API_KEY | 401 | X-API-Key header missing |
INVALID_API_KEY | 401 | API key is invalid |
MISSING_SIGNATURE | 401 | X-Signature header missing |
INVALID_SIGNATURE | 401 | HMAC signature verification failed |
TIMESTAMP_EXPIRED | 401 | X-Timestamp is too old or too far in the future |
NONCE_REUSED | 401 | X-Nonce has already been used |
BRANCH_INACTIVE | 403 | API branch is deactivated |
SERVICE_BANNED | 403 | Service has been banned |
USER_BANNED | 403 | User has been banned |
IP_NOT_ALLOWED | 403 | Client IP not in whitelist |
QUOTA_EXCEEDED | 403 | API quota exceeded |
VALIDATION_ERROR | 400 | Request validation failed |
SLIP_NOT_FOUND | 404 | Slip not found or invalid |
API_SERVER_ERROR | 500 | External API error |
See Error Codes Reference for full list.
Next Steps
- Bank Slip Verification - Learn about slip verification
- Info Endpoint - Get application details
- Error Codes - Handle errors properly