Process transaction pending
With errorCode: 35 - Pending transaction, AppotaPay will callback to Partner via IPN URL (which you registered with AppotaPay) after we receive the bank result.
Partner provides IPN url information to config on AppotaPay system
Method: POST
Header:
{
"Content-Type": "application/json"
}
Params
Params | Type | Description |
---|---|---|
errorCode | Integer | Error code result |
message | String | Description detail error code |
transaction | Object | Transaction information |
transaction.amount | Integer | Transaction money |
transaction.transferAmount | Integer | The actual amount transferred to the receiver, Will be less if this transaction paid by receiver |
transaction.transferStatus | string | Transaction transfer status (success, error) |
transaction.appotapayTransId | String | Transaction id from AppotaPay |
transaction.partnerRefId | String | Transaction id from Partner |
transaction.time | String | Transaction time with format: d-m-Y H:i:s |
signature | String | Signature of parameter passed to the API, the parameter is included into signature like this: amount + appotapayTransId + errorCode + partnerRefId + time + transferAmount + transferStatus (see more how to generate signature) |
Example
Request
{
"errorCode": 0,
"message": "Thành công",
"transaction": {
"amount": 50000,
"transferAmount": 50000,
"transferStatus": "success",
"appotapayTransId": "AP19992831832",
"partnerRefId": "615fb520099dq4",
"time": "27-10-2021 10:03:59"
},
"signature": "681b80d9dff4bc8d17c8b07ee3ef0fb8e3f1a12148184507c7d80a0bee6efe6d"
}
signature =
HMAC_SHA256(data, secretKey)
data sign sort params in place by keys in ascending order, exp: data:
amount={amount}&appotapayTransId={appotapayTransId}&errorCode={errorCode}&partnerRefId={partnerRefId}&time={time}&transferAmount={transferAmount}&transferStatus={transferStatus}
Response
HTTP Code: 200
Body:{"status": "ok"}
The request is considered as Success whenever receiving HTTP code=200. Unsuccessful Request will be retried maximum 3 times, each 5 minutes
Transaction Status
use transferStatus
param for checking transaction status
Transfer Status | Status |
---|---|
success | Transaction successfully |
error | Transaction failed |
Checking data
Use signature
param to check response data from AppotaPay.