---
title: "Initiate Pay by Bank"
method: POST
path: "/v2/moneyins/paybybank/transfer/init"
tags: ["MoneyIns | Pay by Bank"]
---

# Initiate Pay by Bank

`POST /v2/moneyins/paybybank/transfer/init`

## Request

- Base URL: `https://ws.lemonway.fr/mb/env-name/prod/directkitrest`
- URL: `https://ws.lemonway.fr/mb/env-name/prod/directkitrest/v2/moneyins/paybybank/transfer/init`
- Auth: none declared. Required headers: `Authorization`, `PSU-IP-Address`

<b>How does it work?</b>
<br />
<p></p>
            1. Call POST v2/moneyins/paybybank/transfer/init, to receive a redirect URL and the transaction Id. <br /><p></p>
            2. Redirect the end-user to your bank selection page, were they can select their bank from the displayed list. <br /><p></p><b>Note:</b> If you specify the bankId in the request body, the end-user will be directed to their bank. <br />
            For further information on how to obtain bankIds, see: /v2/moneyins/ paybybank/transfer/banks 
            3. Once the end-user selects their bank they are redirected to the bank webpage to enter their credentials.
            <p></p><b>Note:</b> If you have previously specified the bankId the end-user only needs to enter their bank credentials at this stage. <br /><p></p>
            4. After successfully entering their credentials, the end-user will go through Strong Customer Authentication (SCA) to confirm their identity (SCA examples include: face recognition or mobile Bank App software). Some bank ask to SCA before entering credentials.<br /><p></p>
            5. Once successfully authenticated the end-user only needs to verify and validate the amount, comments and so forth on the bank website.
            <p></p>
            6. After submitting the payment, the end-user will be redirected to:
             <ul><li>returnUrl in case of success</li><li>cancelUrl in case of cancellation</li><li>errorUrl in case of error.</li></ul>
            These 3 URLs must be publicly accessible for the end-user. It must also be accessible to our WebKit server to send requests to the end-user.

## Headers

- `Authorization` string, required
- `PSU-Accept-Language` string
- `PSU-IP-Address` string, required
- `PSU-User-Agent` string

## Request body

- MoneyInTransferInitInput
  - `returnUrl` string, required: returnUrl in case of success
  - `cancelUrl` string, required: cancelUrl in case of cancellation
  - `errorUrl` string, required: errorUrl in case of error
  - `countryCode` string, required: The country code associated with the payment bank. ISO Alpha-2 codes accepted: (FR) France, (ES) Spain, (IT) Italy, (DE) Germany, and (PT) Portugal
  - `bankId` string: If you use the bankId in the call, the end-user will be redirected to their bank. They will not have to select a bank from a list provided. To get a comprehensive list of `bankIds` call the `GET v2/moneyins/paybybank/transfer/banks` specifying the ISO Alpha-2 Country Code for example FR for France.
  - `transferType` 0 | 1 | 2: The 'TransferType' can be set to: - Instant: Faster SEPA instant transfer.Funds are credited within 15 minutes if supported by the payer's bank. - Classic: Standard SEPA credit transfer. Funds are credited in 2–3 business days. If not provided, the default value is 'Classic'.<br/>0 = Undefined.<br/>1 = Instant.<br/>2 = Classic.<br/>
  - `reference` string: Unique ID of the call, generated by your server. This ID can be used as a search field when looking for operation details
  - `accountId` string, required: Payment Account ID to Credit
  - `totalAmount` integer: Amount to Debit Amounts are given as integer numbers in cents
  - `commissionAmount` integer: Your Fee Amounts are given as integer numbers in cents
  - `comment` string: Comment Regarding the Transaction
  - `autoCommission` boolean: If true: 1. [amountCom] will be ignored and will be replaced with Lemonway's fee 2. You will not receive any fee

## Response `200`

OK

- MoneyInTransferInitOutput
  - `redirectUrl` string
  - `id` integer
  - `error` Error
    - `code` integer
    - `message` string
    - `psp` PSP
      - `message` string: Get the Error Message from PSP

## Other responses

- `401`: Unauthorized
- `500`: InternalServerError

---

[API](https://skmtc.dev/lemonway/apis/lemonway-directkit-api-2-0.md) - [All operations](https://skmtc.dev/lemonway/apis/lemonway-directkit-api-2-0/llms.txt) - [OpenAPI document](https://skmtc.dev/lemonway/apis/lemonway-directkit-api-2-0/revisions/82551a0a77b8?raw)
