---
title: "Set up webhooks"
space: "Integrations"
url: "https://integrations.frappe.cloud/integrations/payment-integration/stripe/webhooks"
updated: "2026-09-08"
---

Webhooks let Stripe report payment and subscription events to ERPNext. They allow ERPNext to reconcile a payment even when the customer closes the checkout page before returning to your site.

## Create the endpoint in Stripe

Complete [Connect ERPNext to Stripe](./connect), make sure the ERPNext site has a public HTTPS address, and open Stripe in the same test or live mode as the keys in Stripe Settings.

1. Open **Stripe Settings** in ERPNext.
2. Copy the read-only **Webhook URL**.
3. Open [Webhooks in the Stripe Dashboard](https://dashboard.stripe.com/webhooks).
4. Add a webhook endpoint and paste the Webhook URL.
5. Select the events required for the features you use.


| Feature                       | Events                                                                                                     |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------- |
| One-time and partial payments | `checkout.session.completed`, `payment_intent.succeeded`                                                   |
| Saved payment methods         | `setup_intent.succeeded`                                                                                   |
| Subscriptions                 | `invoice.paid`, `invoice.payment_failed`, `customer.subscription.updated`, `customer.subscription.deleted` |
| Refund notifications          | `charge.refunded`                                                                                          |


![](/files/editing secret.webp)

6. Save the endpoint in Stripe.

## Add the signing secret to ERPNext

1. Open the endpoint you created in Stripe.
2. Reveal and copy its signing secret. It begins with `whsec_`.
3. Return to **Stripe Settings** in ERPNext.
4. Paste the value into **Webhook Signing Secret**.
5. Save Stripe Settings.)

![](/files/image(1).webp)

![](http://wiki.site:8004/files/wss.webp)

The signing secret belongs to one endpoint and one Stripe mode. A test endpoint and live endpoint have different secrets.

## Verify the webhook

1. Make a payment in test mode using [Accept one-time payments](./accept-payments).
2. Search for **Stripe Webhook Log** in ERPNext.
3. Confirm that the event appears with status **Processed**.
4. Confirm that the Payment Request has a linked submitted Payment Entry.

## Expected result

Stripe can deliver signed events to ERPNext, and ERPNext can identify the Stripe Settings record that owns the signing secret.

## Troubleshooting

### No webhook log appears

Confirm that Stripe is sending to the exact **Webhook URL** shown in Stripe Settings. Check the endpoint's delivery history, selected events, HTTPS certificate, and test or live mode.

### Stripe reports a signature error

Copy the `whsec_...` secret from the exact endpoint and mode used for delivery, paste it into **Webhook Signing Secret**, and save Stripe Settings.

### A webhook log is Failed

Open the log and review its Error and Retry Count fields. Compare its Stripe Event ID and object ID with the expected Payment Request before retrying delivery from Stripe.