Card Payments
Payment with a New Card
-
Call
POST /moneyins/card/webinitto receive aMoneyInToken.If you want to register the card for future payments, set
registerCard=true. In this case, you will also receive acardId. -
Use the token to redirect the end-user to the PSP payment page.
To create the Payment Page URL, combine the token with the Lemonway WebKit URL. You can find the WebKit URL in the onboarding email.
Example:
https://sandbox-webkit.lemonway.fr/YOUR_COMPANY/dev/ -
After submitting the payment, the end-user will be redirected to one of the following URLs:
returnUrlin case of successcancelUrlin case of cancellationerrorUrlin case of error
These three URLs must be publicly accessible so that the end-user and the Lemonway WebKit server can send requests to them.
Payment with a Registered Card Web
To use this type of payment, you must first complete at least one transaction with registerCard=true.
During this first transaction, Lemonway returns a cardId associated with the client’s card. Make sure you save this cardId, as it is required for future payments.
Note: To ensure that the client’s card has been registered, call
GetCardbefore initiating payments on a registered card.
Payments with a registered card follow this process:
- Call
MoneyInWebInit. - Include the
cardIdin the body of the request. - Follow the same redirect and callback process described in steps 2 and 3 of Payment with a New Card.
Subscription Payments
A prerequisite for setting up a subscription is that you have previously made a payment with a card and registered the card by calling:
POST /moneyins/card/webinitNote: When creating a recurring payment, ensure that
recurringAvgAmountis higher thantotalAmount.If a lower amount is used for
recurringAvgAmount, you will receive the following DirectKit error:368: recurringAvgAmountThis error indicates that the recurring average amount should be greater than the transaction amount.
Note: The initial transaction for a subscription can be for a predetermined or undetermined length of time.
After the card has been registered, use the following endpoint to begin setting up a subscription or payment by delivery system:
POST /moneyins/card/{cardid}/rebillImportant: To increase the likelihood of frictionless payments, you must set up payments with equal recurring amounts.
Deferred Payments
To create a deferred web payment, include captureDelayedDays in the request.
The value must be between 1 and 6 days to have a guaranteed payment.
To validate the pre-authorization and capture the funds, call the following endpoint before the end of the 6-day period:
PUT /moneyins/{transactionid}/validateIf the capture is successful, the original transaction status switches to Success.
Availability: Deferred payments are available on Mercanet v2.
401Unauthorized
500InternalServerError
