MoneyInWebInit: Indirect mode money-in by card crediting a Wallet

Version

Description

1.0


1.2

Output: transaction ID

1.3

Output: card ID if registercard requested

How it works

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

On request, it is possible to set up the payment page so that all payments will be differed and will have to be validated (by calling MoneyInValidate within 6 days).

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

1) You call this function to create a MoneyInToken

2) The end-user will be redirected to the payment page

3) You will need 3 integration points to handle the payment result:

  • returnUrl in case of success

  • cancelUrl in case of cancellation

  • errorUrl in case of error

These 3 URLs must be public accessible so your end-user, and our WebKit server could send requests to them.

Request

  

XML

<MoneyInWebInit xmlns="Service_mb">
  <wlLogin>string</wlLogin>
  <wlPass>string</wlPass>
  <language>string</language>
  <version>string</version>
  <walletIp>string</walletIp>
  <walletUa>string</walletUa>
  <wallet>string</wallet>
  <amountTot>string</amountTot>
  <amountCom>string</amountCom>
  <comment>string</comment>
  <useRegisteredCard>string</useRegisteredCard>
  <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>
</MoneyInWebInit>

JSON

{   
    "wlLogin":"string",
    "wlPass":"string",
    "language":"string",
    "version":"string",
    "walletIp":"string",
    "walletUa":"string",
    "wallet":"string",
    "amountTot":"string",
    "amountCom":"string",
    "comment":"string",
    "useRegisteredCard":"string",
    "wkToken":"string",
    "returnUrl":"string",
    "cancelUrl":"string",
    "errorUrl":"string",
    "autoCommission":"string",
    "registerCard":"string",    
    "isPreAuth":"string",
        "email":"string",
    "delayedDays":"string",
        "label":"string",
    "moneyInNature":"string"
}

Item

Description

Mandatory

Format

Example

wallet

Payment account ID to credit

Can't be SC

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

useRegisteredCard

0: do not store a card nor either use a tokenized card
1: use a tokenized card or save the card

Only available with Payline

No
(0 by default)

[0 :1] char

0

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 by WebKit to terminate the operation

Yes

[1 : max] char

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

errorUrl

Your return URL, called by WebKit in case of an error

Yes

[1 : max] char

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

cancelUrl

Your return URL, called by WebKit in case of a cancellation

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

registerCard

Save the card and returns an ID for future payments. Just like the RegisterCard method, you will then be able to debit the card by calling MoneyInWithCardId

No

[1] char

0 : 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 Transactpro, Atos V2 and Payzen

No

[0:1] char

0

email

Indicate the customer's email if it is not already done in the wallet.

Only available for Transactpro. This email is required to make a payment by Transactpro.

No

[0 : 256] car

customer@example.com

delayedDays

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 Transactpro, 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 activity for this moneyIn :

0 : activité 1
1 : activité 2

No[1] car0 : non (par défaut)

Answer

  

XML

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


  

JSON

{
  "MONEYINWEB":
  {
    "TOKEN":"String",
    "ID":"String",
    "CARD":
    { 
      "ID":"string"
    },
    "REDIRECTURL":"String"
  }
}

Version

Element

Description

Example

1.0

TOKEN

Payment Token to pass to WebKit URL using GET

1wGaBwkdOmOxWT0s4t1Z1364815

>= 1.2

ID

Transaction ID

3232

>=1.3

CARD.ID

Card ID if registerCard was = 1


34

1.0REDIRECTURL

URL to which you need to redirect the customer instead of calling the WebKit

Only available with Transactpro


http://yourwebsite.com/redirectUrl

Next step: Redirect end-user to the Payment Page

Once you got the token of the transaction. You will redirect your client to the payment page

After the client is redirected to the payment page and finish the payment process. Two things will happen:

  1. On the client-side (browser), End-users will be redirected to your returnUrl / cancelUrl or errorUrl depending on the result of the payment process (success, canceled, or failed). It means that your server will receive a HTTP GET and it should reply by returning a beautiful page for your end-user.

  2. On the server-side, our Webkit will inform you the status of payment by sending a HTTP POST to returnUrl / cancelUrl or errorUrl. It is called Server To Server Notification (S2S). This notification is directly sent to your server so it is invisible to your end-user (If you want to "see" these POST notifications, rather look in the logs on your webserver than in your browser.

    • You can find the notification format here 

So typically, you'll have to prepare your returnUrl / cancelUrl and errorUrl in order to

  1. Display your success / canceled / error.. page (for your end-user).

  2. Handle the S2S notification coming from the Webkit.

In both cases (HTTP GET or POST)

  • we send back the wkToken (in response_wkToken). So you could rely on the response_wkToken or response_transactionId to identify the transaction with GetMoneyInTransDetails.

  • your returnUrl / cancelUrl and errorUrl should be able to fulfill your Business requirements (valid / cancel the order, send a confirmation email to your end-users). 


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

  • Due to network retrying you might receive the same notification (GET or POST) several times in different orders. Therefore, your returnUrl / cancelUrl and errorUrl must be able to handle these situations. For example, It shouldn't send 2 times the confirmation email or validate 2 times the same order.

If you don't receive notification (GET or POST), please verify if your returnUrl / cancelUrl and errorUrl are public accessible:

  • Don't use localhost or other private domain name / IP (192.168...)
  • Don't ask for authentication (login/password)
  • Check if your firewall doesn't reject GET / POST messages coming from our Webkit

You must not trust the notifications because any impostor can fake them, so you will always have to check the transaction status with GetMoneyInTransDetails to make sure that the transaction was really a success (paid).

When you received notification from the Webkit you can rely on 2 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