> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Start Bank Transfer

> Create (or refresh) a bank transfer payment session for a booking or wizard.

## Method

`POST` `/v1/payments/bank/init`

## Body Parameters

<ParamField name="bookingId" type="uuid">Booking ID (required if `wizardSessionId` is absent).</ParamField>
<ParamField name="wizardSessionId" type="uuid">Wizard session ID (required if `bookingId` is absent).</ParamField>
<ParamField name="amount" type="number" required>Total amount due.</ParamField>
<ParamField name="currency" type="string" required>ISO 4217 currency (e.g. `EUR`).</ParamField>
<ParamField name="paymentId" type="string" required>Caller-assigned payment identifier (idempotency key).</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token (workspace API key).</ParamField>
<ParamField header="content-type" type="string">`application/json`</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.voyantcloud.com/v1/payments/bank/init \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "bookingId": "4a9a807e-5c7c-4f57-8e6d-2c6f1b1c5d10",
      "amount": 1250,
      "currency": "EUR",
      "paymentId": "pm_20250301_001"
    }'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://api.voyantcloud.com/v1/payments/bank/init", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({
      wizardSessionId: "b1f7f7a0-220c-4f89-9d6d-0c0ae943a99d",
      amount: 980,
      currency: "EUR",
      paymentId: "pm_wizard_123",
    }),
  })
  const session = await res.json()
  ```

  ```python Python theme={null}
  import os, requests

  payload = {
    "bookingId": "4a9a807e-5c7c-4f57-8e6d-2c6f1b1c5d10",
    "amount": 1250,
    "currency": "EUR",
    "paymentId": "pm_20250301_001",
  }

  resp = requests.post(
    "https://api.voyantcloud.com/v1/payments/bank/init",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
      "content-type": "application/json",
    },
    json=payload,
  )
  session = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "ok": true,
    "paymentSessionId": "psn_01J0NRC94RFPR0A8BXQJ2Q3V9S",
    "dueAt": "2025-03-06T10:25:14.000Z",
    "instructions": {
      "iban": "RO49AAAA1B31007593840000",
      "beneficiary": "Voyant Travel SRL",
      "reference": "BOOK-4a9a807e-5c7c-4f57-8e6d-2c6f1b1c5d10",
      "note": "Please include reference in transfer details"
    }
  }
  ```

  ```json 400 Bad Request theme={null}
  { "error": "Provide bookingId or wizardSessionId", "requestId": "req_123" }
  ```
</ResponseExample>

<Tip>The endpoint is idempotent per `paymentId`. Repeated calls update the existing session, refresh the due date (default +5 days), and push the latest pricing metadata.</Tip>
