---
updatedAt: 2026-07-30T07:15:10.000Z
agentTools:
  projectIndex: https://docs.geidea.net/llms.txt
---

# Refund - Full or Partial

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Transaction Management",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://api.ksamerchant.geidea.net",
      "description": "Saudi Arabia - Production"
    },
    {
      "url": "https://api.merchant.geidea.net",
      "description": "Egypt - Production"
    },
    {
      "url": "https://api.geidea.ae",
      "description": "UAE - Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/pgw/api/v2/direct/refund": {
      "post": {
        "summary": "Refund - Full or Partial",
        "description": "",
        "operationId": "refund-1",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orderId",
                  "signature",
                  "refundAmount",
                  "timestamp",
                  "callbackUrl"
                ],
                "properties": {
                  "orderId": {
                    "type": "string",
                    "description": "This is a unique identifier for this order to discern it from the other orders you created. If orderId is not sent with the request, an orderId is created by the server and returned in the response. The orderid can be used to refer to this order in subsequent transactions and in retrieving metadata about the order. The orderId must always be unique for every order created under your merchant profile. This must be a valid GUID.",
                    "default": "8fc74500-9c90-47f6-93c9-08db0d960781"
                  },
                  "callbackUrl": {
                    "type": "string",
                    "description": "The URL where the response containing order details will be returned. Must be a valid URL and must have an HTTPS protocol.",
                    "default": "https://www.callback.com"
                  },
                  "refundAmount": {
                    "type": "number",
                    "description": "Amount for which refund is requested. Amount must be greater than 0.01. Must not have more than 2 digits after the decimal point.",
                    "default": 10.23,
                    "format": "float"
                  },
                  "timestamp": {
                    "type": "string",
                    "description": "The timestamp of the moment at which the refund request has been initiated.",
                    "default": "2/21/2024 5:16:48 AM"
                  },
                  "signature": {
                    "type": "string",
                    "description": "A parameter to ensure the security and authenticity of API communications. It involves generating a signature using the contents of the API request and secret keys, which is then sent along with the request."
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "orderId": "8fc74500-9c90-47f6-93c9-08db0d960781",
                    "callbackUrl": "https://www.goog.lo",
                    "refundAmount": 10
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"orderId\": \"8fc74500-9c90-47f6-93c9-08db0d960781\",\n    \"responseMessage\": \"Refund failed\",\n    \"detailedResponseMessage\": \"Refund failed - payment for order has not been completed\",\n    \"language\": \"en\",\n    \"responseCode\": \"800\",\n    \"detailedResponseCode\": \"002\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "orderId": {
                      "type": "string",
                      "example": "8fc74500-9c90-47f6-93c9-08db0d960781"
                    },
                    "responseMessage": {
                      "type": "string",
                      "example": "Refund failed"
                    },
                    "detailedResponseMessage": {
                      "type": "string",
                      "example": "Refund failed - payment for order has not been completed"
                    },
                    "language": {
                      "type": "string",
                      "example": "en"
                    },
                    "responseCode": {
                      "type": "string",
                      "example": "800"
                    },
                    "detailedResponseCode": {
                      "type": "string",
                      "example": "002"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"type\": \"https://tools.ietf.org/html/rfc7231#section-6.5.1\",\n    \"title\": \"One or more validation errors occurred.\",\n    \"status\": 400,\n    \"traceId\": \"00-6b581a1cc0b34fd0f36650963ef7088f-4a6c1fa2f7f530f0-01\",\n    \"errors\": {\n        \"$\": [\n            \"The JSON object contains a trailing comma at the end which is not supported in this mode. Change the reader options. Path: $ | LineNumber: 4 | BytePositionInLine: 0.\"\n        ]\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "example": "https://tools.ietf.org/html/rfc7231#section-6.5.1"
                    },
                    "title": {
                      "type": "string",
                      "example": "One or more validation errors occurred."
                    },
                    "status": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "traceId": {
                      "type": "string",
                      "example": "00-6b581a1cc0b34fd0f36650963ef7088f-4a6c1fa2f7f530f0-01"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {
                        "$": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "The JSON object contains a trailing comma at the end which is not supported in this mode. Change the reader options. Path: $ | LineNumber: 4 | BytePositionInLine: 0."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```