Skip to content

Notifications

Get a single notification message by reference.

GET /v1/notifications/messages/{messageReference}

Auth: Access token (Bearer).

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

ts
// @vantagepay/vantagepay
const message = await client.notifications.getMessage('2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d')
csharp
// VantagePay.SDK
var message = await client.Notifications.GetMessageAsync(Guid.Parse("2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d"));

Delete a notification message.

DELETE /v1/notifications/messages/{messageReference}

Auth: Access token (Bearer).

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

ts
// @vantagepay/vantagepay
await client.notifications.deleteMessage('2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d')
csharp
// VantagePay.SDK
await client.Notifications.DeleteMessageAsync(Guid.Parse("2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d"));

Get all notification messages for the authenticated merchant or consumer.

GET /v1/notifications/messages

Auth: Access token (Bearer).

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

ts
// @vantagepay/vantagepay
const messages = await client.notifications.getMessages()
csharp
// VantagePay.SDK
var messages = await client.Notifications.GetMessagesAsync();

Mark a notification message as read.

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

Auth: Access token (Bearer).

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

ts
// @vantagepay/vantagepay
await client.notifications.markMessageAsRead('2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d')
csharp
// VantagePay.SDK
await client.Notifications.MarkMessageAsReadAsync(Guid.Parse("2a2b2c2d-3e3f-4a4b-5c5d-6e6f7a7b8c9d"));

Payments for Africa