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
Name | Type | Description | Child Attributes |
---|---|---|---|
orgGuid | string | Organization's unique identifier. | |
scheduleUniqueID | string | Unique identifier for the schedule. | |
totalScheduleAmount | string | Total amount of money scheduled, including first payment. | |
countOfSchedules | string | Number of scheduled payments. | |
frequency | string | Frequency of the schedule. | |
scheduleStartDate | string | Start date of the schedule. | |
currency | string | Currency of the schedule. | |
deviceDateTime | string | Date and Time of transaction made on the device, in UTC format. | |
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. | |
firstPayment | object | Only included if the first payment is processed. |
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"
}
}