Skip to main content

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

NameTypeDescriptionChild Attributes
orgGuid stringOrganization's unique identifier.Placeholder
pledgeAmount stringThe amount pledged.Placeholder
currency stringCurrency of the pledge.Placeholder
pledgeNumber stringUnique number identifying the pledge.Placeholder
deviceDateTime stringDate and time of transaction made on the device, in UTC format.Placeholder

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"
}
}