Skip to main content
Webhooks are used by Nomad Pay to send real-time notifications to your server about events, such as a successful payment.

Overview

This is an outbound request from Nomad Pay to your server. When an event occurs (like payment.succeeded), Nomad Pay will send a POST request to the Webhook URL you configured in your merchant dashboard.
  • Method: POST
  • Content-Type: application/json
  • Signature Algorithm: Ed25519

Verifying Webhooks

To ensure the request is truly from Nomad Pay and has not been tampered with, you must verify the signature. This signature is different from the one you send. We use our own Ed25519 Private Key to sign the callback. You must use our Ed25519 Public Key to verify it.
  • Nomad Pay Public Key:
    • You can find this key in your merchant dashboard’s Developer section.
    • Example: your_nomad_pay_public_key_hex_string
  • Signature Header:
    • The signature will be in the x-signature header.

Callback Body

The body contains the details of the event. Example Callback Body:

Verifying the Signature

You must verify the x-signature against the raw JSON callback body using the Nomad Pay Public Key. Example (Go):

Full Integration Example

Here is a complete example using the Gin web framework (Go) to handle the webhook callback, verify the signature, and parse the payload.

Important Notes

  • Verify Signatures: Always verify the signature. This is critical for security.
  • Respond Quickly: Your endpoint must respond with an HTTP 200 status and the raw string “success” within 5 seconds, or we will consider the callback failed and retry.
  • Idempotency: Because we retry failed webhooks, your system must be able to handle receiving the same event multiple times. Use the order_id or secret_id to de-duplicate.