MoneyInWebInit: Initiate a Web Payment

Why not upgrade your viewing experience! An updated version of this article is on our new documentation portal 👉 here

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
    • If you want to register a card for future payments set registerCard=1 and you will also receive a cardId
  2. 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/
  3. After submitting the payment, the end-user will  be redirected to :
    • returnUrl in case of success
    • cancelUrl in case of cancellation
    • 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 GetMoneyInTransDetails to get the cardId.

Payments on a registered card use the following process:

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

Note: If you receive an error message during the verification process, refer to DirectKit Errors.

Important: To ensure that the client’s card has been registered, call the following method before you initiative payments on a registered card: GetCard 

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 ValidateMoneyIn. If the capture is a success, then the original transaction status switches to Success.

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.

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

After you have registered a card refer to: MoneyInWithCardId to begin setting up a subscription or payment by delivery system.

Important: To ensure the likelyhood of frictionless payments you must setup payments of equal recurring amounts.

XML

<MoneyInWebInit xmlns="Service_mb">
  <wlLogin>string</wlLogin>
  <wlPass>string</wlPass>
  <cardId>string</cardId>
  <language>string</language>
  <version>string</version>
  <walletIp>string</walletIp>
  <walletUa>string</walletUa>
  <wallet>string</wallet>
  <amountTot>string</amountTot>
  <amountCom>string</amountCom>
  <comment>string</comment>
  <wkToken>string</wkToken>
  <returnUrl>string</returnUrl>
  <cancelUrl>string</cancelUrl>
  <errorUrl>string</errorUrl>
  <autoCommission>string</autoCommission>
  <registerCard>string</registerCard>
  <isPreAuth>string</isPreAuth>
  <email>string</email>
  <delayedDays>string</delayedDays>
  <label>string</label>
  <moneyInNature>string</moneyInNature>
  <challengeMode>string</challengeMode>
  <billingAddress>
    <city>string</city>
    <country>string</country>
    <addressAdditional1>string</addressAdditional1>
    <addressAdditional2>string</addressAdditional2>
    <addressAdditional3>string</addressAdditional3>
    <zipCode>string</zipCode>
    <state>string</state>
  </billingAddress>
  <holder>
    <firstName>string</firstName>
    <lastName>string</lastName> 
    <email>string</email>
    <phone>string</phone>
    <mobile>string</mobile>
    <workPhone>string</workPhone>
  </holder>
  <deliveryAddress>
    <city>string</city>
    <country>string</country> 
    <addressAdditional1>string</addressAdditional1>
    <addressAdditional2>string</addressAdditional2>
    <addressAdditional3>string</addressAdditional3>
    <zipCode>string</zipCode>
    <state>string</state>
  </deliveryAddress>
  <deliveryAdditionalInfo>
      <contact><email>string</email>
    <numberOfItemsBasket>string</numberOfItemsBasket>
    <addressDeliveryBillingMatchIndicator>boolean</addressDeliveryBillingMatchIndicator>
    <deliveryAddressCreationDate>YYYY/MM/DD</deliveryAddressCreationDate>
    <estimatedDeliveryDelay>string</estimatedDeliveryDelay>
    <deliveryMode>string</deliveryMode>
  </deliveryAdditionalInfo>
  <customerAccountInfo>
    <customerAccountId>string</customerAccountId>
    <numberOfPurchase180Days>int</numberOfPurchase180Days>
    <numberOfTransactionYear>int</numberOfTransactionYear>
    <customerAccountCreationDate>YYYY/MM/DD</customerAccountCreationDate>
    <suspiciousActivityIndicator>boolean <suspiciousActivityIndicator>
    <numberOfTransaction24Hours>int</numberOfTransaction24Hours>
    <customerAccountChangeDate>YYYY/MM/DD</customerAccountChangeDate>
    <passwordChangeDate>YYYY/MM/DD</passwordChangeDate>
    <addPaymentMeanDate>YYYY/MM/DD</addPaymentMeanDate>
  </customerAccountInfo>
  <authentication>
    <merchantCustomerAuthentMethod>string</merchantCustomerAuthentMethod>
    <merchantCustomerAuthentDateTime>ISO8601 date time format<merchantCustomerAuthentDateTime> 
  </authentication>
</MoneyInWebInit>

JSON

{   
    "wlLogin":"string",
    "wlPass":"string",
    "cardId":"string",
    "language":"string",
    "version":"string",
    "walletIp":"string",
    "walletUa":"string",
    "wallet":"string",
    "amountTot":"string",
    "amountCom":"string",
    "comment":"string",
    "wkToken":"string",
    "returnUrl":"string",
    "cancelUrl":"string",
    "errorUrl":"string",
    "autoCommission":"string",
    "registerCard":"string",    
    "isPreAuth":"string",
    "email":"string",
    "delayedDays":"string",
    "label":"string",
    "moneyInNature":"string"
    "challengeMode": "string"
    "billingAddress": {
      "city": "string",
      "country": "string",
      "addressAdditional1": "string",
      "addressAdditional2": "string",
      "addressAdditional3": "string",
      "zipCode": "string",
      "state": "string"
    },
    "holder": {
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "phone": "string",
      "mobile": "string",
      "workPhone": "string"
    },
    "deliveryAddress": {
      "city": "string",
      "country": "string",
      "addressAdditional1": "string",
      "addressAdditional2": "string",
      "addressAdditional3": "string",
      "zipCode": "string",
      "state": "string"
    },
    "deliveryAdditionalInfo": {
      "contact": {
        "email": "string",
        "numberOfItemsBasket": "string",
        "addressDeliveryBillingMatchIndicator": "boolean",
        "deliveryAddressCreationDate": "YYYY/MM/DD",
        "estimatedDeliveryDelay": "YYYY/MM/DD",
        "deliveryMode": "string"
      },
      "customerAccountInfo": {
        "customerAccountId": "string",
        "numberOfPurchase180Days": "int",
        "numberOfTransactionYear": "int",
        "customerAccountCreationDate": "YYYY/MM/DD",
        "numberOfAttemptsAddCard24Hours": "int",
        "suspiciousActivityIndicator": "boolean",
        "numberOfTransaction24Hours": "int",
        "customerAccountChangeDate": "YYYY/MM/DD",
        "passwordChangeDate": "YYYY/MM/DD",
        "addPaymentMeanDate": "YYYY/MM/DD"
      },
      "authentication": {
        "merchantCustomerAuthentMethod": "string",
        "merchantCustomerAuthentDateTime": "ISO8601 date time format"
      }
    }
}

Item

Description

Mandatory

Format

Example

challegeModeIf 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

wallet

Payment account ID to credit

Can not be an SC Wallet

Yes

[0 : 256] char

33612345678 ou taxi67

amountTot

Amount to debit from the card

Yes

2 decimals

15.00

amountCom

Your fee

No

2 decimals

1.00

comment

Comment regarding the transaction

No

[0 :140] char

Order number 2457765AX2

wkToken

Unique ID of the call created by your server that will be used returned by Lemonway at the end of the operation, using a POST on your URL

Yes

[1: 50] char

5652772

returnUrl

Your back URL, called when an operation is terminated 

Yes

[1: max] char

https://www.yoursite.com/thankyou.php

errorUrl

Your return URL, called when an operation has an error

Yes

[1: max] char

https://www.yoursite.com/oops.php

cancelUrl

Your return URL, called when an operation is canceled

Yes

[1: max] char

https://www.yoursite.com/seeYouNextTime.php

autoCommission

If yes:

  • [amountCom] will be ignored and will be replaced with Lemonway's fee

  • You will not receive any fee

No

[1] char

0: No (by default)
1: Yes

registerCardYou can register this card for the current transactionNo[1] char0: no (by default)
1: yes

isPreAuth

Indicates if the request is delayed and will require validation.

  • If empty: the default behavior 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

No

[0:1] char

0

delayedDays

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

Indicate the number of days of the deferred payment. Between 0 and 6 days to have guaranteed payment. Only usable with isPreAuth=1

Only available for Atos v2, Payzen, Monetico, and if isPreAuth=1


No
6
label

Indicate the name of the shop on the payment page.

Only available for Payzen

No

moneyInNature

Indicate the nature of the activity for this Money-In :

0: activity 1
1: activity 2

No[1] car0: no (by default)

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

billingAddress.addressAdditional1string
5 Avenue Anatole France

billingAddress.addressAdditional2string
Etage 2

billingAddress.addressAdditional3string



billingAddress.zipcodestring
75007

billingAddress.statestring
Paris
holderholder.firstNamestringHolder contact informationMichelR1

holder.lastNamestring
DupontR1

holder.emailstring
MDupont@email.frR1

holder.phonestring
+33100000000R3

holder.mobilestring
+33100000000R3

holder.workPhonestring
+33100000000R3
deliveryAddressdeliveryAddress.citystringDelivery address informationParisR1

deliveryAddress.countrystring
France

deliverystring



Address.addressAdditional1string
5 Avenue Anatole France

deliveryAddress.addressAdditional2string
Etage 2

deliveryAddress.addressAdditional3string



deliveryAddress.zipcodestring
75007

(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



Possible merchantCustomerAuthentMethod Values: - NOAUTHENT = 1 (No authentication of the customer by the merchant), - OWNCREDENTIAL = 2 (Customer authentication by the merchant using his own system), - FEDERATEDID = 3 (Customer authentication by the merchant using an identifier federated (facebook, ...) (e.g. Facebook)), - ISSUERID = 4 (Customer authentication by the merchant using information of the issuer's payment mean), - THIRDPARTY = 5 (Customer authentication by the merchant using a third system), - FIDO = 6 (Customer authentication by the merchant with FIDO (Fast IDentity Online) system)


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

  

XML

<?xml version="1.0" encoding="utf-8"?>
  <MONEYINWEB>
    <TOKEN>String</TOKEN>
    <ID>String</ID>  
  </MONEYINWEB>

JSON

{
  "MONEYINWEB":
  {
    "TOKEN":"String",
    "ID":"String",
  }
}



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), please verify if your returnUrl / cancelUrl and errorUrl are public 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

Always ensure that the transaction status with GetMoneyInTransDetails to make sure that the transaction was really a success (paid).

When you have 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 two values by call GetMoneyInTransDetails  
- Put response_wkToken  to the parameter transactionMerchantToken 
- Or put response_transactionId to transactionId