Skip to main content
Version: 1.0

API Create ebill

Endpoint: /api/v1/service/ebill/create

Method: POST

Header: How to generate JWT_TOKEN

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

Params

ParamsRequiredTypeDescription
billCodeStringBill code, is the unique code for each order
billInfoStringBill information
billExpiryTimeIntegerTransaction expiry time payment bill (Note)
customerNameStringAccount name or card name Client want to check.

- Vietnamese unsigned

- Only text

- Do not fill special character: Example: -,_,\

serviceCodeStringService code
amountIntegerTransaction amount
paymentConditionStringPayment conditions includes:

EQ: Transfer amount is equal bill amount

LTE: Transfer amount is less than or equal bill amount

GTE: ransfer amount is greater or Equal bill amount

NO: No condition (Value column "amount" can set any value >= 10000, Ex: amount=10000)

Payment condition depend on the bank, partner should check amount value when receiving IPN

(Note)
bankCodeStringBank code
notifyUrlStringPartner API is used by AppotaPay to send payment result using IPN (Server to server) method
extraDataStringExtra data
signatureStringSignature of parameter passed to the API, the parameter is included into signature like this: amount + bankCode + billCode + billExpiryTime + billInfo + customerName + extraData + notifyUrl + paymentCondition + serviceCode (more how to generate signature)

Data result

ParamsTypeDescription
errorCodeIntegerError result
messageStringDescription error code detail
billCodeStringBill code, is the unique code for each order
paymentObjectPayment information
payment.bankAccountsArray of ObjectBank account information
payment.bankAccounts.bankCodeStringBank code
payment.bankAccounts.bankNameStringBank name
payment.bankAccounts.bankBranchStringBank branch
payment.bankAccounts.accountNoStringAccount number
payment.bankAccounts.accountNameStringAccount name
signatureStringSignature of parameter passed to the API, the parameter is included into signature like this: billCode + errorCode + json_encode(payment) (see more how to generate signature)

Example

Request

{
"billCode": "60586f8d6a684",
"billInfo": "Thanh toán hóa đơn Gamota",
"serviceCode": "GAME",
"customerName": "PHAM MINH TUAN",
"notifyUrl": "https://appotapay.com",
"amount": 50000,
"billExpiryTime": 1616818154,
"paymentCondition": "NO",
"bankCode": "WOORIBANK",
"signature": "abc123"
}

Response

{
"errorCode": 0,
"message": "Thành công",
"billCode": "60586f8d6a684",
"payment": {
"bankAccounts": [{
"bankCode": "WOORIBANK",
"bankName": "WOORIBANK",
"bankBranch": "",
"accountNo": "902000225675",
"accountName": "VAP001 PHAM MINH TUAN"
}]
},
"signature": "07a0127c496a24e1a72e5eb123da1e7bc603bbf444babc41fde20 63e5438a89f"
}