Skip to main content

Schedule Payment Webhook


The following payload will be sent to the URL endpoint configured in the ScheduleWebhookEndpoint setting after a schedule has been successfully created on a device.

note

If ScheduleStartDate is today, the first payment is processed by Donary, and the details are included in the First Payment object. This first payment information will be sent in the schedule webhook. If the ScheduleStartDate is for the future, no charge will be made by Donary.

Payload

NameTypeDescriptionChild Attributes
orgGuid stringOrganization's unique identifier.Placeholder
scheduleUniqueID stringUnique identifier for the schedule.Placeholder
totalScheduleAmount stringTotal amount of money scheduled, including first payment.Placeholder
countOfSchedules stringNumber of scheduled payments.Placeholder
frequency stringFrequency of the schedule.Placeholder
scheduleStartDate stringStart date of the schedule.Placeholder
currency stringCurrency of the schedule.Placeholder
deviceDateTime stringDate and Time of transaction made on the device, in UTC format.Placeholder

Example:

In the following example, the client set the schedule webhook URL to https://example.yourdomain.com/webhook/schedule. This POST request will send the data to that specified URL.

cURL:

curl -X POST ^
"https://example.yourdomain.com/webhook/schedule" ^
-H "Content-Type: application/json" ^
-d "{\"orgGuid\": \"F9878BB3-4BDF-479F-8FCF-B075680A658A\", \"scheduleUniqueId\": \"dc4f72b9-906b-4b6c-9e4d-d9f68787d907\", \"totalScheduleAmount\": 100, \"countOfSchedules\": 10, \"frequency\": \"Daily\", \"scheduleStartDate\": \"2024-05-25 00:00:00\", \"currency\": \"USD\", \"deviceDateTime\": \"2024-05-25 00:00:00\", \"donorInfo\": {\"donorNumber\": \"1234567\", \"newDonor\": \"It will have value if new donor is created in payment request\"}, \"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\"}], \"firstPayment\": [{\"createdDate\": \"2024-06-25 00:00:00\", \"amount\": 100, \"token\": \"5346q0666h6674p15g0mqq2n17gq3414\", \"maskedApiKey\": \"dona****3ae3\", \"gatewayName\": \"Matbia\", \"last4Digits\": \"8042\", \"brand\": \"Matbia\", \"paymentNumber\": \"112233\", \"paymentStatus\": \"Success\", \"gatewayRefNum\": \"ch_3ND1vS2eZvKYlo2C1iteYyGO\", \"paymentMethod\": \"Matbia\", \"deviceName\": \"Testing\", \"deviceCreatedDate\": \"2024-08-06 08:00:33.127\", \"timezone\": \"Dateline Standard Time\"}]}"

Payload:

{
"orgGuid": "F9878BB3-4BDF-479F-8FCF-B075680A658A",
"scheduleUniqueId": "dc4f72b9-906b-4b6c-9e4d-d9f68787d907",
"totalScheduleAmount": 100,
"countOfSchedules": 10,
"frequency": "Daily",
"scheduleStartDate": "2024-05-25 00:00:00",
"currency": "USD",
"deviceDateTime": "2024-05-25 00:00:00",
"donorInfo": {
"donorNumber": "1234567",
"newDonor": {
"DonorID": "0000000",
"FirstName": "Test",
"LastName": "Charity"
}
},
"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"
},
"firstPayment": {
"processedDateTime": "2024-06-25 00:00:00",
"amount": 100,
"maskedApiKey": "dona****3ae3",
"gatewayName": "Matbia",
"brand": "Matbia",
"paymentNumber": "112233",
"gatewayRefNum": "ch_3ND1vS2eZvKYlo2C1iteYyGO",
"paymentMethod": "Matbia",
"deviceName": "Testing",
"deviceCreatedDate": "2024-08-06 08:00:33.127",
"timezone": "Dateline Standard Time"
}
}