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

200Success

Request processed successfully

400Bad Request

Invalid request data

401Unauthorized

Authentication failed

403Forbidden

No access to this API

404Not Found

Requested resource not found

422Unprocessable Entity

Valid data but cannot be processed (validation errors)

429Too Many Requests

Rate limit exceeded

500Internal Server Error

Server 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
  }
}