Ways to connect Stripe
There are two ways to connect your Stripe account in Cal.com platform integrations:1
Direct Stripe Connect atom
Use the standalone Stripe Connect button atom to provide a dedicated connection interface. This is ideal when you want to give users a specific place to manage their Stripe connection.Below code snippet can be used to render the Stripe connect button:For a demonstration of the Stripe connect atom, please refer to the video below.
2
Event Type Settings payment tab
Use the Event Type Settings component with the payments tab enabled. This approach integrates Stripe connection directly into the event type configuration flow, allowing users to set up payments while configuring their event types.Below code snippet can be used to render the Event Type Settings with the payments tab:For a demonstration of the Stripe connect atom via Event Type Settings, please refer to the video below.
Advanced usage
Team integration
To integrate Stripe to team events, pass theteamId prop.
Below code snippet can be used to render the Stripe connect atom for team:
Custom labels
You can customize the button labels for different states (default, loading, and already connected):Redirect URLs
You can specify custom redirect URLs for successful connections and error scenarios:Handling connection status
You can use callback functions to handle connection check success and errors:Custom styling
You can customize the appearance of the button using theclassName, icon, and color props:
Props
We offer all kinds of customizations to the Stripe connect via props. Below is a list of props that can be passed to the Stripe Connect.| Name | Required | Description |
|---|---|---|
| teamId | No | The ID of the team for team-based Stripe connections |
| icon | No | Custom icon to display on the button (defaults to “credit-card”) |
| color | No | Button color variant (defaults to “primary”) |
| isClickable | No | Boolean to override the disabled state and make the button always clickable |
| className | No | To pass in custom classnames from outside for styling the atom |
| label | No | The label for the connect button |
| alreadyConnectedLabel | No | Label to display when atom is in already connected state |
| loadingLabel | No | Label to display when atom is in loading state |
| onCheckError | No | A callback function to handle errors when checking the connection status |
| redir | No | A custom redirect URL link where the user gets redirected after successful authentication |
| errorRedir | No | A custom redirect URL link where the user gets redirected after authentication failure |
| initialData | No | Initial data to be passed for the connection check |
| onCheckSuccess | No | A callback function to handle success when checking the connection status |
Please ensure all custom classnames are valid Tailwind CSS classnames. Note that sometimes the custom
classnames may fail to override the styling with the classnames that you might have passed via props. That
is because the clsx utility function that we use to override classnames inside our components has some
limitations. A simple get around to solve this issue is to just prefix your classnames with ! property just
before passing in any classname.