Skip to main content
Version: 1.0

API API Payment bill

API API Payment bill

Chat with AI▼

Endpoint: /api/v1/service/bill/pay

Method: POST

Header: How to generate JWT_TOKEN

Language: en | vi

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

Params​

ParamsRequiredTypeDescription
partnerRefId√StringTransaction id partner send to API query bill information
billCode√StringBill code
serviceCode√StringService code(see more Table Of Content menu Service code)
amount√IntegerPayment money
billDetail√StringJSON String is array information bill is result from API check bill
signature√StringSignature of parameter passed to the API, the parameter is included into signature like this: amount + billCode + billDetail + partnerRefId + serviceCode (see more how to generate signature)

Data result​

ParamsTypeDescription
errorCodeIntegerError code result
messageStringDescription detail error code
billDetailArrayMInformation detail bill
billDetail[].billNumberStringID bill
billDetail[].periodStringPeriod payment bill
billDetail[].amountIntegerBill amount
billDetail[].billCreatedStringCreated time bill
billDetail[].billExpiryStringExpired payment
billDetail[].billTypeStringBill type
billDetail[].billOtherInfoStringOther information
billDetail[].isPartialPaymentAllowedBoolDoes the invoice allow partial payments? (default: false)
billDetail[].extraInfoStringExtra information
transactionObjectInformation transaction
transaction.appotapayTransIdStringTransaction id from AppotaPay
transaction.amountIntegerMoney transaction
transaction.billAmountIntegerMoney bill payment
transaction.timeStringTransaction time
accountObjectAccount information
account.balanceIntegerBalance account after payment
signatureStringSignature of parameter passed to the API, the parameter is included into signature like this (amount + appotapayTransId + billAmount + errorCode + time)

Example​

Request​

{
"amount": 100000,
"billDetail": [
{
"billNumber": "117934",
"period": "4/2020",
"amount": 100000,
"billCreated": "",
"billExpiry": "",
"billType": "",
"billOtherInfo": "",
"isPartialPaymentAllowed": false,
"extraInfo": ""
}
],
"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": ""
}
],
"transaction": {
"amount": 100000,
"billAmount":100000,
"appotapayTransId": "01ARXAAWEBDS",
"time": "10-04-2020 10:10:10"
},
"account": {
"balance": 12200000
},
"signature": "b10294bae53e89919b3efd62a763bf3228e260ef1a329..."
}