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

# Initiate Session

Create a new EFT session and obtain a `sessionId` for launching the user payment flow.

To successfully call this endpoint, you must first call the [/Authorize](https://docs.flinks.com/api/pay/endpoints/authorize/authorize.md) endpoint to obtain a valid access token.

## Initiate an EFT Session

This endpoint creates a session on the **Regular EFT path** and returns a `sessionId` that your application uses to launch the hosted Flinks Pay flow: either by redirecting the user to the app URL or loading it in an iframe.

Set `type` to `EFT` and `options.guarantee.enable` to `false`. Funds settle to your client's configured bank account.

### Payee Account (Optional)

The `payee.account` object lets you specify which destination account should receive the funds:

* **When `payee.account` is provided**: funds are routed to the account you specify (`institutionCode`, `transitNumber`, `accountNumber`). Use this when you need per-session routing (for example, settling to different merchant accounts).
* **When `payee.account` is omitted**: Flinks falls back to the default client bank account configured during onboarding. If no default account is configured on your client, the request is rejected.

Flinks records the resolved destination account on the session so each transaction remains fully traceable.

### Authentication Requirements

* You must authenticate and obtain a valid `access_token` from the [/Authorize](https://docs.flinks.com/api/pay/endpoints/authorize/authorize.md) endpoint.
* Create the session while the token is still valid (599 seconds). If it expires, re-authenticate and call this endpoint again.
* Your client must have the **RegularEft** feature enabled. If it is not, the request returns `403 Forbidden`.

### User Identity Matching

`firstName` and `lastName` are used for identity matching against the payor's bank account. They must accurately reflect the person who owns the external account expected to make the payment.

**Critical**: If the provided name differs significantly from the name on the linked bank account, the session will return an error (`EFT0403`) and the transaction will not be processed.

### Reference ID Best Practices

While `referenceId` is not mandatory, it is **strongly recommended**:

* It should uniquely identify the end user or transaction in your system.
* It appears in responses and reconciliation files for easy matching.
* For EFT it flows through as the cross-reference number, so it must be **1 to 36 alphanumeric characters or hyphens**.

### Amount Handling

* **When `amount` is provided**: the value is pre-set and the user cannot modify it in the flow. It must fall within your client's configured minimum/maximum EFT amount.
* **When `amount` is omitted**: the user enters the amount during the hosted flow.

### Payor Address

`payor.address` is **optional** for regular EFT. If you include it, address line 1, city, province, postal code, and country are required.

### Launching the Payment Flow

Once you have a `sessionId`, launch the user flow by directing users to:

```text theme={null}
{{BaseUri}}/app/?sessionId={{sessionId}}
```

## Field Specifications

### Character Limits

| Field | Limit | Notes |
| - | - | - |
| `firstName`, `lastName` | 140 characters combined | Required for identity matching |
| `email` | 256 characters | Used for notifications |
| `referenceId` | 36 characters | Strongly recommended for tracking |
| `addressLine1` | 70 characters | Optional, Street address |
| `city` | 35 characters | Optional, Full city name |
| `postalCode` | 10 characters | Optional, e.g., M5V0T7, M5V 0T7, 90210, 90210-1234 |
| `province` | 2 characters | Optional, Provincial code (e.g., ON, QC) |
| `country` | 2 characters | Optional, Only "CA" supported |
| `accountNumber` | Between 7 and 12 digits | Optional, Numbers only |
| `transitNumber` | 5 digits | Optional, Numbers only |
| `institutionCode` | 3 digits | Optional, Numbers only |

### Supported Province Codes

AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT

## Related Endpoints

* [Get Session Details](https://docs.flinks.com/api/pay/endpoints/eft/v2/sessions-details.md): retrieve comprehensive session information
* [Cancel Session](https://docs.flinks.com/api/pay/endpoints/eft/v2/sessions-cancel.md): terminate an active session


## OpenAPI

````yaml openapi-pay-eft.yaml POST /api/v2/sessions
openapi: 3.0.1
info:
  title: Flinks EFT API V2
  description: Flinks Electronic Funds Transfer (EFT) API v2.
  version: v2
servers: []
security: []
paths:
  /api/v2/sessions:
    post:
      tags:
        - Sessions
      operationId: InitiateSession
      parameters:
        - name: x-client-id
          in: header
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiateSessionRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitiateSessionSetupResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    InitiateSessionRequest:
      type: object
      properties:
        referenceId:
          type: string
          nullable: true
        type:
          $ref: '#/components/schemas/PaymentType'
        direction:
          $ref: '#/components/schemas/PaymentDirection'
        currency:
          $ref: '#/components/schemas/PaymentCurrency'
        amount:
          type: number
          format: decimal
          nullable: true
        options:
          $ref: '#/components/schemas/SessionSetupOptionModel'
        payor:
          $ref: '#/components/schemas/PayorInfoRequest'
        payee:
          $ref: '#/components/schemas/PayeeInfoRequest'
      additionalProperties: false
    InitiateSessionSetupResponse:
      type: object
      properties:
        sessionId:
          type: string
          format: uuid
        referenceId:
          type: string
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    PaymentType:
      enum:
        - EFT
        - e-Transfer
      type: string
      default: EFT
    PaymentDirection:
      enum:
        - DEBIT
        - CREDIT
      type: string
      default: DEBIT
    PaymentCurrency:
      enum:
        - CAD
      type: string
    SessionSetupOptionModel:
      type: object
      properties:
        guarantee:
          $ref: '#/components/schemas/GuaranteeOptions'
        notificationPreferences:
          $ref: '#/components/schemas/NotificationPreferencesOptions'
        showConsentScreen:
          type: boolean
          nullable: true
        limits:
          $ref: '#/components/schemas/SessionLimitsModel'
        amountModification:
          type: boolean
        redirectPreferences:
          $ref: '#/components/schemas/RedirectPreferencesResponse'
      additionalProperties: false
    PayorInfoRequest:
      type: object
      properties:
        email:
          type: string
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        middleName:
          type: string
          nullable: true
        occupation:
          type: string
          nullable: true
        birthDate:
          type: string
          nullable: true
        account:
          $ref: '#/components/schemas/PayorAccountInfoRequest'
        address:
          $ref: '#/components/schemas/BaseAddressModel'
      additionalProperties: false
    PayeeInfoRequest:
      type: object
      properties:
        account:
          $ref: '#/components/schemas/PayeeAccountInfoRequest'
      additionalProperties: false
    GuaranteeOptions:
      type: object
      properties:
        enable:
          type: boolean
          default: false
      additionalProperties: false
    NotificationPreferencesOptions:
      type: object
      properties:
        language:
          $ref: '#/components/schemas/Language'
      additionalProperties: false
    SessionLimitsModel:
      type: object
      properties:
        minimumAmount:
          type: number
          format: decimal
          nullable: true
        maximumAmount:
          type: number
          format: decimal
          nullable: true
      additionalProperties: false
    RedirectPreferencesResponse:
      type: object
      properties:
        mode:
          $ref: '#/components/schemas/RedirectPreferencesMode'
        urlSuccess:
          type: string
          format: uri
          nullable: true
        urlExit:
          type: string
          format: uri
          nullable: true
      additionalProperties: false
    PayorAccountInfoRequest:
      type: object
      properties:
        accountId:
          type: string
          format: uuid
          nullable: true
        institutionCode:
          type: string
          nullable: true
        transitNumber:
          type: string
          nullable: true
        accountNumber:
          type: string
          nullable: true
        accountLabel:
          type: string
          nullable: true
      additionalProperties: false
    BaseAddressModel:
      type: object
      properties:
        addressLine1:
          type: string
          nullable: true
        addressLine2:
          type: string
          nullable: true
        unit:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        province:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        postalCode:
          type: string
          nullable: true
      additionalProperties: false
    PayeeAccountInfoRequest:
      type: object
      properties:
        institutionCode:
          type: string
          nullable: true
        transitNumber:
          type: string
          nullable: true
        accountNumber:
          type: string
          nullable: true
        accountLabel:
          type: string
          nullable: true
      additionalProperties: false
    Language:
      enum:
        - EN
        - FR
      type: string
    RedirectPreferencesMode:
      enum:
        - JsEvents
        - RedirectUri
      type: string

````