---
updatedAt: 2025-08-11T11:56:12.000Z
agentTools:
  projectIndex: https://rivhit-api.readme.io/llms.txt
---

# 💳 Refunds - Documents/Receipts

# Full Refund

This is a short action to cancel the document or receipt quickly with the same amount and details like the original production.

<br />

Methods -

[Document.Cancel](https://rivhit-api.readme.io/reference/post_online-rivhitonlineapi-svc-document-cancel#/)

[Receipt.Cancel](https://rivhit-api.readme.io/reference/post_online-rivhitonlineapi-svc-receipt-cancel#/)

<br />

> Send the document/receipt type and number accordingly in order to cancel them automatically -
>
> This action will produce a new document/receipt as a refund.

<br />

> 📘 The system will automatically add a comment to refund document/receipt with the cancelled document/receipt type and number.

<br />

## Cancel a Document 'Invoice Receipt'

<br />

In this document type the cancel will be with both methods separately.

<br />

### **Document.Cancel** - To refund the invoice part

Send in request parameters:

`'document_type = 2'`

<br />

`'document_number'`

Send the 'Receipt Invoice' number to refund.

<br />

> The automatic document produced as a refund will be type 3 - Credit Tax Invoice (by system default)

<br />

<Accordion title="Document.Cancel of Invoice Receipt example" icon="fa-info-circle">
  ```json
  Request
  {
    "api_token": "A73530CF-19A4-4085-8C0D-75506DD6EDFE",
    "document_type": 2,
    "document_number": 6923
  }
  ```
</Accordion>

<br />

Invoice will be shown as follows:

<Image align="center" className="border" border={true} src="https://files.readme.io/bd8d8261c17d38dcfaa08cd2c9ada31cdbf5065b25ebd6d03c66afcfcaab9ab2-image.png" />

<br />

<br />

### **Receipt.Cancel** - To refund the receipt part

Send in request parameters:

`'receipt_type = 2'`

<br />

`'receipt_number'`

Send the 'Receipt Invoice' number to refund (will be same as in Document.Cancel).

<br />

<Accordion title="Receipt.Cancel of Invoice Receipt example" icon="fa-info-circle">
  ```json
  Request
  {
    "api_token": "A73530CF-19A4-4085-8C0D-75506DD6EDFE",
    "receipt_type": 2,
    "receipt_number": 6923
  }
  ```
</Accordion>

<br />

Receipt will be shown as follows:

<Image align="center" className="border" border={true} src="https://files.readme.io/faed12d591d70a4fe8024b0992f8fe4fa905a8ac64cd41b7a286ffd9fee4160b-image.png" />

<br />

<br />

# Partial or Custom Refund

In order to make a partial refund or change the original document/receipt in the refund there is  a need to produce a new document/receipt.

<br />

Methods -

[Document.New](https://rivhit-api.readme.io/reference/post_online-rivhitonlineapi-svc-document-new#/)

[Receipt.New](https://rivhit-api.readme.io/reference/post_online-rivhitonlineapi-svc-receipt-cancel#/)

<br />

This are the ground rules:

* To create the document/receipt as a refund send a negative amount (with -) on the items/payments array.
* To create an invoice refund use document type 3 - Invoice Refund (by system default).
* To create a refund of receipt use receipt type 1 (same type as a regular receipt).
* In case of cancelling a document type "Invoice Receipt", send both methods Document.New and Receipt.New in order to create a refund for both parts.
* It is recommended to send a comment with the details of the document/receipt that is refunded in order to make a link between the two.