---
updatedAt: 2026-06-30T10:22:43.000Z
agentTools:
  projectIndex: https://documentation.lemonway.com/llms.txt
---

# Create Payment Form (Pay by Link)

 Accept payments by an SMS, email, or document.   
 Create a form that permits your customers to make card payments by link.     
 
- Payment forms are generated and managed by Lemonway.  
- Payment forms are publicly accessible, making it possible for anyone to pay with a valid link.    
- Payment by bank card is only supported.  

Payment Scenerios:  
1. **Benificary Wallet `walletReceiver` not specified**  
You only specify `walletPayer` and not `walletReceiver` in the body parameters.  
They make a card payment and funds are transfered to the `walletPayer` (a designated wallet)

2. **Payer and Benificary Wallet defined**  

3. **Benificary pecified**  

 **Note:** Deferred payment is not supported.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "v2",
    "title": "Lemonway DirectKit API 2.0"
  },
  "paths": {
    "/v2/moneyins/card/paymentform": {
      "post": {
        "tags": [
          "MoneyIns | Pay by Link"
        ],
        "summary": "Create Payment Form (Pay by Link)",
        "description": " Accept payments by an SMS, email, or document.   \r\n Create a form that permits your customers to make card payments by link.     \r\n \r\n- Payment forms are generated and managed by Lemonway.  \r\n- Payment forms are publicly accessible, making it possible for anyone to pay with a valid link.    \r\n- Payment by bank card is only supported.  \r\n\r\nPayment Scenerios:  \r\n1. **Benificary Wallet `walletReceiver` not specified**  \r\nYou only specify `walletPayer` and not `walletReceiver` in the body parameters.  \r\nThey make a card payment and funds are transfered to the `walletPayer` (a designated wallet)\r\n\r\n2. **Payer and Benificary Wallet defined**  \r\n\r\n3. **Benificary pecified**  \r\n\r\n **Note:** Deferred payment is not supported.",
        "operationId": "MoneyIns_CardPaymentFormPost",
        "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/CreatePaymentFormInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePaymentFormOutput"
                },
                "examples": {
                  "response": {
                    "value": {
                      "form": {
                        "walletIp": "82.26.79.125",
                        "walletUa": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.3",
                        "amountTotRange": "1100-50100",
                        "amountCom": "",
                        "language": "fr",
                        "version": "1.9",
                        "style": "https://YourCompany.com/public/payment.css",
                        "atosStyle": "https://YourCompany.com/public/atos.css",
                        "notifUrl": "http://login:pass@YourCompany.com/notif/?origine=lemonway&orderId=135",
                        "options": "",
                        "active": true,
                        "raisonSociale": null,
                        "id": "579c7def4bb0411da294d9b57c2c1323",
                        "optId": "Order1234",
                        "accountPayer": "8888",
                        "accountReceiver": "9999",
                        "comment": "Commande numéro 245",
                        "returnUrl": "http://YourCompany.com/ThankYou",
                        "cancelUrl": "http://YourCompany.com/PleaseComeBackLater",
                        "errorUrl": "http://YourCompany.com/Sorry",
                        "firstNamePayer": "Jean",
                        "lastNamePayer": "DUPONT",
                        "emailPayer": "jean.dupont@email.com"
                      }
                    }
                  }
                }
              }
            }
          },
          "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"
          }
        }
      },
      "CreatePaymentFormInput": {
        "type": "object",
        "properties": {
          "optId": {
            "description": "To cross-reference a buyer with a payment, use `optId` to help associate them with one another.   \r\n**Note:** Do not use special characters in this field, for example: #, @, and !.",
            "maxLength": 60,
            "minLength": 0,
            "type": "string"
          },
          "walletPayer": {
            "description": "Associated with the **Payer Wallet**.  \r\nIf this field is filled then the money reaches this wallet before arriving at the beneficiary wallet (via a transfer wallet to wallet).\r\n**Important:** Don't put the <b>SC Wallet</b> here, it won't work. You cannot debit the <b>SC Wallet</b> with a credit card.",
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "walletReceiver": {
            "description": "Beneficiary Wallet. If this field is not complete, then the end-user must to fill its value on the payment form. \r\n<b>We recommend you complete the form instead of your end-user</b>\r\nDon't put the <b>SC Wallet</b> here, it won't work. You cannot credit the <b>SC Wallet</b> with a credit card.",
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          },
          "totalAmount": {
            "description": "Amount or a range of the amount to be debited.\r\n1. If this field is configured with an interval (eg, 15.30-500.26) then the final customer will have to enter an appropriate amount in the form.\r\n2. If this field is not filled then the end-user can enter any amount to the form.\r\n3. If this field is filled with a precise value (eg 15.60), then the end-user has no choice in the amount field of the form.\r\nAmounts are given as integer numbers in cents.\r\nNote: If you enter a fixed amount",
            "type": "string"
          },
          "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"
          },
          "returnUrl": {
            "description": "URL redirection after the payment procedure is successfully finished",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "cancelUrl": {
            "description": "URL redirection after the payment procedure is cancelled",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "errorUrl": {
            "description": "URL edirection after the payment procedure is failed",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "firstNamePayer": {
            "description": "Payer's First Name\r\nIf this field is not filled then the end-user have to fill it in the payment form",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "lastNamePayer": {
            "description": "Payer's Last Name\r\nIf this field is not filled then the end-user have to fill it in the payment form",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "emailPayer": {
            "description": "Payer's Email\r\nIf this field is not filled then the end-user have to fill it in the payment form",
            "maxLength": 255,
            "minLength": 0,
            "pattern": "^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$",
            "type": "string"
          },
          "style": {
            "description": "Link to a custom CSS Stylesheet\r\nThe stylesheet should be publicly accessible via **HTTPS*",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "atosStyle": {
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "notifUrl": {
            "description": "At the end of the payment procedure, an HTTP POST message containing the payment status (PAID, ERROR, CANCEL) is sent to this address. \r\nIt is possible that the same notification might be sent several times.",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          },
          "options": {
            "description": "Reserved for a future version",
            "maxLength": 255,
            "minLength": 0,
            "type": "string"
          }
        },
        "example": {
          "optId": "Order1234",
          "walletPayer": "8888",
          "walletReceiver": "9999",
          "totalAmount": "500-1000",
          "commissionAmount": 100,
          "comment": "Commande numéro 245",
          "returnUrl": "http://YourCompany.com/ThankYou",
          "cancelUrl": "http://YourCompany.com/PleaseComeBackLater",
          "errorUrl": "http://YourCompany.com/Sorry",
          "firstNamePayer": "Jean",
          "lastNamePayer": "DUPONT",
          "emailPayer": "jean.dupont@email.com",
          "style": "https://sandbox-webkit.lemonway.fr/demo/dev/payment-page/css/main.css",
          "atosStyle": "https://YourCompany.com/public/atos.css",
          "notifUrl": "http://login:pass@YourCompany.com/notif/?origine=lemonway&orderId=135"
        }
      },
      "CreatePaymentFormOutput": {
        "type": "object",
        "properties": {
          "form": {
            "$ref": "#/components/schemas/PaymentForm"
          },
          "error": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "PaymentForm": {
        "type": "object",
        "properties": {
          "walletIp": {
            "type": "string"
          },
          "walletUa": {
            "type": "string"
          },
          "amountTotRange": {
            "type": "string"
          },
          "amountCom": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "style": {
            "type": "string"
          },
          "atosStyle": {
            "description": "Mercanet v1 only: Link to a custom Mercanet CSS Stylesheet.\r\nThe stylesheet should be publicly accessible via HTTPS",
            "type": "string"
          },
          "notifUrl": {
            "type": "string"
          },
          "options": {
            "description": "Reserved for future version",
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "raisonSociale": {
            "type": "string"
          },
          "id": {
            "description": "Payment Form ID",
            "type": "string"
          },
          "optId": {
            "description": "Optional identity of the payment form. You should not use special character here.",
            "type": "string"
          },
          "accountPayer": {
            "description": "Payer Account\r\nIf this field is filled then the money reaches this wallet before arriving at the beneficiary wallet (via a transfer wallet to wallet)\r\nnote: Don't put the <b>SC Wallet</b> here, it won't work. You cannot credit the <b>SC Wallet</b> with a credit card.",
            "type": "string"
          },
          "accountReceiver": {
            "description": "Beneficiary Account\r\nif this field is not filled then the end-user must to fill its value on the payment form. We recommend you to always fill it instead of your end-user.\r\nnote: Don't put the <b>SC Wallet</b> here, it won't work. You cannot credit the <b>SC Wallet</b> with a credit card.",
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "returnUrl": {
            "description": "URL redirection after the payment procedure is successfully finished",
            "type": "string"
          },
          "cancelUrl": {
            "description": "URL redirection after the payment procedure is cancelled",
            "type": "string"
          },
          "errorUrl": {
            "description": "URL redirection after the payment procedure is failed",
            "type": "string"
          },
          "firstNamePayer": {
            "description": "Payer's First Name\r\nIf this field is not filled then the end-user have to fill it in the payment form.",
            "type": "string"
          },
          "lastNamePayer": {
            "description": "Payer's Last Name\r\nIf this field is not filled then the end-user have to fill it in the payment form.",
            "type": "string"
          },
          "emailPayer": {
            "description": "Payer's Email\r\nIf this field is not filled then the end-user have to fill it in the payment form.",
            "type": "string"
          }
        }
      }
    }
  },
  "x-readme": {}
}
```