--- title: "Referenced refund" description: "Issue a point-of-sale refund connected to the original payment." url: "https://docs.adyen.com/point-of-sale/basic-tapi-integration/refund-payment/referenced" source_url: "https://docs.adyen.com/point-of-sale/basic-tapi-integration/refund-payment/referenced.md" canonical: "https://docs.adyen.com/point-of-sale/basic-tapi-integration/refund-payment/referenced" last_modified: "2025-01-22T13:28:00+01:00" language: "en" --- # Referenced refund Issue a point-of-sale refund connected to the original payment. [View source](/point-of-sale/basic-tapi-integration/refund-payment/referenced.md) To return funds to a shopper after a payment is approved, you need to refund the payment. Referenced refunds are connected to the original payment, using the unique identifier of that payment. When you make a POS payment, the Terminal API response returns the [transaction identifier](/point-of-sale/design-your-integration/terminal-api#response-body) of the payment in the format `tenderReference.pspReference`. To make a referenced refund, you specify this transaction identifier in your refund request. This lets us validate the refund against the original payment, to ensure that it hasn't already been refunded. You can make a: * **Full refund** to return the total value of the purchase to the shopper. * **Partial refund** to return part of the purchase to the shopper. For example, when a shopper returns one of the items they purchased. You can also make multiple partial refunds. For example, when a shopper returns several items at different times. ## Requirements | 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/). | | **[Webhooks](/development-resources/webhooks)** | Subscribe to the following webhook:- **[CANCEL\_OR\_REFUND webhook](/point-of-sale/basic-tapi-integration/refund-payment/refund-webhooks#cancel-or-refund-webhook/)** | | **Limitations** | Take into account the following limitations for [refunding an offline payment when back online](#refund-offline-payment) in a Mobile solution:- This type of refund is only supported in a iOS Mobile solution. - [Store and Forward offline payments](/point-of-sale/offline-payment) for Tap to Pay on iPhone is currently only supported in the US. | | **Setup steps** | Optionally, set up [offline payments](/point-of-sale/offline-payment/) to be able to [refund an offline payment when back online](#refund-offline-payment). | ## Make a referenced refund Select a tab to see the parameters that you need to specify for a full referenced refund, or a partial referenced refund. ### Tab: Full refund Here we describe the **basic** referenced refund request for the full amount. To [refund an offline payment](#refund-offline-payment) or to [refund an ecommerce payment](#refund-ecommerce-payment), the request is a little different. 1. Get the `TransactionID` and the `TimeStamp` of the original payment. You received these values in the payment response, in the `POIData.POITransactionID` object. 2. Make a [Terminal API](/point-of-sale/design-your-integration/terminal-api) reversal request, 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 **Reversal**. | 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-") | **Reversal** | | `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 [ReversalRequest](https://docs.adyen.com/api-explorer/terminal-api/latest/post/reversal) object with: | Parameter | Required | Description | | ----------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `OriginalPOITransaction.POITransactionID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An object with:- `TransactionID`: Transaction identifier of the original payment in the format `tenderReference.pspReference`. For example, **BV0q001643892070000.VK9DRSLLRCQ2WN82** - `TimeStamp`: Date and time in [UTC format](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_\(UTC\)) of the original payment. For example, **2000-01-01T00:00:00.000Z** | | `ReversalReason` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Set to **MerchantCancel**. | The following example shows how to make a full referenced refund. #### JSON ```json { "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Service", "MessageCategory":"Reversal", "MessageType":"Request", "SaleID":"POSSystemID12345", "ServiceID":"0207111105", "POIID":"V400m-324688179" }, "ReversalRequest":{ "OriginalPOITransaction":{ "POITransactionID":{ "TransactionID":"BV0q001643892070000.VK9DRSLLRCQ2WN82", "TimeStamp":"2022-01-31T12:08:45.004Z" } }, "ReversalReason":"MerchantCancel" } } } ``` #### 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.REVERSAL ); messageHeader.setMessageType( MessageType.REQUEST ); messageHeader.setSaleID(saleID); messageHeader.setServiceID(serviceID); messageHeader.setPOIID(POIID); saleToPOIRequest.setMessageHeader(messageHeader); ReversalRequest reversalRequest = new ReversalRequest(); OriginalPOITransaction originalPOITransaction = new OriginalPOITransaction(); TransactionIdentification pOITransactionID = new TransactionIdentification(); pOITransactionID.setTransactionID(transactionID); pOITransactionID.setTimeStamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar())); originalPOITransaction.setPOITransactionID(pOITransactionID); reversalRequest.setOriginalPOITransaction(originalPOITransaction); reversalRequest.setReversalReason( ReversalReasonType.MERCHANT_CANCEL ); saleToPOIRequest.setReversalRequest(reversalRequest); terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest); ``` The payment terminal shows a waiting screen until you receive the response.\ ![Waiting screen](/user/pages/docs/03.point-of-sale/05.basic-tapi-integration/05.refund-payment/01.referenced/WaitingScreen.png) 3. When you receive the [ReversalResponse](https://docs.adyen.com/api-explorer/terminal-api/latest/post/reversal/#responses-200), note the following: | Parameter | Description | | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Response.Result` | **Success** means we received your request. The refund itself will be processed asynchronously. | | `POIData.POITransactionID.TransactionID` | The PSP reference for this refund request. | | `PaymentReceipt` | The generated receipt data. This includes **REFUND REQUESTED**. | | `Response.AdditionalResponse` | This includes:- `posOriginalAmountValue`: The amount (in [minor units](/development-resources/currency-codes)) of the original payment. - `posAuthAmountValue`: The refund amount (in minor units) that we will try to get authorized. - `pspReference`: The PSP reference for this refund request. | **Response when we received your full reversal request** ```json { "SaleToPOIResponse":{ "MessageHeader":{ "MessageCategory":"Reversal", "MessageClass":"Service", "MessageType":"Response", "POIID":"V400m-324688179", "ProtocolVersion":"3.0", "SaleID":"POSSystemID12345", "ServiceID":"207111107" }, "ReversalResponse":{ "POIData":{ "POITransactionID":{ "TimeStamp":"2022-02-03T15:04:15.004Z", "TransactionID":"TF995R5G6L2GWR82" } }, "PaymentReceipt":[ "..." ], "Response":{ "AdditionalResponse":"tid=47069832&transactionType=GOODS_SERVICES&posadditionalamounts.originalAmountValue=1025&giftcardIndicator=false&posAmountGratuityValue=0&pspReference=TF995R5G6L2GWR82&store=YOUR_STOREL&iso8601TxDate=2022-02-03T15%3a04%3a13.0000000%2b0000&posOriginalAmountValue=1025&txtime=16%3a04%3a13&paymentMethod=mc&txdate=03-02-2022&merchantReference=2022-02-03%2016%3a04%3a13&posadditionalamounts.originalAmountCurrency=EUR&transactionReferenceNumber=TF995R5G6L2GWR82&posAuthAmountCurrency=EUR&posAmountCashbackValue=0&posEntryMode=CLESS_CHIP&posAuthAmountValue=1025", "Result":"Success" } } } } ``` If your request failed, the [ReversalResponse.Response](https://docs.adyen.com/api-explorer/terminal-api/latest/post/reversal/#responses-200-Response) contains: * `Result`: **Failure** * `AdditionalResponse`: This includes a `message` explaining why the request failed. For example: * *Original pspReference required for this operation*: Messages like this tell you how to fix the request so you can try again. * *Transaction is already voided*: This message tells you that we already received a full reversal request for the original transaction. 4. Wait for the [CANCEL\_OR\_REFUND](https://docs.adyen.com/api-explorer/Webhooks/latest/post/CANCEL_OR_REFUND) webhook event to learn the outcome of the refund request. Refunds are always processed asynchronously. ### Tab: Partial refund Here we describe the **basic** referenced refund request for a partial amount. To [refund an offline payment](#refund-offline-payment) or to [refund an ecommerce payment](#refund-ecommerce-payment), the request is a little different. 1. Get the `TransactionID` and the `TimeStamp` of the original payment. You received these values in the payment response, in the `POIData.POITransactionID` object. 2. Make a [Terminal API](/point-of-sale/design-your-integration/terminal-api) reversal request, 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 **Reversal**. | 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-") | **Reversal** | | `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 [ReversalRequest](https://docs.adyen.com/api-explorer/terminal-api/latest/post/reversal) object with: | Parameter | Required | Description | | ----------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `OriginalPOITransaction.POITransactionID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An object with:- `TransactionID`: Transaction identifier of the original payment in the format `tenderReference.pspReference`. For example, **BV0q001643892070000.VK9DRSLLRCQ2WN82** - `TimeStamp`: date and time in [UTC format](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_\(UTC\)) of the original payment. For example, **2000-01-01T00:00:00.000Z** | | `ReversalReason` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Set to **MerchantCancel**. | | `ReversedAmount` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The amount (provided as a number, not a string) being returned to the shopper in the partial refund. Must be smaller than or equal to the initial payment amount. | | `SaleData.SaleToAcquirerData` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The currency of the refund, in the format `currency=ABC` where `ABC` is the three-letter [currency code](/development-resources/currency-codes). This must match the currency of the original payment. | | `SaleData.SaleTransactionID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An object with:- `TransactionID`: your reference for the refund. In your Customer Area and Adyen reports, this will show as the **merchant reference**. - `TimeStamp`: date and time in [UTC format](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_\(UTC\)) of the refund. | The following example shows how to make a partial referenced refund of EUR 6.00. #### JSON ```json { "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Service", "MessageCategory":"Reversal", "MessageType":"Request", "SaleID":"POSSystemID12345", "ServiceID":"207111108", "POIID":"V400m-324688179" }, "ReversalRequest":{ "OriginalPOITransaction":{ "POITransactionID":{ "TransactionID":"BV0q001643892070000.VK9DRSLLRCQ2WN82", "TimeStamp":"2022-01-31T12:08:45.004Z" } }, "ReversalReason":"MerchantCancel", "ReversedAmount":6.00, "SaleData":{ "SaleToAcquirerData":"currency=EUR", "SaleTransactionID":{ "TimeStamp":"2022-02-03T15:04:14.004Z", "TransactionID":"rev-708" } } } } } ``` #### 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.REVERSAL ); messageHeader.setMessageType( MessageType.REQUEST ); messageHeader.setSaleID(saleID); messageHeader.setServiceID(serviceID); messageHeader.setPOIID(POIID); saleToPOIRequest.setMessageHeader(messageHeader); ReversalRequest reversalRequest = new ReversalRequest(); OriginalPOITransaction originalPOITransaction = new OriginalPOITransaction(); TransactionIdentification pOITransactionID = new TransactionIdentification(); pOITransactionID.setTransactionID(transactionID); pOITransactionID.setTimeStamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar())); originalPOITransaction.setPOITransactionID(pOITransactionID); reversalRequest.setOriginalPOITransaction(originalPOITransaction); reversalRequest.setReversalReason( ReversalReasonType.MERCHANT_CANCEL ); reversalRequest.setReversedAmount(6.0); SaleData saleData = new SaleData(); saleData.setSaleToAcquirerData("currency=EUR"); TransactionIdentification saleTransactionID = new TransactionIdentification(); saleTransactionID.setTimeStamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar())); saleTransactionID.setTransactionID(transactionID); saleData.setSaleTransactionID(saleTransactionID); reversalRequest.setSaleData(saleData); saleToPOIRequest.setReversalRequest(reversalRequest); terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest); ``` The payment terminal shows a waiting screen until you receive the response.\ ![Waiting screen](/user/pages/docs/03.point-of-sale/05.basic-tapi-integration/05.refund-payment/01.referenced/WaitingScreen.png) 3. When you receive the [ReversalResponse](https://docs.adyen.com/api-explorer/terminal-api/latest/post/reversal/#responses-200) note the following: | Parameter | Description | | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Response.Result` | **Success** means we received your request. The refund itself will be processed asynchronously. | | `Response.ReversedAmount` | The partial refund amount that we will try to get authorized. | | `POIData.POITransactionID.TransactionID` | The PSP reference for this refund request. | | `PaymentReceipt` | The generated receipt data. This includes **REFUND REQUESTED**. | | `Response.AdditionalResponse` | This includes:- `posOriginalAmountValue`: The amount (in [minor units](/development-resources/currency-codes)) of the original payment. - `posAuthAmountValue`: The refund amount (in minor units) that we will try to get authorized. - `merchantReference`: The `SaleData.SaleTransactionID.TransactionID` from the partial refund request. - `pspReference`: The PSP reference for this refund request. | **Response when we received your partial reversal request** ```json { "SaleToPOIResponse":{ "MessageHeader":{ "MessageCategory":"Reversal", "MessageClass":"Service", "MessageType":"Response", "POIID":"V400m-324688179", "ProtocolVersion":"3.0", "SaleID":"POSSystemID12345", "ServiceID":"207111107" }, "ReversalResponse":{ "POIData":{ "POITransactionID":{ "TimeStamp":"2022-02-03T15:04:15.004Z", "TransactionID":"TF995R5G6L2GWR82" } }, "PaymentReceipt":[ "..." ], "Response":{ "AdditionalResponse":"tid=47069832&transactionType=GOODS_SERVICES&posadditionalamounts.originalAmountValue=1025&giftcardIndicator=false&posAmountGratuityValue=0&pspReference=TF995R5G6L2GWR82&store=YOUR_STOREL&iso8601TxDate=2022-02-03T15%3a04%3a13.0000000%2b0000&posOriginalAmountValue=1025&txtime=16%3a04%3a13&paymentMethod=mc&txdate=03-02-2022&merchantReference=2022-02-03%2016%3a04%3a13&posadditionalamounts.originalAmountCurrency=EUR&transactionReferenceNumber=TF995R5G6L2GWR82&posAuthAmountCurrency=EUR&posAmountCashbackValue=0&posEntryMode=CLESS_CHIP&posAuthAmountValue=600", "Result":"Success" }, "ReversedAmount":6 } } } ``` If your request failed, the [ReversalResponse.Response](https://docs.adyen.com/api-explorer/terminal-api/latest/post/reversal/#responses-200-Response) contains: * `Result`: **Failure** * `AdditionalResponse`: This includes a `message` explaining why the request failed. For example: * *Original pspReference required for this operation*: Messages like this tell you how to fix the request so you can try again. * *Transaction is already voided*: This message tells you that we already received a full reversal request for the original transaction. 4. Wait for the [CANCEL\_OR\_REFUND](https://docs.adyen.com/api-explorer/Webhooks/latest/post/CANCEL_OR_REFUND) webhook event to learn the outcome of the refund request. Refunds are always processed asynchronously. ## Refund an offline payment when back online When there is a temporary loss of internet connectivity, you can continue making point-of-sale payments. This is referred to as [offline payments](/point-of-sale/offline-payment). The response for an offline payment does not include a PSP reference because PSP references are generated on the Adyen payments platform, and that could not be reached due to the loss of internet connectivity. If you need to refund such a payment when your integration is back online, you need to accommodate the fact that the PSP reference is missing from the offline payment response. There are two options: * **Use the PSP reference from the webhook**.\ Find the PSP reference of the offline payment in the standard webhook that you received (or in your Customer Area). You can then make a [regular referenced refund](#referenced-request) using the PSP reference. * **Use the tender reference from the offline payment response**.\ Payment terminals generate a tender reference for each payment. To make a referenced refund of an offline payment, you provide the tender reference and the date of the offline payment. In most cases you also need to know the unique identifier of the terminal that processed the payment. See the tabs below for details. If you make a referenced refund using the tender reference before the offline payment has been processed, the request is queued and retried by the Adyen platform. The payment status then changes from `Authorised` to `Cancelled`, because no funds have been transferred yet. If the payment status is `Sent for Settle` before the referenced refund is made, the payment status changes to `Refunded`. ### Tab: Full refund using tender reference Compared to a [basic full referenced refund](/point-of-sale/basic-tapi-integration/refund-payment/referenced?tab=full_refund_1), note the following request parameters: | Parameter | Required | Description | | ----------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `OriginalPOITransaction.POITransactionID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An object with `TransactionID`: the tender reference of the original payment. For example, **BV0q001643892070000** | | `OriginalPOITransaction.POIID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Can be either:- [the unique ID of the terminal](/point-of-sale/design-your-integration/terminal-api#get-the-terminal-id) (for example **P400Plus-275008565**), - the [card reader ID](/point-of-sale/mobile-ios/build/card-reader#add-the-card-reader-id-to-the-payment-request) (for example **NYC1-0207111104**) for an NYC1 transaction, - the unique [installationId](https://docs.adyen.com/api-explorer/softpos-configuration-api/latest/post/auth/certificate#responses-201-installationId) of the mobile SDK (for example **AC2ABBE8-EDD8-4E2B-AF45-8770FA2347DC.924**) for a Tap To Pay transactionthat processed the original payment. With the POIID, we can find the missing information. | ```json { "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Service", "MessageCategory":"Reversal", "MessageType":"Request", "SaleID":"POSSystemID12345", "ServiceID":"207111108", "POIID":"V400m-324688179" }, "ReversalRequest":{ "OriginalPOITransaction":{ "POITransactionID":{ "TransactionID":"BV0q001643892070000", "TimeStamp":"2022-01-31T12:08:45.004Z" }, "POIID":"P400Plus-275008565" }, "ReversalReason":"MerchantCancel" } } } ``` ### Tab: Partial refund using tender reference Compared to a [basic partial referenced refund](/point-of-sale/basic-tapi-integration/refund-payment/referenced?tab=partial_refund_2), note the following request parameters: | Parameter | Required | Description | | ----------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `OriginalPOITransaction.POITransactionID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An object with `TransactionID`: the tender reference of the original payment. For example, **BV0q001643892070000** | | `OriginalPOITransaction.POIID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Can be either:- [the unique ID of the terminal](/point-of-sale/design-your-integration/terminal-api#get-the-terminal-id) (for example **P400Plus-275008565**), - the [card reader ID](/point-of-sale/mobile-ios/build/card-reader#add-the-card-reader-id-to-the-payment-request) (for example **NYC1-0207111104**) for an NYC1 transaction, - the unique [installationId](https://docs.adyen.com/api-explorer/softpos-configuration-api/latest/post/auth/certificate#responses-201-installationId) of the mobile SDK( for example **AC2ABBE8-EDD8-4E2B-AF45-8770FA2347DC.924**) for a Tap To Pay transactionthat processed the original payment. With the POIID, we can find the missing information. | ```json { "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Service", "MessageCategory":"Reversal", "MessageType":"Request", "SaleID":"POSSystemID12345", "ServiceID":"207111108", "POIID":"V400m-324688179" }, "ReversalRequest":{ "OriginalPOITransaction":{ "POITransactionID":{ "TransactionID":"BV0q001643892070000", "TimeStamp":"2022-01-31T12:08:45.004Z" }, "POIID":"P400Plus-275008565" }, "ReversalReason":"MerchantCancel", "ReversedAmount":6, "SaleData":{ "SaleToAcquirerData":"currency=EUR", "SaleTransactionID":{ "TimeStamp":"2022-02-03T15:04:14.004Z", "TransactionID":"27911" } } } } } ``` ## Refund an ecommerce payment An ecommerce payment does have a PSP reference, but the tender reference is missing because it is generated by the terminal. To refund an ecommerce payment, you need to know the PSP reference, the date, and the currency of the original payment. ### Tab: Full refund of an ecommerce transaction Compared to a [basic full referenced refund](/point-of-sale/basic-tapi-integration/refund-payment/referenced?tab=full_refund_1), note the following request parameters: | Parameter | Required | Description | | ----------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `OriginalPOITransaction.POITransactionID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An object with `TransactionID`: the PSP reference of the original payment, in the format `.pspReference`. For example: **.VK9DRSLLRCQ2WN82**Do not forget the leading dot (.). Without it, you will receive the error message `unreachable host`. | | `SaleData.SaleToAcquirerData` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The currency of the refund, in the format `currency=ABC` where `ABC` is the three-letter [currency code](/development-resources/currency-codes). This must match the currency of the original payment. | | `SaleData.SaleTransactionID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An object with:- `TransactionID`: your reference for the refund. In your Customer Area and Adyen reports, this will show as the **merchant reference**. - `TimeStamp`: date and time in [UTC format](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_\(UTC\)) of the refund. | ```json { "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Service", "MessageCategory":"Reversal", "MessageType":"Request", "SaleID":"POSSystemID12345", "ServiceID":"207111108", "POIID":"V400m-324688179" }, "ReversalRequest":{ "OriginalPOITransaction":{ "POITransactionID":{ "TransactionID":".VK9DRSLLRCQ2WN82", "TimeStamp":"2022-01-31T12:08:45.004Z" } }, "ReversalReason":"MerchantCancel", "SaleData":{ "SaleToAcquirerData":"currency=EUR", "SaleTransactionID":{ "TimeStamp":"2022-02-03T15:04:14.004Z", "TransactionID":"rev-708" } } } } } ``` When you receive the `ReversalResponse`, note that the `Response.AdditionalResponse` includes: * `posOriginalAmountValue`: **0** (zero) * `posAuthAmountValue`: **0** (zero) That is because at this moment we do not know the original amount of the ecommerce payment, and thus also do not know the refund amount that we will try to get authorized. ### Tab: Partial refund of an ecommerce transaction Compared to a [basic partial referenced refund](/point-of-sale/basic-tapi-integration/refund-payment/referenced?tab=partial_refund_2), note the following request parameters: | Parameter | Required | Description | | ----------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `OriginalPOITransaction.POITransactionID` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An object with `TransactionID`: the PSP reference of the original payment, in the format `.pspReference`. For example: **.VK9DRSLLRCQ2WN82**Do not forget the leading dot (.). Without it, you will receive the error message `unreachable host`. | ```json { "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Service", "MessageCategory":"Reversal", "MessageType":"Request", "SaleID":"POSSystemID12345", "ServiceID":"207111108", "POIID":"V400m-324688179" }, "ReversalRequest":{ "OriginalPOITransaction":{ "POITransactionID":{ "TransactionID":".VK9DRSLLRCQ2WN82", "TimeStamp":"2022-01-31T12:08:45.004Z" } }, "ReversalReason":"MerchantCancel", "ReversedAmount":6, "SaleData":{ "SaleToAcquirerData":"currency=EUR", "SaleTransactionID":{ "TimeStamp":"2022-02-03T15:04:14.004Z", "TransactionID":"rev-708" } } } } } ``` When you receive the `ReversalResponse`, note that the `Response.AdditionalResponse` includes: * `posOriginalAmountValue`: **0** (zero) That is because at this moment we do not know the original amount of the ecommerce payment. ## See also * [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) * [FAQs: Refunds](https://help.adyen.com/knowledge/payments/refunds/)