Create Payment Form

CreatePaymentForm

How it works

  • You use this function to configure a new payment form. It will return the ID of the newly created form.

    Payment form Id example
    
    579c7def4bb0411da294d9b57c2c1323
    
  • Combine this Payment form's id with your Webkit URL, you will get the link to the payment form page.

    Payment link examples
    https://webkit.lemonway.fr/mb/YourCompany/prod/payment-page/?fId=579c7def4bb0411da294d9b57c2c1323
    
    or
    
    https://sandbox-webkit.lemonway.fr/YourCompany/dev/payment-page/?fId=579c7def4bb0411da294d9b57c2c1323
    
    
    
  • Now you can communicate this link to your end-user

    • by mail or any means, you want
    • by embedding the form to your website or mobile web view.
  • This link is reusable.

  • Lemonway will not send any notification to the end user after payment. It is up to you to communicate with your users.

XML

<CreatePaymentForm xmlns="Service_mb">
  <wlLogin>string</wlLogin>
  <wlPass>string</wlPass>
  <language>string</language>
  <version>string</version>
  <walletIp>string</walletIp>
  <walletUa>string</walletUa>
  <optId>string</optId>  
  <walletPayer>string</walletPayer>
  <walletReceiver>string</walletReceiver>
  <amountTot>string</amountTot>
  <amountCom>string</amountCom>
  <comment>string</comment>
  <returnUrl>string</returnUrl>
  <cancelUrl>string</cancelUrl>
  <errorUrl>string</erroUrl>
  <firstNamePayer>string</firstNamePayer>
  <lastNamePayer>string</lastNamePayer>
  <emailPayer>string</emailPayer>
  <style>string</style>
  <atosStyle>string</atosStyle>
  <notifUrl>string</notifUrl>
  <options>string</options>
</CreatePaymentForm>

<CreatePaymentFormResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="Service_mb_xml">
  <FORM>
<id>579c7def4bb0411da294d9b57c2c1323</id>
<optId>Order1234</optId>
<walletPayer>8888<walletPayer/>
<walletReceiver>9999</walletReceiver>
<walletIp>82.26.79.125</walletIp> 
<walletUa>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.3</walletUa>
 <amountTotRange>10.00-500.00</amountTotRange>
 <amountCom/>
 <comment>Commande numéro 245</comment>
 <returnUrl>http://YourCompany.com/ThankYou</returnUrl>
 <cancelUrl>http://YourCompany.com/PleaseComeBackLater</cancelUrl>
 <errorUrl>http://YourCompany.com/Sorry<errorUrl>
 <language>fr</language>
 <version>1.9</version>
 <firstNamePayer>Jean</firstNamePayer>
 <lastNamePayer>DUPONT</lastNamePayer>
 <emailPayer>[email protected]</emailPayer>
 <style>https://YourCompany.com/public/payment.css</style>
 <atosStyle>https://YourCompany.com/public/atos.css</atosStyle>
 <notifUrl>http://login:[email protected]/notif/?origine=lemonway&orderId=135</notifUrl>
 <options></options>
 <active>1</active>
 </FORM>
 </CreatePaymentFormResult> 
   

JSON

{
    "wlLogin": "string",
    "wlPass": "string",
    "language": "string",
    "version": "string",
    "walletIp": "string",
    "walletUa": "string",
    "optId": "string",
    "walletPayer": "string",
    "walletReceiver": "string",
    "amountTot": "string",
    "amountCom": "string",
    "comment": "string",
    "returnUrl": "string",
    "cancelUrl": "string",
    "errorUrl": "string",
    "firstNamePayer": "string",
    "lastNamePayer": "string",
    "emailPayer": "string"
    "style": "string"
    "atosStyle": "string"
    "notifUrl": "string"
    "options": "string"
}
{
   "FORM": {
   "id": "579c7def4bb0411da294d9b57c2c1323",
   "optId": "ooo",
   "walletPayer": "8888",
   "walletReceiver": "9999",
   "walletIp": "163.5.208.226",
   "walletUa": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.3",
   "amountTot": "",
   "amountCom": "",
   "comment": "",
   "returnUrl": null,
   "cancelUrl": null,
   "errorUrl": null,
   "language": "fr",
   "version": "1.1",
   "firstNamePayer": "Jean",
   "lastNamePayer": "DUPONT",
   "emailPayer": "[email protected]",
   "style": "https://MyCompany.com/public/payment.css",
   "atosStyle": null,
   "notifUrl": null,
   "options": null,
   "active": "1"
   }
}

Request Input Description

ParamsDescriptionMandatoryFormatExample
amountComAmount of commission you wish to takeNo2 decimals1
amountTotAmount or a range of the amount to be debited.No[0:33]15
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 form10.00-600.00
If this field is not filled then the end-user can enter any amount into the form
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
atosStyleAtos v1 only: Link to a custom Atos CSS stylesheet.No[0:255]https://YourCompany.com/public/atos.css
The stylesheet should be publicly accessible via HTTPS
cancelUrlURL redirection after the payment procedure is canceledNo[0:255]http://YourCompany.com/PleaseComeBackLater
commentOptional commentNo[0 :140]Commande numéro 245
emailPayerPayer's email.No[0:255][email protected]
If this field is not filled then the end-user has to fill it in the payment form.
errorUrlURL redirection after the payment procedure is failedNo[0:255]http://YourCompany.com/Sorry
firstNamePayerPayer's first name.No[0:255]Jean
If this field is not filled then the end-user has to fill it in the payment form.
lastNamePayerPayer's last name.No[0:255]DUPONT
If this field is not filled then the end-user has to fill it in the payment form.
notifUrlAt the end of the payment procedure, An HTTP POST message containing the payment status (PAID, ERROR, CANCEL) is sent to this address. It is possible that the same notification might be sent several times.No[0:255]http://login:[email protected]/notif/?origine=lemonway&orderId=135
optIdOptional identity of the payment form. You shouldn't use special character here.No[0 : 60]Order1234
optionsReserved for a future versionNo[0:255]
returnUrlURL redirection after the payment procedure is successfully finishedNo[0:255]http://YourCompany.com/ThankYou
styleLink to a custom CSS stylesheet.No[0:255]Example: https://sandbox-webkit.lemonway.fr/demo/dev/payment-page/css/main.css
The stylesheet should be publicly accessible via HTTP
walletPayerPayer Wallet.No[0 : 100]8888
If this field is filled then the money reaches this wallet before arriving at the beneficiary wallet (via a transfer wallet to wallet)
Don't put the wallet sc here, it won't work. You cannot credit the wallet sc with a credit card.
walletReceiverBeneficiary Wallet.No[0 : 100]9999
If this field is not filled then the end-user must fill in its value on the payment form. We recommend you always fill it out instead of your end user.
Don't put the wallet sc here, it won't work. You cannot credit the wallet sc with a credit card.

Notification (notifUrl)

At the end of the payment procedure, An HTTP POST message containing the payment status (PAID, ERROR, CANCEL) is sent to the notifUrl.

Unlike other payment methods:
there is only one notifUrl (others got returnUrl, cancelUrl, errorUrl)
and the notifications are sent by the Webkit WS (IIS). Not the Webkit PHP (Apache). So if you want to check if a notification was sent, you must check the log of the Webkit WebService

The same notification might be sent several times to your notifUrl. An impostor can also send the same notification. When you received a notification, please make sure to confirm the payment status with GetCompletedPaymentForm

Example:

POST:(
        [optId] => ooo
        [parentId] => 579c7def4bb0411da294d9b57c2c1323
        [parentComment] => test with notif and P2P
        [id] => 7e98be392a5e45f6bc357a9ab8c623d2
        [walletPayer] => 8888
        [walletReceiver] => 9999
        [amountTot] => 60.48
        [comment] =>
        [firstNamePayer] => Jean
        [lastNamePayer] => DUPONT
        [emailPayer] => [email protected]
        [status] => PAID
        [utcdate] => 2016-09-19 13:09:16Z
        [created] => 2016-09-19 15:09:12Z
        [returnUrl] => ""
        [cancelUrl] => ""
        [errorUrl] => ""
    )