API Reference
Log In
API Reference

Find out when and how to refund a payment

When a payment is reached captured status you can refund the payment. You can refund a payment through the Rootline Dashboard or using the API.

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.