Skip to main content

Manage checkout notifications

Checkout notifications use a polling and acknowledgement model, where you poll for notification messages and acknowledge their receipt via API calls. In this guide, you will learn how to:

  • Retrieve transaction notifications
  • Acknowledge notifications
  • Retrieve notifications for a given time period

Retrieve notifications for consumer transactions

Retrieve notifications for your consumer transactions by performing the following steps:

  • Send a GET call on the /notifications/receive endpoint.
  • To automatically acknowledge all retrieved notifications, send autoAck=true in the query.
Note

All notification messages for the past 30 days that have not been acknowledged will continue to be delivered with subsequent polling requests.

The following is a sample request to retrieve a maximum of 10 notifications that are set to be acknowledged on receipt.

Method: GET

Endpoint: /notifications/receive?maxNumberMessages=10&timeoutMs=20&autoAck=true

Json
{
    "messages": [
        {
            "messageInfo": {
                "messageId": "da0336dd-77bf-49cb-a2f2-6d46f26dbc07",
                "receiptHandle": "AQEB2x1qhHKwd+pi8NQKnGduHSb+P0haY+sfw8DpfhGx5BTQ6XCq+tUCzLQGc65JY/ThKQZq7D4ne79WIjmlh7izpHl33rGWLEjOtcNpFkBhTYYlshVCc80H2OfIJn0MoebxRu9FkVZjnbYYrI6nnbutrT6Vl6CiYT4X8C81MhJ="
            },
            "createdAt": "2023-04-12T02:11:32.259Z",
            "orderNotification": {
                "checkoutIntent": "CHECKOUT_INTENT_AUTH_ONLY",
                "status": "STATUS_SUCCESS",
                "transactionReferenceNumber": "Q12345-4447-228",
                "checkoutReference": "QSA2345",
                "totalTransactionAmount": "1000",
                "transactionTimestamp": "2023-04-12T02:11:32.259Z",
                "fraudCheckStatus": "FRAUD_CHECK_STATUS_APPROVED"
            }
        }
    ],
    "autoAckFailedMessages": [
        {
            "messageId": "da0336dd-77bf-49cb-a2f2-6d46f26dbc07",
            "receiptHandle": "AQEB2x1qhHKwd+pi8NQKnGduHSb+P0haY+sfw8DpfhGx5BTQ6XCq+tUCzLQGc65JY/ThKQZq7D4ne79WIjmlh7izpHl33rGWLEjOtcNpFkBhTYYlshVCc80H2OfIJn0MoebxRu9FkVZjnbYYrI6nnbutrT6Vl6CiYT4X8C81MhJ="
        }
    ]
}

Acknowledge notifications

Acknowledge notifications you retrieved by performing a POST call to the /notifications/ack endpoint.

The following is a sample request to send an acknowledgement for a notification.

Method: POST

Endpoint: /notifications/ack

Json
{
    "messageInfos": [
        {
            "messageIdentifier": "d38e582e-27e1-4748-811b-79281f3bb714"
        }
    ]
}

Response:

Json
{
    "ackFailedMessages": [
        {
            "messageIdentifier": "d38e582e-27e1-4748-811b-79281f3bb714"
        }
    ]
}

Retrieve all notifications for a given time period

Retrieve all notifications for a given time period by performing the following steps:

  1. Send a GET call on the /notifications endpoint.
  2. Use the periodStart and periodEnd as query parameters.

The following is a sample request to retrieve all notifications from April 5 to April 6.

Method: GET

Endpoint: /notifications?periodStart=2023-04-05T00:00:00.000000000Z&periodEnd=2023-04-06T00:00:00.000000000Z

Json
{
    "messagesResponses": [
        {
            "createdAt": "2022-12-21T09:30:15.987Z",
            "orderNotification": {
                "transactionReferenceNumber": "Q12345-4447-228",
                "checkoutReference": "QSA2345"
            }
        }
    ]
}