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</errorUrl>
  <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>jean.dupont@email.com</emailPayer>
    <style>https://YourCompany.com/public/payment.css</style>
    <atosStyle>https://YourCompany.com/public/atos.css</atosStyle>
    <notifUrl>http://login:pass@YourCompany.com/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",
   "amountTot": "",
   "amountCom": "",
   "comment": "",
   "returnUrl": null,
   "cancelUrl": null,
   "errorUrl": null,
   "language": "fr",
   "version": "1.1",
   "firstNamePayer": "Jean",
   "lastNamePayer": "DUPONT",
   "emailPayer": "jean.dupont@gmail.com",
   "style": "https://MyCompany.com/public/payment.css",
   "atosStyle": null,
   "notifUrl": null,
   "options": null,
   "active": "1"
   }
}

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.

🚧

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

Example:

POST:(
    [optId] => ooo
    [parentId] => 579c7def4bb0411da294d9b57c2c1323
    [status] => PAID
    [utcdate] => 2016-09-19 13:09:16Z
    [created] => 2016-09-19 15:09:12Z
)