logo

SmartBill

Overview

The /dte/credit-note route allows you to reduce or cancel the amount of a previously issued CCF (Credito Fiscal). Credit Notes are typically used to invalidate or partially refund a CCF — for example, when a product is returned, a billing error is corrected, or a discount is applied after the original document was sent to Hacienda.

The credit note is linked to the original CCF through its codigoGeneracion (document UUID). The request is processed and sent to Hacienda, and a response is provided indicating success or failure.

Request Details

URL: https://api.smartbill.lat/v1/dte/credit-note

HTTP Method: POST

Headers:

  • Content-Type: application/json
  • X-Smartbill-Public-Key: API Public key
  • X-Smartbill-Private-Key: API private key

Structure

In the body of the request, you will need to include the structure for "dteJson". The credit note payload is intentionally minimal — only three fields are required.

documentRelated

UUID

Required

This is the codigoGeneracion (UUID) of the CCF you want to reduce or invalidate. It must correspond to an existing CCF already processed by Hacienda, otherwise Hacienda will return an error.

description

string

Required

The reason for issuing the credit note. This is where the user explains the motive — for example: "Invalidación del documento", "Devolución parcial", or "Corrección de precio".

amount

number

Required

The amount you want to subtract from the original CCF. This value must not exceed the total of the original document, otherwise Hacienda will reject the credit note. Use the full CCF total if you want to invalidate the document entirely.

Make sure the amount is less than or equal to the total of the original CCF. Exceeding the original amount will cause Hacienda to reject the credit note.

Example

Below is an example of a request to issue a credit note that fully invalidates an existing CCF:

Select an option

Response

In this section, you can see two types of responses: a successful response and an error response.

Select an option