--- title: "Return transferred funds" description: "Return funds to the sender of the original internal transfer, without creating a new transfer." url: "https://docs.adyen.com/platforms/internal-fund-transfers/return-transfers" source_url: "https://docs.adyen.com/platforms/internal-fund-transfers/return-transfers.md" canonical: "https://docs.adyen.com/platforms/internal-fund-transfers/return-transfers" last_modified: "2020-09-11T17:20:00+02:00" language: "en" --- # Return transferred funds Return funds to the sender of the original internal transfer, without creating a new transfer. [View source](/platforms/internal-fund-transfers/return-transfers.md) If funds were transferred from one balance account to another by mistake, you can return the funds to the source balance account without initiating a new internal transfer. Instead, you provide the transfer ID of the original incoming transfer. Returning the funds is then handled as a modification of that same internal transfer. Note that returning funds in this way only works if the original internal transfer was a push transfer. ## Requirements * Make sure that your server can [receive and accept webhooks](/development-resources/webhooks/configure-and-manage), and that the **Transfer webhook** has been added in your [Customer Area](https://ca-test.adyen.com/). * Ask our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to enable transfers for the balance account where the funds are returned from. * If the balance accounts involved in the internal funds transfer *do not belong to the same account holder*, check the [capabilities](/platforms/verification-overview/capabilities#capabilities) of the account holders: * The account holder of the balance account where the funds are returned from must have the **sendToBalanceAccount** capability. * The account holder of the balance account where the funds are returned to must have the **receiveFromBalanceAccount** capability. * Make sure that your [API credential](/platforms/manage-access/api-credentials-web-service/): * Has access to the [Transfers API](https://docs.adyen.com/api-explorer/transfers/latest/overview). * Has the **TransferService Webservice Initiate [role](/platforms/manage-access/webservice-roles/?tab=transfers_3)**. ## Initiate a return To return an internal push transfer: 1. Make a POST [/transfers/{transferId}/returns](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/\(transferId\)/returns) request, where `{transferId}` is the ID of the original incoming transfer that is returned in the webhooks. Specify the following request parameters: | Parameter | Required | Description | | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | | [amount](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/\(transferId\)/returns#request-amount) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Object containing the currency and value of the transfer. These must be the same as in the original transfer. | | [reference](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/\(transferId\)/returns#request-reference) | | Your unique reference for returning the transfer. | The following example shows how to return EUR 100 previously received through an internal transfer with the ID `123XYZABC456DEF7`. **Return an internal transfer** #### curl ```bash curl https://balanceplatform-api-test.adyen.com/btl/v4/transfers/123XYZABC456DEF7/returns \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "amount": { "currency": "EUR", "value": 10000 }, "reference": "YOUR_UNIQUE_REFERENCE_FOR_THE_RETURN" }' ``` #### Java ```java // Adyen Java API Library v33.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.transfers.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.transfers.*; Client client = new Client("ADYEN_BALANCE_PLATFORM_API_KEY", Environment.TEST); // Create the request object(s) Amount amount = new Amount() .currency("EUR") .value(10000L); ReturnTransferRequest returnTransferRequest = new ReturnTransferRequest() .reference("YOUR_UNIQUE_REFERENCE_FOR_THE_RETURN") .amount(amount); // Send the request TransfersApi service = new TransfersApi(client); ReturnTransferResponse response = service.returnTransfer("transferId", returnTransferRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_BALANCE_PLATFORM_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("EUR") ->setValue(10000); $returnTransferRequest = new ReturnTransferRequest(); $returnTransferRequest ->setReference("YOUR_UNIQUE_REFERENCE_FOR_THE_RETURN") ->setAmount($amount); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new TransfersApi($client); $response = $service->returnTransfer('transferId', $returnTransferRequest, $requestOptions); ``` #### C\# ```cs // Adyen .net API Library v28.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Transfers; using Adyen.Service.Transfers; var config = new Config() { XApiKey = "ADYEN_BALANCE_PLATFORM_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Amount amount = new Amount { Currency = "EUR", Value = 10000 }; ReturnTransferRequest returnTransferRequest = new ReturnTransferRequest { Reference = "YOUR_UNIQUE_REFERENCE_FOR_THE_RETURN", Amount = amount }; // Send the request var service = new TransfersService(client); var response = service.ReturnTransfer("transferId", returnTransferRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v23.3.0 const { Client, TransfersAPI } = require('@adyen/api-library'); const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" }); // Create the request object(s) const returnTransferRequest = { amount: { currency: "EUR", value: 10000 }, reference: "YOUR_UNIQUE_REFERENCE_FOR_THE_RETURN" } // Send the request const transfersAPI = new TransfersAPI(client); const response = transfersAPI.TransfersApi.returnTransfer("transferId", returnTransferRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v17.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v17/src/common" "github.com/adyen/adyen-go-api-library/v17/src/adyen" "github.com/adyen/adyen-go-api-library/v17/src/transfers" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := transfers.Amount{ Currency: "EUR", Value: 10000, } returnTransferRequest := transfers.ReturnTransferRequest{ Reference: common.PtrString("YOUR_UNIQUE_REFERENCE_FOR_THE_RETURN"), Amount: amount, } // Send the request service := client.Transfers() req := service.TransfersApi.ReturnTransferInput("transferId").IdempotencyKey("UUID").ReturnTransferRequest(returnTransferRequest) res, httpRes, err := service.TransfersApi.ReturnTransfer(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.3.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_BALANCE_PLATFORM_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "amount": { "currency": "EUR", "value": 10000 }, "reference": "YOUR_UNIQUE_REFERENCE_FOR_THE_RETURN" } # Send the request result = adyen.transfers.transfers_api.return_transfer(request=json_request, transferId="transferId", idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v10.1.1 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_BALANCE_PLATFORM_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :amount => { :currency => 'EUR', :value => 10000 }, :reference => 'YOUR_UNIQUE_REFERENCE_FOR_THE_RETURN' } # Send the request result = adyen.transfers.transfers_api.return_transfer(request_body, 'transferId', headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v23.3.0 import { Client, TransfersAPI, Types } from "@adyen/api-library"; const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" }); // Create the request object(s) const amount: Types.transfers.Amount = { currency: "EUR", value: 10000 }; const returnTransferRequest: Types.transfers.ReturnTransferRequest = { reference: "YOUR_UNIQUE_REFERENCE_FOR_THE_RETURN", amount: amount }; // Send the request const transfersAPI = new TransfersAPI(client); const response = transfersAPI.TransfersApi.returnTransfer("transferId", returnTransferRequest, { idempotencyKey: "UUID" }); ``` 2. In the response, note the following: * `id`: the ID of the return request. * `status`: **Authorised**. If **Declined**, this can indicate that you used the wrong transfer ID in the URL. * `transferId`: the ID of the original incoming transfer, which you specified in the URL of the return request. **Response** ```json { "id": "4LR2TG600M43TYM5", "reference": "YOUR_UNIQUE_REFERENCE_FOR_THE_RETURN", "status": "authorised", "transferId": "123XYZABC456DEF7" } ``` ## Get updates on the status of the return Track returns by using the [webhooks](/platforms/internal-fund-transfers/internal-transfer-webhooks) that Adyen sends to your server. The webhooks provide the status of the request and also inform you if the request failed. You can also [view the return in your Customer Area](/platforms/view-transfers-details).