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

# Gestioná recibos

> Revisá recibos, creá ajustes, actualizá estados pendientes, enviá emails y generá links al PDF.

Usá **Invoices** como vista contable de lo que el customer debe o pagó. Usá **Transactions** para revisar cada intento de pago que buscó saldar un recibo.

## Revisá el estado

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { Commet } from "@commet/node";

  const commet = new Commet({ apiKey: "ck_xxx" });

  const response = await commet.invoices.list();
  ```

  ```python Python theme={null}
  from commet import Commet

  commet = Commet("ck_xxx")

  invoices_list_result = commet.invoices.list()
  ```

  ```go Go theme={null}
  client, err := commet.New("ck_xxx")
  if err != nil {
  	log.Fatal(err)
  }
  ctx := context.Background()

  invoicesListResult, err := client.Invoices.List(ctx, nil)
  if err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java theme={null}
  import co.commet.Commet;
  import co.commet.params.ListInvoicesParams;

  var commet = Commet.builder().apiKey("ck_xxx").build();

  var invoicesListResult = commet.invoices().list(ListInvoicesParams.builder().build());
  ```

  ```php PHP theme={null}
  use Commet\Commet;

  $commet = new Commet('ck_xxx');

  $invoicesListResult = $commet->invoices->list();
  ```
</CodeGroup>

Abrí un recibo en el dashboard para ver line items, impuestos, contexto de la suscripción, intentos de pago y datos del customer.

## Creá un recibo de ajuste

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { Commet } from "@commet/node";

  const commet = new Commet({ apiKey: "ck_xxx" });

  const invoice = await commet.invoices.createAdjustment({
    customerId: "user_123",
    amount: 5000,
    description: "Customer requested",
  });
  ```

  ```python Python theme={null}
  from commet import Commet

  commet = Commet("ck_xxx")

  invoice = commet.invoices.create_adjustment(
      customer_id="user_123",
      amount=5000,
      description="Customer requested",
  )
  ```

  ```go Go theme={null}
  client, err := commet.New("ck_xxx")
  if err != nil {
  	log.Fatal(err)
  }
  ctx := context.Background()

  invoice, err := client.Invoices.CreateAdjustment(ctx, &commet.CreateAdjustmentInvoiceParams{
  	CustomerID: "user_123",
  	Amount: 5000,
  	Description: "Customer requested",
  })
  if err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java theme={null}
  import co.commet.Commet;
  import co.commet.params.CreateAdjustmentInvoiceParams;

  var commet = Commet.builder().apiKey("ck_xxx").build();

  var invoice = commet.invoices().createAdjustment(
      CreateAdjustmentInvoiceParams.builder("user_123", 5000L, "Customer requested").build()
  );
  ```

  ```php PHP theme={null}
  use Commet\Commet;

  $commet = new Commet('ck_xxx');

  $invoice = $commet->invoices->createAdjustment(
      customerId: 'user_123',
      amount: 5000,
      description: 'Customer requested',
  );
  ```
</CodeGroup>

Usá un monto positivo para un cargo adicional y uno negativo para un crédito. Es un documento contable puntual; no cambia el plan ni las próximas renovaciones.

## Marcá un recibo pendiente

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { Commet } from "@commet/node";

  const commet = new Commet({ apiKey: "ck_xxx" });

  const invoice = await commet.invoices.updateStatus({
    id: "inv_xxx",
    status: "paid",
  });
  ```

  ```python Python theme={null}
  from commet import Commet

  commet = Commet("ck_xxx")

  invoice = commet.invoices.update_status(
      "inv_xxx",
      status="paid",
  )
  ```

  ```go Go theme={null}
  client, err := commet.New("ck_xxx")
  if err != nil {
  	log.Fatal(err)
  }
  ctx := context.Background()

  invoice, err := client.Invoices.UpdateStatus(ctx, "inv_xxx", &commet.UpdateInvoiceStatusParams{
  	Status: "paid",
  })
  if err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java theme={null}
  import co.commet.Commet;
  import co.commet.params.UpdateInvoiceStatusParams;

  var commet = Commet.builder().apiKey("ck_xxx").build();

  var invoice = commet.invoices().updateStatus(
      "inv_xxx",
      UpdateInvoiceStatusParams.builder("paid").build()
  );
  ```

  ```php PHP theme={null}
  use Commet\Commet;

  $commet = new Commet('ck_xxx');

  $invoice = $commet->invoices->updateStatus(
      id: 'inv_xxx',
      status: 'paid',
  );
  ```
</CodeGroup>

Solo un recibo pendiente puede marcarse como `paid` o `void`. Esto registra un pago externo o un write-off deliberado; no crea una transacción en el proveedor.

## Enviá o descargá

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { Commet } from "@commet/node";

  const commet = new Commet({ apiKey: "ck_xxx" });

  const sentInvoice = await commet.invoices.send({ id: "inv_xxx" });
  ```

  ```python Python theme={null}
  from commet import Commet

  commet = Commet("ck_xxx")

  sent_invoice = commet.invoices.send("inv_xxx")
  ```

  ```go Go theme={null}
  client, err := commet.New("ck_xxx")
  if err != nil {
  	log.Fatal(err)
  }
  ctx := context.Background()

  sentInvoice, err := client.Invoices.Send(ctx, "inv_xxx", nil)
  if err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java theme={null}
  import co.commet.Commet;
  import co.commet.params.SendInvoiceParams;

  var commet = Commet.builder().apiKey("ck_xxx").build();

  var sentInvoice = commet.invoices().send("inv_xxx", SendInvoiceParams.builder().build());
  ```

  ```php PHP theme={null}
  use Commet\Commet;

  $commet = new Commet('ck_xxx');

  $sentInvoice = $commet->invoices->send(id: 'inv_xxx');
  ```
</CodeGroup>

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { Commet } from "@commet/node";

  const commet = new Commet({ apiKey: "ck_xxx" });

  const invoiceDownload = await commet.invoices.getDownloadUrl({ id: "inv_xxx" });
  ```

  ```python Python theme={null}
  from commet import Commet

  commet = Commet("ck_xxx")

  invoice_download = commet.invoices.get_download_url("inv_xxx")
  ```

  ```go Go theme={null}
  client, err := commet.New("ck_xxx")
  if err != nil {
  	log.Fatal(err)
  }
  ctx := context.Background()

  invoiceDownload, err := client.Invoices.GetDownloadURL(ctx, "inv_xxx", nil)
  if err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java theme={null}
  import co.commet.Commet;
  import co.commet.params.DownloadInvoiceParams;

  var commet = Commet.builder().apiKey("ck_xxx").build();

  var invoiceDownload = commet.invoices().getDownloadUrl(
      "inv_xxx",
      DownloadInvoiceParams.builder().build()
  );
  ```

  ```php PHP theme={null}
  use Commet\Commet;

  $commet = new Commet('ck_xxx');

  $invoiceDownload = $commet->invoices->getDownloadUrl(id: 'inv_xxx');
  ```
</CodeGroup>

El link al PDF está firmado y vence a los siete días. Generalo cuando el customer solicite el documento en lugar de guardar una URL pública permanente.

Para entender renovaciones automáticas y timing de overage, leé [Recibos y ciclos de billing](/docs/es/invoices-and-billing-cycles).


## Related topics

- [Recibos](/docs/es/what-invoices-do-customers-receive-and-when.md)
- [Recibos y ciclos de cobro](/docs/es/invoices-and-billing-cycles.md)
- [Pagos únicos](/docs/es/one-time-payments.md)
- [invoice.voided](/docs/es/webhooks/invoice-voided.md)
- [Better Auth](/docs/es/better-auth.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.