Integrations
Sources
Incoming webhooks
Stripe

How to connect Stripe to Knock

Learn how to use Stripe webhooks to trigger notifications and manage data in Knock.

The Stripe source enables you to receive Stripe webhook events in Knock and map them to actions like triggering workflows, identifying users, and managing tenants. Knock provides a pre-built integration with webhook verification and event-to-action mappings ready to use.

Prerequisites

#
  • A Stripe account with access to the Developers section
  • A Knock account with at least one workflow configured

Getting started

#
1

Create the source in Knock

Navigate to Integrations > Sources in your Knock dashboard and click "Create source." Select Stripe from the list of pre-built integrations.

2

Copy the webhook URL

Copy the webhook URL for the Knock environment you want to configure.

3

Add the webhook endpoint in Stripe

In your Stripe Dashboard, go to Developers > Webhooks and click "Add endpoint." Paste the Knock webhook URL and select the event types you want to receive.

4

Copy the signing secret

After creating the endpoint in Stripe, click on it to reveal the Signing secret. Copy this value.

5

Paste the signing secret in Knock

Back in the Knock dashboard, paste the Stripe signing secret into the source configuration. Knock uses this to verify that incoming webhooks are from Stripe.

6

Review event mappings

Review the pre-configured event-to-action mappings and enable the ones relevant to your use case.

Pre-configured events

#

The Stripe source comes with mappings for common Stripe webhook event types. You can enable or disable each mapping independently.

Stripe eventSuggested actionDescription
customer.createdIdentify userCreates or updates a user in Knock when a new Stripe customer is created
customer.updatedIdentify userUpdates user properties in Knock when customer details change
customer.subscription.createdTrigger workflowNotifies users when a new subscription starts
customer.subscription.updatedTrigger workflowNotifies users of subscription changes (upgrades, downgrades)
customer.subscription.deletedTrigger workflowNotifies users when a subscription is canceled
invoice.paidTrigger workflowSends a payment confirmation notification
invoice.payment_failedTrigger workflowAlerts users to failed payment attempts
charge.refundedTrigger workflowNotifies users when a refund is processed

Customization

#

You can modify any of the pre-configured mappings or create new ones for additional Stripe event types. When customizing field mappings, use dot notation to reference nested fields in the Stripe webhook payload (e.g. data.object.customer_email).

For details on building custom event-action mappings and field mapping, see the custom webhooks documentation.

New chat