How notifications work

The platform has 2 notification mechanisms:

  • By email
  • By HTTP REST webhooks (Json format)

There is no way to answer to a notification whatever the channel.

By Webhooks

Webhooks provide a way for notifications to be delivered to an external web server whenever certain actions/status occur on a resource of the Nexway Monetize Platform. HTTP body request is only in JSON format.

By Email

The email's body will be by default the same JSON format as the webhook body. However you could modify it by adding your own email template for notifications.

List of resource notifications

  • Orders
  • Subscriptions

Configure notifications

You can configure notifications by Nexway Center or by APIs.

Create an order confirmation notification

In this example, we want to receive an order confirmation notification by email and webhook.

The customer id is 06874434-4d42-423e-87c0-3290862809cc.

Use the Create notification rules to POST the following rule:

{
    "customerId": "06874434-4d42-423e-87c0-3290862809cc",
    "rules": [
        {
            "resource": "Order",
            "eventType": "confirmed",
            "isActive": true,
            "emailChannel": {
                "recipients": [
                    "jdoe@com2us.com",
                    "tmonk@com2us.com"
                ]
            },
            "webHooks": {
                "urlList": [
                    {
                        "Host": "backoffice.com2us.com",
                        "Path": "/webhooks",
                        "Scheme": "https"
                    }
                ]
            }
        }
    ]
}

So notification will be received on jdoe@com2us.com and tmonk@com2us.com emails and on https://backoffice.com2us.com/webhooks. As isActive value is true, the rule execution will start just after the POST request.