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

      Message encoding

      To prevent errors or ambiguity caused by special charaters enclosed in a message, need to properly encode the message before message is transmitted.

      Encoding scenarios

      Encoding method

      For the byte data, such as the signature and the encrypted content, encode the data with the base64 algorithm before transmitting.

      Via the base64 algorithm

      For the HTTP/HTTPS URL data, perform URL encoding first via the urlencode algorithm before transmitting.

      For example:

      • Original URL:
      • Encoded URL:

      Via the urlencode