# Refund Request

Use this request to refund a settled transaction. Refunds can also be issued manually from the UpGate back office. Partial refunds are supported only for card, Apple Pay, and Google Pay payments, and only with certain processors. For all other payment methods, the full amount must be refunded.

Endpoint: POST /refund
Version: 1.2
Security: X-Api-Key

## Request fields (application/json):

  - `transaction_id` (string, required)

  - `reason` (string)

  - `initiated_by` (string)

  - `amount` (string)
    Amount to refund. Should only be provided in case of partial refund.

  - `currency_code` (string)
    Currency code (ISO 4217), should be present if amount is provided

## Response 200 fields (application/json):

  - `type` (string, required)
    Enum: "REFUND"

  - `data` (object, required)

  - `data.transaction_id` (string, required)

  - `data.reason` (string)
    Optional field

  - `data.initiated_by` (string)
    Optional field

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.error_code` (string, required)
    Enum: "INVALID_REQUEST_PARAMETER", "INVALID_REQUEST", "INTERNAL_ERROR", "TOO_MANY_REQUESTS", "NOT_FOUND"

  - `errors.error_message` (string, required)


