Configure notifications

Learn how to set up and test MarketPay notifications.


For each notification type that you want to receive from Adyen MarketPay, create a corresponding configuration. You can also get information on all notifications you already configured, update these configurations, test and delete them.

You also need to accept each notification, to confirm that you've received it.

Create a notification configuration

To configure a notification, make the /createNotificationConfiguration call and pass the URL to accept this notification and the event type(s). In addition, provide the message format, protocol, user name, password and other parameters, as shown in the example below.

Refer to Notification types for the list of event types you can enable.

Request

{
   "configurationDetails":{
      "active":true,
      "apiVersion":4,
      "description":"Test notification769551",
      "eventConfigs":[
         {
            "NotificationEventConfiguration":{
               "eventType":"ACCOUNT_HOLDER_VERIFICATION",
               "includeMode":"INCLUDE"
            }
         },
         {
            "NotificationEventConfiguration":{
               "eventType":"ACCOUNT_HOLDER_CREATED",
               "includeMode":"INCLUDE"
            }
         },
      ],
      "messageFormat":"JSON",
      "notifyURL":"https://www.merchant-domain.com/notification-handler",
      "notifyUsername":"testUserName",
      "notifyPassword":"testPassword",
      "sendActionHeader":true,
      "sslProtocol":"SSL"
   }
}

Response

{
   "pspReference":"9914734158490046",
   "configurationDetails":{
      "active":true,
      "apiVersion":4,
      "description":"Test notification769551",
      "eventConfigs":[
         {
            "NotificationEventConfiguration":{
               "eventType":"ACCOUNT_HOLDER_VERIFICATION",
               "includeMode":"INCLUDE"
            }
         }
      ],
      "messageFormat":"SOAP",
      "notificationId":2,
      "notifyURL":"http://www.adyen.com",
      "sendActionHeader":true,
      "sslProtocol":"SSL"
   }
}

Get a configuration

To get the details of a previously configured notification, make the /getNotificationConfiguration call and pass the notification ID as a parameter.

Request

{
   "notificationId":2
}

Response

{
   "pspReference":"9914734158490053",
   "configurationDetails":{
      "active":"true",
      "apiVersion":4,
      "description":"Test notification769551",
      "eventConfigs":[
         {
            "NotificationEventConfiguration":{
               "eventType":"ACCOUNT_HOLDER_VERIFICATION",
               "includeMode":"INCLUDE"
            }
         }
      ],
      "messageFormat":"SOAP",
      "notificationId":2,
      "notifyURL":"http://www.adyen.com",
      "sendActionHeader":"true",
      "sslProtocol":"SSL"
   }
}

Get a list of configurations

In addition, you can get a list of all configured notifications. For this, make the /getNotificationConfigurationList call and pass an empty request as a parameter.

Request

{ }

Response

{
   "pspReference":"9914734166680075",
   "configurations":[
      {
         "NotificationConfigurationDetails":{
            "active":"true",
            "apiVersion":4,
            "description":"Test Notification 344076",
            "eventConfigs":[
               {
                  "NotificationEventConfiguration":{
                     "eventType":"ACCOUNT_HOLDER_UPDATED",
                     "includeMode":"INCLUDE"
                  }
               }
            ],
            "messageFormat":"JSON",
            "notificationId":1,
            "notifyURL":"http://YourServer.com/marketpay/notifications/accountHolderUpdated",
            "sendActionHeader":"false",
            "sslProtocol":"SSL"
         }
      },
      {
         "NotificationConfigurationDetails":{
            "active":"true",
            "apiVersion":4,
            "description":"Test Notification 392418",
            "eventConfigs":[
               {
                  "NotificationEventConfiguration":{
                     "eventType":"ACCOUNT_HOLDER_CREATED",
                     "includeMode":"INCLUDE"
                  }
               }
            ],
            "messageFormat":"JSON",
            "notificationId":2,
            "notifyURL":"http://YourServer.com/marketpay/notifications/accountHolderCreated",
            "sendActionHeader":"false",
            "sslProtocol":"SSL"
         }
      },
      {
         "NotificationConfigurationDetails":{
            "active":"true",
            "apiVersion":4,
            "description":"Test notification538042",
            "eventConfigs":[
               {
                  "NotificationEventConfiguration":{
                     "eventType":"ACCOUNT_HOLDER_VERIFICATION",
                     "includeMode":"INCLUDE"
                  }
               }
            ],
            "messageFormat":"SOAP",
            "notificationId":3,
            "notifyURL":"http://YourServer.com/marketpay/notifications/accountHolderVerification",
            "sendActionHeader":"true",
            "sslProtocol":"SSL"
         }
      }
   ]
}

Update notification configurations

To change notification settings, make the /updateNotificationConfiguration call and pass new settings as its parameters. The notification to be updated is specified by the notificationId value.

Request

{
   "configurationDetails":{
      "active":"false",
      "apiVersion":4,
      "description":"new description799847",
      "eventConfigs":[
         {
            "NotificationEventConfiguration":{
               "eventType":"ACCOUNT_HOLDER_CREATED",
               "includeMode":"EXCLUDE"
            }
         },
         {
            "NotificationEventConfiguration":{
               "eventType":"ACCOUNT_CREATED",
               "includeMode":"INCLUDE"
            }
         }
      ],
      "notificationId":3,
      "notifyPassword":"testPassword2",
      "notifyURL":"http://www.adyen.com",
      "notifyUsername":"testUserName2",
      "sendActionHeader":"false",
      "sslProtocol":"TLSv10"
   }
}

Response

{
   "pspReference":"9914734160470077",
   "configurationDetails":{
      "active":"false",
      "apiVersion":4,
      "description":"new description799847",
      "eventConfigs":[
         {
            "NotificationEventConfiguration":{
               "eventType":"ACCOUNT_CREATED",
               "includeMode":"INCLUDE"
            }
         },
         {
            "NotificationEventConfiguration":{
               "eventType":"ACCOUNT_HOLDER_CREATED",
               "includeMode":"EXCLUDE"
            }
         }
      ],
      "messageFormat":"SOAP",
      "notificationId":3,
      "notifyURL":"http://www.adyen.com",
      "sendActionHeader":"false",
      "sslProtocol":"TLSv10"
   }
}

Delete notification configurations

If you no longer need some of configured notifications, delete them by making the /deleteNotificationConfigurations call. Notifications to be deleted are specified by the IDs in the notificationIds array.

Request

{
   "notificationIds":[
      11,
      26
   ]
}

Response

{
   "pspReference":"9914713525761479"
}

Accept notifications

To confirm that you have received a notification, your server should acknowledge the notification with the response:

{
	"notificationResponse" : "[accepted]"
}

We use at-least-once delivery to ensure that your server has received a notification. If your server has not acknowledged a notification within 10 seconds we will queue all notifications to this endpoint. We'll then retry sending the notification until it is accepted. Once accepted, you'll receive all your queued notifications.

Retry attempts will happen regularly, at increasing time intervals:

  • 2 minutes
  • 5 minutes
  • 10 minutes
  • 15 minutes
  • 30 minutes
  • 1 hour
  • 2 hours
  • 4 hours

Retries then happen every 8 hours for the following 7 days.

Test a notification

To test a notification configuration, make the /testNotificationConfiguration call and pass a notificationId as a parameter.

Request

{
   "eventTypes":[

   ],
   "notificationId":10
}

Response in case of success

{
   "pspReference":"9914734161240289",
   "errorMessages":[

   ],
   "eventTypes":[
      "ACCOUNT_HOLDER_CREATED"
   ],
   "exchangeMessages":[
      {
         "ExchangeMessage":{
            "messageCode":"Number",
            "messageDescription":"1"
         }
      },
      {
         "ExchangeMessage":{
            "messageCode":"Title",
            "messageDescription":"Test 1: Test_ACCOUNT_HOLDER_CREATED"
         }
      }
   ],
   "notificationId":10,
   "okMessages":[
      "ResponseCode: 200",
      "ResponseTime_ms: 6",
      "Output: {\"name\":\"[accepted]\"}"
   ]
}

Response in case of failure

{
   "pspReference":"9914734162410311",
   "errorMessages":[
      "Failed to send message. Error description: Not equiped to send com.adyen.services.marketplace.notification.event.account.AccountHolderVerificationNotification"
   ],
   "eventTypes":[
      "ACCOUNT_HOLDER_VERIFICATION"
   ],
   "exchangeMessages":[
      {
         "ExchangeMessage":{
            "messageCode":"Number",
            "messageDescription":"1"
         }
      },
      {
         "ExchangeMessage":{
            "messageCode":"Title",
            "messageDescription":"Test 1: Test_ACCOUNT_HOLDER_VERIFICATION"
         }
      }
   ],
   "notificationId":10,
   "okMessages":[

   ]
}

Next steps

Notification types

Learn about the MarketPay notification types.

link

Enable HMAC signatures

Add extra security to your MarketPay notifications.

link