tencent cloud

All product documents
Tencent Cloud Super App as a Service
Superapp Payment Certificate Signature
Last updated: 2025-04-03 11:36:38
Superapp Payment Certificate Signature
Last updated: 2025-04-03 11:36:38
The superapp's payment uses its certificate's private key to perform SHA256 with RSA signing on the "response signature string," and then encodes the signature result using Base64 to obtain the signature value..

Construct the signature string

1. Get the following information from the response or notification callback:
HTTP Header Wechatpay-Timestamp: The response timestamp.
HTTP Header Wechatpay-Nonce: The response nonce.
Response body: Use the original response body for verification. Ensure that any framework used does not alter the response body, as any modification will result in verification failure.
2. Construct the response signature string according to the following rules. The signature string consists of three lines, each ending with a newline character (\\n, ASCII value 0x0A). If the response body is empty (e.g., HTTP status code 204 No Content), the last line will be just a newline character.
Request timestamp\\n
Request random string\\n
Request body\\n

Get the response signature

The response signature from the supperapp's payment is transmitted via the HTTP header Wechatpay-Signature. (Note: Examples may contain line breaks, but actual data should be in one line). Use Base64 decoding on the Wechatpay-Signature field value to obtain the response signature.

Verify the signature

Use the superapp's payment public key to verify the signature string and SHA256 with RSA signature.


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon