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
#
RedirectMethod: 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
&tokenResult={\"status\":0,\"message\":\"Th\\u00e0nh c\\u00f4ng\",\"card\":{\"status\":\"active\",\"token\":\"2331123162638222\",\"card_name\":\"NGUYEN VAN A\",\"card_number\":\"970400xxxxxx0001\",\"card_date\":\"\",\"card_type\":\"ATM_CARD\"}}
&signature=9487dd169d2178b249d1503d2f2d7f01d1210517f6ae3a2703760cb218c838f3
#
IPN (Instant Payment Notification)Server AppotaPay send payment result to notifyUrl
Header
{ "Content-Type": "applicaton/json"}
Method : POST
HTTP Request:
Params | Data type | Description |
---|---|---|
errorCode | Integer | Error code |
message | String | Error code detail |
partnerCode | String | Your Partner code |
apiKey | String | API KEY |
amount | Integer | Payment amount |
currency | String | Currency code (default: VND) |
orderId | String | Order ID |
bankCode | String | Bank Code |
paymentMethod | String | Payment method |
paymentType | String | Payment type (default: WEB) |
appotapayTransId | String | AppotaPay transaction ID |
transactionTs | Integer | Payment time |
extraData | String | Extra data |
tokenResult | String | Information token and card saved |
signature | String | Signature check data signature = data: |
Signature example data:
amount=2000&apiKey=FJcmF8uj2ISveL5FvvNk4pnp8xrhINz8&appotapayTransId=AP231437168954&bankCode=VCB¤cy=VND&errorCode=0&extraData=string&message=Success&orderId=11034005&partnerCode=APPOTAPAY&paymentMethod=ATM&paymentType=WEB&tokenResult={"status":0,"message":"Th\u00e0nh c\u00f4ng","card":{"status":"active","token":"2331123162638222","card_name":"NGUYEN VAN A","card_number":"970400xxxxxx0001","card_date":"","card_type":"ATM_CARD"}}&transactionTs=1679542882
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", "tokenResult": "{\"status\":0,\"message\":\"Th\\u00e0nh c\\u00f4ng\",\"card\":{\"status\":\"active\",\"token\":\"4120587300058051\",\"card_name\":\"NGUYEN VAN A\",\"card_number\":\"970400xxxxxx0001\",\"card_date\":\"\",\"card_type\":\"ATM_CARD\"}}", "signature":"d6ff2d38c2b1167c6d17b9dbb1380347b24c1bf912dc442dbd018b2e1ed74f3d"}
HTTP Response:
HTTP Code: 200
Body: {"status": "ok"}
#
Transaction Statususe errorCode
param for checking transaction status
Error Code | Status |
---|---|
= 0 | Transaction successfully |
!= 0 | Transaction failed or pending |
#
Checking dataUse signature
param to check response data from AppotaPay.