Skip to main content

Callback Notifications

smilepayz teamsLess 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.

Sandbox Callback Interface

๐Ÿ” Callback Signature Verification

Signature Generation

X-SIGNATURE = SHA256withRSA(smilepayz_private_key, stringToSign)

String to Sign

stringToSign = tradeNo + "|" + X-TIMESTAMP

Verification Process

  1. Extract X-SIGNATURE and X-TIMESTAMP from callback headers
  2. Construct stringToSign using tradeNo and X-TIMESTAMP
  3. Use SmilePayz public key to verify signature
  4. Return SUCCESS string if verification passes

Response

When receiving callback requests, simply return:

SUCCESS

๐Ÿ“‹ Implementation Steps

  1. Get Platform Public Key: Refer to Integration Info
  2. Verify Signature: Use the signature verification method from Tools Documentation
  3. Process Callback: Handle payment status updates
  4. 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
Last update: