API Overview
Overview of SePay Payment Gateway API including base URLs, authentication and endpoints.
Base URLs
URL
https://pgapi-sandbox.sepay.vn
API Authentication
All SePay APIs use Basic Authentication for authentication.
Headers
Authorization: Basic base64(merchant_id:secret_key) Content-Type: application/json
Common Error Codes
200SuccessRequest processed successfully
400Bad RequestInvalid request data
401UnauthorizedAuthentication failed
403ForbiddenNo access to this API
404Not FoundRequested resource not found
422Unprocessable EntityValid data but cannot be processed (validation errors)
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error
Pagination
APIs returning lists support pagination:
per_pageinteger
Number of results per page (default: 20, max: 100)
pageinteger
Current page (default: 1)
Response Format
RESPONSE
{
"data": "[...]",
"meta": {
"per_page": 20,
"total": 100,
"has_more": false,
"current_page": 1,
"page_count": 5
}
}