---
agentTools:
  projectIndex: https://paytech.readme.io/llms.txt
---

# /api/v1/payments/{id}/operations

Get a list of operations performed during payment processing sorted by time (most recent first)

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "pay.tech API",
    "description": "Payment API\n",
    "contact": {
      "name": "Support",
      "email": "support@pay.tech"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": ""
  },
  "servers": [
    {
      "url": "https://engine-sandbox.pay.tech",
      "description": "Sandbox"
    },
    {
      "url": "https://engine.pay.tech",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Payment",
      "description": "Merchant Payments API"
    }
  ],
  "paths": {
    "/api/v1/payments/{id}/operations": {
      "get": {
        "tags": [
          "Payment"
        ],
        "description": "Get a list of operations performed during payment processing sorted by time (most recent first)",
        "operationId": "getOperations",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment Id",
            "required": true,
            "schema": {
              "pattern": "/[a-zA-Z0-9]{32}/",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operation List Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          },
          "404": {
            "description": "Payment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFoundError"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuthentication": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    }
  },
  "components": {
    "schemas": {
      "PaymentOperation": {
        "properties": {
          "id": {
            "type": "integer",
            "description": "Operation Id"
          },
          "operation": {
            "$ref": "#/components/schemas/Operation"
          },
          "started": {
            "type": "string",
            "format": "ISO 8601",
            "description": "Operation start time",
            "example": "2020-10-07T13:36:32.595Z"
          },
          "completed": {
            "type": "string",
            "format": "ISO 8601",
            "description": "Operation end time",
            "example": "2020-10-07T13:36:32.595Z"
          },
          "paymentState": {
            "$ref": "#/components/schemas/PaymentState"
          },
          "outgoingMessages": {
            "type": "string",
            "description": "List of messages sent to external APIs during operation processing"
          },
          "incomingMessages": {
            "type": "string",
            "description": "List of messages received from external APIs during operation processing"
          }
        }
      },
      "OperationListResponse": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "ISO 8601",
            "example": "2020-10-07T13:36:32.595Z"
          },
          "status": {
            "type": "integer",
            "description": "HTTP status code",
            "example": 200
          },
          "result": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentOperation"
            }
          }
        }
      },
      "UnauthorizedError": {
        "required": [
          "status",
          "error",
          "message",
          "timestamp",
          "path"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "example": 401
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          },
          "message": {
            "type": "string",
            "example": "Invalid token"
          },
          "timestamp": {
            "type": "string",
            "format": "ISO 8601",
            "example": "2020-10-07T13:32:19.444Z"
          },
          "path": {
            "type": "string",
            "example": "/api/v1/payments"
          }
        },
        "example": {
          "status": 401,
          "error": "Unauthorized",
          "message": "Invalid token",
          "timestamp": "2020-10-07T13:32:19.444Z",
          "path": "/api/v1/resource-name"
        }
      },
      "NotFoundError": {
        "required": [
          "status",
          "error",
          "message",
          "timestamp",
          "path"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "example": 404
          },
          "error": {
            "type": "string",
            "example": "Not Found"
          },
          "message": {
            "type": "string",
            "example": "404 NOT_FOUND"
          },
          "timestamp": {
            "type": "string",
            "format": "ISO 8601",
            "example": "2020-10-07T13:32:19.444Z"
          },
          "path": {
            "type": "string",
            "example": "/api/v1/payments"
          }
        },
        "example": {
          "status": 404,
          "error": "Not Found",
          "message": "404 NOT_FOUND",
          "timestamp": "2020-10-07T13:32:19.444Z",
          "path": "/api/v1/resource-name"
        }
      },
      "PaymentState": {
        "type": "string",
        "description": "Payment State",
        "example": "PENDING",
        "enum": [
          "CHECKOUT",
          "PENDING",
          "AUTHORIZED",
          "CANCELLED",
          "DECLINED",
          "COMPLETED"
        ]
      },
      "Operation": {
        "type": "string",
        "description": "Operation performed during payment processing",
        "example": "CREATE_PAYMENT",
        "enum": [
          "CREATE_PAYMENT",
          "CHECKOUT",
          "CANCEL",
          "CONFIRMATION",
          "CASCADING",
          "REDIRECT",
          "CONTINUE",
          "CONTINUE_ANTI_FRAUD",
          "DETECT_FRAUD",
          "DEPOSIT",
          "WITHDRAWAL",
          "REFUND",
          "CHARGEBACK",
          "CAPTURE",
          "VOID",
          "CHECK_STATE",
          "HANDLE_WEBHOOK",
          "MANUAL_UPDATE"
        ]
      }
    },
    "securitySchemes": {
      "bearerAuthentication": {
        "type": "http",
        "description": "The client sends HTTP requests with the Authorization header that contains the word Bearer followed by a space and the Shop Api Key.",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 101,
      "1": 45,
      "2": 69,
      "3": 133,
      "4": 174,
      "5": 147,
      "6": 179,
      "7": 8,
      "8": 208,
      "9": 63,
      "10": 103,
      "11": 68
    }
  }
}
```