> ## Documentation Index
> Fetch the complete documentation index at: https://adyen-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cashback

> Obtain a small amount of cash from a card with a purchase or without a purchase (cashout).

The cashback feature lets shoppers get cash in hand from their account, either with their purchase or without a purchase. Cashback without a purchase is often called cashout.

This page shows how to make a Terminal API cashback request and interpret the response.

## Requirements

Before you begin, take into account the following requirements, limitations, and preparations.

| Requirement | Description |
| - | - |
| **Integration type** | This feature is supported with a [Terminal API integration](https://adyen-preview.mintlify.site/point-of-sale/get-started) with payment terminals. |
| **Limitations** | [Support](#support) for the feature is limited to specific cards and countries/regions. |
| **Setup steps** | Before you begin, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to enable cashbacks. |

## Issue a cashback

1. Determine the following values that you will need to pass in your payment request:

   * The cashback amount.

   * The sum of the cashback amount and the amount due for the shopper's purchases.

2. [Make a payment request](https://adyen-preview.mintlify.site/point-of-sale/basic-tapi-integration/make-a-payment), including:

   * The [PaymentTransaction](https://docs.adyen.com/api-explorer/terminal-api/latest/post/payment#request-PaymentTransaction) object with the total and cashback amounts:

     | Parameter | Description |
     | - | - |
     | `AmountsReq.RequestedAmount` | The total amount to be paid by the shopper. That is the amount of the purchase plus the amount of the cashback. |
     | `AmountsReq.CashBackAmount` | The cashback amount. |

   The example below shows the request for a shopper who purchased goods for **10** AUD, and wants to get a cashback of **2** AUD:

   #### JSON

   ```json theme={null}
   {
     "SaleToPOIRequest": {
       "MessageHeader": {
         "ProtocolVersion": "3.0",
         "MessageClass": "Service",
         "MessageCategory": "Payment",
         "MessageType": "Request",
         "ServiceID": "0501160930",
         "SaleID": "POSSystemID12345",
         "POIID": "P400Plus-540004072"
       },
       "PaymentRequest": {
         "SaleData": {
           "SaleTransactionID": {
             "TransactionID": "3375",
             "TimeStamp": "2018-05-01T14:09:30+00:00"
           }
         },
         "PaymentTransaction": {
           "AmountsReq": {
             "Currency": "AUD",
             "RequestedAmount": 12.00,
             "CashBackAmount": 2.00
           }
         }
       }
     }
   }
   ```

   #### Java

   ```java theme={null}
   String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";
   String saleID = "YOUR_CASH_REGISTER_ID";
   String POIID = "YOUR_TERMINAL_ID";
   String transactionID = "YOUR_UNIQUE_TRANSACTION_ID";

   SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
   MessageHeader messageHeader = new MessageHeader();
   messageHeader.setProtocolVersion("3.0");
   messageHeader.setMessageClass( MessageClassType.SERVICE );
   messageHeader.setMessageCategory( MessageCategoryType.PAYMENT );
   messageHeader.setMessageType( MessageType.REQUEST );
   messageHeader.setServiceID(serviceID);
   messageHeader.setSaleID(saleID);
   messageHeader.setPOIID(POIID);
   saleToPOIRequest.setMessageHeader(messageHeader);

   PaymentRequest paymentRequest = new PaymentRequest();
   SaleData saleData = new SaleData();
   TransactionIdentification saleTransactionID = new TransactionIdentification();
   saleTransactionID.setTransactionID(transactionID);
   saleTransactionID.setTimeStamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar()));
   saleData.setSaleTransactionID(saleTransactionID);
   paymentRequest.setSaleData(saleData);

   PaymentTransaction paymentTransaction = new PaymentTransaction();
   AmountsReq amountsReq = new AmountsReq();
   amountsReq.setCurrency("AUD");
   amountsReq.setRequestedAmount( BigDecimal.valueOf(12.00) );
   amountsReq.setCashBackAmount( BigDecimal.valueOf(2.00) );
   paymentTransaction.setAmountsReq(amountsReq);
   paymentRequest.setPaymentTransaction(paymentTransaction);
   saleToPOIRequest.setPaymentRequest(paymentRequest);
   terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);
   ```

3. When you receive the payment response, check the [PaymentResponse.Response.Result](https://docs.adyen.com/api-explorer/terminal-api/latest/post/payment#responses-200-Response-Result):

   * **Success** means the issuer authorized both the payment and the cashback.\
     The amount in the `PaymentResult.AmountsResp.CashBackAmount` field is the amount that you need to pay to the shopper in cash.

   * **Partial** means the issuer authorized the payment but not the cashback.

   **Payment response with cashback**

   ```json theme={null}
   {
       "SaleToPOIResponse": {
           "PaymentResponse": {
               "POIData": {
                   "POITransactionID": {
                       "TimeStamp": "2018-05-01T14:09:30.000Z",
                       "TransactionID": "u6W7001525183770000.NC6HT9CRT65ZGN82"
                   }
               },
               "SaleData": {
                   "SaleTransactionID": {
                       "TimeStamp": "2018-05-01T14:09:30.000Z",
                       "TransactionID": "3375"
                   }
               },
               "PaymentResult": {
                   "AuthenticationMethod": [
                       "OnlinePIN"
                   ],
                   "PaymentAcquirerData": {...},
                   "PaymentInstrumentData": {
                       "CardData": {
                           "EntryMode": [
                               "MagStripe"
                           ],
                           "PaymentBrand": "eftpos_australia_sav",
                           "MaskedPan": "637204 **** 0025",
                           "SensitiveCardData": {
                               "ExpiryDate": "1220"
                           }
                       },
                       "PaymentInstrumentType": "Card"
                   },
                   "AmountsResp": {
                       "AuthorizedAmount": 12,
                       "CashBackAmount": 2,
                       "Currency": "AUD"
                   }
               },
               "Response": {
                   "Result": "Success",
                   "AdditionalResponse": "...cashBackAmountValue=200"
               }
           },
           "MessageHeader": {...}
       }
   }
   ```

## Supported cards and countries/regions

Cashback is supported for:

* **eftpos** debit cards in Australia.
* **girocard** debit cards in Germany. Only with a purchase.
* **Mastercard** in Europe. Only with a purchase, and only in specific countries/regions. Contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to learn for which countries/regions cashback can be enabled.
* **Visa** in Europe. Only with a purchase

## See also

* [Capture payments](https://adyen-preview.mintlify.site/point-of-sale/capturing-payments.md)
* [Payment methods](https://adyen-preview.mintlify.site/point-of-sale/what-we-support/payment-methods)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.