Skip to main content
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

X-Tenant-ID
string
Example:

"tenant-demo-001"

X-User-ID
string
X-Forwarded-For
string

Client IP address

Example:

"127.0.0.1"

X-Forwarded-From
string

Client source identifier

Example:

"client-app"

platform
string

Client platform

Example:

"mobile"

deviceId
string

Device identifier

Example:

"device-demo-001"

Authorization
string

Bearer JWT

Example:

"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkZW1vLXVzZXIifQ.demo-signature"

Path Parameters

accountId
string<uuid>
required
Example:

"00000000-0000-0000-0000-000000000000"

operationType
enum<string>
required

Operation kind (see prepare/execute and FinTransApiService.deriveAllowedOperationTypes)

Available options:
transfer
Example:

"transfer"

Body

application/json

Prepare operation payload

type
string
required
Example:

"INTERNAL"

target
object
required
currency
string
required
Example:

"EUR"

beneficiaryName
string
required
Example:

"John Customer"

amount
object
required
beneficiaryId
string
required
Example:

"eba40e17-e539-430e-a6cc-2b0f01e4c86e"

sourceAccount
object
required
companyName
string
required
Example:

"John Customer"

description
string
required
Example:

"Internal funding transfer to customer wallet"

Response

Operation prepared

Standard API response wrapper with prepared order in data

code
integer<int32>

HTTP-style status code

Example:

201

data
object

Prepared order

message
string

Result message

Example:

"Success"