Skip to main content
  • Last Updated: 2022-07-05 13:50:33

Overview

  • The open platform uses a public/private key mechanism for application management. Merchants can configure a public key / public key certificate for their application under Key Management in the open platform to prevent data tampering and ensure the security of interactions between merchant applications and the platform.

Terminology

  1. Public Key: The application public key (public_key), generated by the developer using a key generation tool.
  2. Private Key: The application private key (private_key), generated by the developer using a key generation tool.
  3. Platform Public Key: Generated by the open platform after the developer uploads their application public key. Used by developers to verify signatures on asynchronous or synchronous messages from the platform.

Signature Algorithm

Features

  • If you are unfamiliar with the API call method, please review the API Call Conventions documentation first.
  • Every API call must include a signature. The server validates the signature against the request parameters. Requests with invalid signatures will be rejected. The main purposes are:
    • Verify the integrity of each request’s parameters on both the service provider and platform sides.
    • Verify the identity of the requester on both the service provider and platform sides.

Signature Calculation

Java — Sign Reference Code

Java — Verify Signature Reference Code

If you are using another language, refer to the code above to implement it yourself.

Signature Algorithm:

Note:

When computing the SHA256withRSA signature, the byte stream must be encoded in UTF-8. Otherwise, signature calculation for parameters containing non-ASCII characters (e.g. Chinese) may be incorrect.

Request Example:

request