Skip to main content

Configure notifications for payment schedules using Custom Events

Zuora

Configure notifications for payment schedules using Custom Events

The Payment Schedules feature supports setting notifications to notify your end customers on custom events, such as when a payment schedule is created, or when payment schedule items have been processed.

You can leverage the Create an event trigger REST API to set up custom events against the Payment Schedule and Payment Schedule Item base objects.

See Custom Events for information about the Custom Events feature. 

Example API request and response of creating event triggers on Payment Schedule

The following API request set up an event that will be triggered when payment schedules are created.

Example request:

{
    "active": true,
    "baseObject": "PaymentSchedule",
    "condition": "changeType == 'INSERT'",
    "description": "Trigger an event when a Payment Schedule is created",
    "eventType": {
        "description": "A Payment Schedule is created",
        "displayName": "Payment Schedule Creation",
        "name": "PSCreation"
    }
}

The response would look like the following:

{
    "id": "920d0b4fc953455bb9e6d3dda231da90",
    "baseObject": "PaymentSchedule",
    "condition": "changeType == 'INSERT'",
    "description": "Trigger an event when a Payment Schedule is created",
    "eventType": {
        "name": "PSCreation",
        "displayName": "Payment Schedule Creation",
        "description": "A Payment Schedule is created",
        "namespace": "user.notification"
    },
    "active": true
}

Example API request and response of creating event triggers on Payment Schedule Item

The following API request set up an event that will be triggered when a payment schedule item is processed.

{
   "active": true,
   "baseObject": "PaymentScheduleItem",
   "condition": "changeType == 'UPDATE' && PaymentScheduleItem.Status == 'Processed' and PaymentScheduleItem.Status_old == 'Pending'",
   "description": "Trigger an event when a Payment Schedule Item is processed",
   "eventType": {
       "description": "A Payment Schedule Item is processed",
       "displayName": "Payment Schedule Item Processed",
       "name": "PSIProcessed"
   }
}

The response would look like the following:

{
   "id": "26d471288b9142fdbe1a8a86d6079acf",
   "baseObject": "PaymentScheduleItem",
   "condition": "changeType == 'UPDATE' && PaymentScheduleItem.Status == 'Processed' and PaymentScheduleItem.Status_old == 'Pending'",
   "description": "Trigger an event when a Payment Schedule Item is processed",
   "eventType": {
       "name": "PSIProcessed",
       "displayName": "Payment Schedule Item Processed",
       "description": "A Payment Schedule Item is processed",
       "namespace": "user.notification"
   },
   "active": true
}