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
Params | Required | Type | Description |
---|---|---|---|
billCode | √ | String | Bill code, is the unique code for each order |
billInfo | √ | String | Bill information |
billExpiryTime | Integer | Transaction expiry time payment bill (Note) | |
customerName | √ | String | Account name or card name Client want to check. - Vietnamese unsigned - Only text - Do not fill special character: Example: -,_,\ |
serviceCode | String | Service code | |
amount | √ | Integer | Transaction amount |
paymentCondition | √ | String | Payment 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 | √ | String | Bank code |
notifyUrl | √ | String | Partner API is used by AppotaPay to send payment result using IPN (Server to server) method |
extraData | String | Extra data | |
signature | √ | String | Signature of parameter passed to the API, the parameter is included into signature like this: amount + bankCode + billCode + billExpiryTime + billInfo + customerName + extraData + notifyUrl + paymentCondition + serviceCode (see more how to generate signature) |
Data result
Params | Type | Description |
---|---|---|
errorCode | Integer | Error result |
message | String | Description error code detail |
billCode | String | Bill code, is the unique code for each order |
payment | Object | Payment information |
payment.bankAccounts | Array of Object | Bank account information |
payment.bankAccounts.bankCode | String | Bank code |
payment.bankAccounts.bankName | String | Bank name |
payment.bankAccounts.bankBranch | String | Bank branch |
payment.bankAccounts.accountNo | String | Account number |
payment.bankAccounts.accountName | String | Account name |
signature | String | Signature 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"
}