Callback notification
WARNING
Note: The same notification may be sent multiple times to the merchant system. And the merchant system must be able to handle correctly the same notification. Recommended practices are as follows. When processing a notification, firstly checking the status of the corresponding service data to determine whether the notification has been processed. If no, process it again. If yes, direct return a success result. Before state checking and processing of business data, concurrency control is performed using data locks to avoid data chaos caused by function reentrant.
DANGER
Attention: The merchant system must do signature verification for the content of the order callback, and verify whether the returned order amount is consistent with the order amount. The reason for doing these to prevent data leakage resulting in "false notice" resulting in loss of funds.
Interface address
The notify url parameter submitted by the POST unified order interface is set. If you cannot access the link, your service system cannot receive the notification from the payment center.
Request Body
app_id
string
Application
mch_id
string
Merchant
create_time
time
Notification time
resource_type
string
The resource data type of the notification. Payment success notification is encrypt-resource
event_type
string
Notification type. The type of payment success notification is SUCCESS.
resource
object
Notification resource data
» original_type
string
The original callback type is transaction
» algorithm
string
Currently, only AES-256-ECB is supported for the encryption algorithm that encrypts the result data
» ciphertext
string
Base64 encoded on/off result data ciphertext. If enabled, the encrypted content is returned. After decryption, it is a json string of TransactionNotifyDetail.
» nonce
string
Encrypt using random strings
Request example
{
"app_id": "xxxxx",
"mch_id": "zzzzzz",
"create_time": "2023-06-26T17:21:17.754429+08:00",
"resource_type": "encrypt-resource",
"event_type": "TRANSACTION.SUCCESS",
"resource": {
"original_type": "transaction",
"algorithm": "AEAD_AES_256_GCM",
"ciphertext": "I/psKgdkVwxbkEIWtwRxfxLzViuRS+gJTQSdLf+lmK7awoqUcIJisTAJx0Qbv4K6wV8WgyMRFYHD5CCLKmFNU2OnmEm2f2vGhaoS2h28A9BEGx1CWEUw3tfldf/+VWlBAnIBylFjHzbSo7fgn7S3fFEAZHTxoy+9jNIoynqHZbn4Y6eucj1YCw0ZmuKHPpPPrvclbhHmaZHfau+SKyag3C0/cj7zu4mBkRZ39zuk9B7DAADzaRENOZ/ZyibU+zs3gibnCbI2NWEnQWIiCi7vK0jq/FCBWytHihQM364zlVrPPCBDbv2MSqk4fyAM7IDeT6h/z/2kmDOQ6aFPYlLojIkgCCOIevQITS9E+BS1rgmmH+DRKsJNiD257aLhX2/F53VEnjfqqKdDs2lqfX0dCMLqselGUT981fFKceXg+r6hQqcUzLlF28XL5NrfVPreRDo6jI2K0tCy9cOx+cxH3yoDzOFBzM0RlxWqvUhRsMv9ZGfpgCZ0o9HxNObqLjVCQzE5SWPXvmkw+QpWk0oNUvpCEDhj9Vfq6XCV8j3tT3tZTYCa5UQy9VCdmval/2vb50QaAgDYXU6PH/9Xv7AXg6kg29iK+Ec0euxZxosRoVczzRg+0Arl/zvBcphWNIUTdx5IcA12WtP+krk9NNGtj7igk21DhcseJrKBpG7ll9O/Wmq1L8BwW+ypuJS+kHV61jRNYMFJY48Pt11Zoukgqu94kzrhz+KET8q463zlyu/Kp2z5yWI8xwvOtuyjosszfm6/YFQTFdhcmHY3X1yz44NaVG9FPev1QPoPmI7K3Jqa0Q8Q5kQTbe/KrB0eyRpXtyAaShOEeiS2ypmFAC81/m4mjuTd24yAjBcTIfBYzjxwjPbKfv+OYKahDwJP1b7EhsM+Sgu48wQ+pp6wc8TYCOkiRR1pKeb3kaxpQGzlq7VNbWHFPw9TDiyCIEnr8T5eiJtzJJ0U0iIfqN5WHk7iHiNK4Y4TvmdF4f6UyeMTHvaprvzUZI8il5wvoCgIiRUY7qvv5V/KL4ZWHN6Y3EEvQmP4WDo3Wx5IFW8C1gkyFv8lQ1COSNYMPog6RLAI0rNvKZjvc4baWwcHmk/fM92X19F2Y0DArqLFFUTJVE5bUQXQexiUO1e8IL07wqY=",
"nonce": "d8816e8d6dca4409b790a4bcaa25c621"
}
}
Return example
success
Please return success
to notify the notification server after successfully receives the callback request. After the notification server receiving success
, the notification stops. Otherwise, the notification will be sent 10 times at the frequency of 0s/15s/30s/3m/10m/20m/30m/60m/3h/6h.