Refunds

Overview

On Revio, you can refund a transaction quickly with the API or the Revio dashboard.

πŸ“˜

Refunds are not setup up by default. Please contact your Revio account manager to activate this feature for you.


Dashboard refund

Refunding customers via the Revio dashboard is easy to do. Navigate to your feed section and select refund by clicking on the ellipses next to the transaction you want to refund.

3454

Refunds via the API

Send a request to the refund endpoint with the purchase_id in the Request URL to initiate a refund and consult the refund_availability field on Purchase in detail about whether this Purchase can be refunded or not.

This request will generate a Payment object and return it as a successful response.

curl -X 'POST' \
  'https://gate.reviopay.com/api/v1/purchases/07e9c8d2-5af7-4c40-92e4-866a07bed7cd/refund/' \
  -H 'Authorization: Bearer {Revio API key}' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "amount": 120
}'

If this operation takes too long to be processed on the acquirer side - you will get a response with status code 200 and a Purchase object having status = pending_refund in body (you will receive a corresponding Webhook callback too for a purchase.pending_refund event).

To be notified of a successful operation completion, please subscribe to payment.refunded callback event - it will deliver a Payment generated by this refund.

If refund fails due to payment processing error, you will receive HTTP response code 400 with error code purchase_refund_error.

In this case, to get more details about the error, you should perform a GET /purchase/ request for the Purchase you tried to refund. In transaction_data.attempts[] array (newest element first) you'll find the corresponding attempt with error code and description in .errorparameter.

πŸ“˜

Pro tip

An optional amount argument can be included in the request body to request a partial refund.