import Link from "next/link"; import { useRouter } from "next/navigation"; import { useState } from "react"; import { Toaster } from "react-hot-toast"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc"; import { Button, showToast, TextField } from "@calcom/ui"; import { Icon } from "@calcom/ui"; export default function PayPalSetup() { const [newClientId, setNewClientId] = useState(""); const [newSecretKey, setNewSecretKey] = useState(""); const router = useRouter(); const { t } = useLocale(); const integrations = trpc.viewer.integrations.useQuery({ variant: "payment", appId: "paypal" }); const [paypalPaymentAppCredentials] = integrations.data?.items || []; const [credentialId] = paypalPaymentAppCredentials?.userCredentialIds || [-1]; const showContent = !!integrations.data && integrations.isSuccess && !!credentialId; const saveKeysMutation = trpc.viewer.appsRouter.updateAppCredentials.useMutation({ onSuccess: () => { showToast(t("keys_have_been_saved"), "success"); router.push("/event-types"); }, onError: (error) => { showToast(error.message, "error"); }, }); if (integrations.isPending) { return
; } return (Paypal
Getting started with Paypal APP
Here in Cal.com we offer Paypal as one of our payment gateway. You can use your own Paypal Business account to receive payments from your customers enabling and setting up price and currency for each of your event types.
Resources:
Link to Paypal developer API REST Setup Guide: https://developer.paypal.com/api/rest/#link-getclientidandclientsecretSetup instructions
Remember to only proceed with the following steps if your account has already been upgraded to a business account. Also keep in mind that some of the following steps might be different since Paypal offers different experiences based on your country.
Our integration creates a specific webhook on your Paypal account that we use to report back transactions to our system. If you delete this webhook, we will not be able to report back and you should Uninstall and Install the app again for this to work again. Uninstalling the app won't delete your current event type price/currency configuration but you would not be able to receive bookings.