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

API specification

AlipayHK APIs are HTTP-based RESTful APIs with request and response messages formatted in JSON. An API caller, uniquely identified by the clientID assigned by AlipayHK during the onboarding process, can use the POST method to call the APIs.

Message structure

API request and response messages are formatted in JSON and encoded in UTF-8. A message contains three parts: head, body, and signature. The following examples illustrate the message structure

 

API request

copy
{
    "request": {
         <request header>
         <request body>
    },
    <signature>
}

API Response

copy
{
    "response": { 
        <response header>
        <response body> 
    }, 
    <signature> 
}