Skip to main content
Version: 1.0

Process payment result

After the customer completes the payment process, the AppotaPay system notifies the result to the partner's system through 2 forms

Note
  • It is necessary to carefully check the status, amount & signature field parameters
  • It is recommended to call the api to check the transaction status to ensure the most accurate updated results

Redirect

Method: GET

Params in query

partnerCode=TEST&apiKey=oMhJpkz7K6HDcR6S&amount=50000& currency=VND&orderId=5f61d06311019 &bankCode=SHB&paymentMethod=ATM&paymentType=WEB&appotapayTransId=AP200910016654B&errorCode=0 &message=Thành+công&transactionTs=1600246241&extraData=test+test &signature=9487dd169d2178b249d1503d2f2d7f01d1210517f6ae3a2703760cb218c838f3

IPN (Instant Payment Notification)

Server AppotaPay send payment result to notifyUrl

Header

{
"Content-Type": "applicaton/json"
}

Method: POST

HTTP Request:

ParamsData typeDescription
errorCodeIntegerError code
messageStringError code detail
partnerCodeStringYour Partner code
apiKeyStringAPI KEY
amountIntegerPayment amount
currencyStringCurrency code (default: VND)
orderIdStringOrder ID
bankCodeStringBank Code
paymentMethodStringPayment method
paymentTypeStringPayment type (default: WEB)
appotapayTransIdStringAppotaPay transaction ID
transactionTsIntegerPayment time
extraDataStringExtra data
signatureStringSignature check data

signature = HMAC_SHA256(data, secretKey)

data: amount={amount}&apiKey={apiKey}&appotapayTransId={appotapayTransId}&bankCode={bankCode}& currency={currency}&errorCode={errorCode}&extraData={extraData}&message={message}&orderId={orderId}&partnerCode={partnerCode}&paymentMethod={paymentMethod}&paymentType={paymentType}&transactionTs={transactionTs}

Example Request:

{
"errorCode":0,
"message":"Thành công",
"partnerCode": "TEST",
"apiKey": "oMhJpkz7K6HDcR6S",
"amount":50000,
"currency":"VND",
"orderId":"5f5b46cb73fd0",
"bankCode":"SHB",
"paymentMethod":"ATM",
"paymentType":"WEB",
"appotapayTransId":"AP200910014125B",
"transactionTs":1599817433,
"extraData":"test test",
"signature":"d6ff2d38c2b1167c6d17b9dbb1380347b24c1bf912dc442dbd018b2e1ed74f3d"
}

HTTP Response:

HTTP Code: 200
Body: {"status": "ok"}

Transaction Status

use errorCode param for checking transaction status

Error CodeStatus
= 0Transaction successfully
!= 0Transaction failed or pending

Checking data

Use signature param to check response data from AppotaPay.