# Retrieve Undelivered Notifications
source: https://developer.mastercard.com/transaction-notifications/documentation/tutorials-and-guides/undelivered-notifications/index.md

Use the undelivered notifications endpoint to recover transaction notifications that were not delivered to your webhook, for example during planned or unplanned downtime.
Note: Mastercard retries failed deliveries at progressive intervals for up to 24 hours. After 24 hours, undelivered notifications are stored for up to seven days. After seven days, they are deleted.

## Before You Begin {#before-you-begin}

Confirm the following:

* You have a [webhook](https://developer.mastercard.com/transaction-notifications/documentation/tutorials-and-guides/webhook/index.md) configured and expect that one or more notifications were not delivered.
* You have [configured OAuth credentials](https://developer.mastercard.com/transaction-notifications/documentation/api-basics/index.md#client-authentication).

## Retrieve Undelivered Notifications {#retrieve-undelivered-notifications}

1. Send a `GET` request to the `/notifications/undelivered-notifications` endpoint. For your first request, omit the `after` parameter to retrieve the oldest stored notifications.


   API Reference: `GET /notifications/undelivered-notifications`

2. Process the response. The response contains a `data` array with notification payloads in the same format as webhook deliveries, and a `nextCursor` value for pagination.

3. If the response includes a `nextCursor` value, send another request with the `after` parameter set to the `nextCursor` value from the previous response. Repeat until no `nextCursor` is returned.

Note: The API returns up to 100 notifications per request. Track the `nextCursor` value between requests to avoid retrieving the same notifications, especially if multiple outages occur within the seven-day retention window.

## Example Pagination Flow {#example-pagination-flow}

The following example shows how to paginate through all undelivered notifications:

1. **First request:** `GET /notifications/undelivered-notifications`
   * Response returns notifications 1--100 and `nextCursor: 100`.
2. **Second request:** `GET /notifications/undelivered-notifications?after=100`
   * Response returns notifications 101--200 and `nextCursor: 200`.
3. **Final request:** `GET /notifications/undelivered-notifications?after=200`
   * Response returns notifications 201--250. No `nextCursor` is returned, indicating all notifications have been retrieved.

## Troubleshooting {#troubleshooting}

| Issue                                  | Cause                                                                                          | Solution                                                                                   |
|:---------------------------------------|:-----------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------|
| Empty result set                       | No undelivered notifications exist, or the `after` value is beyond the latest sequence number. | Confirm the `after` sequence number. If omitted, the API returns the oldest stored events. |
| Same notifications returned repeatedly | The `after` parameter was not updated between requests.                                        | Track and pass the `nextCursor` value from the previous response as the `after` parameter. |
| Notifications missing after outage     | The seven-day retention period has expired.                                                    | Retrieve undelivered notifications promptly after any outage to avoid data loss.           |

## Next Steps {#next-steps}

* Review the [Returns Undelivered Notifications](https://developer.mastercard.com/transaction-notifications/documentation/api-reference/inbound/index.md#getUndeliveredNotifications) API specification for the full list of response fields.
* Set up a [webhook](https://developer.mastercard.com/transaction-notifications/documentation/tutorials-and-guides/webhook/index.md) if you have not configured one yet.
* Explore [Retrieve Clearing Data](https://developer.mastercard.com/transaction-notifications/documentation/tutorials-and-guides/clearing-data/index.md) to fetch settled transaction data for enrolled cards.
