---
title: "Retry without creating another payment | Timbro"
description: "Recover the same request when its response is lost"
canonical: "https://timbro.do/en/docs/cobros/reintentos-e-idempotencia/"
---

Webhooks and errors

# Retry without creating another payment

Save the payment request before sending it. If you lose the response, send it again with the same `paymentReference`: Timbro returns the same payment and its current status.

- [TypeScript](https://timbro.do/en/docs/cobros/reintentos-e-idempotencia/#tab-panel-0-0)
- [Python](https://timbro.do/en/docs/cobros/reintentos-e-idempotencia/#tab-panel-0-1)

```ts
import { createTimbroPayments, type CreatePaymentCommand } from "@timbro/payments";

const timbro = createTimbroPayments({ apiKey: process.env.TIMBRO_PAYMENTS_SECRET_KEY! });

export async function recoverPayment(savedRequest: CreatePaymentCommand) {
  return timbro.payments.create(savedRequest);
}
```

```python
import os

from timbro_payments import TimbroPayments
from timbro_payments.types import CreatePaymentRequest, Payment

timbro = TimbroPayments(api_key=os.environ["TIMBRO_PAYMENTS_SECRET_KEY"])


def recover_payment(saved_request: CreatePaymentRequest) -> Payment:
    return timbro.payments.create(saved_request)
```

The SDK creates the idempotency key and makes up to two automatic retries for transient failures. If those attempts run out, keep the request to recover it later.

An ERP can derive the reference from the order and its revision with `paymentReferenceForSource` in TypeScript or `payment_reference_for_source` in Python. The same order revision always yields the same reference.

## What you can repeat

- The reference is retained within the same merchant and mode, Test or Live.
- Changing the amount, items, tax, selected merchant account, or other request data returns a conflict (`409`).
- If you sent `expiresAfterSeconds`, send it again unchanged. It is part of the request: a different value, or leaving it out after sending it, returns a conflict (`409`).
- Changing the merchant configuration does not change a payment that has already been accepted.
- An expired or canceled payment stays the same when you repeat its reference.

Direct HTTP accepts the same body. `Idempotency-Key` is optional when creating payments and refunds; if you send it, keep that key when retrying too. Other operations, such as registering a webhook, require it. Derive that key from a record your system keeps, such as the order or the order line, and never generate a new key for each attempt.

An unknown outcome may eventually be approved. [Confirm what happened to the payment before starting another collection](https://timbro.do/en/docs/produccion/recuperar-pago-incierto/).

[Previous\
Handle errors](https://timbro.do/en/docs/produccion/errores/)[Next\
Recover an uncertain payment](https://timbro.do/en/docs/produccion/recuperar-pago-incierto/)

Sell, serve your customers, and collect payments from your phone

© 2026 Timbro. All rights reserved

[Español](https://timbro.do/docs/cobros/reintentos-e-idempotencia/)[English](https://timbro.do/en/docs/cobros/reintentos-e-idempotencia/)

## Products

[Invoicing](https://timbro.do/en/facturacion-electronica/)[Serve](https://timbro.do/en/atiende/)[Collect](https://timbro.do/en/pagos/)[Portal Timbro](https://timbro.do/en/portal-timbro/)[Integrations](https://timbro.do/en/integraciones/)[Cuenta Timbro](https://timbro.do/en/cuenta-timbro/)[Pricing](https://timbro.do/en/precios/)

## Developers

[SDKs and API](https://timbro.do/en/desarrolladores/)[Documentation](https://timbro.do/en/docs/)[API reference](https://timbro.do/en/docs/reference/payments/)

## Company

[INDEXA, the company behind Timbro](https://indexa.do/)[Presentations](https://timbro.do/en/presentaciones/)

## Help

[How to start](https://timbro.do/en/como-empezar/)[Electronic invoicing guide](https://timbro.do/en/guias/facturacion-electronica-republica-dominicana/)[Contact](https://timbro.do/en/contacto/)<hola@timbro.do>

## Legal

[Business Terms](https://timbro.do/en/politicas/negocios/)[Terms of use](https://timbro.do/en/politicas/uso/)[Privacy](https://timbro.do/en/politicas/privacidad/)[Security](https://timbro.do/en/politicas/seguridad/)[All documents](https://timbro.do/en/politicas/)
