# Reverse a Transfer
source: https://developer.mastercard.com/mastercard-send-funding/documentation/use-cases/reverse-transfer/index.md

This example flow shows how you use a **Funding Reversal API POST** request to reverse an approved funding transfer. For details of using the API and sample requests and responses, see [API Reference](https://developer.mastercard.com/mastercard-send-funding/documentation/api-reference/index.md).

You provide the IDs that were returned in the Funding API response when the funding transfer was created:

* Transfer ID from the `id` field, for example 'trn_1357924680'
* Transaction ID from the `transaction_history.data.transaction[].id` field, for example 'txn_A9B8C7D6E5F4G3H2'

### Example sequence {#example-sequence}

Diagram mastercard-send-sequence-funding-reversal-post

1. You send a [Funding Reversal API POST](https://developer.mastercard.com/mastercard-send-funding/documentation/api-reference/index.md) request to Mastercard Send. Provide the funding transfer's Transfer ID and Transaction ID as the `transferId` and `transactionId` path parameters, respectively.

   API endpoint: `.../v1/partners/{partnerId}/transfers/{transferId}/transactions/{transactionId}/reversals`

   Example: `.../v1/partners/ptnr_BEeCrYJHh2BXTXPy_PEtp-8DBOo/transfers/trn_1357924680/transactions/txn_A9B8C7D6E5F4G3H2/reversals`

   Your request can include a `decline_details` query parameter that determines the type of API response when a transfer is declined. If set to 'true', a decline will be a 200 response with extra details. Otherwise, it will be a 402 error message.

   Provide the reason for the reversal, for example:
   * JSON
   * XML

   ```JSON
   {
     "funding_reversal": {
       "reversal_reason": "Payment not completed"
     }
   }
   ```

   ```XML
   <funding_reversal>
     <reversal_reason>Payment not completed</reversal_reason>
   </funding_reversal>
   ```

2. Mastercard Send validates your API request and locates the funding transfer to retrieve its details. If the API request fails validation or the transfer does not exist or cannot be reversed, Mastercard Send stops processing the request and returns a 4xx error message with the appropriate [error code](https://developer.mastercard.com/mastercard-send-funding/documentation/response-error-codes/error-codes/index.md).

3. If your API request passes the validation and the transfer is found, Mastercard routes a Funding Reversal Transaction request message to the issuer that holds the sending account and approved the funding transfer.

4. The issuer validates the request, determines whether it approves the transaction, and includes its decision in a Funding Reversal Transaction response message to Mastercard.

5. If the issuer approves the transaction, it credits the sending account.

6. Mastercard processes the response and sends a Funding Reversal API response to you.

The API response depends on the reversal outcome:

|        Outcome        |                                                                                       Response type                                                                                        |
|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Reversed (successful) | 200 response with `status` value as 'REVERSED'.                                                                                                                                            |
| Declined              | If `decline_details` query parameter was set to 'true': 200 response with `status` value still 'APPROVED'. Otherwise: 402 error with `ReasonCode` as 'DECLINE'.                            |
| Unknown               | 202 response with `status` value as 'UNKNOWN', see [this guidance](https://developer.mastercard.com/mastercard-send-funding/documentation/response-error-codes/unknown-response/index.md). |

In 200 and 202 responses for a reversed funding transfer, the `transaction` array will contain two objects: one for the original Funding Transaction, one for the subsequent Funding Reversal Transaction.
