Skip to content

Messages

Create a notification message for a specific merchant.

POST /v1/notifications/admin/messages/merchant/{merchantReference}

Auth: API key (VantagePayAdminClient).

Parameters

NameInRequiredDescription
merchantReferencepathYesA globally unique internal merchant reference (UUID).

Request body

FieldTypeRequiredDescription
messageTypeInformation, Warning, CriticalYesThe delivery channel for the message (e.g. push notification, in-app banner).
messageTargetNone, Portal, Terminal, EmailYesThe audience this message is intended for (e.g. consumers, merchants).
messagePlacementNone, Dashboard, Reports, ValueAddedServices, Profile, QR, Transactions, Loans, HelpAndSupport, UserManagement, DevicesNoThe placement within the application where the message will be displayed (e.g. top banner, feed).
headerstringYesThe message heading, limited to 512 characters.
bodystringYesThe main body text of the message.
buttonTextstring?NoThe label for the call-to-action button, limited to 128 characters. Omit for messages without a button.
navigationKeystring?NoA key identifying the in-app navigation destination when the message action is triggered (e.g. "screen").
navigationValuestring?NoThe value associated with ZGA.Core.Models.Notifications.Requests.CreateMessageRequest.NavigationKey that specifies the exact destination (e.g. a screen name or route path).
visibleFromDatestring?NoThe earliest date from which the message should be shown. If null, the message is visible immediately upon creation.
visibleUntilDatestringYesThe date after which the message will no longer be displayed.
json
{
  "messageType": "Information",
  "messageTarget": "None",
  "messagePlacement": "None",
  "header": "string",
  "body": "string",
  "buttonText": "string",
  "navigationKey": "string",
  "navigationValue": "string",
  "visibleFromDate": "string",
  "visibleUntilDate": "string"
}

Responses

StatusDescription
200The request was successful and the message was created.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
resultobjectNoAn in-app notification message displayed to a consumer or merchant.
json
{
  "success": true,
  "result": {
    "reference": "00000000-0000-0000-0000-000000000000",
    "messageType": "Information",
    "messageTarget": "None",
    "messagePlacement": "None",
    "header": "string",
    "body": "string",
    "navigationKey": "string",
    "navigationValue": "string",
    "buttonText": "string",
    "isRead": true,
    "readDate": "string",
    "visibleFromDate": "string",
    "visibleUntilDate": "string",
    "createdDate": "string"
  }
}

Code samples

WARNING

The JavaScript SDK does not cover admin APIs - use the .NET SDK.

csharp
using VantagePay.Models.Notifications;
using VantagePay.Models.Notifications.Requests;

var message = await adminClient.Notifications.CreateMerchantMessageAsync(
    new CreateMessageRequest
    {
        MessageType = MessageType.Information,
        MessageTarget = MessageTarget.Portal,
        MessagePlacement = MessagePlacement.Dashboard,
        Header = "Planned Maintenance",
        Body = "Service window starts at 22:00 UTC.",
        VisibleUntilDate = DateTimeOffset.UtcNow.AddDays(7),
    },
    Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6"));

Get all notification messages for the merchant.

GET /v1/notifications/admin/messages/merchant/{merchantReference}

Auth: API key (VantagePayAdminClient).

Parameters

NameInRequiredDescription
merchantReferencepathYesA globally unique internal merchant reference (UUID).

Responses

StatusDescription
200The request was successful and the messages were returned.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
resultarray<object>?NoGets the response payload.
json
{
  "success": true,
  "result": [
    {}
  ]
}

Code samples

WARNING

The JavaScript SDK does not cover admin APIs - use the .NET SDK.

csharp
var messages = await adminClient.Notifications.GetMerchantMessagesAsync(Guid.Parse("3fa85f64-5717-4562-b3fc-2c963f66afa6"));

Create a notification message for a specific consumer.

POST /v1/notifications/admin/messages/consumer/{consumerReference}

Auth: API key (VantagePayAdminClient).

Parameters

NameInRequiredDescription
consumerReferencepathYesA globally unique internal consumer reference (UUID).

Request body

FieldTypeRequiredDescription
messageTypeInformation, Warning, CriticalYesThe delivery channel for the message (e.g. push notification, in-app banner).
messageTargetNone, Portal, Terminal, EmailYesThe audience this message is intended for (e.g. consumers, merchants).
messagePlacementNone, Dashboard, Reports, ValueAddedServices, Profile, QR, Transactions, Loans, HelpAndSupport, UserManagement, DevicesNoThe placement within the application where the message will be displayed (e.g. top banner, feed).
headerstringYesThe message heading, limited to 512 characters.
bodystringYesThe main body text of the message.
buttonTextstring?NoThe label for the call-to-action button, limited to 128 characters. Omit for messages without a button.
navigationKeystring?NoA key identifying the in-app navigation destination when the message action is triggered (e.g. "screen").
navigationValuestring?NoThe value associated with ZGA.Core.Models.Notifications.Requests.CreateMessageRequest.NavigationKey that specifies the exact destination (e.g. a screen name or route path).
visibleFromDatestring?NoThe earliest date from which the message should be shown. If null, the message is visible immediately upon creation.
visibleUntilDatestringYesThe date after which the message will no longer be displayed.
json
{
  "messageType": "Information",
  "messageTarget": "None",
  "messagePlacement": "None",
  "header": "string",
  "body": "string",
  "buttonText": "string",
  "navigationKey": "string",
  "navigationValue": "string",
  "visibleFromDate": "string",
  "visibleUntilDate": "string"
}

Responses

StatusDescription
200The request was successful and the message was created.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
resultobjectNoAn in-app notification message displayed to a consumer or merchant.
json
{
  "success": true,
  "result": {
    "reference": "00000000-0000-0000-0000-000000000000",
    "messageType": "Information",
    "messageTarget": "None",
    "messagePlacement": "None",
    "header": "string",
    "body": "string",
    "navigationKey": "string",
    "navigationValue": "string",
    "buttonText": "string",
    "isRead": true,
    "readDate": "string",
    "visibleFromDate": "string",
    "visibleUntilDate": "string",
    "createdDate": "string"
  }
}

Code samples

WARNING

The JavaScript SDK does not cover admin APIs - use the .NET SDK.

csharp
using VantagePay.Models.Notifications;
using VantagePay.Models.Notifications.Requests;

var message = await adminClient.Notifications.CreateConsumerMessageAsync(
    new CreateMessageRequest
    {
        MessageType = MessageType.Information,
        MessageTarget = MessageTarget.Portal,
        MessagePlacement = MessagePlacement.Dashboard,
        Header = "Planned Maintenance",
        Body = "Service window starts at 22:00 UTC.",
        VisibleUntilDate = DateTimeOffset.UtcNow.AddDays(7),
    },
    Guid.Parse("7c9e6679-7425-40de-944b-e07fc1f90ae7"));

Get all notification messages for the consumer.

GET /v1/notifications/admin/messages/consumer/{consumerReference}

Auth: API key (VantagePayAdminClient).

Parameters

NameInRequiredDescription
consumerReferencepathYesA globally unique internal consumer reference (UUID).

Responses

StatusDescription
200The request was successful and the messages were returned.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
resultarray<object>?NoGets the response payload.
json
{
  "success": true,
  "result": [
    {}
  ]
}

Code samples

WARNING

The JavaScript SDK does not cover admin APIs - use the .NET SDK.

csharp
var messages = await adminClient.Notifications.GetConsumerMessagesAsync(Guid.Parse("7c9e6679-7425-40de-944b-e07fc1f90ae7"));

Get a single notification message by reference.

GET /v1/notifications/admin/messages/{messageReference}

Auth: API key (VantagePayAdminClient).

Parameters

NameInRequiredDescription
messageReferencepathYesThe unique reference of the message.

Responses

StatusDescription
200The request was successful and the message was returned.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
resultobjectNoAn in-app notification message displayed to a consumer or merchant.
json
{
  "success": true,
  "result": {
    "reference": "00000000-0000-0000-0000-000000000000",
    "messageType": "Information",
    "messageTarget": "None",
    "messagePlacement": "None",
    "header": "string",
    "body": "string",
    "navigationKey": "string",
    "navigationValue": "string",
    "buttonText": "string",
    "isRead": true,
    "readDate": "string",
    "visibleFromDate": "string",
    "visibleUntilDate": "string",
    "createdDate": "string"
  }
}

Code samples

WARNING

The JavaScript SDK does not cover admin APIs - use the .NET SDK.

csharp
var message = await adminClient.Notifications.GetMessageAsync(Guid.Parse("2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d"));

Delete a notification message.

DELETE /v1/notifications/admin/messages/{messageReference}

Auth: API key (VantagePayAdminClient).

Parameters

NameInRequiredDescription
messageReferencepathYesThe unique reference of the message.

Responses

StatusDescription
200The request was successful and the message was deleted.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

WARNING

The JavaScript SDK does not cover admin APIs - use the .NET SDK.

csharp
await adminClient.Notifications.DeleteMessageAsync(Guid.Parse("2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d"));

Mark a notification message as read.

PATCH /v1/notifications/admin/messages/{messageReference}/read

Auth: API key (VantagePayAdminClient).

Parameters

NameInRequiredDescription
messageReferencepathYesThe unique reference of the message.

Responses

StatusDescription
200The request was successful and the message was marked as read.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

WARNING

The JavaScript SDK does not cover admin APIs - use the .NET SDK.

csharp
await adminClient.Notifications.MarkMessageAsReadAsync(Guid.Parse("2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d"));

Payments for Africa