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.
RefundsIf the merchant wallet balance is insufficient, the shortfall is automatically covered by the SC Wallet.
ImportantCard refunds are processed asynchronously. The API returns
Pendingimmediately, and the final status,SuccessorError, 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.
Unauthorized - invalid or missing bearer token.
Internal server 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
NoteIf 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 successfully3000— refund failed
Field: response_msg
Human-readable response message.
Field: response_wkToken
Merchant token of the original payment.
Field: response_transactionId
Lemonway transaction ID.
Field: response_transactionAmount
Refunded amount.
Field: response_transactionMessage
Payment comment.
401Unauthorized
500InternalServerError

