---
updatedAt: 2026-08-19T16:31:14.000Z
agentTools:
  projectIndex: https://documentation.lemonway.com/llms.txt
---

# Initiate Pay by Bank

<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.

## How does it work?

1. Call `POST /v2/moneyins/paybybank/transfer/init` to receive:

   * A redirect URL
   * The transaction ID

2. Redirect the end user to the bank-selection page, where they can select their bank from the displayed list.

   > **Note:** If you include the `bankId` in the request body, the end user is redirected directly to their bank.

   To retrieve the available bank IDs, call:

   `GET /v2/moneyins/paybybank/transfer/banks`

3. After selecting their bank, the end user is redirected to the bank's website or application to enter their credentials.

   > **Note:** If the `bankId` was included in the initial request, the end user does not need to select their bank and can proceed directly to authentication.

4. The end user completes Strong Customer Authentication (SCA) to confirm their identity.

   Authentication methods may include:

   * Facial recognition
   * Fingerprint recognition
   * Confirmation through the bank's mobile application
   * A one-time password

   Depending on the bank, SCA may be requested before or after the end user enters their credentials.

5. Once authenticated, the end user reviews and confirms the payment details, including the amount and payment reference, on the bank's website or application.

6. After the payment is submitted, the end user is redirected to one of the following URLs:

   * `returnUrl` if the payment is successfully submitted
   * `cancelUrl` if the end user cancels the payment
   * `errorUrl` if an error occurs

> **Important:** The `returnUrl`, `cancelUrl`, and `errorUrl` must be publicly accessible to both the end user's browser and Lemonway's WebKit servers.

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "v2",
    "title": "Lemonway DirectKit API 2.0"
  },
  "paths": {
    "/v2/moneyins/paybybank/transfer/init": {
      "post": {
        "tags": [
          "MoneyIns | Pay by Bank"
        ],
        "summary": "Initiate Pay by Bank",
        "description": "<b>How does it work?</b>\r\n<br />\r\n<p></p>\r\n            1. Call POST v2/moneyins/paybybank/transfer/init, to receive a redirect URL and the transaction Id. <br /><p></p>\r\n            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 />\r\n            For further information on how to obtain bankIds, see: /v2/moneyins/ paybybank/transfer/banks \r\n            3. Once the end-user selects their bank they are redirected to the bank webpage to enter their credentials.\r\n            <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>\r\n            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>\r\n            5. Once successfully authenticated the end-user only needs to verify and validate the amount, comments and so forth on the bank website.\r\n            <p></p>\r\n            6. After submitting the payment, the end-user will be redirected to:\r\n             <ul><li>returnUrl in case of success</li><li>cancelUrl in case of cancellation</li><li>errorUrl in case of error.</li></ul>\r\n            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.",
        "operationId": "MoneyIns_MoneyInTransferInit",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Authorization bearer (OAuth 2)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PSU-Accept-Language",
            "in": "header",
            "description": "Response language accepted by final client (PSU). English by default",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PSU-IP-Address",
            "in": "header",
            "description": "IP address of the final client (PSU).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PSU-User-Agent",
            "in": "header",
            "description": "User-agent of the final client (PSU).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoneyInTransferInitInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MoneyInTransferInitOutput"
                },
                "examples": {
                  "response": {
                    "value": {
                      "redirectUrl": "https://lemonway.com/citron/prod/?moneyintoken=0b69cab7c3cc4ac9aff3",
                      "id": 123
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "InternalServerError"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://ws.lemonway.fr/mb/env-name/prod/directkitrest/"
    }
  ],
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "format": "int32",
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "psp": {
            "$ref": "#/components/schemas/PSP"
          }
        }
      },
      "PSP": {
        "type": "object",
        "properties": {
          "message": {
            "description": "Get the Error Message from PSP",
            "type": "string"
          }
        }
      },
      "MoneyInTransferInitInput": {
        "required": [
          "returnUrl",
          "cancelUrl",
          "errorUrl",
          "countryCode",
          "accountId"
        ],
        "type": "object",
        "properties": {
          "returnUrl": {
            "description": "returnUrl in case of success",
            "type": "string"
          },
          "cancelUrl": {
            "description": "cancelUrl in case of cancellation",
            "type": "string"
          },
          "errorUrl": {
            "description": "errorUrl in case of error",
            "type": "string"
          },
          "countryCode": {
            "description": "The country code associated with the payment bank. ISO Alpha-2 codes accepted: (FR) France, (ES) Spain, (IT) Italy, (DE) Germany, and (PT) Portugal",
            "type": "string"
          },
          "bankId": {
            "description": "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.",
            "type": "string"
          },
          "transferType": {
            "format": "int32",
            "description": "The 'TransferType' can be set to:\r\n- Instant: Faster SEPA instant transfer.Funds are credited within 15 minutes if supported by the payer's bank.\r\n- Classic: Standard SEPA credit transfer. Funds are credited in 2–3 business days.\r\n            \r\nIf not provided, the default value is 'Classic'.<br/>0 = Undefined.<br/>1 = Instant.<br/>2 = Classic.<br/>",
            "enum": [
              0,
              1,
              2
            ],
            "type": "integer"
          },
          "reference": {
            "description": "Unique ID of the call, generated by your server. This ID can be used as a search field when looking for operation details",
            "maxLength": 50,
            "minLength": 0,
            "type": "string"
          },
          "accountId": {
            "description": "Payment Account ID to Credit",
            "maxLength": 256,
            "minLength": 0,
            "type": "string"
          },
          "totalAmount": {
            "format": "int32",
            "description": "Amount to Debit\r\nAmounts are given as integer numbers in cents",
            "type": "integer"
          },
          "commissionAmount": {
            "format": "int32",
            "description": "Your Fee\r\nAmounts are given as integer numbers in cents",
            "type": "integer"
          },
          "comment": {
            "description": "Comment Regarding the Transaction",
            "maxLength": 140,
            "minLength": 0,
            "type": "string"
          },
          "autoCommission": {
            "description": "If true:\r\n1. [amountCom] will be ignored and will be replaced with Lemonway's fee  \r\n2. You will not receive any fee",
            "type": "boolean"
          }
        },
        "example": {
          "returnUrl": "https://fr.wikipedia.org/wiki/OK",
          "cancelUrl": "https://fr.wikipedia.org/wiki/Cancel",
          "errorUrl": "https://fr.wikipedia.org/wiki/Error",
          "countryCode": "FR",
          "bankId": "the-bank-id",
          "transferType": 2,
          "reference": "Dze8778",
          "accountId": "1234",
          "totalAmount": 10000,
          "commissionAmount": 100,
          "comment": "Comment the transaction request",
          "autoCommission": false
        }
      },
      "MoneyInTransferInitOutput": {
        "type": "object",
        "properties": {
          "redirectUrl": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "error": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  },
  "x-readme": {}
}
```