Skip to main content
Version: 1.0

API Create ebill

API Create ebill

Chat with AI▼

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

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
billCode√StringBill code, is the unique code for each order
billInfo√StringBill information
billExpiryTimeIntegerTransaction expiry time payment bill (Note)
customerName√StringAccount name or card name Client want to check.

- Vietnamese unsigned

- Only text

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

(Note)
serviceCodeStringService code
amount√IntegerTransaction amount
paymentCondition√StringPayment 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)
bankCode√StringBank code
notifyUrl√StringPartner API is used by AppotaPay to send payment result using IPN (Server to server) method
extraDataStringExtra data
signature√StringSignature 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.accountNoStringAccount number
payment.bankAccounts.accountNameStringAccount name
payment.bankAccounts.bankBranchStringBank branch
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",
"accountNo": "902000225675",
"accountName": "VAP001 PHAM MINH TUAN",
"bankBranch": ""
}]
},
"signature": "07a0127c496a24e1a72e5eb123da1e7bc603bbf444babc41fde20 63e5438a89f"
}