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

# Settings

> The settings that authorize fiscal routes, provider environments, file design, and CargoWise delivery.

Each document is mapped to one route before provider submission. The route and its required
settings must be usable before Lambda performs the fiscal action.

## Fiscal routes

All five routes are enabled by default.

| UI label                                 | Route key                   | Action                                                        |
| ---------------------------------------- | --------------------------- | ------------------------------------------------------------- |
| **Stamp PUE invoices**                   | `income_pue_stamp`          | Issue PUE income CFDIs                                        |
| **Stamp PPD invoices**                   | `income_ppd_stamp`          | Issue PPD income CFDIs                                        |
| **Stamp payment complements (REP)**      | `payment_rep_stamp`         | Issue REPs for eligible PPD parents                           |
| **Stamp Tipo E credit notes**            | `credit_tipo_e_stamp`       | Issue parent-linked or standalone Tipo E credits              |
| **Cancel parent for full-value credits** | `credit_full_parent_cancel` | Cancel a fully offset parent instead of issuing a credit CFDI |

When a route is disabled, Lambda records a settings finding and does not perform that action. A
full-value credit has one controlled alternative: when parent cancellation is disabled, Lambda can
stamp a Tipo E credit if that route is enabled and the required parent evidence is usable.

Lambda checks the route again before issuance. If the settings changed after capture, Lambda stops
instead of silently choosing a different fiscal action.

## Facturapi environment

Test and live stamping use separate Facturapi readiness. The requested environment must have a
usable organization binding and certificate state.

| Environment | Behavior                                                                                |
| ----------- | --------------------------------------------------------------------------------------- |
| Test        | Creates test fiscal files and does not send them through normal live CargoWise delivery |
| Live        | Creates the production fiscal document and starts CargoWise delivery after verification |

A document does not switch environments during an attempt.

## REP eligibility window

The **REP eligibility window** has:

* **Enabled**
* **Window (days)** from `0` through `365`

When enabled, it can treat a parent as PUE when a payment arrives within the configured Mexico City
calendar-day window. Lambda freezes the decision with the payment intent, so a later setting change
does not rewrite an in-flight REP.

See [Payments](/stamping/payments) for the complete decision.

## Invoice design

The **Invoice design** setting offers:

| Choice       | Source                                                              |
| ------------ | ------------------------------------------------------------------- |
| **Detailed** | Facturapi PDF with the synchronized organization logo               |
| **Minimal**  | Lambda PDF rendered from the stamped XML with the organization logo |

Detailed is the default. Lambda uses Minimal when the exact attempt cannot prove that the current
logo is synchronized to the current Facturapi organization.

## CargoWise delivery

Lambda outbound requires a **CargoWise outbound URL** and usable connection credentials. File
allocation also uses:

* **CFDI XML doc type**
* **Cancellation XML doc type**
* **CFDI PDF doc type**

When **Cancellation XML doc type** is empty, Lambda uses **CFDI XML doc type** for the cancellation
XML.

DocManager modules are selected by document:

| Document                              | Module |
| ------------------------------------- | ------ |
| Income CFDI and credit CFDI           | `INV`  |
| Payment complement                    | `RRC`  |
| Payment complement file document type | `CMP`  |

A missing setting blocks only the action that needs it. For example, a missing CargoWise target can
stop delivery after the CFDI has already been issued and stored.
