目录

What Should I Do If an Error Indicating Invalid Signature Is Reported in the API Response?

  1. Verify that the private key used for signing pairs the public key uploaded to the merchant platform.

  2. Verify that the character strings to be signed are correctly concatenated. The fields to be signed in an object need to be sorted before concatenation. The nested lower-level objects in an object also need to be sorted before concatenation. For details, please refer to Signing Rules.

  3. Verify that the naming convention of the sorted and concatenated fields is consistent with that of the request parameters. For example, if the signed fields use the Hungarian notation, the request parameters should use the camelCase notation. Otherwise, the signed content will be inconsistent with the verified content.

  4. Verify that signing content field (for example, sign) is correctly set. For example, if the signed content is not promptly set to the sign field, the fixed sign content is always used to initiate the request.

  5. Verify that the signing algorithm is consistent with the required one.