Create and Configure Pay Link Widget
This document provides configuration instructions for the Pay Link Widget.
Create
Before configuring the specific fields for the Pay Link Widget, you need to create a widget. If you haven't done this yet, please refer to the Create Widget section for instructions. This section covers the general fields that need to be specified during widget creation.
After completing the generic fields, return to this page to configure the Pay Link specific fields detailed below.
Configure
Webhooks
The PayLink Widget can send events via webhooks, allowing you to receive real-time notifications about payment processes. Here are the configurable webhook settings:
Name | Description | Requirement |
---|---|---|
Webhook URI | Specify your endpoint URI to receive webhook events. This is optional but recommended for real-time updates. | Optional |
Webhook format | Events will be sent in JWT format. This is preselected as the default format to ensure secure and structured data transmission. | Preselected default |
Handling Webhooks
Ensure your webhook endpoint correct processes JWT payloads:
app.post('/webhook/receipt/moneyhub', (req, res) => {
try {
const payload = jwt.verify(req.body.token, publicKey);
// Process the payload
res.sendStatus(200);
} catch (error) {
console.error('Webhook error:', error);
res.sendStatus(500);
}
});
For more information about webhooks and what events trigger them, see Webhooks .
Previewing the Widget
Once a Widget has been created it can be Previewed via the top menu bar, see Preview
Updated 2 months ago