Skip to main content

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.

If Rootline is not able to schedule the refund you will receive a refund.scheduled.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. The funds will be reversed to your account.

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.scheduled.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.