> ## 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.

# Payment complements

> How Lambda handles payment receipts, PPD vs PUE, and parent dependencies.

A payment complement (REP / complemento de pago) records payment against one or more previously stamped income invoices. CargoWise sends a payment receipt; Lambda decides which lines belong in the stamped complement and whether the parent evidence is ready.

Success in the workspace is usually labeled **Applied**. The underlying fiscal result is still a stamped CFDI.

## PPD vs PUE

| Payment form on the income invoice | What Lambda expects                 |
| ---------------------------------- | ----------------------------------- |
| **PPD** (paid later)               | One or more REPs as payments arrive |
| **PUE** (paid at invoice time)     | No REP for that income              |

Mixed receipts can include both. Lambda excludes PUE allocations from the stamped complement and stamps the PPD lines that remain.

Organizations can also enable a [REP eligibility window](/stamping/special/rep-eligibility-window) that includes or omits parents by calendar days after CargoWise PostDate.

## Expected path

<Steps>
  <Step title="CargoWise sends a payment receipt">
    The receipt may reference one or more parent invoices and can include embedded parent evidence
    from CargoWise.
  </Step>

  <Step title="Lambda reconciles parents">
    Lambda confirms parent stamp evidence, unpaid balances, installment sequence, and currency or FX
    evidence when needed.
  </Step>

  <Step title="Eligible lines stamp as a REP">
    Facturapi issues the payment CFDI. Lambda stores the result and the updated balance chain.
  </Step>

  <Step title="Artifacts return to CargoWise">
    Lambda outbound delivers the payment artifacts separately from income delivery.
  </Step>
</Steps>

## Waiting for parent

If the parent invoice is missing, not stamped yet, or lacks verifiable stamp evidence, the payment shows **Waiting for parent**.

That is a dependency, not a failure. Lambda can continue automatically when the parent evidence arrives. If the parent exists but its values disagree, the payment may move to **Failed** with a note that names the mismatch.

## Balance chain, in plain language

SAT requires each payment installment to preserve a consistent unpaid balance:

1. Previous unpaid balance before this payment
2. Amount paid in this installment
3. Remaining unpaid balance after this payment

Those three values must agree. When they do not, Lambda pauses with labeled amounts in the note so you can see which document or parent disagrees.

Partial payments over time are normal: one income invoice can receive several REPs, each with the next installment number and updated remaining balance.

## Currency and FX

Cross-currency payments need proven exchange-rate evidence from CargoWise. Lambda derives the payment currency fields from that evidence; it does not invent a rate to make the stamp succeed.

If FX evidence is missing, see [Troubleshooting](/troubleshooting#fx-evidence-missing).

CargoWise exchange-difference (EXX) lines are excluded from the stamped complement — see [Exchange-difference lines](/stamping/special/exchange-difference-lines).

## Related

* [Income invoices](/stamping/income-invoices)
* [REP eligibility window](/stamping/special/rep-eligibility-window)
* [Payment reversals](/stamping/special/payment-reversals)
* [Rules](/stamping/rules)
* [Statuses](/stamping/statuses#processing)
* [Troubleshooting](/troubleshooting)
