Skip to main content
Version: Lastest

API API Payment bill

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

Method: POST

Header: How to generate JWT_TOKEN

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

Params

ParamsRequiredTypeDescription
partnerRefIdStringTransaction id partner send to API query bill information
billCodeStringBill code
serviceCodeStringService code(see more Table Of Content menu Service code)
amountIntegerPayment money
billDetailStringJSON String is array information bill is result from API check bill
signatureStringSignature 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) (see more how to generate signature)

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..."
}