URL: /baas/api/reference/financial-operations/prepare-financial-operation
---
title: 'Prepare financial operation'
description: 'Prepare a financial operation before execution. Returns a preparedOrderId used by the execute endpoint.'
---
## 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
```bash
curl --request POST \
--url 'https://sandbox.finhub.cloud/api/v2.1/fintrans/{accountId}/types/{operationType}/prepare' \
--header 'Authorization: Bearer ' \
--header 'X-Tenant-Id: ' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'User-Agent: ' \
--header 'X-Forwarded-From: ' \
--header 'platform: Web' \
--header 'deviceId: ' \
--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
```json
{
"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
```json
{
"code": 500,
"data": {
"deviceId_accepted": [
"deviceId",
"X-Device-Id",
"device-id"
],
"missingHeaders": [
"X-Forwarded-From",
"deviceId"
]
},
"message": "Missing required header(s)"
}
```