Pledge Webhook
After a pledge has been created on a device, Donary Enterprise will send the following payload to the endpoint configured in the PledgeWebhookEndpoint
setting.
Payload
Name | Type | Description | Child Attributes |
---|---|---|---|
orgGuid | string | Organization's unique identifier. | |
pledgeAmount | string | The amount pledged. | |
currency | string | Currency of the pledge. | |
pledgeNumber | string | Unique number identifying the pledge. | |
deviceDateTime | string | Date and time of transaction made on the device, in UTC format. | |
donorInfo | object | Information about the donor. | |
campaignInfo | object | Information about the campaign. | |
reasonInfo | object | Information about the reason. | |
collectorInfo | object | Information about the collector. | |
locationInfo | object | Information about the location. |
Example:
In the following example, the client set the pledge webhook URL to https://example.yourdomain.com/webhook/pledge
. This POST request will send the data to that specified URL.
cURL:
curl -X POST ^
"https://example.yourdomain.com/webhook/pledge" ^
-H "Content-Type: application/json" ^
-d "{\"orgGuid\": \"F9878BB3-4BDF-479F-8FCF-B075680A658A\", \"pledgeAmount\": 100, \"currency\": \"USD\", \"pledgeNumber\": 123456, \"deviceDateTime\": \"2024-05-25 00:00:00\", \"donorInfo\": {\"donorNumber\": \"1234567\", \"newDonor\": \"It will have value if new donor is created in pledge\"}, \"campaignInfo\": {\"campaignNumber\": 1007, \"campaignName\": \"Gold Page\"}, \"reasonInfo\": {\"reasonNumber\": 1001, \"reasonName\": \"Gold Reason\"}, \"collectorInfo\": {\"collectorNumber\": 1234568, \"collectorName\": \"Test Collector\"}, \"locationInfo\": {\"locationName\": \"Test Group\", \"longitude\": \"-73.933259000\", \"latitude\": \"40.690329000\"}}"
Payload:
{
"orgGuid": "F9878BB3-4BDF-479F-8FCF-B075680A658A",
"pledgeAmount": 100,
"currency": "USD",
"pledgeNumber": 123456,
"deviceDateTime": "2024-05-25 00:00:00",
"donorInfo": {
"donorNumber": "1234567",
"newDonor": "This will have value if a new donor is created in the pledge"
},
"campaignInfo": {
"campaignNumber": 1007,
"campaignName": "Gold Page"
},
"reasonInfo": {
"reasonNumber": 1001,
"reasonName": "Gold Reason"
},
"collectorInfo": {
"collectorNumber": 1234568,
"collectorName": "Test Collector"
},
"locationInfo": {
"locationName": "Test Group",
"longitude": "-73.933259000",
"latitude": "40.690329000"
}
}