# Retrieving the Last Voucher

This guide explains how to retrieve or reprint the last transaction voucher from an Integrated POS using the `GetLastVoucher` operation. Behaviour is the same across USB and Network.

## What is the last voucher

The **last voucher** is the receipt content of the most recent transaction on the POS terminal (either a sale or a cancellation). `GetLastVoucher` triggers a reprint or returns that content without re-executing the transaction. It is useful when the receipt was lost, printing failed, or the customer requests a duplicate.

## Before you begin

Before retrieving the last voucher:

* A Connector must be created and validated using `Polling`
* Integrated POS Mode must be active
* At least one transaction must have been completed on the terminal

## Step 1: Execute the request

To retrieve or reprint the last transaction voucher, call the `GetLastVoucher` operation. You can choose to print it directly on the POS or receive the content in the response.

The following parameters are available for the `GetLastVoucher` operation:

| Parameter | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| `PrintOnPos` | Boolean | No | If `true`, the POS prints the voucher. If `false`, receipt content is returned in `ReceiptContent`. |
| `SkipReceipt` | Boolean | No | If `true`, the client receipt is not printed; if `false` (default), it is printed. Ignored when `PrintOnPos` is `false`. |

The following example demonstrates how to request a reprint of the last voucher directly on the POS terminal:

```csharp
var request = new LastTransactionRequest
{
    PrintOnPos = true,
    SkipReceipt = false
};

var voucherResult = await connector.GetLastVoucherAsync(request);
```

## Step 2: Handle the response

Upon completion, the POS returns a structured response with the operation status and, if requested, the receipt content. Below is an example of a successful response object:

```json
{
  "Code": 0,
  "Message": "APPROVED",
  "ReceiptContent": null
}
```

<Callout type="note">

The return contains only `Code`, `Message`, and `ReceiptContent`. `ReceiptContent` is `null` here because the request set `PrintOnPos` to `true`. When `PrintOnPos` is `false`, `ReceiptContent` returns a structured object with the receipt fields — see [Printing Responsibility](/en/integrated-pos/core-concepts-pos/printing-responsibility).

</Callout>

Always verify the `Code` and `Message` before processing the `ReceiptContent`.

## Important considerations

Keep in mind the following:

* Only the most recent transaction voucher can be retrieved (sale or cancellation).
* The operation does not reprocess or reverse the transaction.
* If the last transaction was a Report, no voucher is printed and an explanatory message is returned.

## Next steps

* [Printing Responsibility](/en/integrated-pos/core-concepts-pos/printing-responsibility) — PrintOnPos and ReceiptContent.