Danh sách đơn hàng

API truy vấn danh sách đơn hàng cho phép bạn lấy thông tin danh sách đơn hàng với các bộ lọc tùy chọn.


API Endpoint

GET
https://pgapi-sandbox.sepay.vn/v1/order

API Request

per_pageinteger

Số đơn hàng mỗi trang (mặc định 20)

Mặc định: 20
pageinteger

Trang hiện tại (mặc định 1)

Mặc định: 1
qstring

Tìm kiếm theo từ khóa

order_statusenum

Lọc theo trạng thái đơn hàng:

  • CAPTURED: Đã thanh toán
  • CANCELLED: Đã hủy
  • AUTHENTICATION_NOT_NEEDED: Đang đợi thanh toán
customer_idstring

Lọc theo ID khách hàng

created_atstring

Lọc theo ngày tạo (YYYY-MM-DD)

from_created_atstring

Ngày bắt đầu (YYYY-MM-DD)

end_created_atstring

Ngày kết thúc (YYYY-MM-DD)

sortstring

Sắp xếp (created_at:asc, created_at:desc)

API Response

Success Response (200)
{
  "data": [
    {
      "id": "9",
      "customer_id": "2427",
      "order_id": "SEPAY-68BA83CE637C1",
      "order_invoice_number": "DH1757053857",
      "order_status": "AUTHENTICATION_NOT_NEEDED",
      "order_amount": "300000.00",
      "order_currency": "VND",
      "order_description": "Đơn hàng #1757053857",
      "authentication_status": null,
      "created_at": "2025-09-05 13:31:42",
      "updated_at": "2025-09-05 13:31:42"
    }
  ],
  "meta": {
    "per_page": 20,
    "total": 1,
    "has_more": false,
    "current_page": 1,
    "page_count": 1
  }
}
dataarray<object>
metaobject

Code mẫu

>
>
>
curl --request GET \
--url 'https://pgapi-sandbox.sepay.vn/v1/order?per_page=50&page=1&q=INV_20231201&order_status=CAPTURED&customer_id=CUST_001&created_at=2023-12-01&from_created_at=2023-12-01&end_created_at=2023-12-31&sort=created_at%3Adesc' \
--header 'Authorization: Basic REPLACE_BASIC_AUTH'