API Endpoint
GET
https://einvoice-api.sepay.vn/v1/invoices/{reference_code}API Request
reference_codestringrequired
Mã tham chiếu hóa đơn
Lấy reference_code từ đâu?
reference_code là mã tham chiếu duy nhất của hóa đơn, bạn có thể lấy từ:
- API Xuất hóa đơn - Trả về trong response khi kiểm tra trạng thái xuất hóa đơn (
/v1/invoices/create/check/{tracking_code}) - API Phát hành hóa đơn - Trả về trong response khi kiểm tra trạng thái phát hành (
/v1/invoices/issue/check/{tracking_code}) - API Danh sách hóa đơn - Mỗi hóa đơn trong danh sách đều có
reference_code(/v1/invoices)
API Response
Response thành công (200)
{
"success": true,
"data": {
"reference_code": "084e179d-d95a-11f0-aef4-52c7e9b4f41b",
"invoice_number": "589",
"issued_date": "2026-01-26",
"pdf_url": "https://beta-portalv2.mifi.vn/DownloadPDFCA.aspx?...",
"xml_url": null,
"status": "issued",
"buyer": {
"name": "Công ty ABC",
"tax_code": "0101234567",
"address": "123 Đường A, Quận B, Hà Nội",
"email": "buyer@example.com",
"phone": "0900000000"
},
"seller_store": {
"xid": "8f14e45f-ceea-4b6d-9c1a-2b3c4d5e6f70",
"code": "CN01",
"name": "Chi nhánh 1"
},
"total_before_tax": 200000,
"tax_amount": 20000,
"total_amount": 220000,
"notes": "Ghi chú hóa đơn",
"source": "api",
"items": [
{
"line_number": 1,
"line_type": 1,
"item_code": "SP001",
"item_name": "Sản phẩm A",
"unit": "cái",
"quantity": "2.00",
"unit_price": "100000.00",
"total_amount": "200000.00",
"tax_rate": "10.00",
"tax_amount": "20000.00"
}
]
}
}successboolean
dataobject
Địa điểm kinh doanh người bán
Trường seller_store là thông tin địa điểm kinh doanh người bán đã gắn với hóa đơn lúc tạo, gồm xid, code và name. Nếu hóa đơn không gắn địa điểm nào thì trường này là null.
Xử lý lỗi
401UnauthorizedThiếu hoặc sai Bearer token. Kiểm tra lại header Authorization.
404Not FoundKhông tìm thấy hóa đơn theo reference_code. Kiểm tra lại mã tham chiếu.
Code mẫu
>
>
>
curl --request GET \--url https://einvoice-api.sepay.vn/v1/invoices/084e179d-d95a-11f0-aef4-52c7e9b4f41b \--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Bước tiếp theo
Sau khi có thông tin chi tiết hóa đơn:
- Tải hóa đơn - Sử dụng
reference_codeđể tải file PDF hoặc XML của hóa đơn - Danh sách hóa đơn - Quay lại danh sách để tra cứu các hóa đơn khác