---
updatedAt: 2026-05-29T13:25:42.000Z
agentTools:
  projectIndex: https://developer.eftcorp.com/llms.txt
---

# Initiate a payment refund

Processes a partial or full refund. The refund amount cannot exceed the original payment amount.

# OpenAPI definition

```json
{
  "servers": [
    {
      "url": "https://eclipse-java-sandbox.ukheshe.rocks",
      "description": "Eclipse sandbox environment"
    },
    {
      "url": "https://ukheshe.live",
      "description": "Eclipse production environment"
    },
    {
      "url": "https://eclipse-java-develop.ukheshe.rocks",
      "description": "Eclipse development environment"
    },
    {
      "url": "https://zw.ukheshe.live",
      "description": "Zim Eclipse production environment"
    }
  ],
  "openapi": "3.1.0",
  "components": {
    "schemas": {
      "EclipsePaymentRefund": {
        "description": "Data about a refund to do against a payment.",
        "type": "object",
        "required": [
          "amount",
          "externalUniqueId"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount in the currency of the existing payment",
            "minimum": 1e-9
          },
          "callbackUrl": {
            "type": "string",
            "pattern": "^http(s)?:\\/\\/.*\\..*$",
            "minLength": 10,
            "maxLength": 2000
          },
          "description": {
            "type": "string",
            "description": "Optional. Description or reason for the refund",
            "pattern": "(?s)^(?:[\\t\\r\\n]|[^\\p{C}<>])*$",
            "minLength": 0,
            "maxLength": 2000
          },
          "externalUniqueId": {
            "type": "string",
            "description": "Unique identifier for the refund. Duplicates are rejected to ensure double transactions are impossible. Note: This is NOT the externalUniqueId of the original payment",
            "minLength": 6,
            "maxLength": 100
          }
        }
      },
      "ExceptionData": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "info": {
            "type": "object",
            "additionalProperties": {}
          },
          "severity": {
            "$ref": "#/components/schemas/ExceptionSeverity"
          },
          "spanId": {
            "type": "string"
          },
          "stackTrace": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/ExceptionType"
          }
        }
      },
      "ExceptionSeverity": {
        "type": "string",
        "enum": [
          "CRITICAL",
          "HIGH",
          "INFO",
          "LOW",
          "MEDIUM"
        ]
      },
      "ExceptionType": {
        "type": "string",
        "enum": [
          "BUSINESS",
          "SYSTEM"
        ]
      },
      "PaymentRefundResult": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2022-03-10T12:15:50-04:00"
            ]
          },
          "description": {
            "type": "string"
          },
          "errorDescription": {
            "type": "string",
            "description": "This will only be populated if there was an error"
          },
          "externalUniqueId": {
            "type": "string"
          },
          "gatewayTransactionId": {
            "type": "string"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2022-03-10T12:15:50-04:00"
            ]
          },
          "paymentId": {
            "type": "integer",
            "format": "int64"
          },
          "refundId": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "JWTBearerAuthorisation": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "info": {
    "description": "A RESTful API using JSON as the data transfer model, covering all tenant-facing functionality in the Eclipse payments platform.",
    "title": "Eclipse ReST API",
    "version": "3.0.0"
  },
  "tags": [
    {
      "name": "q) Payments",
      "description": "Manage individual payments: retrieve, update, cancel, process refunds, and obtain proof of payment."
    }
  ],
  "paths": {
    "/eclipse-conductor/rest/v1/tenants/{tenantId}/payments/{paymentId}/refunds": {
      "post": {
        "summary": "Initiate a payment refund",
        "description": "Processes a partial or full refund. The refund amount cannot exceed the original payment amount.",
        "tags": [
          "q) Payments"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "paymentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EclipsePaymentRefund"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRefundResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExceptionData"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "JWTBearerAuthorisation": []
          }
        ]
      }
    }
  }
}
```