# Process Cashback Operations

This guide provides instructions on how to implement Cashback (Purchase with Cash Withdrawal) operations. This functionality allows a user to make a purchase and receive cash in a single transaction by explicitly declaring two separate amounts.

## How it works

A Cashback operation modifies the standard transaction flow by splitting the total transaction into the base cost of goods/services and the additional cash amount requested by the customer.

* **Trigger Conditions**: A transaction is processed as Cashback only if the `TTY` field is set to **"09"** and the `ICB` field contains a value greater than zero.
* **EMV Tag 9C**: When `TTY` is set to **"09"**, the internal EMV kernel automatically formats Tag **9C** (Transaction Type) to the correct EMV-defined value for Purchase with Cashback (`09`).
* **UI Behavior**: The Pinpad displays a specific split-screen showing the purchase amount and the cashback amount clearly to the cardholder before prompting for the card.

To trigger a Cashback flow, the Host System modifies the initialization parameters used in a standard payment sequence (Y19 → Y15 → Y02). The steps below follow that sequence.

## Step 1: Initialize with Y19

Define the primary Cashback parameters during the initial request:

* **Transaction Type (`TTY`)**: Set strictly to **"09"** (Purchase with Cashback).
* **Purchase Amount (`IMP`)**: The 12-digit numeric value representing the cost of goods/services (e.g., \$15.00 \= `000000001500`).
* **Cashback Amount (`ICB`)**: The 12-digit numeric value representing the cash withdrawal amount (e.g., \$20.00 \= `000000002000`).

## Step 2: Set the total amount (Y15)

If your flow utilizes the **Y15** command for EMV contact transactions, ensure the amounts are aligned:

* **Amount Update**: The terminal uses the values provided in the flow to calculate the total presented to the user.
* **Confirmation**: The user is asked to confirm the amounts visually on the terminal screen before card presentment.

## Step 3: Retrieve data and authorize (Y02 / Y03)

Once the user confirms the amounts and presents the card:

1. **Y02 Update**: The Host System can update the `IMP` or `ICB` amounts in the **Y02** command if necessary.
2. **Authorization**: The Host System receives the encrypted track data and EMV tags (including Tag 9C) to construct the authorization request for the backend.
3. **Completion**: Use the **Y03** command to deliver the authorizer's response back to the terminal.

## Terminal screens

When the `Y19` requirement indicates a Cashback operation, the terminal presents a specialized UI to the cardholder:

* **Amount Display**: The screen explicitly shows the amount to be delivered in cash along with the purchase amount.
* **Standard Fallback**: If the `ICB` value is set to **"000000000000"**, the terminal ignores the Cashback logic and continues with a conventional purchase screen.

> Although the software supports this flow, the Pinpad Getnet solution has not been officially certified for operations with cashback.

## Next steps

With the Cashback flow implemented, you can proceed to other specialized transaction types:

1. [**QR Code Payments**](https://docs.globalgetnet.com/en/products/in-store-payments/host-to-host?doc=h2h-process-qr-code-payments\&section=kei2fli2gqggbwgaddtl3xb7): Learn how to implement the `Y0Q` flow for digital wallets.
2. [**API Commands**](https://docs.globalgetnet.com/en/products/in-store-payments/host-to-host?doc=h2h-api-commands\&section=g7b851vgbt737kwul1fmgve2): Refer to the full technical structure for the `Y19` and `Y02` command fields.