Refunds and cancels

When a payment is successfully captured, you can refund the payment, using the /refund operation. If the payment is not captured yet, and you want to cancel it, you can use the /cancel operation.

Refund using the Dashboard

If you want to refund a payment using the Rootline Dashboard:

  1. Find the payment you want to refund in the payments page.
  2. In the right top of the page click on "Payment Operations" and "Refund Payment".
  3. By default on the root payment you will issue a full refund. On split refunds you can perform a partial refund by entering the amount.
  4. Add a reference for the refund for your reconciliation purposes and click "Refund".

Refund using the API

If you want to refund a payment using the API you need to call the POST /payments/{payment_id}/refund endpoint.

Full refund

If you want to refund the full transaction you provide the root payment_id and a reference for the refund.

{ "reference": "your-refund-reference" }

Partial refund

When you want to make a partial refund you can specify the amount in the refund request

{ "reference": "your-refund-reference", "amount": { "currency": "EUR", "quantity": "5.30" } }

Partial refund split payment

If you want to refund a split payment from a payment you can specify the split_payment_id in the API endpoint and provide a reference for the refund.

POST /payments/{split_payment_id}/refund { "reference": "your-refund-reference" }

When you want to refund only a partial part of the split payment you need to provide the amount in the request as well.

POST /payments/{split_payment_id}/refund { "reference": "your-refund-reference", "amount": { "currency": "EUR", "quantity": "5.30" } }

Refund statuses and webhooks

When you submit a refund, Rootline will handle the refund asynchronous.
Before scheduling the refund Rootline will verify :

  • The payment method supports refunds;
  • The payment can be refunded;
  • The payment has enough balance for the refunds;
  • The payment has no open dispute (see Refunds and disputes).

If Rootline is not able to schedule the refund you will receive a refund.schedule.failed webhook. If the refund is successfully scheduled by Rootline you will receive the refund.scheduled webhook.

It is possible that after Rootline scheduled the refund the refund fails outside the Rootline system. When such an event occurs you will be informed by the refund.failed webhook.

Cancel a payment

When a payment is not yet captured you can cancel the payment.

To cancel the payment you need to call POST /payments/{payment_id}/cancel in the request you need to provide a reference for your reconciliation.

{ "reference": "your-cancel-reference" }

A cancel is processed asynchronous in the Rootline system and the webhooks will inform you of the outcome.

Cancel statuses and webhooks

When you submit a cancel, Rootline will handle the cancel asynchronous.

Before scheduling the cancel Rootline will verify:

  • The payment method supports a capture;
  • The payment has authorized balance to cancel.

When Rootline fails to schedule the cancel you will be informed by the cancel.schedule.failed webhook. If the cancel is accepted by Rootline you will receive a cancel.scheduled webhook and the cancel is submitted to the scheme. If the cancel fails outside of Rootline's system you will receive the cancel.failed webhook.
When the cancel is successful you will receive the canceled wehbook.

Refunds and disputes

A refund and a dispute both return money to the customer, so they can conflict on the same payment.

  • A payment with an open dispute cannot be refunded. From the moment Rootline registers the dispute until it is closed, every refund on that payment is rejected — including refunds on the payment's splits, and regardless of the refund amount. The disputed amount is already being settled through the dispute; if the customer is entitled to the money, accept the dispute instead.
  • The rejection arrives via webhook, not on the API call. Refunds are processed asynchronously: the refund API call itself succeeds and returns the refund. The rejection is then delivered as a refund.schedule.failed webhook with failure_details.code set to open_dispute. Make sure your webhook subscription covers this event, or the refund will silently never execute.
  • When the dispute closes in your favor, refunds work again. No action is needed on your side: a new refund request after the dispute is closed is processed normally.
  • A refund that was already scheduled before the dispute was registered still executes, and does not prevent the chargeback debit. If you refunded and then lose the dispute, the amount leaves your balance once as the refund and again as the chargeback — the two are not netted. Recovery in that case goes through the dispute defense process: your earlier refund is useful evidence, so include it when you defend. See Defending a chargeback.
  • A refund does not withdraw a dispute. Only the customer's bank can do that.

Before refunding, check whether the payment has a dispute. If it does, decide whether to defend or accept instead of refunding.