Redirection Guidelines
Step 1: Create a Payment Request
Initiate a Web Payment REST v2 or Initiate a Web Payment SOAP v1
Call this endpoint to validate and store a payment request in our database, you will receive a response with an id and a webKitToken, check Response Example below.
It is important that you add the following inputs in the body parameters:
- returnUrl: specify where your client is redirected if payment is successful
- cancelUrl: specify where your client is redirected if payment is canceled
- errorUrl: specify where your client is redirected if a payment has an error
{
"value": {
"returnUrl": "https://www.yoursite.com/thankyou.php",
"errorUrl": "https://www.yoursite.com/oops.php",
"cancelUrl": "https://www.yoursite.com/seeYouNextTime.php",
"registerCard": false,
"captureDelayedDays": 6,
"moneyInNature": 0,
"reference": "Dze8778",
"accountId": "33612345678",
"totalAmount": 1500,
"commissionAmount": 100,
"comment": "Order number 2457765AX2",
"autoCommission": false
}
}
{
"webKitToken": "1wGaBwkdOmOxWT0s4t1Z1364815",
"id": 3232,
"id ": 3232,
"cardId": 34
}
Frictionless Paymebts
For further information regarding frictionless payments see: Frictionless Payments
Step 2: Redirect your clients to a Lemonway Payment URL
Build your Lemonway Payment URL using the specified format:
-
Production:https://webkit.lemonway.fr/mb/YourEnvironmentName/prod/?moneyintoken=XXXXXXX&lang=XX&tpl=XXX
-
Sandbox: https://sandbox-webkit.lemonway.fr/YourEnvironmentName/dev/?moneyintoken=XXXXXXX&lang=XX&tpl=XXX
Parameters
Parameter | Usage | Description |
---|---|---|
moneyintoken (displayed as webKitToken in response) | required | The Money-in token received from the Card Payment Initiation response.
|
lang | optional | ISO2 language code used for the payment page. This is in English (en) by default. Non-exhaustive lists of accepted codes: en, no, sp, fr, xz, ge, it, br, da, fi, sw, po, fl, ci, pl, ne. |
tpl | optional | The template name use on the payment page. Only Atos v2 |
Custom Payment Pages
If you would like to implement a custom payment page, contact our Support Team to advise you. Once you have customized your page, you can then add the template name your Payment URL using the tpl parameter. Note this feature is only available for Atos v2 contracts.
Step 3: Receive and Process Payment Information
Subject to the Payment Status, Lemonway will redirect your clients to the correct URL (return, error, or cancel).
You will get:
-
a Redirect URL on your redirect URLs (either return an error or cancel according to the Payment Status), with the response_wkToken.
-
a POST notification on your callback URLs (the same redirect URLs, return, error, or cancel according to the Payment Status).
To retrieve detailed information about a Payment (including Bank declines) call GET/v2/moneyins or GetMoneyIn.
Ensure that your redirect URLs are publicly available so we can correctly send you all notifications
The following table outlines the information you will receive with the POST notification depending on the transaction status:
Status | Parameters | Descriptions | Possible Values |
---|---|---|---|
success error | response_code | Payment Status | 0000: Success |
success | response_wkToken | Reference field you complete when initializing the money-in | |
success | response_msg | Error Message | |
success | response_transacctionid | Lemonway transaction ID | |
success | response_transactionAmount | Payment amount transaction | |
success | response_transactionMessage | Comment |
Note
Lemonway recommends setting up the webhook Id= 42 "MoneyIn: transaction status synchronization alert" in the Dashboard (Backoffice). You will then be alerted when the transaction status switches to Cancelled if the payment was abandoned by the payer.
Updated about 1 month ago