Nhảy tới nội dung
Phiên bản: Lastest

API Truy vấn thông tin hoá đơn

Endpoint: /api/v1/service/bill/check

Method: POST

Header: Cách tạo JWT_TOKEN

{
"X-APPOTAPAY-AUTH": Bearer JWT_TOKEN,
"Content-Type": "application/json"
}

Tham số

Tham sốYêu cầuKiểu dữ liệuMô tả
partnerRefIdStringMã giao dịch phía đối tác, duy nhất cho mỗi giao dịch (mã này sẽ được dùng khi thực hiện gọi API thanh toán hoá đơn)
billCodeStringMã hoá đơn/thanh toán
serviceCodeStringMã dịch vụ (xem thêm phần Phụ Lục bảng mã dịch vụ)
signatureStringChữ ký các tham số truyền lên API, các tham số được đưa vào chữ ký theo thứ tự bao gồm: billCode + partnerRefId + serviceCode (xem thêm phần cách tạo signature)

Dữ liệu trả về

Tham sốKiểu dữ liệuMô tả
errorCodeIntegerMã lỗi trả về
messageStringMô tả chi tiết mã lỗi
billDetailArray of ObjectMảng thông tin chi tiết hoá đơn
billDetail[].billNumberStringID của hoá đơn
billDetail[].periodStringKỳ thanh toán hoá đơn
billDetail[].amountIntegerSố tiền hoá đơn
billDetail[].billCreatedStringNgày tạo hoá đơn
billDetail[].billExpiryStringNgày hết hạn thanh toán
billDetail[].billTypeStringLoại hoá đơn
billDetail[].billOtherInfoStringCác thông tin khác
billDetail[].isPartialPaymentAllowedBooleanHoá đơn có cho phép thanh toán từng phần hay không (mặc định: false)
billDetail[].extraInfoStringThông tin bổ sung
customerInfoObjectThông tin khách hàng
customerInfo.customerCodeStringMã khách hàng
customerInfo.customerNameStringTên khách hàng
customerInfo.customerAddressStringĐịa chỉ khách hàng
customerInfo.customerOtherInfoStringThông tin khác
customerInfo.extraInfoStringThông tin mở rộng

Ví dụ

Request

{
"partnerRefId": "AB123",
"billCode": "PD12121",
"serviceCode": "ENVHN",
"signature": "b10294bae53e89919b3efd62a763bf3..."
}

Response

{
"errorCode": 0,
"message": "Thành công",
"billDetail": [
{
"billNumber": "117934",
"period": "4/2020",
"amount": 100000,
"billCreated": "",
"billExpiry": "",
"billType": "",
"billOtherInfo": "", "isPartialPaymentAllowed": false, "extraInfo": ""
}
],
"customerInfo": {
"customerCode": "PA12121",
"customerName": "Nguyen Van A",
"customerAddress": "Ha Noi",
"customerOtherInfo": "PA11",
"extraInfo": ""
}
}