Initiate a Web Payment

Payment with a New Card

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

    • If you include registerCard=true, you’ll also get back a cardId for future payments.
  2. Redirect your end‑user to the PSP payment page by combining the MoneyInToken with your Lemonway Webkit URL (provided in your onboarding email). For example:

    https://sandbox-webkit.lemonway.fr/YOUR_COMPANY/dev/
  3. After the end‑user submits payment, they’ll be sent to one of three URLs on your system:

    • returnUrl on success
    • cancelUrl on cancellation
    • errorUrl on error

    Make sure all three URLs are publicly accessible so both the end‑user and Lemonway’s WebKit server can reach them.


Payment with a Registered Card (Web)
Before you can use a registered card, you must:

  • Have already made at least one transaction with registerCard=true to obtain and save a cardId.
  • (Optional but recommended) Call the GetCard method to confirm the card is registered.

To process a payment with that saved cardId:

  1. Call POST /moneyins/card/webinit (referred to as “MoneyInWebInit”) and include the cardId in the request body.
  2. Follow steps 2 and 3 from the “Payment with a New Card” flow above to redirect the user and handle return, cancel, or error URLs.

Subscription Payments
Prerequisite: you must have already registered a card via POST /moneyins/card/webinit.

To set up recurring payments:

  • Ensure recurringAvgAmount is greater than totalAmount; otherwise you’ll receive error 368 (recurringAvgAmount must be greater than the transaction amount).
  • The initial subscription transaction can be for a predetermined or undetermined period.

Once the card is registered, call:

POST /moneyins/card/{cardId}/rebill

to begin setting up the subscription or delivery‑based payments.

Important: For the smoothest experience, configure each recurring payment to use the same amount.


Deferred Payments
If you need a deferred web payment:

  1. Include captureDelayedDays (between 1 and 6) in your POST /moneyins/card/webinit request to hold funds.

  2. Before the delay period expires (within 6 days), call:

    PUT /moneyins/{transactionId}/validate

    to capture the funds. Once successful, the transaction status will change to “Success.”

Note: Deferred payments are available on Mercanet v2.


🆕 Activate Payment with Apple Pay

Reach out to your Account Manager or contact our Support Team to get started today!

See: Apple Pay x Lemonway


Important: Whenever you see accountId in a path or body parameter, enter your wallet’s ID.

Language
Click Try It! to start a request and see the response here!