Skip to main content

Gửi email hóa đơn

API này cho phép gửi hóa đơn qua email cho người mua.

Lưu ý

API này hiện chỉ hỗ trợ nhà cung cấp XCyber.

POST
URLhttps://uat-open-api.tingee.vn/v1/e-invoice/send-email

Gửi hóa đơn qua email cho người mua.

Header Request

HeaderBắt buộcMô tả
Content-Typeapplication/json
x-client-idMã định danh của đối tác do TINGEE cung cấp.
x-signatureChữ ký xác thực HMAC SHA512. Xem thêm tại Cách sinh chữ ký.
x-request-timestampThời gian gửi request (format: yyyyMMddHHmmssSSS, múi giờ UTC+7)

Body Parameter

TrườngKiểuBắt buộcMô tả
providerstringNhà cung cấp: x-cyber, hilo, s-invoice.
(Tự lấy từ tài khoản mặc định nếu không truyền).
taxCodestringMã số thuế.
(Tự lấy từ tài khoản mặc định nếu không truyền).
merchantIdnumberMã Merchant.
(Bắt buộc nếu kết nối bằng tài khoản Master Merchant).
invoiceCodestringMã hóa đơn / transactionUuid.
recipientEmailstringEmail người nhận.

Ví dụ mã nguồn

curl --location --request POST 'https://uat-open-api.tingee.vn/v1/e-invoice/send-email' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'x-request-timestamp: 20251209103911111' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'Content-Type: application/json' \
--data '{
"invoiceCode": "INV-20251209-001",
"recipientEmail": "buyer@example.com"
}'

Response mẫu

{
"data": null,
"success": true,
"error": null
}
TrườngKiểuMô tả
successbooleanTrạng thái xử lý (true = Thành công).
errorstringMã lỗi (nếu có), null nếu thành công.

Mã lỗi thường gặp

CodeMô tảHướng xử lý
90Sai format timestampKiểm tra format yyyyMMddHHmmssSSS.
91Request quá hạnKiểm tra thời gian gửi request.
97Sai chữ kýKiểm tra lại Secret Key và logic tạo Signature.
OthersLỗi khácXem Danh sách mã lỗi.