# Event notifications
source: https://developer.mastercard.com/mastercard-buyer-payment-agent/documentation/use_cases/commercial-direct-payments/event-notifications/index.md

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

To enable MTLS, ensure you must:

1. Have a Mastercard-trusted certificate authority (CA).
2. Request access to the Key Management Portal in Mastercard Connect.
3. Load 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. Commercial Direct Payments 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.

Provide the URL of the event notification during onboarding. An example of the event notification URL could be `https://companyname.com/bps/notifications`. When Commercial Direct Payments sends an event notification to your URL, Commercial Direct Payments expects an acknowledgment within three seconds. If Commercial Direct Payments does not receive an acknowledgment within three seconds, then Commercial Direct Payments retries the payment notification three times at 30-second intervals. If you continue not to respond, the Commercial Direct Payments updates the status to Buyer Payment Agent_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-buyer-payment-agent/uploads/webhooknotification.png "Event Notification Information Flow")

All Commercial Direct Payments use cases use the following 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": {
          }
}
```

