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