Charge Payment Webhook
After a successful payment on a Donary device, Donary Enterprise will send the data to the URL endpoint configured in the PaymentWebhookEndpoint
setting.
Payload
Name | Type | Description | Child Attributes | |
---|---|---|---|---|
orgGuid | string | Organization's unique identifier. | ||
donorInfo | object | Information about the donor. | ||
campaignInfo | array of objects | Information about the campaign. | ||
reasonInfo | array of objects | Information about the reason. | ||
collectorInfo | object | Information about the collector. | ||
locationInfo | object | Information about the location. | ||
processedDateTime | string | Date and time of the transaction processed through the gateway, in UTC format. | ||
amount | string | The amount of the transaction. | ||
token | string | Credit card token returned from the gateway. | ||
maskedApiKey | string | An identifier used to map to the correct account. For example, 1234****5678. | ||
gatewayName | string | Name of the payment gateway, for example:
Stripe
Cardknox | ||
last4Digits | string | Last four digits of the credit card number. | ||
brand | string | Credit card network, for example:
Visa
Amex | ||
paymentNumber | string | Receipt number. | ||
gatewayRefNum | string | Reference number from the payment gateway. | ||
paymentMethod | string | Method of payment, which will be one of the following:
OJC
Credit_Card
Matbia
Pledger
Donors_Fund
ACH | ||
currency | string | Currency of the transaction, which will be one of the following:
USD
ILS
EUR
CAD
GBP | ||
deviceName | string | Terminal where the payment was made. | ||
deviceCreatedDate | string | Time of payment on the device. | ||
timezone | string | Time zone, for example:
UTC
EST |
Example:
In this example, the client set the payment webhook URL to https://example.yourdomain.com/webhook/charge
. A POST request will be sent with the following payload to the client's specified URL.
Payload:
{
"OrgGUID": "115e9d3d-baf2-4089-b896-9b2621ffcf1b",
"DonorInfo": {
"DonorNumber": "10",
"NewDonor": {
"DonorID": "10",
"FirstName": "Yaakov",
"LastName": "Freedman"
}
},
"CampaignInfo": [
{
"CampaignNumber": 5,
"CampaignName": "Beis Medresh"
}
],
"ReasonInfo": [
{
"ReasonNumber": 1045,
"ReasonName": "Keren Habinyan"
}
],
"CollectorInfo": {},
"LocationInfo": {},
"ProcessedDateTime": "2024-11-25T21:01:14.44",
"Amount": 10,
"MaskedAPIKey": "pk_t****I7jx",
"GatewayName": "Stripe",
"Brand": "VISA",
"PaymentNumber": "1238",
"GatewayRefNum": "ch_3QP9PB2eZvKYlo2C0hHANK5Z",
"PaymentMethod": "Credit Card",
"Currency": "USD",
"DeviceCreatedDate": "2024-11-25T21:01:09.827",
"Timezone": "Eastern Standard Time",
"PaymentStatus": "Success"
}
cURL:
curl --location --request POST 'https://example.yourdomain.com/webhook/charge' \
--header 'Content-Type: application/json' \
--data-raw '{"OrgGUID":"115e9d3d-baf2-4089-b896-9b2621ffcf1b","DonorInfo":{"DonorNumber":"10","NewDonor":{"DonorID":"10","FirstName":"Yaakov","LastName":"Freedman"}},"CampaignInfo":[{"CampaignNumber":5,"CampaignName":"Beis Medresh"}],"ReasonInfo":[{"ReasonNumber":1045,"ReasonName":"Keren Habinyan"}],"CollectorInfo":{},"LocationInfo":{},"ProcessedDateTime":"2024-11-25T21:01:14.44","Amount":10,"MaskedAPIKey":"pk_t****I7jx","GatewayName":"Stripe","Brand":"VISA","PaymentNumber":"1238","GatewayRefNum":"ch_3QP9PB2eZvKYlo2C0hHANK5Z","PaymentMethod":"Credit Card","Currency":"USD","DeviceCreatedDate":"2024-11-25T21:01:09.827","Timezone":"Unknown","PaymentStatus":"Success"}'