Initiate a Web Payment

MoneyInWebInit

How does it work?

This functionality enables you to use our card payment web pages.

Payment with a New Card

  1. By calling MoneyInWebInit, you receive a MoneyInToken

📘

Did you know?

If you want to register a card for future payments set registerCard=1 and you will also receive a cardId

  1. With this MoneyInToken, you are able to redirect the end-user to the Web Payment page. You have to combine the Token and the Lemonway Webkit URL to get the Payment Page URL. You can find the URL of the WebKit in the onboarding email.
    For example, https://sandbox-webkit.lemonway.fr/YOUR_COMPANY/dev/
  2. After submitting the payment, the end-user will be redirected to:
    returnUrl in case of success, cancelUrl in case of cancellation, and errorUrl in case of error

Payment with a Registered Card (Web)

To use this type of payment you have to make at least one transaction and set registerCard=1. On this first transaction, we will return a cardId that is associated with the client card. Ensure that you save this cardId to use for future payment, or use the method Retrieve Payment Details to get the cardId.

Payments on a registered card use the following process:

You call MoneyInWebInit ensuring that you include the cardId in the body of the request. Refer to steps 2 and 3 as stated above.

🚧

Important

To ensure that the client’s card has been registered, call the following method before you initiative payments on a registered card: Check if Card is Registered


Subscription Payments

A prerequisite to setting up a subscription is that you have previously made a payment with a card and registered the card using MoneyWebInit.

📘

Did you know?

Initial transaction for a subscription can be for a predetermined or an undetermined length of time.

After you have registered a card refer to Charge a Registered Card to begin setting up a subscription or payment by the delivery system.

📘

Important

When creating recurring payment that are one shot, ensure that you use the correct format One_shot as stated in the API.

❗️

Warning

When creating a recurring payment the recurringAvgAmount must be higher than totalAmount. If a lower amount is entered for recurringAvgAmount you will receive a directkit error message:
368: recurringAvgAmount stating that the amount should be greater than the transaction amount.

🚧

Important

To ensure the likelihood of frictionless payments you must set up payments of equal recurring amounts.


Deferred Payments

If you want to create a deferred Web Payment, in the request please indicate within delayedDays, a number between 1 and 6 days to have guaranteed payment.

To validate the pre-authorization and capture funds, you need to call Capture a Deferred Payment. If the capture is a success, then the original transaction status switches to Success.

XML

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>
        <MoneyInWebInit xmlns="Service_mb_xml">
            <wallet>{{wallet}}</wallet>
            <amountTot>15.00</amountTot>
            <amountCom>1.00</amountCom>
            <comment>Test for new DSP2 inputs</comment>
            <useRegisteredCard>0</useRegisteredCard>
            <returnUrl>https://en.wikipedia.org/wiki/OK</returnUrl>
            <cancelUrl>https://en.wikipedia.org/wiki/Cancel</cancelUrl>
            <errorUrl>https://en.wikipedia.org/wiki/Error</errorUrl>
            <wlLogin>{{login}}</wlLogin>
            <wlPass>{{password}}</wlPass>
            <language>en</language>
            <version>5.0</version>
            <walletIp>1.1.1.1</walletIp>
            <walletUa>Chrome</walletUa>
            <email>test@lemonway.com</email>
            <label>label test</label>
            <cardId>0</cardId>
            <delayedDays>0</delayedDays>
            <challengeModeId>1</challengeModeId>
            <merchantCustomerAuthenticationMethodId>3</merchantCustomerAuthenticationMethodId>
            <merchantCustomerAuthenticationDateTime>2021/05/24 06:00:00</merchantCustomerAuthenticationDateTime>
            <billingAddressCity></billingAddressCity>
            <billingAddressAdditional1></billingAddressAdditional1>
            <billingAddressAdditional2></billingAddressAdditional2>
            <billingAddressAdditional3></billingAddressAdditional3>
            <billingAddressZipcode></billingAddressZipcode>
            <billingAddressState></billingAddressState>
            <billingAddressCountry>FRA</billingAddressCountry>
            <holderContactFirstName>Hello</holderContactFirstName>
            <holderContactLastName>World</holderContactLastName>
            <holderContactPhone>+33100000000</holderContactPhone>
            <holderContactMobile>+33100000000</holderContactMobile>
            <holderContactWorkPhone>+33100000000</holderContactWorkPhone>
            <holderContactEmail>hello@world.com</holderContactEmail>
            <deliveryAddressCity></deliveryAddressCity>
            <deliveryAddressAdditional1></deliveryAddressAdditional1>
            <deliveryAddressAdditional2></deliveryAddressAdditional2>
            <deliveryAddressAdditional3></deliveryAddressAdditional3>
            <deliveryAddressZipcode></deliveryAddressZipcode>
            <deliveryAddressState></deliveryAddressState>
            <deliveryAddressCountry>FRA</deliveryAddressCountry>
            <addressDeliveryBillingMatchIndicator>true</addressDeliveryBillingMatchIndicator>
            <deliveryContactEmail>hello@world.com</deliveryContactEmail>
            <deliveryAddressCreationDate>2021/05/24 06:00:00</deliveryAddressCreationDate>
            <deliveryMode>string</deliveryMode>
            <estimatedDeliveryDelay>0</estimatedDeliveryDelay>
            <numberOfItemsBasket>0</numberOfItemsBasket>
            <addPaymentMeanDate>2021/05/24 06:00:00</addPaymentMeanDate>
            <customerAccountChangeDate>2021/05/24 06:00:00</customerAccountChangeDate>
            <customerAccountCreationDate>2021/05/24 06:00:00</customerAccountCreationDate>
            <customerAccountId>string</customerAccountId>
            <numberOfAttemptsAddCard24Hours>0</numberOfAttemptsAddCard24Hours>
            <numberOfPurchase180Days>0</numberOfPurchase180Days>
            <numberOfTransaction24Hours>0</numberOfTransaction24Hours>
            <numberOfTransactionYear>0</numberOfTransactionYear>
            <passwordChangeDate>2021/05/24 06:00:00</passwordChangeDate>
            <suspiciousActivityIndicator>false</suspiciousActivityIndicator>
        </MoneyInWebInit>
    </soap12:Body>
</soap12:Envelope>
<?xml version="1.0" encoding="utf-8"?>
  <MONEYINWEB>
    <TOKEN>String</TOKEN>
    <ID>String</ID>
    <CARD>
    	<ID>string</ID>
    </CARD>
    <REDIRECTURL>String</REDIRECTURL>
  </MONEYINWEB>

JSON

{
  "p":{
        "wallet":  "{{wallet}}",
        "amountTot":"2.00",
        "amountCom":"1.00",
        "returnUrl": "https://en.wikipedia.org/wiki/OK",
        "errorUrl": "https://en.wikipedia.org/wiki/Error",
        "cancelUrl": "https://en.wikipedia.org/wiki/Cancel",
        "wlLogin":  "{{login}}",
        "wlPass":   "{{password}}",
        "language": "fr",
        "version" : "1.3",
        "walletIp" : "1.1.1.1",
        "walletUa" : "LWSUPPORT_test",
        "moneyInNature": "123",
        "challengeModeId": "No_preference",
        "merchantCustomerAuthenticationMethodId": "NOAUTHENT",
        "merchantCustomerAuthenticationDateTime": "",
        "billingAddressCity": "",
        "billingAddressAdditional1": "",
        "billingAddressAdditional2": "",
        "billingAddressAdditional3": "",
        "billingAddressZipcode": "",
        "billingAddressState": "",
        "billingAddressCountry": "FRA",
        "holderContactFirstName": "Hello",
        "holderContactLastName": "World",
        "holderContactEmail": "hello@world.com",
        "holderContactPhone": "",
        "holderContactMobile": "",
        "holderContactWorkPhone": "",
        "deliveryAddressCity": "",
        "deliveryAddressAdditional1": "",
        "deliveryAddressAdditional2": "",
        "deliveryAddressAdditional3": "",
        "deliveryAddressZipcode": "",
        "deliveryAddressState": "",
        "deliveryAddressCountry": "FRA",
        "addressDeliveryBillingMatchIndicator": "",
        "deliveryContactEmail": "",
        "deliveryAddressCreationDate": "",
        "deliveryMode": "",
        "estimatedDeliveryDelay": "",
        "numberOfItemsBasket": "",
        "customerAccountId": "",
        "addPaymentMeanDate": "",
        "customerAccountChangeDate": "",
        "customerAccountCreationDate": "",
        "numberOfAttemptsAddCard24Hours": "",
        "numberOfPurchase180Days": "",
        "numberOfTransaction24Hours": "",
        "numberOfTransactionYear": "",
        "passwordChangeDate": "",
        "suspiciousActivityIndicator": ""
    }
}
{
  "MONEYINWEB":
  {
    "TOKEN":"String",
    "ID":"String",
    "CARD":
    { 
      "ID":"string"
    },
    "REDIRECTURL":"String"
  }
}

Request Input Description

ItemDescriptionMandatoryFormatExample
challengeModeIf you would like to enforce 3D Secure for your client then use the challenge mode. Possible values are No_preference (default value). The cardholder's bank will decide whether or not to challenge and CHALLENGENostringno_preference
wkTokenUnique ID of the call created by your server that will be used and returned by Lemonway at the end of the operation, using a POST on your URLYes[1: 50] char5652772
walletPayment account ID to the creditYes[0: 256] char33612345678 ou taxi67
Can not be SC
returnUrlYour back URL, called by WebKit to terminate the operationYes[1: max] charhttps://www.yoursite.com/thankyou.php
registerCardSave the card and returns an ID for future payments.No[1] char0: no (by default)
1: yes
moneyInNatureIndicate the nature of the activity for this Money-In:No[1] car0 : non (par défaut)
0: activity 1
1: activity 2
labelIndicate the name of the shop on the payment page.No
isPreAuthIndicates if the request is delayed and will require validation.No[0:1] char0
If empty: the default behaviour is no delay and no validation necessary (unless stated otherwise in your contract)
If = 1: the payment is pre-authorized. You will have to call MoneyInValidate within 'delayDays' time-lapse (From J to J+delayDays).
If the value is something else: debit is immediately effective
Only available for Atos V2 and Payzen
errorUrlYour return URL, called by WebKit in case of an errorYes[1: max] charhttps://www.yoursite.com/oops.php
delayedDaysIndicate the number of days of the deferred payment. Between 0 and 6 days to have guaranteed payment. Only usable with isPreAuth=1No6
Only available for Atos v2, Payzen, Monetico, and if isPreAuth=1
commentComment regarding the transactionNo[0:140] charOrder number 2457765AX2
cardIdThe card Id associated with the transactionNostringAB4545
(Only if you are making a transaction with a registered card)
cancelUrlYour return URL, called by WebKit in case of a cancellationYes[1: max] charhttps://www.yoursite.com/seeYouNextTime.php
autoCommissionIf yes:No[1] char0: No (by default)
[amountCom] will be ignored and will be replaced with Lemonway's fee1: Yes
You will not receive any fee
amountTotAmount to debit from the cardYes2 decimals15
amountComYour feeNo2 decimals1
paymentPatternRecurring: If a payment follows a recurring amount or One shot: (when there is no future recurring payments)Nopossible values: Recurring or One_shot
recurringAvgAmountAverage Amount of future recurring payments to cover recurring payments with variable amounts. Note: Only if the amount is higher than the amount of the first transactionNostring

Additional Optional Inputs to Enable Frictionless Payments

The following table displays the fields that are considered to have high importance for the card and banks ranking system. They recommend that they be populated if the information is available. The most important fields are ranked from R1 (being the most important) to R4.

ObjectFieldFormatDescriptionsExamplePriority
billingAddressbillingAddress.citystringBilling addressParisR2
billingAddress.countrystringFRA
billingAddress.addressAdditional1string5 Avenue Anatole France
billingAddress.addressAdditional2stringEtage 2
billingAddress.addressAdditional3string
billingAddress.zipcodestring75007
billingAddress.statestringParis
holderholder.firstNamestringHolder contact informationMichelR1
holder.lastNamestringDupontR1
holder.emailstringMDupont@email.frR1
holder.phonestring+33100000000R3
holder.mobilestring+33100000000R3
holder.workPhonestring+33100000000R3
deliveryAddressdeliveryAddress.citystringDelivery address informationParisR1
deliveryAddress.countrystringFrance
deliverystring
Address.addressAdditional1string5 Avenue Anatole France
deliveryAddress.addressAdditional2stringEtage 2
deliveryAddress.addressAdditional3string
deliveryAddress.zipcodestring75007
(postal code)
deliveryAddress.statestring
deliveryAdditionalInfodeliveryAdditionalInfo.Contact.emailstringDelivery contact emailMDupont@email.frR2
numberOfItemsBasketstringNumber of items in shopping cart8R4
deliveryAdditionalInfo.DeliveryBillingMatchbooleanDescribes delivery and billing addresses are the same. Possible values: true or falsetrueR4
deliveryAdditionalInfo.deliveryAddressCreationDateYYYY/MM/DDCreation date of delievery address2020/05/05R4
deliveryAdditionalInfo.estimatedDeliveryDelayYYYY/MM/DDEstimated delivery date2021/06/21R4
deliveryAdditionalInfo.deliveryModestringDelivery Method for example: Postal Office or Amazon boxAmazon BoxR4
authenticationAuthentication.merchantCustomerAuthentMethodstringAuthentication method used to authenticate the buyer before making the payment.3R4
Authentication.merchantCustomerAuthentDateTimeISO8601 date time formatDate and time of the cardholder authentication2021-05-24T06:00ZR4
customerAccountInfocustomerAccountInfo.customerAccountIdstringAdditional information about the account optionally provided by the 3-D Secure Requestor.Customer for 1 yearR4
customerAccountInfo.numberOfPurchase180DaysintThe amount of customer transactions made over the last six months (last 180 days)10R4
customerAccountInfo.numberOfTransactionYearintNumber of accepted or abandoned transactions in the last year on the merchant's customer account.100R4
customerAccountInfo.customerAccountCreationDateYYYY/MM/DDWhen the customer account was originally created.2020/05/05R4
customerAccountInfo.numberOfAttemptsAddCard24HoursintNumber of distinct cards used by the merchant's account in the last 24 hours.1R4
customerAccountInfo.suspiciousActivityIndicatorbooleanNotes if a suspicious activity is detected on customer account in the merchant's website.falseR4
customerAccountInfo.numberOfTransaction24HoursstringHow many transactions did the customer make in the last 24hours1R4
customerAccountInfo.customerAccountChangeDateYYYY/MM/DDLast date the customer account was changed2020/07/14R4
customerAccountInfo.passwordChangeDateYYYY/MM/DDDate of last change of password of the customer account2020/07/14R4
customerAccountInfo.addPaymentMeanDateYYYY/MM/DDDate of last added form of payment made to account. For example a new card registered to the account2020/05/05R4

Response Ouput Description

VersionElementDescriptionExample
1TOKENPayment Token to pass to WebKit URL using GET1wGaBwkdOmOxWT0s4t1Z1364815
>= 1.2IDTransaction ID3232
>=1.3CARDIDCard ID if registerCard=134

The token is not reusable. You will have to generate a new token for each payment. You will have to initialize a new transaction for each test.

Mercanet v2:
You can customize the Mercanet payment page, by developing a template pack, and then send it to us. Once your template is deployed, you will be able to use it by adding the tpl parameter in the Webkit URL.

For example : https://sandbox-webkit.lemonway.fr/YOUR_COMPANY/dev/?moneyintoken=1wGaBwkdOmOxWT0s4t1Z1364815&tpl=your_template_name

🚧

Please note

You will have to rely on both GET or POST (you should fulfill your Business requirements whenever you caught a GET or a POST)

If you do not receive notification (GET or POST), verify if your returnUrl / cancelUrl and errorUrl are publicly accessible:

  • Do not use localhost or another private domain name / IP (192.168...)
  • Do not ask for authentication (login/password)
  • Check if your firewall does not reject GET/POST messages coming from our Webkit

🚧

When you received notification from the Webkit you can rely on two things to identify the transaction:

  • the response_wkToken is the wkToken that you chose for the transaction when calling MoneyInWebInit
  • the response_transactionId is the transaction Id generated by LemonWay when you called MoneyInWebInit
    You can get the detailed information of the transaction from one of these 2 values by calling GetMoneyInTransDetails
  • Put response_wkToken to the parameter transactionMerchantToken
  • Or put response_transactionId to transactionId