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 transaction, which will be one of the following:
USD
ILS
EUR
CAD
GBP
Placeholder
pledgeNumber stringUnique number identifying the pledge.Placeholder
deviceCreatedDate stringTime of payment on the device.Placeholder
timezone stringTime zone, for example:
UTC
EST
Placeholder

Example:

In the following example, the client set the pledge webhook URL to https://example.yourdomain.com/webhook/pledge. A POST request will be sent with the data to the specified URL.

Payload:

{
"orgGuid": "F9878BB3-4BDF-479F-8FCF-B075680A658A",
"pledgeAmount": 100,
"currency": "USD",
"pledgeNumber": 123456,
"donorInfo": {
"donorNumber": "101",
"newDonor": null
},
"campaignInfo": {
"campaignNumber": 1015,
"campaignName": "Coffee"
},
"reasonInfo": {
"reasonNumber": 1001,
"reasonName": "Gold Reason"
},
"collectorInfo": {
"collectorNumber": 1234568,
"collectorName": "Dovid Feld"
},
"locationInfo": {
"locationName": "NYC",
"longitude": "-73.933259000",
"latitude": "40.690329000"
},
"deviceCreatedDate": "2024-11-25T21:01:09.827",
"timezone": "Eastern Standard Time",
}

cURL:

curl --location --request POST 'https://example.yourdomain.com/webhook/pledge' \
--header 'Content-Type: application/json' \
--data-raw '{"orgGuid":"F9878BB3-4BDF-479F-8FCF-B075680A658A","pledgeAmount":100,"currency":"USD","pledgeNumber":123456,"donorInfo":{"donorNumber":"101","newDonor":null},"campaignInfo":{"campaignNumber":1015,"campaignName":"Coffee"},"reasonInfo":{"reasonNumber":1001,"reasonName":"Gold Reason"},"collectorInfo":{"collectorNumber":1234568,"collectorName":"Dovid Feld"},"locationInfo":{"locationName":"NYC","longitude":"-73.933259000","latitude":"40.690329000"},"deviceCreatedDate":"2024-11-25T21:01:09.827","timezone":"Eastern Standard Time"}'