Step 5: Fund the Transfer
Learn to transfer funds using Wise Payouts API.
In this lesson, we’ll learn how to transfer funds and use simulation endpoints.
Transfer funds
Press + to interact
This is the final step of the payouts process. After executing this call, our account will be debited with the amount we transferred, and the status of the receiver’s account will also change. The following endpoint is used to make this happen:
{baseURL}/v3/profiles/{profileID}/transfers/{transferID}/payments
Request parameters
The code below takes only one parameter:
Parameter Name | Format | Category | Description |
| String | Required | Shows that multicurrency account will be debited by this transfer. Its value is |
Press + to interact
API_KEY
Not Specified...
PROFILE_ID
Not Specified...
TRANSFER_ID
Not Specified...
// Importing libraries hereconst fetch = require('node-fetch');// Define API key hereconst API_KEY = 'Bearer {{API_KEY}}';// Define endpoint URL hereconst endpointUrl = 'https://api.sandbox.transferwise.tech/v3/profiles/{{PROFILE_ID}}/transfers/{{TRANSFER_ID}}/payments';// Define Header Parameters hereconst headerParameters = {authorization: API_KEY,'Content-Type': 'application/json',};// Define Body Parameters hereconst bodyParameters = "{ \n \"type\":\"BALANCE\"\n}";// Setting API call optionsconst options = {method: 'POST',headers: headerParameters,body: bodyParameters,};// Function to make API callasync function transferFund() {try {const response = await fetch(endpointUrl, options);// Printing responseprintResponse(response);} catch (error) {// Printing error messageprintError(response);}}// Calling function to make API calltransferFund();
Let’s have a look at the highlighted lines in the code shown above:
- Line 8: We define the URL for