# Direct Debit Webhook API
source: https://developer.mastercard.com/cross-border-services/documentation/api-ref/direct-debit-api/index.md

The Direct Debit push notification, available to MTS EU contracted Customers, informs SEPA direct debit participants of a pending debit to their payment account.

## Prenotifications {#prenotifications}

To download the Open API specifications (or swagger file) click on the expandable section below. Once expanded, scroll down to the body of the request and click on Model tab and then on the request objects to look at the request parameters.

API Reference: `GET /pre-notifications`

* **Formats supported** : JSON   
* **HTTP Version**: 1.0/ 1.1
* **Required HTTP header parameters** :   
  content-type : Format of the inbound content being submitted. example: application/json   
  content-length: Length of the inbound content body in octets.

## Endpoints {#endpoints}

This is a push notification and webhook endpoint will need to be provided by you for Mastercard to send the Direct debit push notifications.

## Payload Encryption {#payload-encryption}

All the request payload sent by you to Mastercard must be encrypted. And you will need to decrypt the payload sent by  
Mastercard.   

For more detailed information on payload **Encryption/ Decryption** , please see [here](https://developer.mastercard.com/cross-border-services/documentation/api-ref/encryption/index.md)

## Sandbox Testing {#sandbox-testing}

Not Applicable

## Sample Request {#sample-request}

* JSON

```JSON
{
  "partnerId": "BEL_MCSXB1HS5fd",
  "eventRef": "69aa98a4-a93a-4cab-b179-bbe7433e8b58",
  "eventType": "PRE_NOTIFICATION",
  "message": "A maximum of 500000 EUR may be pulled from FR7630006000011234567890189 on 06/07/2023",
  "mandateReference": "418ef45d8ac898d680b2242519c7d71a",
  "creditorId": "IE02ZZZ305651"
}
```

## Sample Responses {#sample-responses}

Not Applicable

## Error Codes {#error-codes}

Please refer to complete list of error codes [here](https://developer.mastercard.com/cross-border-services/documentation/response-error-codes/error-codes/index.md).

For information about the HTTP response codes that may be returned for your API requests, see [HTTP Response Codes](https://developer.mastercard.com/cross-border-services/documentation/response-error-codes/http-response-codes/index.md).

## Push Notification Configuration Details {#push-notification-configuration-details}

For more information on configuring a push notification, please see [here](https://developer.mastercard.com/cross-border-services/documentation/api-ref/push-notifications-details/index.md).
Note:
* Contact your mastercard representative for mTLS push notification mastercard public certificate. This certificate needs to be trusted by the receiving application. Also, please share the server certificate chain for validation (via KMP portal), if it's accepted on Mastercard's infrastructure.
* Once done, data can be sent by Mastercard to the other party.
