diff --git a/packages/app-store/apps.browser.generated.tsx b/packages/app-store/apps.browser.generated.tsx
index e623dbc919f359..8d80a68a6b6a0e 100644
--- a/packages/app-store/apps.browser.generated.tsx
+++ b/packages/app-store/apps.browser.generated.tsx
@@ -27,6 +27,7 @@ export const EventTypeAddonMap = {
ga4: dynamic(() => import("./ga4/components/EventTypeAppCardInterface")),
giphy: dynamic(() => import("./giphy/components/EventTypeAppCardInterface")),
gtm: dynamic(() => import("./gtm/components/EventTypeAppCardInterface")),
+ hitpay: dynamic(() => import("./hitpay/components/EventTypeAppCardInterface")),
hubspot: dynamic(() => import("./hubspot/components/EventTypeAppCardInterface")),
matomo: dynamic(() => import("./matomo/components/EventTypeAppCardInterface")),
metapixel: dynamic(() => import("./metapixel/components/EventTypeAppCardInterface")),
@@ -56,6 +57,7 @@ export const EventTypeSettingsMap = {
ga4: dynamic(() => import("./ga4/components/EventTypeAppSettingsInterface")),
giphy: dynamic(() => import("./giphy/components/EventTypeAppSettingsInterface")),
gtm: dynamic(() => import("./gtm/components/EventTypeAppSettingsInterface")),
+ hitpay: dynamic(() => import("./hitpay/components/EventTypeAppSettingsInterface")),
metapixel: dynamic(() => import("./metapixel/components/EventTypeAppSettingsInterface")),
paypal: dynamic(() => import("./paypal/components/EventTypeAppSettingsInterface")),
plausible: dynamic(() => import("./plausible/components/EventTypeAppSettingsInterface")),
diff --git a/packages/app-store/apps.keys-schemas.generated.ts b/packages/app-store/apps.keys-schemas.generated.ts
index c896d27cdc1f9f..e4e3d8e265df3b 100644
--- a/packages/app-store/apps.keys-schemas.generated.ts
+++ b/packages/app-store/apps.keys-schemas.generated.ts
@@ -14,6 +14,7 @@ import { appKeysSchema as giphy_zod_ts } from "./giphy/zod";
import { appKeysSchema as googlecalendar_zod_ts } from "./googlecalendar/zod";
import { appKeysSchema as googlevideo_zod_ts } from "./googlevideo/zod";
import { appKeysSchema as gtm_zod_ts } from "./gtm/zod";
+import { appKeysSchema as hitpay_zod_ts } from "./hitpay/zod";
import { appKeysSchema as hubspot_zod_ts } from "./hubspot/zod";
import { appKeysSchema as intercom_zod_ts } from "./intercom/zod";
import { appKeysSchema as jelly_zod_ts } from "./jelly/zod";
@@ -61,6 +62,7 @@ export const appKeysSchemas = {
googlecalendar: googlecalendar_zod_ts,
googlevideo: googlevideo_zod_ts,
gtm: gtm_zod_ts,
+ hitpay: hitpay_zod_ts,
hubspot: hubspot_zod_ts,
intercom: intercom_zod_ts,
jelly: jelly_zod_ts,
diff --git a/packages/app-store/apps.metadata.generated.ts b/packages/app-store/apps.metadata.generated.ts
index 05c112e0f7a6fa..96d8b842bf990f 100644
--- a/packages/app-store/apps.metadata.generated.ts
+++ b/packages/app-store/apps.metadata.generated.ts
@@ -32,6 +32,7 @@ import { metadata as giphy__metadata_ts } from "./giphy/_metadata";
import { metadata as googlecalendar__metadata_ts } from "./googlecalendar/_metadata";
import { metadata as googlevideo__metadata_ts } from "./googlevideo/_metadata";
import gtm_config_json from "./gtm/config.json";
+import hitpay_config_json from "./hitpay/config.json";
import horizon_workrooms_config_json from "./horizon-workrooms/config.json";
import { metadata as hubspot__metadata_ts } from "./hubspot/_metadata";
import { metadata as huddle01video__metadata_ts } from "./huddle01video/_metadata";
@@ -126,6 +127,7 @@ export const appStoreMetadata = {
googlecalendar: googlecalendar__metadata_ts,
googlevideo: googlevideo__metadata_ts,
gtm: gtm_config_json,
+ hitpay: hitpay_config_json,
"horizon-workrooms": horizon_workrooms_config_json,
hubspot: hubspot__metadata_ts,
huddle01video: huddle01video__metadata_ts,
diff --git a/packages/app-store/apps.schemas.generated.ts b/packages/app-store/apps.schemas.generated.ts
index 8fc3cd923d05d7..b584885b07c60d 100644
--- a/packages/app-store/apps.schemas.generated.ts
+++ b/packages/app-store/apps.schemas.generated.ts
@@ -14,6 +14,7 @@ import { appDataSchema as giphy_zod_ts } from "./giphy/zod";
import { appDataSchema as googlecalendar_zod_ts } from "./googlecalendar/zod";
import { appDataSchema as googlevideo_zod_ts } from "./googlevideo/zod";
import { appDataSchema as gtm_zod_ts } from "./gtm/zod";
+import { appDataSchema as hitpay_zod_ts } from "./hitpay/zod";
import { appDataSchema as hubspot_zod_ts } from "./hubspot/zod";
import { appDataSchema as intercom_zod_ts } from "./intercom/zod";
import { appDataSchema as jelly_zod_ts } from "./jelly/zod";
@@ -61,6 +62,7 @@ export const appDataSchemas = {
googlecalendar: googlecalendar_zod_ts,
googlevideo: googlevideo_zod_ts,
gtm: gtm_zod_ts,
+ hitpay: hitpay_zod_ts,
hubspot: hubspot_zod_ts,
intercom: intercom_zod_ts,
jelly: jelly_zod_ts,
diff --git a/packages/app-store/apps.server.generated.ts b/packages/app-store/apps.server.generated.ts
index bc2c49c2af0a4a..f8639aeafd66b6 100644
--- a/packages/app-store/apps.server.generated.ts
+++ b/packages/app-store/apps.server.generated.ts
@@ -32,6 +32,7 @@ export const apiHandlers = {
googlecalendar: import("./googlecalendar/api"),
googlevideo: import("./googlevideo/api"),
gtm: import("./gtm/api"),
+ hitpay: import("./hitpay/api"),
"horizon-workrooms": import("./horizon-workrooms/api"),
hubspot: import("./hubspot/api"),
huddle01video: import("./huddle01video/api"),
diff --git a/packages/app-store/hitpay/DESCRIPTION.md b/packages/app-store/hitpay/DESCRIPTION.md
new file mode 100644
index 00000000000000..a4b15502c3bfb7
--- /dev/null
+++ b/packages/app-store/hitpay/DESCRIPTION.md
@@ -0,0 +1,8 @@
+---
+items:
+ - 1.jpeg
+ - 2.jpeg
+ - 3.jpeg
+---
+
+{DESCRIPTION}
diff --git a/packages/app-store/hitpay/LICENSE b/packages/app-store/hitpay/LICENSE
new file mode 100644
index 00000000000000..86aae54b2907fd
--- /dev/null
+++ b/packages/app-store/hitpay/LICENSE
@@ -0,0 +1,42 @@
+The Cal.com Commercial License (EE) license (the “EE License”)
+Copyright (c) 2020-present Cal.com, Inc
+
+With regard to the Cal.com Software:
+
+This software and associated documentation files (the "Software") may only be
+used in production, if you (and any entity that you represent) have agreed to,
+and are in compliance with, the Cal.com Subscription Terms available
+at https://cal.com/terms (the “EE Terms”), or other agreements governing
+the use of the Software, as mutually agreed by you and Cal.com, Inc ("Cal.com"),
+and otherwise have a valid Cal.com Commercial License subscription ("EE Subscription")
+for the correct number of hosts as defined in the EE Terms ("Hosts"). Subject to the foregoing sentence,
+you are free to modify this Software and publish patches to the Software. You agree
+that Cal.com and/or its licensors (as applicable) retain all right, title and interest in
+and to all such modifications and/or patches, and all such modifications and/or
+patches may only be used, copied, modified, displayed, distributed, or otherwise
+exploited with a valid EE Subscription for the correct number of hosts.
+Notwithstanding the foregoing, you may copy and modify the Software for development
+and testing purposes, without requiring a subscription. You agree that Cal.com and/or
+its licensors (as applicable) retain all right, title and interest in and to all such
+modifications. You are not granted any other rights beyond what is expressly stated herein.
+Subject to the foregoing, it is forbidden to copy, merge, publish, distribute, sublicense,
+and/or sell the Software.
+
+This EE License applies only to the part of this Software that is not distributed under
+the AGPLv3 license. Any part of this Software distributed under the MIT license or which
+is served client-side as an image, font, cascading stylesheet (CSS), file which produces
+or is compiled, arranged, augmented, or combined into client-side JavaScript, in whole or
+in part, is copyrighted under the AGPLv3 license. The full text of this EE License shall
+be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+For all third party components incorporated into the Cal.com Software, those
+components are licensed under the original license provided by the owner of the
+applicable component.
diff --git a/packages/app-store/hitpay/api/add.ts b/packages/app-store/hitpay/api/add.ts
new file mode 100644
index 00000000000000..1d4593d604b16c
--- /dev/null
+++ b/packages/app-store/hitpay/api/add.ts
@@ -0,0 +1,42 @@
+import type { NextApiRequest, NextApiResponse } from "next";
+
+import prisma from "@calcom/prisma";
+
+import config from "../config.json";
+
+export default async function handler(req: NextApiRequest, res: NextApiResponse) {
+ if (!req.session?.user?.id) {
+ return res.status(401).json({ message: "You must be logged in to do this" });
+ }
+ const appType = config.type;
+ try {
+ const alreadyInstalled = await prisma.credential.findFirst({
+ where: {
+ type: appType,
+ userId: req.session.user.id,
+ },
+ });
+ if (alreadyInstalled) {
+ throw new Error("Already installed");
+ }
+ const installation = await prisma.credential.create({
+ data: {
+ type: appType,
+ key: {},
+ userId: req.session.user.id,
+ appId: "hitpay",
+ },
+ });
+
+ if (!installation) {
+ throw new Error("Unable to create user credential for Alby");
+ }
+ } catch (error: unknown) {
+ if (error instanceof Error) {
+ return res.status(500).json({ message: error.message });
+ }
+ return res.status(500);
+ }
+
+ return res.status(200).json({ url: "/apps/hitpay/setup" });
+}
diff --git a/packages/app-store/hitpay/api/callback.ts b/packages/app-store/hitpay/api/callback.ts
new file mode 100644
index 00000000000000..0ad5c5fca29256
--- /dev/null
+++ b/packages/app-store/hitpay/api/callback.ts
@@ -0,0 +1,67 @@
+import type { NextApiRequest, NextApiResponse } from "next";
+import qs from "qs";
+
+import prisma from "@calcom/prisma";
+
+export default async function handler(req: NextApiRequest, res: NextApiResponse) {
+ const { reference, status } = req.query;
+ let payment;
+ if (reference) {
+ payment = await prisma.payment.findFirst({
+ where: {
+ externalId: reference,
+ },
+ select: {
+ id: true,
+ amount: true,
+ bookingId: true,
+ booking: {
+ select: {
+ uid: true,
+ user: {
+ select: {
+ email: true,
+ username: true,
+ credentials: {
+ where: {
+ type: "hitpay_payment",
+ },
+ },
+ },
+ },
+ responses: true,
+ eventType: {
+ select: {
+ slug: true,
+ },
+ },
+ },
+ },
+ },
+ });
+
+ if (!payment) {
+ return res.redirect("/apps/installed/payment");
+ }
+ const key = payment.booking?.user?.credentials?.[0].key;
+ if (!key) {
+ return res.redirect("/apps/installed/payment");
+ }
+ }
+ if (status !== "completed") {
+ const url = `/${payment.booking.user.username}/${payment.booking.eventType.slug}`;
+ return res.redirect(url);
+ }
+
+ const queryParams = {
+ "flag.coep": false,
+ isSuccessBookingPage: true,
+ email: payment.booking.responses.email,
+ eventTypeSlug: payment.booking.eventType.slug,
+ };
+
+ const query = qs.stringify(queryParams);
+ const url = `/booking/${payment.booking.uid}?${query}`;
+
+ return res.redirect(url);
+}
diff --git a/packages/app-store/hitpay/api/index.ts b/packages/app-store/hitpay/api/index.ts
new file mode 100644
index 00000000000000..567bbf79794bf8
--- /dev/null
+++ b/packages/app-store/hitpay/api/index.ts
@@ -0,0 +1,3 @@
+export { default as add } from "./add";
+export { default as callback } from "./callback";
+export { default as webhook } from "./webhook";
diff --git a/packages/app-store/hitpay/api/webhook.ts b/packages/app-store/hitpay/api/webhook.ts
new file mode 100644
index 00000000000000..90a3ee79d25b22
--- /dev/null
+++ b/packages/app-store/hitpay/api/webhook.ts
@@ -0,0 +1,93 @@
+import { createHmac } from "crypto";
+import type { NextApiRequest, NextApiResponse } from "next";
+
+import { IS_PRODUCTION } from "@calcom/lib/constants";
+import { getErrorFromUnknown } from "@calcom/lib/errors";
+import { HttpError as HttpCode } from "@calcom/lib/http-error";
+import { handlePaymentSuccess } from "@calcom/lib/payment/handlePaymentSuccess";
+import prisma from "@calcom/prisma";
+
+export const config = {
+ api: {
+ bodyParser: false,
+ },
+};
+
+interface WebhookReturn {
+ payment_id: string;
+ payment_request_id: string;
+ phone: string;
+ amount: string;
+ currency: string;
+ status: string;
+ reference_number: string;
+ hmac: string;
+}
+
+type ExcludedWebhookReturn = Omit Couldn't obtain payment URL Authorization failed: {error} Connecting... HitPay Connected!