# Event notifications
source: https://developer.mastercard.com/mastercard-supplier-payment-agent/documentation/use_cases/business-payment-service/event-notifications/index.md

## Setting Up MTLS for event notifications {#setting-up-mtls-for-event-notifications}

To enable MTLS, ensure you:

1. have a Mastercard-trusted certificate authority (CA)
2. requested access to Key Management Portal in Mastercard Connect
3. loaded the XMLGW certificate details into the trust store

## How event notifications work {#how-event-notifications-work}

Mastercard presents its client certificate when requested by the server to authenticate and establish a trusted connection before sending the notification to your event notification URL. Business Payment Service sends notifications to your event notification URL when a Buyer Payment Agent creates a payment instruction or updates a payment instruction status. It also returns responses to all registration or discovery requests to your event notification URL.

You should provide the URL of the event notification during onboarding. An example event notification URL could be `https://companyname.com/bps/notifications`. When Business Payment Service sends an event notification to your URL, Business Payment Service expects and acknowledgement within three seconds. If Business Payment Service does not receive an acknowledgement in three seconds, then Business Payment Service retries to send the notification three times at regular intervals of three seconds. If you continue to not respond, then Business Payment Service updates the status of the payment instruction to SPA_SYSTEM_ERROR.

Each event notification has an event type to identify the data within the notification. The data schema changes based on the event type.

![alt text](https://static.developer.mastercard.com/content/mastercard-supplier-payment-agent/uploads/webhooknotification.png "Event Notification Structure")

All Business Payment Service use cases use the below event notification payload structure. The data object schemas will differ based on the event type. Please refer to the use case section for the schemas.
* JSON

```JSON
{
  "eventId": "string",
  "eventType": "string",
  "eventCreatedDate": "datetime",
  "data": {
          }
}
```

