Webhooks API

Find out more about the Viva Wallet Webhooks API. The API calls below use basic authentication.

1. List messages

HTTP request

get    /webhooks/v1/messages

Query parameters

ParameterTypeRequiredDescription
eventTypeIdinttrueFilter all messages with the specified eventTypeId.
beforedatetimefalseRetrieve all messages before the specified date.
responseStatusintfalse1 for success, 2 for fail. Omit for all statuses

Response

[
    {
        "messageId": "uuid",
        "eventTypeId": "int",
        "created ": "datetime",
        "responseStatus": "int",
        "statusCode": "int?",
        "delivered": "datetime?",
        "nextRetry": "datetime?",
        "url": "string"
    }
]

2. Get message details by ID

HTTP request

get    /webhooks/v1/messages/{messageId}

URI parameters

ParameterTypeDescription
messageIduuidThe ID of the message to retrieve details.

Response

{
    "messageId": "uuid",
    "eventTypeId": "int",
    "created ": "datetime",
    "responseStatus": "int",
    "statusCode": "int?",
    "delivered": "datetime?",
    "nextRetry": "datetime?",
    "url": "string",
    "string": "payload",
    "deliveries": [
        {
            "deliveryId ": "uuid",
            "created ": "datetime",
            "responseStatus": "int",
            "statusCode": "int?",
            "delivered": "datetime?"
        }
    ]
}

3. Attempt to redeliver a message

HTTP request

post    /webhooks/v1/messages/{messageId}:redeliver

URI parameters

ParameterTypeDescription
messageIduuidThe ID of the message to redeliver.

Retry policy

Viva Payments will assume you have successfully received a webhook notification if you respond with http status 200 to the above POST calls. In any other case (e.g. http status 404,401,500) a retry mechanism will start and run once per hour until a status 200 is received or the max retries threshold is reached (72 retries / 3 days).