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

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

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

Chat với AI▼

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

Method: POST

Header: Cách tạo JWT_TOKEN

Language: en | vi

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

Tham số​

Tham sốYêu cầuKiểu dữ liệuMô tả
partnerRefId√StringMã 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)
billCode√StringMã hoá đơn/thanh toán
serviceCode√StringMã dịch vụ (xem thêm phần Phụ Lục bảng mã dịch vụ)
signature√StringChữ 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": ""
}
}

Code Examples​

curl --location 'https://gateway.dev.appotapay.com/api/v1/service/bill/check' \
--header 'X-APPOTAPAY-AUTH: JWT_TOKEN' \
--header 'Content-Type: application/json' \
-d '{
"partnerRefId": "AB123",
"billCode": "PD12121",
"serviceCode": "ENVHN",
"signature": "b10294bae53e89919b3efd62a763bf3..."
}'

Request​

REQUEST

Development server
Example (from schema)