Fund Wallet
curl --request PUT \
--url https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount} \
--header 'X-Auth-Token: <x-auth-token>' \
--header 'platform: <platform>' \
--header 'uuid: <uuid>' \
--header 'x-idempotency-key: <x-idempotency-key>'import requests
url = "https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}"
headers = {
"platform": "<platform>",
"uuid": "<uuid>",
"X-Auth-Token": "<x-auth-token>",
"x-idempotency-key": "<x-idempotency-key>"
}
response = requests.put(url, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
platform: '<platform>',
uuid: '<uuid>',
'X-Auth-Token': '<x-auth-token>',
'x-idempotency-key': '<x-idempotency-key>'
}
};
fetch('https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"X-Auth-Token: <x-auth-token>",
"platform: <platform>",
"uuid: <uuid>",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("platform", "<platform>")
req.Header.Add("uuid", "<uuid>")
req.Header.Add("X-Auth-Token", "<x-auth-token>")
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}")
.header("platform", "<platform>")
.header("uuid", "<uuid>")
.header("X-Auth-Token", "<x-auth-token>")
.header("x-idempotency-key", "<x-idempotency-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["platform"] = '<platform>'
request["uuid"] = '<uuid>'
request["X-Auth-Token"] = '<x-auth-token>'
request["x-idempotency-key"] = '<x-idempotency-key>'
response = http.request(request)
puts response.read_bodyAPI Endpoints
Fund Wallet
Adds funds to a user wallet account.
PUT
/
wallet
/
fund-wallet
/
{wallet-id}
/
{amount}
Fund Wallet
curl --request PUT \
--url https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount} \
--header 'X-Auth-Token: <x-auth-token>' \
--header 'platform: <platform>' \
--header 'uuid: <uuid>' \
--header 'x-idempotency-key: <x-idempotency-key>'import requests
url = "https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}"
headers = {
"platform": "<platform>",
"uuid": "<uuid>",
"X-Auth-Token": "<x-auth-token>",
"x-idempotency-key": "<x-idempotency-key>"
}
response = requests.put(url, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
platform: '<platform>',
uuid: '<uuid>',
'X-Auth-Token': '<x-auth-token>',
'x-idempotency-key': '<x-idempotency-key>'
}
};
fetch('https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"X-Auth-Token: <x-auth-token>",
"platform: <platform>",
"uuid: <uuid>",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("platform", "<platform>")
req.Header.Add("uuid", "<uuid>")
req.Header.Add("X-Auth-Token", "<x-auth-token>")
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}")
.header("platform", "<platform>")
.header("uuid", "<uuid>")
.header("X-Auth-Token", "<x-auth-token>")
.header("x-idempotency-key", "<x-idempotency-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/{wallet-id}/{amount}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["platform"] = '<platform>'
request["uuid"] = '<uuid>'
request["X-Auth-Token"] = '<x-auth-token>'
request["x-idempotency-key"] = '<x-idempotency-key>'
response = http.request(request)
puts response.read_bodyAdds a specified amount to a user’s wallet account. This is used to fund the wallet before making investments.
Request Headers
The JWT Access Token obtained from the
/login or /refresh-token endpoint.Unique idempotency key for the request to prevent duplicate processing.
The date and time at which the request was initiated (ISO 8601 format).
The IP address of the customer making the request.
Unique identifier for the interaction/session.
Path Parameters
The unique identifier (UUID) of the wallet to fund.
The amount to add to the wallet.
Code Examples
curl --location --request PUT 'https://test-investment-products-service.fincode.software/api/v1/user/wallet/fund-wallet/123e4567-e89b-12d3-a456-426614174000/50000' \
--header 'X-Auth-Token: YOUR_JWT_ACCESS_TOKEN' \
--header 'x-idempotency-key: unique-key-12345' \
--header 'x-fapi-auth-date: 2024-01-15T10:30:00Z' \
--header 'x-fapi-customer-ip-address: 192.168.1.1' \
--header 'x-fapi-interaction-id: interaction-12345'
const axios = require('axios');
const BASE_URL = 'https://test-investment-products-service.fincode.software/api/v1/user/wallet';
async function fundWallet(accessToken, walletId, amount) {
try {
const response = await axios.put(
`${BASE_URL}/fund-wallet/${walletId}/${amount}`,
{},
{
headers: {
'X-Auth-Token': accessToken,
'x-idempotency-key': `key-${Date.now()}`,
'x-fapi-auth-date': new Date().toISOString(),
'x-fapi-customer-ip-address': '192.168.1.1',
'x-fapi-interaction-id': `interaction-${Date.now()}`,
},
}
);
if (response.data.data) {
console.log(`Wallet ${walletId} funded successfully with ${amount}`);
} else {
console.log('Wallet funding failed');
}
return response.data.data;
} catch (error) {
console.error(
'Failed to fund wallet:',
error.response?.data || error.message
);
throw error;
}
}
⌘I
