Callback Notifications
Less than 1 minute
Callback Notifications
Callback notifications provide real-time payment status updates to your system. This guide explains how to handle and verify callback requests.
๐ Callback Process
Sandbox Environment
- Create sandbox order
- Click
Set Callback
to simulate success/failure - Important: Payment method must not be empty
- Test callback handling in your system
Production Environment
- Callbacks are sent automatically when actual payments occur
- No manual intervention required
- Real-time payment status updates
API Orders Only
Callbacks are only sent for orders created via API. Orders created through merchant platform payment links cannot be linked to merchant systems.
๐ Callback Signature Verification
Signature Generation
X-SIGNATURE = SHA256withRSA(smilepayz_private_key, stringToSign)
String to Sign
stringToSign = tradeNo + "|" + X-TIMESTAMP
Verification Process
- Extract
X-SIGNATURE
andX-TIMESTAMP
from callback headers - Construct
stringToSign
usingtradeNo
andX-TIMESTAMP
- Use SmilePayz public key to verify signature
- Return
SUCCESS
string if verification passes
Response
When receiving callback requests, simply return:
SUCCESS
๐ Implementation Steps
- Get Platform Public Key: Refer to Integration Info
- Verify Signature: Use the signature verification method from Tools Documentation
- Process Callback: Handle payment status updates
- Return Response: Send
SUCCESS
confirmation
โ ๏ธ Important Notes
- Signature Verification: Always verify callback signatures
- Public Key: Use correct platform public key for verification
- Response: Return
SUCCESS
string only - Security: Never trust unverified callbacks