Refund a Money-In

This endpoint allows you to refund a Money-In transaction to the original funding source, either the cardholder’s card or the bank account used to initiate the payment.

By default, this endpoint issues a full refund. To issue a partial refund, specify the amountToRefund parameter. Multiple partial refunds are supported, provided that the total refunded amount does not exceed the original transaction amount.

💰

Refunds

If the merchant wallet balance is insufficient, the shortfall is automatically covered by the SC Wallet.

⚠️

Important

Card refunds are processed asynchronously. The API returns Pending immediately, and the final status, Success or Error, is confirmed later by the payment scheme.

To receive the final status, configure a webhook URL with Lemonway. Lemonway will send a POST notification once the refund has been finalized.

General Rules

  • A refund can only be made to the cardholder's original card or the bank that made the initial payment.
  • Lemonway reserves the right to retain the payment fee.
  • If no refund amount is specified, the total amount is refunded.
  • If the client wallet has insufficient funds, an ON-US payment is automatically performed from your SC Wallet to the Client Wallet, before the card refund.

Time Restrictions on Payments

  • It is possible to cumulate refunds until the total amount is refunded.
  • Card payment refunds are not available from 22:00 to 03:00 (Central European Time)
  • Refunds can only be made up to 12 months after the initial payment.
  • Wire transfer refunds can be made up to 365 days after the initial payment.
  • iDEAL Refunds are only available up to 99 days after the initial payment

Response Codes

Refund accepted. Status is Pendingthen Success/Error after the notification from webhook.

When the transaction object Status is Pending the refund has been submitted to the payment scheme and is awaiting confirmation.

The transaction reaches Success or Error asynchronously. You can check the final status with GET /transaction or configure a webhook URL to receive a push notification.

📘

Note

In the Dashboard these statuses appear as Pending, Completed (Success) and Failed (Error)


Merchant Webhook Notification

Once the refund reaches a final state, Lemonway sends a POST notification to the merchant’s configured webhook URL.

Configuration

The webhook URL must be pre-configured by Lemonway. To set this up, provide your webhook URL to your Implementation Team.

Example


https://webhook.myshop.com/lemonway/refunds
📘

Note

If a webhook URL is not configured, no notification is sent. The event is recorded as skipped for traceability.

Payload

The notification is sent as application/x-www-form-urlencoded with the following fields:

Your endpoint must return HTTP 200 to acknowledge receipt. Any other response or timeout is logged as failed by Lemonway.

Field: response_code

Response status code returned by Lemonway.

  • 0000 — refund completed successfully
  • 3000 — refund failed


Field: response_wkToken

Merchant token of the original payment.



Field: response_transactionAmount

Refunded amount.


Path Params
int64
required
Body Params
int32
^-?[0-9]{1,13}(.[0-9]{2}){0,1}$

Refund Amount. If empty, the total amount of the payment will be refunded.

string
length between 0 and 140

Comment on the refund.
Explain the reason for the refunded amount
Note: In the API Response displayed before the comment will appear the refund transaction id. Example: comment": "Refund 2763789 Items not wanted"

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