Skip to main content

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

NameTypeDescriptionChild Attributes
orgGuid stringOrganization's unique identifier.Placeholder
processedDateTime stringDate and time of the transaction processed through the gateway, in UTC format.Placeholder
amount stringThe amount of the transaction.Placeholder
token stringCredit card token returned from the gateway.Placeholder
maskedApiKey stringAn identifier used to map to the correct account. For example, 1234****5678.Placeholder
gatewayName stringName of the payment gateway, for example:
Stripe
Cardknox
Placeholder
last4Digits stringLast four digits of the credit card number.Placeholder
brand stringCredit card network, for example:
Visa
Amex
Placeholder
paymentNumber stringReceipt number.Placeholder
gatewayRefNum stringReference number from the payment gateway.Placeholder
paymentMethod stringMethod of payment, which will be one of the following:
OJC
Credit_Card
Matbia
Pledger
Donors_Fund
ACH
Placeholder
currency stringCurrency of the transaction, which will be one of the following:
USD
ILS
EUR
CAD
GBP
Placeholder
deviceName stringTerminal where the payment was made.Placeholder
deviceCreatedDate stringTime of payment on the device.Placeholder
timezone stringTime zone, for example:
UTC
EST
Placeholder

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