# Invoicing for Cancellations and Payouts

In terms of invoicing, there are two kinds of transactions that stand out:

* For payouts, you create [regular invoices](/creditguard/documents-and-invoicing/issuing-invoices.md) with the `addCgInvoice` command.
* For cancellations, you create [refund invoices](/creditguard/documents-and-invoicing/refund-invoices.md) with the `refundCgInvoice` command.

## Cancellations

There is no such thing as a "cancellation invoice".

When a transaction is canceled, you account for it by issuing a [refund invoice](/creditguard/documents-and-invoicing/refund-invoices.md) that matches the original transaction invoice but is a credit rather than a debit.

Although there are separate commands for canceling and refunding (`cancelDeal` and `refundDeal`), there is only one command for document generation: `refundCgInvoice`.

## Payouts

[Payouts](/creditguard/additional-payment-scenarios/payouts.md) are credit transactions in which you pay the customer, regardless of the original payment.

For invoicing purposes, payouts are handled [just like regular transactions](/creditguard/documents-and-invoicing/issuing-invoices.md): you use the `addCgInvoice` command with the payout’s transaction ID (`tranId`).

The `refundCgInvoice` command does not apply to payouts: even though a payout is a credit transaction, it does not require a refund invoice.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.hyp.co.il/creditguard/documents-and-invoicing/cancellations-payouts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
