Prepare financial operation
curl --request POST \
--url https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare \
--header 'Content-Type: application/json' \
--data '
{
"type": "INTERNAL",
"target": {
"name": "John Customer",
"iban": "LT213320011000055860"
},
"currency": "EUR",
"beneficiaryName": "John Customer",
"amount": {
"value": "100000",
"scale": 2,
"currency": "EUR"
},
"beneficiaryId": "eba40e17-e539-430e-a6cc-2b0f01e4c86e",
"sourceAccount": {
"walletId": "d7d94804-4d8b-45af-862f-77cbcef740f4"
},
"companyName": "John Customer",
"description": "Internal funding transfer to customer wallet",
"consent": {
"consentReference": "f3822ff0-3986-4fef-84eb-7b517e657b6f"
}
}
'import requests
url = "https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare"
payload = {
"type": "INTERNAL",
"target": {
"name": "John Customer",
"iban": "LT213320011000055860"
},
"currency": "EUR",
"beneficiaryName": "John Customer",
"amount": {
"value": "100000",
"scale": 2,
"currency": "EUR"
},
"beneficiaryId": "eba40e17-e539-430e-a6cc-2b0f01e4c86e",
"sourceAccount": { "walletId": "d7d94804-4d8b-45af-862f-77cbcef740f4" },
"companyName": "John Customer",
"description": "Internal funding transfer to customer wallet",
"consent": { "consentReference": "f3822ff0-3986-4fef-84eb-7b517e657b6f" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'INTERNAL',
target: {name: 'John Customer', iban: 'LT213320011000055860'},
currency: 'EUR',
beneficiaryName: 'John Customer',
amount: {value: '100000', scale: 2, currency: 'EUR'},
beneficiaryId: 'eba40e17-e539-430e-a6cc-2b0f01e4c86e',
sourceAccount: {walletId: 'd7d94804-4d8b-45af-862f-77cbcef740f4'},
companyName: 'John Customer',
description: 'Internal funding transfer to customer wallet',
consent: {consentReference: 'f3822ff0-3986-4fef-84eb-7b517e657b6f'}
})
};
fetch('https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare', 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://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'INTERNAL',
'target' => [
'name' => 'John Customer',
'iban' => 'LT213320011000055860'
],
'currency' => 'EUR',
'beneficiaryName' => 'John Customer',
'amount' => [
'value' => '100000',
'scale' => 2,
'currency' => 'EUR'
],
'beneficiaryId' => 'eba40e17-e539-430e-a6cc-2b0f01e4c86e',
'sourceAccount' => [
'walletId' => 'd7d94804-4d8b-45af-862f-77cbcef740f4'
],
'companyName' => 'John Customer',
'description' => 'Internal funding transfer to customer wallet',
'consent' => [
'consentReference' => 'f3822ff0-3986-4fef-84eb-7b517e657b6f'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare"
payload := strings.NewReader("{\n \"type\": \"INTERNAL\",\n \"target\": {\n \"name\": \"John Customer\",\n \"iban\": \"LT213320011000055860\"\n },\n \"currency\": \"EUR\",\n \"beneficiaryName\": \"John Customer\",\n \"amount\": {\n \"value\": \"100000\",\n \"scale\": 2,\n \"currency\": \"EUR\"\n },\n \"beneficiaryId\": \"eba40e17-e539-430e-a6cc-2b0f01e4c86e\",\n \"sourceAccount\": {\n \"walletId\": \"d7d94804-4d8b-45af-862f-77cbcef740f4\"\n },\n \"companyName\": \"John Customer\",\n \"description\": \"Internal funding transfer to customer wallet\",\n \"consent\": {\n \"consentReference\": \"f3822ff0-3986-4fef-84eb-7b517e657b6f\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"INTERNAL\",\n \"target\": {\n \"name\": \"John Customer\",\n \"iban\": \"LT213320011000055860\"\n },\n \"currency\": \"EUR\",\n \"beneficiaryName\": \"John Customer\",\n \"amount\": {\n \"value\": \"100000\",\n \"scale\": 2,\n \"currency\": \"EUR\"\n },\n \"beneficiaryId\": \"eba40e17-e539-430e-a6cc-2b0f01e4c86e\",\n \"sourceAccount\": {\n \"walletId\": \"d7d94804-4d8b-45af-862f-77cbcef740f4\"\n },\n \"companyName\": \"John Customer\",\n \"description\": \"Internal funding transfer to customer wallet\",\n \"consent\": {\n \"consentReference\": \"f3822ff0-3986-4fef-84eb-7b517e657b6f\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"INTERNAL\",\n \"target\": {\n \"name\": \"John Customer\",\n \"iban\": \"LT213320011000055860\"\n },\n \"currency\": \"EUR\",\n \"beneficiaryName\": \"John Customer\",\n \"amount\": {\n \"value\": \"100000\",\n \"scale\": 2,\n \"currency\": \"EUR\"\n },\n \"beneficiaryId\": \"eba40e17-e539-430e-a6cc-2b0f01e4c86e\",\n \"sourceAccount\": {\n \"walletId\": \"d7d94804-4d8b-45af-862f-77cbcef740f4\"\n },\n \"companyName\": \"John Customer\",\n \"description\": \"Internal funding transfer to customer wallet\",\n \"consent\": {\n \"consentReference\": \"f3822ff0-3986-4fef-84eb-7b517e657b6f\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 201,
"data": {
"preparedOrderId": "8c5a8cc5-56f8-4d63-ae50-4de57f4f9c8b",
"sessionId": "<string>",
"status": "<string>",
"balanceCheck": "<unknown>",
"consent": "<unknown>",
"documents": "<unknown>",
"fees": "<unknown>",
"regulatoryInfo": "<unknown>",
"statusDetails": "<unknown>",
"summary": "<unknown>",
"transactions": [
"<unknown>"
],
"tenantId": "<string>",
"time": "<string>",
"validUntil": "<string>"
},
"message": "Success"
}Financial Operations
Prepare financial operation
Prepare a financial operation before execution. Returns a preparedOrderId used by the execute endpoint.
POST
/
api
/
v2.1
/
fintrans
/
{accountId}
/
types
/
{operationType}
/
prepare
Prepare financial operation
curl --request POST \
--url https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare \
--header 'Content-Type: application/json' \
--data '
{
"type": "INTERNAL",
"target": {
"name": "John Customer",
"iban": "LT213320011000055860"
},
"currency": "EUR",
"beneficiaryName": "John Customer",
"amount": {
"value": "100000",
"scale": 2,
"currency": "EUR"
},
"beneficiaryId": "eba40e17-e539-430e-a6cc-2b0f01e4c86e",
"sourceAccount": {
"walletId": "d7d94804-4d8b-45af-862f-77cbcef740f4"
},
"companyName": "John Customer",
"description": "Internal funding transfer to customer wallet",
"consent": {
"consentReference": "f3822ff0-3986-4fef-84eb-7b517e657b6f"
}
}
'import requests
url = "https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare"
payload = {
"type": "INTERNAL",
"target": {
"name": "John Customer",
"iban": "LT213320011000055860"
},
"currency": "EUR",
"beneficiaryName": "John Customer",
"amount": {
"value": "100000",
"scale": 2,
"currency": "EUR"
},
"beneficiaryId": "eba40e17-e539-430e-a6cc-2b0f01e4c86e",
"sourceAccount": { "walletId": "d7d94804-4d8b-45af-862f-77cbcef740f4" },
"companyName": "John Customer",
"description": "Internal funding transfer to customer wallet",
"consent": { "consentReference": "f3822ff0-3986-4fef-84eb-7b517e657b6f" }
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'INTERNAL',
target: {name: 'John Customer', iban: 'LT213320011000055860'},
currency: 'EUR',
beneficiaryName: 'John Customer',
amount: {value: '100000', scale: 2, currency: 'EUR'},
beneficiaryId: 'eba40e17-e539-430e-a6cc-2b0f01e4c86e',
sourceAccount: {walletId: 'd7d94804-4d8b-45af-862f-77cbcef740f4'},
companyName: 'John Customer',
description: 'Internal funding transfer to customer wallet',
consent: {consentReference: 'f3822ff0-3986-4fef-84eb-7b517e657b6f'}
})
};
fetch('https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare', 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://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'INTERNAL',
'target' => [
'name' => 'John Customer',
'iban' => 'LT213320011000055860'
],
'currency' => 'EUR',
'beneficiaryName' => 'John Customer',
'amount' => [
'value' => '100000',
'scale' => 2,
'currency' => 'EUR'
],
'beneficiaryId' => 'eba40e17-e539-430e-a6cc-2b0f01e4c86e',
'sourceAccount' => [
'walletId' => 'd7d94804-4d8b-45af-862f-77cbcef740f4'
],
'companyName' => 'John Customer',
'description' => 'Internal funding transfer to customer wallet',
'consent' => [
'consentReference' => 'f3822ff0-3986-4fef-84eb-7b517e657b6f'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare"
payload := strings.NewReader("{\n \"type\": \"INTERNAL\",\n \"target\": {\n \"name\": \"John Customer\",\n \"iban\": \"LT213320011000055860\"\n },\n \"currency\": \"EUR\",\n \"beneficiaryName\": \"John Customer\",\n \"amount\": {\n \"value\": \"100000\",\n \"scale\": 2,\n \"currency\": \"EUR\"\n },\n \"beneficiaryId\": \"eba40e17-e539-430e-a6cc-2b0f01e4c86e\",\n \"sourceAccount\": {\n \"walletId\": \"d7d94804-4d8b-45af-862f-77cbcef740f4\"\n },\n \"companyName\": \"John Customer\",\n \"description\": \"Internal funding transfer to customer wallet\",\n \"consent\": {\n \"consentReference\": \"f3822ff0-3986-4fef-84eb-7b517e657b6f\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"INTERNAL\",\n \"target\": {\n \"name\": \"John Customer\",\n \"iban\": \"LT213320011000055860\"\n },\n \"currency\": \"EUR\",\n \"beneficiaryName\": \"John Customer\",\n \"amount\": {\n \"value\": \"100000\",\n \"scale\": 2,\n \"currency\": \"EUR\"\n },\n \"beneficiaryId\": \"eba40e17-e539-430e-a6cc-2b0f01e4c86e\",\n \"sourceAccount\": {\n \"walletId\": \"d7d94804-4d8b-45af-862f-77cbcef740f4\"\n },\n \"companyName\": \"John Customer\",\n \"description\": \"Internal funding transfer to customer wallet\",\n \"consent\": {\n \"consentReference\": \"f3822ff0-3986-4fef-84eb-7b517e657b6f\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"INTERNAL\",\n \"target\": {\n \"name\": \"John Customer\",\n \"iban\": \"LT213320011000055860\"\n },\n \"currency\": \"EUR\",\n \"beneficiaryName\": \"John Customer\",\n \"amount\": {\n \"value\": \"100000\",\n \"scale\": 2,\n \"currency\": \"EUR\"\n },\n \"beneficiaryId\": \"eba40e17-e539-430e-a6cc-2b0f01e4c86e\",\n \"sourceAccount\": {\n \"walletId\": \"d7d94804-4d8b-45af-862f-77cbcef740f4\"\n },\n \"companyName\": \"John Customer\",\n \"description\": \"Internal funding transfer to customer wallet\",\n \"consent\": {\n \"consentReference\": \"f3822ff0-3986-4fef-84eb-7b517e657b6f\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 201,
"data": {
"preparedOrderId": "8c5a8cc5-56f8-4d63-ae50-4de57f4f9c8b",
"sessionId": "<string>",
"status": "<string>",
"balanceCheck": "<unknown>",
"consent": "<unknown>",
"documents": "<unknown>",
"fees": "<unknown>",
"regulatoryInfo": "<unknown>",
"statusDetails": "<unknown>",
"summary": "<unknown>",
"transactions": [
"<unknown>"
],
"tenantId": "<string>",
"time": "<string>",
"validUntil": "<string>"
},
"message": "Success"
}Endpoint
POST /api/v2.1/fintrans/{accountId}/types/{operationType}/prepare
This endpoint requires
X-Forwarded-From and a device header. The backend accepts any of:
deviceId, X-Device-Id, device-id.Sample cURL
curl --request POST \
--url 'https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'X-Tenant-Id: <TENANT_ID>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'User-Agent: <USER_AGENT>' \
--header 'X-Forwarded-From: <FORWARDED_FROM>' \
--header 'platform: Web' \
--header 'deviceId: <DEVICE_ID>' \
--data '{
"type": "INTERNAL",
"target": {
"name": "John Customer",
"iban": "LT213320011000055860"
},
"currency": "EUR",
"beneficiaryName": "John Customer",
"amount": {
"value": "100000",
"scale": 2,
"currency": "EUR"
},
"beneficiaryId": "eba40e17-e539-430e-a6cc-2b0f01e4c86e",
"sourceAccount": {
"walletId": "d7d94804-4d8b-45af-862f-77cbcef740f4"
},
"companyName": "John Customer",
"description": "Internal funding transfer to customer wallet",
"consent": {
"consentReference": "f3822ff0-3986-4fef-84eb-7b517e657b6f"
}
}'
Response Example
{
"code": 200,
"data": {
"preparedOrderId": "621d1386-f2fb-4655-88a8-997db0ec446a",
"status": "READY"
},
"message": "Success"
}
Use the returned
preparedOrderId as input to the execute endpoint.Missing Headers Error Example
{
"code": 500,
"data": {
"deviceId_accepted": [
"deviceId",
"X-Device-Id",
"device-id"
],
"missingHeaders": [
"X-Forwarded-From",
"deviceId"
]
},
"message": "Missing required header(s)"
}
Headers
Example:
"tenant-demo-001"
Client IP address
Example:
"127.0.0.1"
Client source identifier
Example:
"client-app"
Client platform
Example:
"mobile"
Device identifier
Example:
"device-demo-001"
Bearer JWT
Example:
"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkZW1vLXVzZXIifQ.demo-signature"
Path Parameters
Example:
"00000000-0000-0000-0000-000000000000"
Operation kind (see prepare/execute and FinTransApiService.deriveAllowedOperationTypes)
Available options:
transfer Example:
"transfer"
Body
application/json
Prepare operation payload
Example:
"INTERNAL"
Show child attributes
Show child attributes
Example:
"EUR"
Example:
"John Customer"
Show child attributes
Show child attributes
Example:
"eba40e17-e539-430e-a6cc-2b0f01e4c86e"
Show child attributes
Show child attributes
Example:
"John Customer"
Example:
"Internal funding transfer to customer wallet"
Show child attributes
Show child attributes
⌘I