API lấy chi tiết đơn hàng

Lấy chi tiết một đơn hàng qua API Cổng thanh toán SePay, gồm trạng thái, số tiền, thông tin khách hàng và lịch sử giao dịch.

||

API Endpoint

GET
https://pgapi.sepay.vn/v1/order/detail/{order_invoice_number}

API Request

order_invoice_numberstringrequired

Mã hóa đơn của đơn hàng cần truy vấn, là giá trị order_invoice_number bạn gửi khi tạo đơn (Ví dụ DH1756370479)

API Response

Success Response (200)
{
  "data": {
    "id": "6f1c2b3a-8d4e-11f0-9a1b-0242ac120002",
    "customer_id": null,
    "order_id": "SEPAY-68B01673A77FF",
    "order_invoice_number": "DH1756370479",
    "order_status": "CAPTURED",
    "order_amount": "300000.00",
    "order_currency": "VND",
    "order_description": "Đơn hàng #1756370479",
    "authentication_status": "AUTHENTICATION_SUCCESSFUL",
    "created_at": "2025-08-28 15:43:48",
    "updated_at": "2025-08-28 15:43:48",
    "transactions": [
      {
        "id": "7a2d3c4b-8d4e-11f0-9a1b-0242ac120002",
        "payment_method": "CARD",
        "transaction_type": "PAYMENT",
        "transaction_amount": "300000",
        "transaction_currency": "VND",
        "transaction_status": "APPROVED",
        "authentication_status": "AUTHENTICATION_SUCCESSFUL",
        "card_number": "512345xxxxxx0008",
        "card_holder_name": "NGO QUOC DAT",
        "card_expiry": "1230",
        "card_funding_method": "DEBIT",
        "card_brand": "MASTERCARD",
        "transaction_date": "2025-08-28 15:43:41",
        "transaction_last_updated_date": "2025-08-28 15:43:41"
      }
    ]
  }
}
dataobject

Code mẫu

>
>
>
curl --request GET \
--url https://pgapi.sepay.vn/v1/order/detail/DH1756370479 \
--header 'Authorization: Basic REPLACE_BASIC_AUTH'

Ghi chú

Định nghĩa trạng thái đơn hàng
  • CAPTURED: Đã thanh toán
  • CANCELLED: Đã hủy
  • AUTHENTICATION_NOT_NEEDED: Đang đợi thanh toán