Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

Notification process

After receiving a notification, you need to verify the authenticity of the signature to ensure the data contained in the notification is originated from AlipayHK without being modified during the transmission. Only after verifying the content, you can trust the received notification and use the data contained in the notification in your own system for further process.

Note:

For the alipay.intl.acquiring.common.notify.pay API: 

You need to provide AlipayHK with the payment notify URL offline after the contract is signed so that it can be configured accordingly for payment notification.

After the transaction succeeds, including both the agreement and WAP payment, you will receive both asynchronous and synchronous responses from our payment gateway. It is recommended to process the asynchronous notification. You don't need to verify both the asynchronous notification and synchronous notification.

Below is one example of the payment notification sent to the merchant-provided notify_url. After the program is executed, you need to reply a resultCode of SUCCESS to AlipayHK. If not, the AlipayHK server will keep re-sending the notification, until over 24 hours 22 minutes. Generally, there are 8 notifications within 25 hours (Frequency: 2m, 10m, 10m, 1h, 2h, 6h, 15h).

Request

copy
{
    "request":{
        "head":{
           "version":"2.0.0",
            "function":"alipay.intl.acquiring.common.notify.pay",
           "clientId":"2014000014442",
           "reqTime":"2001-07-04T12:08:56+05:30",
           "reqMsgId":"1234567asdfasdf1123fda",
            "reserve":"{}"
        },
        "body":{
            "resultInfo":{
               "resultStatus":"S",
               "resultCodeId":"00000000",
               "resultCode":"SUCCESS",
               "resultMsg":"success"
            },
           "acquirementId":"201503       2412007101547201352747",
           "merchantTransId":"51051001000000000002",
            "orderAmount":{
               "currency":"USD",
               "value":"239"
            },
           "paymentTime":"2016-07-04T12:08:56+05:30",
           "extendInfo":"{}"
        }
    },
    "signature":"signature string"
}

Response

copy
{  
   "response":{  
      "head":{  
         "version":"2.0.0",
         "function":"alipay.intl.acquiring.common.notify.pay",
         "clientId":"4Q5XPV504B0A5302",
         "respTime":"2018-12-14T12:57:29+05:30",
         "reqMsgId":"2018-12-13-4966a937-2987-4d5f-bda4-94fc10622f41",
         "reserve":"{}"
      },
      "body":{  
         "resultInfo":{  
            "resultStatus":"S",
            "resultCodeId":"00000000",
            "resultCode":"SUCCESS",
            "resultMsg":"success"
         }
      }
   },
   "signature":"lWPNGhCPdtYH7LjNztxbMPln5zs5+ditM4e4cRMRhkvyiVK82PgzoWGSnWNwg77Epipc7NMpNNnpJrxjOQSeTqOLATCNN85v1l5SWWzzPMVv4w5tMq62KT1p33A0XuoqR92UX/H3RbJvUV2EjiDlx2PFMJt1rRVZBaNkxIq/ynCMA3lI1sQ1TXbgP6SEzvQh+WTJHxZcFVIyCHRDfyofNssW+tXwHB7zTF2G1cNbLTR4xKQ6dldA40inU9+zvavybuMWCNO7To6YUeg3SPyHEGM7NrG0GQYndCxXZSteJYcj+gvcOHIih5N7BboGtwB/eo5F3yjwe0GG5DrC+hhnoA=="
}