The Repayment and Disbursement APIs involve financial transactions. Before integrating with the production environment, merchants must complete the following security configurations.
All API requests and asynchronous notification URLs must use HTTPS.
TLS 1.2 or higher must be used.
Callback URLs must use a valid certificate issued by a trusted Certification Authority (CA).
HTTP plaintext URLs and self-signed certificates are not allowed.
2. Request Signing and Notification Signature Verification#
Required:
API requests must use RSA2 (SHA256withRSA) for signature generation.
The signing content must be encoded using TF-8, and the signature result must use standard Base64 encoding.
The signature must be computed over the exact raw JSON text of the "request" field in the outer request envelope. The "signature" field must not be included in the signing content.
Do not reorder fields, remove empty fields, or convert the formats of null, empty strings, or numeric values.
Upon receiving an asynchronous notification from the platform, the merchant must first verify the signature and complete the idempotency check before processing the order status. Once an order reaches a final status, it may only be handled manually.
If signature verification fails, the merchant must not perform any business processing or update the order status, and must record the event in security logs.
For the specific message format, please refer to the "Signature" section of the corresponding API.
Private keys must not be hard-coded in source code, plaintext configuration files, or version control repositories.
Private keys, tokens, and passwords must not be written to logs.
Access to private keys must be restricted to authorized business service accounts only.
Recommended:
Store keys using KMS, HSM, Vault, or an encrypted configuration center.
Rotate keys regularly.
If a key is suspected to have been compromised, immediately stop the relevant API calls and contact the platform technical support team to replace the key.
Each request must use a unique msgId to prevent duplicate submissions.
Asynchronous notifications may be sent multiple times. Merchants must implement idempotent processing based on the order number and order status.
A network timeout does not necessarily mean that the transaction has failed. The Query API must be used to confirm the final transaction status. A transaction may be determined as failed only if the status query is performed more than 60 seconds after transaction initiation and within one month of transaction initiation.
Signature verification failures or response parsing failures must not trigger business processing or cause an order to be directly marked as failed.