---
title: "Refund a transaction"
method: POST
path: "/transactions/{transaction_id}/refund"
tags: ["Transactions"]
---

# Refund a transaction

`POST /transactions/{transaction_id}/refund`

## Request

- Base URL: `https://api.vrio.app`
- URL: `https://api.vrio.app/transactions/{transaction_id}/refund`
- Auth: API key in header `X-Api-Key`

Process a refund on a transaction.

## Request body

- object
  - `refund_amount` string, required: Set the refund amount. It cannot exceed the total minus any refunds or chargebacks.
  - `cancel_order_offer` boolean: Cancel any active order offer associated with the transaction.
  - `cancel_active_shipment` boolean: Cancel any active shipment associated with the transaction.
  - `check_refund` boolean: Should it be sent as a check refund. This will not process at the gateway and a check will need to be manually issued.
  - `transaction_notes` string: Apply note to the history of this transaction.

## Response `200`

OK

- object
  - `success` boolean
  - `response_code` integer
  - `response` string
  - `gateway_response_id` string
  - `gateway_response_gateway_id` string
  - `gateway_response_code` string
  - `gateway_auth_code` string
  - `gateway_response_cvv` string
  - `gateway_response_avs` string
  - `gateway_response_text` string
  - `gateway_request_text` string
  - `processor_response_text` string
  - `date_request` string, date-time, nullable
  - `date_response` string, date-time, nullable
  - `merchant_id` integer
  - `merchant_descriptor` string, nullable
  - `reason` string, nullable: Reason in case of merchant error.
  - `gateway_response_description` string
  - `gateway_hard_decline` string
  - `transaction_id` integer
  - `transaction_total` string
  - `transaction_price` string
  - `transaction_tax` string
  - `transaction_shipping` string
  - `transaction_discount_total` string
  - `gift_card_applied` string
  - `customer_balance_applied` string
  - `post_data` string, nullable
  - `shipment_id` integer, nullable
  - `reattempt_data` object[]
    - `success` boolean
    - `response_code` integer
    - `response` string
    - `gateway_response_id` string
    - `gateway_response_gateway_id` string
    - `gateway_response_code` string
    - `gateway_auth_code` string
    - `gateway_response_cvv` string
    - `gateway_response_avs` string
    - `gateway_response_text` string
    - `gateway_request_text` string
    - `processor_response_text` string
    - `date_request` string, date-time, nullable
    - `date_response` string, date-time, nullable
    - `merchant_id` integer
    - `merchant_descriptor` string, nullable
    - `reason` string, nullable: Reason in case of merchant error.
    - `gateway_response_description` string
    - `gateway_hard_decline` string
    - `transaction_id` integer
    - `transaction_total` string
    - `transaction_price` string
    - `transaction_tax` string
    - `transaction_shipping` string
    - `transaction_discount_total` string
    - `gift_card_applied` string
    - `customer_balance_applied` string
    - `post_data` string, nullable
    - `shipment_id` integer, nullable

## Other responses

- `400`: Process Error response
- `401`: Unauthorized response
- `403`: Forbidden response
- `500`: Error response

---

[API](https://skmtc.dev/vrio/apis/customer-service.md) - [All operations](https://skmtc.dev/vrio/apis/customer-service/llms.txt) - [OpenAPI document](https://skmtc.dev/vrio/apis/customer-service/revisions/88f76a0e56f0?raw)
