Notifications

Overview


Notifications are a way our clients can easily get updates on events for their merchants. Event notifications are tied to the merchant ID

Events


Events that you can be notified of include the following:

  • Chargebacks
  • Deposits
  • Successful Payments
  • Failed Payments
  • Upcoming SAQ Expiration
  • Refund Created
  • New Statement
  • Batch Closed
  • Expired Card

Note: Only 1 event can be set up at a time through the API. For example, If you are setting up a notification event for "Chargebacks" and "Deposits" to be sent via SMS, Email, and Webhook, you need to set up the "Chargeback" event, and then the "Deposits" event separately.


Where to send notifications


Notifications can be sent to:

  • Email
  • SMS
  • Webhook

You can choose to have notifications sent to as many of these as you desire, or simply just one of them. When setting up via API there are two steps you need to take for each to function. They need to be set to "true" and they need to be provided with an endpoint to send the notification.


Example:

{
     "sendEmail": true,
     "emailAddress": "[email protected]",
     "sendSMS": true,
     "phoneNumber": "1112223344",
     "sendWebhook": true,
     "callbackUrl": "webhookendpoint.com"
}

Sources


Sources identify from which payment points do you want notifications to be sent. For example, if you want to be notified of declines that come from API requests, Quickpay, and Recurring, you can specify that using the "Sources"

"sources": "QuickPay, API, Recurring"

Terminals

Terminals, while not being listed as a "source" are still able to be used as a method for sending notifications. Terminals are configured to make their payments as an API call, so if you have API enabled as a source, your terminal payments will also trigger notification events. Terminals can also be used as Quick Pay in our MXM UI, so be sure to enable Quick Pay as well to ensure you receive all of your notifications when using a terminal.


Creating the Notification Event


Events need to be created before notifications can start being received. Once set up, you are good to go. The setup is a PUT using the following endpoint:


Sandbox: https://sandbox.api.mxmerchant.com/checkout/v3/subscription
Production: https://api.mxmerchant.com/checkout/v3/subscription

{
     "sendEmail": true,
     "emailAddress": "[email protected]",
     "sendSMS": true,
     "phoneNumber": "1112223344",
     "sendWebhook": true,
     "callbackUrl": "webhookendpoint.com",
     "sources": "QuickPay, API, Recurring",
     "merchantId": 10001291238,
     "threshold": 0
}

After it is set up, notifications will start being sent based on the parameters you have set.


Get Notifications


This endpoint is used to get notification details:

Sandbox: https://sandbox.api.mxmerchant.com/checkout/v3/subscription
Production: https://api.mxmerchant.com/checkout/v3/subscription

This is a GET request that will pull all notifications sent based on the Merchant ID. Users can limit how many responses they view, and which notification they wish to begin with in the call.

{
"echo": true,
"merchantId": "100012913281",
"limit": 50,
"offset": 10
}