Initiate a Web Payment

Card Payments

Payment with a New Card

  1. Call POST /moneyins/card/webinit to receive a MoneyInToken.

    If you want to register the card for future payments, set registerCard=true. In this case, you will also receive a cardId.

  2. 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/
  3. After submitting the payment, the end-user will be redirected to one of the following URLs:

    • returnUrl in case of success
    • cancelUrl in case of cancellation
    • errorUrl in 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 GetCard before initiating payments on a registered card.

Payments with a registered card follow this process:

  1. Call MoneyInWebInit.
  2. Include the cardId in the body of the request.
  3. 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/webinit

Note: When creating a recurring payment, ensure that recurringAvgAmount is higher than totalAmount.

If a lower amount is used for recurringAvgAmount, you will receive the following DirectKit error:

368: recurringAvgAmount

This 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}/rebill

Important: 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}/validate

If the capture is successful, the original transaction status switches to Success.

Availability: Deferred payments are available on Mercanet v2.


Body Params
string

Your site URL called by WebKit to terminate the operation.

string

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

string

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

boolean

Save the card and returns an ID for future payments.

int32

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

string

Indicates the name of the shop on the payment page.

string

Indicates the CardId

int32
enum

Indicates the nature of activity for this Money-In:
0 = Activity 1.
1 = Activity 2.

Allowed:
threeDS
object
riskAnalysis
object
int32

Average 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 transaction.

string

Recurring: If a payment follows a recurring amount or One_shot: when there is no future recurring payments.

string
length between 0 and 50

Unique ID of the call, generated by your server. This ID can be used as a search field when looking for operation details

string
required
length between 0 and 256

Payment Account ID to Credit

int32
required

Amount to Debit
Amounts are given as integer numbers in cents

int32

Your Fee
Amounts are given as integer numbers in cents

string
length between 0 and 140

Comment Regarding the Transaction

boolean

If true:

  1. [amountCom] will be ignored and will be replaced with Lemonway's fee
  2. You will not receive any fee
Headers
string
required

Authorization bearer (OAuth 2)

string

Response language accepted by final client (PSU). English by default

string
required

IP address of the final client (PSU).

string

User-agent of the final client (PSU).

Responses

401

Unauthorized

500

InternalServerError

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json