To set up Webhooks you will need to:
- Create an endpoint.
- Configure the Webhook(s) you require.
- Listen for events (see the Receiving Endpoint section for more on this).
Note that before you can use Webhooks you must set up a dedicated Endpoint on your infrastructure. (See Webhook Receiving Endpoint for more on this).
Setting up a Webhook
To set up a Webhook:
- Log on to the Developer Dashboard (currently available from the Nuapay home page).
- Click Add Webhook.
- Add the required details in the pop-up dialog box:
- The name of the Webhook notification.
- The URL of the Endpoint you configured.
- Status is set to Enabled by default (if Disabled no notifications are generated).
- Retry period (determines for how many days failed notifications will be retried. Retries are automatically generated every 30 minutes). In the screen above the setting is 1 day so retries will be made every 30 minutes for 24 hours (or until a retry is successful).
- Sign Key is the secret key that the application uses to sign the notification JSON body. The signature is sent in the request HTTP 'X-Signature' header. If you leave this field blank the application will automatically generate a key.
- The Event Types drop-down allows you to configure what events will trigger the notification to the Webhooks Endpoint URL. In the example above only Payment Received will trigger a notification but you may define 1-n events as required.
- Click Submit.
Once you have set up the Webhook, you will need to configure a Receiving Endpoint.