{
  "openapi": "3.0.3",
  "info": {
    "title": "Mollie Subscription Renew Webhook Endpoint",
    "description": "Endpoint for handling Mollie subscription renewal webhook notifications.",
    "version": "1.0.0"
  },
  "paths": {
    "/mollie/webhook/subscription/{swSubscriptionId}/renew": {
      "get": {
        "summary": "Handle Mollie Subscription Renewal Webhook Notification (GET)",
        "operationId": "handleMollieSubscriptionRenewalWebhookGet",
        "parameters": [
          {
            "name": "swSubscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the subscription associated with the renewal webhook."
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook handled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Optional success message."
                    }
                  },
                  "required": ["success"]
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["success", "error"]
                },
                "example": {
                  "success": false,
                  "error": "Unprocessable entity error message."
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Handle Mollie Subscription Renewal Webhook Notification (POST)",
        "operationId": "handleMollieSubscriptionRenewalWebhookPost",
        "parameters": [
          {
            "name": "swSubscriptionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the subscription associated with the renewal webhook."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The ID of the Mollie payment associated with the renewal webhook."
                  },
                  "subscriptionId": {
                    "type": "string",
                    "description": "The ID of the Mollie subscription associated with the renewal webhook."
                  }
                },
                "required": ["id", "subscriptionId"],
                "example": {
                  "id": "tr_123456789",
                  "subscriptionId": "sub_987654321"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook handled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Optional success message."
                    }
                  },
                  "required": ["success"]
                },
                "example": {
                  "success": true
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": ["success", "error"]
                },
                "example": {
                  "success": false,
                  "error": "Unprocessable entity error message."
                }
              }
            }
          }
        }
      }
    }
  }
}
