--- title: "Unreferenced refund" description: "Issue a point-of-sale refund to any card presented to the payment terminal." url: "https://docs.adyen.com/point-of-sale/basic-tapi-integration/refund-payment/unreferenced" source_url: "https://docs.adyen.com/point-of-sale/basic-tapi-integration/refund-payment/unreferenced.md" canonical: "https://docs.adyen.com/point-of-sale/basic-tapi-integration/refund-payment/unreferenced" last_modified: "2025-01-22T15:36:00+01:00" language: "en" --- # Unreferenced refund Issue a point-of-sale refund to any card presented to the payment terminal. [View source](/point-of-sale/basic-tapi-integration/refund-payment/unreferenced.md) To return funds to a shopper after a payment is approved, you need to refund the payment. Unreferenced refunds let you return any amount to any card presented to the payment terminal. But you need to manually reconcile those refunds. If you want to use unreferenced refunds, we highly recommend that you ensure your POS app can reconcile a refund against the original purchase. This reduces the risk of return fraud (a payment being refunded multiple times), and human error (store staff enter the wrong refund amount). Also consider checking beforehand if the card that the shopper presents to the terminal is the same card that was used for the original payment. To do so, you need to implement card acquisition and save the card alias of all transactions. See [card acquisition before refunding](/point-of-sale/shopper-recognition/before-refund). ## Requirements Before you begin, take into account the following requirements, limitations, and preparations. | Requirement | Description | | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Integration type** | A [Terminal API integration](/point-of-sale/basic-tapi-integration/) with payment terminals or with a [Mobile solution](/point-of-sale/ipp-mobile/). | | **[API credentials](/development-resources/api-credentials)** | To enable unreferenced refunds using API calls, you must have an API credential with an API key and the following [role](/development-resources/api-credentials#api-permissions):- **Management API—Terminal settings read and write** If you have a Terminal API integration with [cloud-based communications](/point-of-sale/design-your-integration/choose-your-architecture#cloud-communications), you can use the existing API key that you use for Terminal API requests. | | **[Customer Area roles](/account/user-roles)** | To enable unreferenced refunds using the Customer Area, you must have the following role:- **Merchant POS Terminal Management** | | **[Webhooks](/development-resources/webhooks)** | Subscribe to the following webhook:- **[REFUND\_WITH\_DATA webhook](/point-of-sale/basic-tapi-integration/refund-payment/refund-webhooks/#refund-with-data-webhook)** | | **Limitations** | Note the following limitations:- Due to anti-money laundering and payment industry regulations, it is not possible to enable unreferenced refunds for certain [Merchant Category Codes (MCC)](/get-started-with-adyen/adyen-glossary/#merchant-category-code) and in the following countries: * Brazil * Mexico * Australia * Malaysia * Singapore * Hong Kong * India - It is not possible to make unreferenced refunds to a QR code wallet, such as Alipay and WeChat Pay. To refund these payment methods, you must make a referenced refund. | | **Setup steps** | To enable unreferenced refunds at the company or merchant account level, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other). To enable unreferenced refunds on the store or for an individual terminal or mobile device, follow the setup steps for your [Customer Area](#enable-through-the-customer-area) or for [making API calls](#enable-with-api-calls). | ## Enable unreferenced refunds You can enable unreferenced refunds at the store or terminal level in two ways: * [Through the Customer Area](#enable-through-the-customer-area) * [By making API calls](#enable-with-api-calls) Optionally, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to enable: * Enable unreferenced refunds at the company or merchant account level. * A refund delay, so you have time to [cancel an unreferenced refund](/point-of-sale/basic-tapi-integration/refund-payment/cancel-unreferenced) when necessary. ### Enable through the Customer Area To enable unreferenced refund for a store or for an individual terminal or mobile device through the Customer Area: 1. Log in to your [Customer Area](https://ca-test.adyen.com/) and select the store or terminal. 2. Go to **Terminal Settings** > **Payment features** > **Refund**. 3. Under **Unreferenced refunds**, select **Enabled**. 4. Optionally, under **Offline refund limit**, select **Add new currency limit** and enter the maximum amount you want to allow for offline refunds.. Due to anti-money laundering and payment industry regulations, it is not always possible to enable unreferenced refunds. An error message will inform you if unreferenced refunds are not allowed: * `Unreferenced refunds are not permitted for the country of this store.` * `Unreferenced refunds are not permitted for this account or store due to its merchant category code.` 5. Select **Save**. ### Enable with API calls To enable unreferenced refunds at the store or terminal level using API calls: 1. Make a PATCH request to the `/terminalSettings` endpoint for the store or terminal.\ Use one of the following endpoints: * PATCH [/stores/{storeId}/terminalSettings](https://docs.adyen.com/api-explorer/Management/latest/patch/stores/\(storeId\)/terminalSettings) * PATCH [/terminals/{terminalId}/terminalSettings](https://docs.adyen.com/api-explorer/Management/latest/patch/terminals/\(terminalId\)/terminalSettings) In the request body include a `refunds` object with: * `unreferenced.enableUnreferencedRefunds`: Indicates whether unreferenced refunds are enabled on the terminal or mobile device. Set this to **true** to enable unreferenced refunds. The following example shows how to enable unreferenced refunds on the terminal level. **PATCH /terminals/(terminalId)/terminalSettings request** ```bash curl https://management-test.adyen.com/v3/terminals/{terminalId}/terminalSettings \ -H 'x-API-key: ADYEN_API_KEY' \ -X Patch \ -d '{ "refunds": { "unreferenced": { "enableUnreferencedRefunds": true } } }' ``` Due to anti-money laundering and payment industry regulations, it is not always possible to enable unreferenced refunds. The example below shows an error message returned when unreferenced refunds cannot be enabled. **Error message - Unreferenced refunds not permitted** ```json { "type": "https://docs.adyen.com/errors/validation", "title": "Invalid parameters", "status": 422, "detail": "Field 'device.allowRefund' is not valid. Reason: Unreferenced refunds are not permitted for this account or store due to its merchant category code.", "errorCode": "33_808" } ``` ## Make an unreferenced refund For an unreferenced refund to a gift card, you need to specify more parameters than we describe here. Refer to [Make a refund to a gift card](/point-of-sale/gift-cards-terminal-api/refund-gift-cards). 1. [Make a payment request](/point-of-sale/basic-tapi-integration/make-a-payment), specifying: * The standard [`SaleToPOIRequest.MessageHeader` ](/point-of-sale/design-your-integration/terminal-api#request-message-header)object, with `MessageClass` set to **Service** and `MessageCategory` set to **Payment**. | Parameter | Required | Description | | ----------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ProtocolVersion` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **3.0** | | `MessageClass` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **Service** | | `MessageCategory` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **Payment** | | `MessageType` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **Request** | | `ServiceID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal (`POIID`) being used. | | `SaleID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Your unique ID for the POS system component to send this request from. | | `POIID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The unique ID of the terminal to send this request to. Format: *\[device model]-\[serial number]*. | - The [PaymentRequest](https://docs.adyen.com/api-explorer/terminal-api/latest/post/payment) object with: | Parameter | Description | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `SaleData.SaleTransactionID` | An object with:- `TransactionID`: your unique reference to identify the refund. Your Customer Area and Adyen reports show this ID as the **merchant reference** for the transaction. If the original payment was an [offline payment](/point-of-sale/offline-payment), you can make reconciliation easier by including the **tender reference of the offline payment**. - `TimeStamp`: Date and time of the refund in [UTC format](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_\(UTC\)). | | `PaymentTransaction.AmountsReq` | An object with:- `Currency`: The transaction [currency](/development-resources/currency-codes). - `RequestedAmount`: The amount being refunded to the card. | | `PaymentData.PaymentType` | **Refund** | The following example shows how to refund EUR 10.99 to a card. #### JSON ```json { "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Service", "MessageCategory":"Payment", "MessageType":"Request", "SaleID":"POSSystemID12345", "ServiceID":"175", "POIID":"V400m-324688179" }, "PaymentRequest":{ "SaleData":{ "SaleTransactionID":{ "TimeStamp":"2022-02-04T11:54:28.000Z", "TransactionID":"YOUR_REFUND_REFERENCE" } }, "PaymentTransaction":{ "AmountsReq":{ "Currency":"EUR", "RequestedAmount":10.99 } }, "PaymentData":{ "PaymentType":"Refund" } } } } ``` #### Java ```java String saleID = "YOUR_CASH_REGISTER_ID"; String serviceID = "YOUR_UNIQUE_ATTEMPT_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.setSaleID(saleID); messageHeader.setServiceID(serviceID); messageHeader.setPOIID(POIID); saleToPOIRequest.setMessageHeader(messageHeader); PaymentRequest paymentRequest = new PaymentRequest(); SaleData saleData = new SaleData(); TransactionIdentification saleTransactionID = new TransactionIdentification(); saleTransactionID.setTimeStamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar())); saleTransactionID.setTransactionID(transactionID); saleData.setSaleTransactionID(saleTransactionID); paymentRequest.setSaleData(saleData); PaymentTransaction paymentTransaction = new PaymentTransaction(); AmountsReq amountsReq = new AmountsReq(); amountsReq.setCurrency("EUR"); amountsReq.setRequestedAmount( BigDecimal.valueOf(10.99) ); paymentTransaction.setAmountsReq(amountsReq); paymentRequest.setPaymentTransaction(paymentTransaction); PaymentData paymentData = new PaymentData(); paymentData.setPaymentType( PaymentType.REFUND ); paymentRequest.setPaymentData(paymentData); saleToPOIRequest.setPaymentRequest(paymentRequest); terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest); ``` 2. Let the shopper complete the transaction on the terminal. The terminal prompts the shopper to present their card, and then shows that the transaction is approved. 3. When you receive the [PaymentResponse](https://docs.adyen.com/api-explorer/terminal-api/latest/post/payment#responses-200), note the following: * `Response.Result`: **Success**. This means we received your request. Usually, the refund is processed asynchronously. Whether the refund is processed synchronously or asynchronously depends on the card scheme and the country/region where the card is used. If processed synchronously, you get the `acquirerResponseCode` in the `AdditionalResponse`. * `POIData.POITransactionID.TransactionID`: the [transaction identifier](/point-of-sale/design-your-integration/terminal-api#transaction-identifier) for this refund request, in the format `tenderReference.pspReference`. * `PaymentReceipt`: the generated receipt data. This includes **transaction\_type\_refund**. * `SaleData.SaleTransactionID.TransactionID`: the reference you provided in the request. * `Response.AdditionalResponse` with: * `transactionType`: **REFUND** * `posAuthAmountValue`: the refund amount (in [minor units](/development-resources/currency-codes)) that we try to get authorized. * `pspReference`: the PSP reference for this refund request. * `acquirerResponseCode`: if this field is included, the request was processed synchronously. The value **Approved** means the refund is approved. **Unreferenced refund response** ```json { "SaleToPOIResponse": { "MessageHeader": { "MessageCategory": "Payment", "MessageClass": "Service", "MessageType": "Response", "POIID": "V400m-324688179", "ProtocolVersion": "3.0", "SaleID": "POSSystemID12345", "ServiceID": "175" }, "PaymentResponse": { "POIData": { "POIReconciliationID": "1000", "POITransactionID": { "TimeStamp": "2022-02-04T11:54:29.000Z", "TransactionID": "ItS6001643972069002.ZC4R4RBFJGXXGN82" } }, "PaymentReceipt": [...], "PaymentResult": { "AmountsResp": { "AuthorizedAmount": 10.99, "Currency": "EUR" }, ... "PaymentAcquirerData": { "AcquirerPOIID": "V400m-324688179", "AcquirerTransactionID": { "TimeStamp": "2022-02-04T11:54:29.000Z", "TransactionID": "ZC4R4RBFJGXXGN82" }, "MerchantID": "ADYEN_MERCHANT_ACCOUNT" }, "PaymentInstrumentData": { "CardData": {...} }, "PaymentInstrumentType": "Card" }, "PaymentType": "Refund" }, "Response": { "AdditionalResponse": "...transactionType=REFUND...{hint:This is included only if the refund is processed synchronously.}acquirerResponseCode=APPROVED{/hint}...posAuthAmountValue=1099...pspReference=ZC4R4RBFJGXXGN82...alias=P601291289070502", "Result": "Success" }, "SaleData": { "SaleTransactionID": { "TimeStamp": "2022-02-04T10:54:26.740Z", "TransactionID": "YOUR_REFUND_REFERENCE" } } } } } ``` 4. Wait for the [REFUND\_WITH\_DATA webhook](/point-of-sale/basic-tapi-integration/refund-payment/refund-webhooks#refund-with-data-webhook) to learn the outcome. If successful, the refund is issued to the shopper's account. ## See also * [Cancel an unreferenced refund](/point-of-sale/basic-tapi-integration/refund-payment/cancel-unreferenced) * [Outcome of a refund](/point-of-sale/basic-tapi-integration/refund-payment/refund-webhooks) * [Making refunds while offline](/point-of-sale/offline-payment#making-refunds-while-offline) * [Refunds on standalone terminals](/point-of-sale/standalone/standalone-use#refund) * [FAQs: Refunds](https://help.adyen.com/knowledge/payments/refunds/)