> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paymend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Recover payments

> Your best practice guide to payment recovery via Paymend

Paymend specializes in recovery of payments that have already failed authorization. Whether a payment is consumer or merchant-initiated, one-time or recurring: when you receive a decline from your primary payment provider, simply re-route it to Paymend and we’ll take care of the rest.

It is not always possible to recover a failed payment immediately. In these cases, merchants can safely leave the payment with Paymend, confident that it will be handled by a platform designed to maximize the chance of eventual approval.

Our recovery engine evaluates each failed payment using a rich set of signals and dynamically selects the optimal recovery strategy. In certain scenarios, this means intentionally waiting before attempting the payment again. A common example is an insufficient funds decline: retrying immediately is unlikely to succeed, so Paymend schedules a retry for when we expect the cardholder to have available balance again.

## Pending payments

When Paymend requires additional time to process a payment, we respond to the payment creation request with a `PENDING` status.

A `PENDING` status means:

* The payment has been successfully created
* No final authorization decision has been made yet
* Paymend is actively managing recovery attempts

`PENDING` is always a temporary state. Without any further action from the merchant, the payment will eventually transition to one of the following final statuses:

* `AUTHORIZED`
* `CAPTURED`
* `FAILED`

Paymend will never hold a payment in a non-terminal state indefinitely: we enforce a maximum recovery window for all payments. If recovery is not successful within this window, the payment is marked as `FAILED` and no further attempts are made.

You can see the lifecycle for payments with Paymend [here](/core-concepts).

## Best practices for `PENDING` payments

While a payment is in `PENDING` state with Paymend, merchants may continue to attempt recovery outside of Paymend.

To avoid conflicts or double charges, please follow these rules:

1. **Do not retry the same payment via Paymend while it remains in `PENDING` state**.
2. If circumstances change such that no further authorization attempts should be made for a `PENDING` payment (for example, the order is canceled or the consumer is successfully charged elsewhere), **the payment with Paymend must be voided to prevent a double charge**.

<Note>
  In the event of a race condition where Paymend has already recovered the payment, resulting in a temporary double charge, you must issue a refund.
</Note>

<img src="https://mintcdn.com/paymend/-K-zFxYRBHZCvqLZ/images/paymend-void_pending_payment.jpg?fit=max&auto=format&n=-K-zFxYRBHZCvqLZ&q=85&s=0a8a67ad74c9bf062c31a0d957f009fe" alt="Void a PENDING payment" width="9975" height="4912" data-path="images/paymend-void_pending_payment.jpg" />

## Webhooks

Merchants should rely on Paymend webhooks to receive real-time notifications when a payment’s status changes (for example, when a payment moves from `PENDING` to `AUTHORIZED`). This avoids the need to poll the query endpoint for updates.

You can find more details on Paymend webhooks [here](/webhooks).

<img src="https://mintcdn.com/paymend/-K-zFxYRBHZCvqLZ/images/paymend-pending_response_via_webhook.jpg?fit=max&auto=format&n=-K-zFxYRBHZCvqLZ&q=85&s=cc9aec2e3c42b78767b204d03c27a70c" alt="Payment status update via webhook" width="9065" height="5404" data-path="images/paymend-pending_response_via_webhook.jpg" />

## Previous failure details

The more information you can provide about previous attempts to process a payment, the more effectively Paymend can recover it.

Paymend supports a [PreviousFailure](/api-reference/objects/previous-failure) object that allows you to pass details about earlier attempts and their failure reasons. This information helps route the payment onto the most effective recovery path more quickly.

## Integration checklist

To ensure your integration to Paymend is of the highest quality, ensure that you:

* Subscribe to webhooks (link to webhooks docs)
* Handle `PENDING` as a non-terminal state
* Void `PENDING` payments if no further authorization attempts should be made
* Provide [PreviousFailure](/api-reference/objects/previous-failure) data where available
