Webhooks are used to notify the merchant system in real time about transaction status changes (such as deposits credited, payouts completed, etc.). When an event occurs, NUSDpay sends an HTTP POST request to the endpoint URL configured by the merchant.

How It Works

After receiving a Webhook, first verify that the wallet_id belongs to your project. Events from other projects should be ignored.

Configure Webhook

1

Prepare an endpoint URL

Deploy an HTTP endpoint on your server to receive Webhook events.
2

Provide the URL to us

Send the endpoint URL to technical support to be configured.
3

Implement the handling logic

In your endpoint, implement: parse the request → verify the signature → process the business logic → respond with 200/201.

Verify the Signature

To prevent unauthorized access, you must verify the signature when you receive a Webhook event.

Steps

  1. Read the timestamp and signature from the request headers:
  1. Concatenate the message: raw request body + "|" + timestamp
  2. Apply a double SHA256 hash to the message
  3. Verify the signature using the Ed25519 public key

Full Verification Code

Please contact technical support to obtain the PUB_KEY.

Webhook Events

Event Types

NUSDpay does not guarantee that events arrive in the order they are produced. Your endpoint should process business logic based on event content, not arrival order.

Retry Mechanism

  • Timeout (no response within 2 seconds) or non-200/201 response: the system retries automatically
  • Up to 10 retries
  • After exceeding the retry limit, the event status becomes “delivery failed”
We recommend using request_id for idempotency to prevent retries from causing duplicate processing. We also recommend periodically calling the query endpoint as a reconciliation fallback.

Complete Implementation Examples

Next Steps

Deposit Callback

View the payload field reference for deposit events.

Withdrawal Callback

View the payload field reference for withdrawal events.