Skip to main content
Webhook Cover Image
Webhooks provide real-time notifications when specific events occur in your Dodo Payments account. Use webhooks to automate workflows, update your database, send notifications, and keep your systems synchronized.
Our webhook implementation follows the Standard Webhooks specification, ensuring compatibility with industry best practices and existing webhook libraries.

Key Features

Real-time Delivery

Receive instant notifications when events occur

Secure by Default

HMAC SHA256 signature verification included

Automatic Retries

Built-in retry logic with exponential backoff

Event Filtering

Subscribe only to events you need

Getting Started

The Dodo Payments webhooks portal has been rebuilt with a native dashboard experience. Your existing endpoints, signing secrets, signature verification, event names, and webhook payloads are unchanged. No integration work is needed.
Where things live.
  • Under Developer → Webhooks — the Endpoints, Event catalog, Logs, Activity, and Settings tabs.
  • On an individual endpoint — the Overview tab, carrying delivery stats, the signing secret and Replay history, plus the Testing and Advanced tabs and the bulk replay actions.
  • On a message — opened from the Logs tab, where each delivery attempt can be replayed on its own without opening the endpoint.
1

Access Webhook Settings

Navigate to the Dodo Payments Dashboard and go to Developer → Webhooks.
2

Create Webhook Endpoint

Click Add endpoint to open the endpoint creation side sheet.
3

Enter Endpoint URL or Choose Integration

Enter the URL where you want to receive webhook events, or select an integration connector to route events to a third-party service (Slack, Discord, Zapier, Resend, etc.).
4

Select Events to Receive

Choose the specific events your endpoint should listen for. Events are organized in a searchable tree grouped by resource. You can select individual events or a parent resource to receive all related events.
Only selected events will trigger webhooks to your endpoint, helping you avoid unnecessary traffic and processing.
5

Create Endpoint

Click Create endpoint to save your configuration.
6

Get Secret Key

Your webhook signing secret is displayed on the endpoint’s Overview tab. You’ll use this to verify the authenticity of received webhooks.
Keep your webhook secret key secure and never expose it in client-side code or public repositories.
7

Rotate Secret (Optional)

If needed, you can rotate your webhook secret for enhanced security. Click Rotate secret, alongside the secret on the Overview tab.
Rotating the secret will expire it and replace it with a new one. The old secret will only be valid for the next 24 hours. Afterward, trying to verify with the old secret will fail.
Use secret rotation periodically or immediately if you suspect your current secret has been compromised.

Integration Connectors

Instead of building your own webhook receiver, you can route webhook events directly to third-party services using integration connectors. This eliminates the need to write and maintain custom webhook handlers for popular platforms.

How Connectors Work

A connector carries a transformation that converts the Dodo Payments event into the shape the destination expects. Which details you supply depends on the destination: The connector picker in the dashboard shows the full set currently available to your business, so treat the table above as the destinations with step-by-step setup instructions rather than an exhaustive list. See External Integrations for what each destination can do once events reach it.

Setting Up a Connector

Pick a connector while creating or editing an endpoint, and the side sheet shows setup instructions written for that destination — for example, how to create an incoming webhook URL in Slack, or where to find your Resend API key. Before you save, run the connector transformation test to confirm the event is converted correctly for the destination.
Use a connector to reach a supported destination without writing code. If you need custom logic, use a standard endpoint with a transformation instead.

Configuring Subscribed Events

You can configure which specific events each webhook endpoint should receive.
1

Navigate to Webhook Endpoints

Go to your Dodo Payments Dashboard and navigate to Developer → Webhooks.
2

Select Your Endpoint

Click on the webhook endpoint you want to configure.
3

Open Event Configuration

Click Edit to open the endpoint configuration side sheet.
4

Browse Event Types

The event type selector displays all available webhook events organized in a searchable tree, grouped by resource (e.g., payment, subscription, dispute). Use the search bar to quickly find specific events by name or keyword.
5

Select Events

Check the boxes next to the events you want to receive. You can:
  • Select individual events (e.g., payment.succeeded, payment.failed)
  • Select a parent resource to receive all related events
  • Mix and match specific events based on your needs
6

Save Configuration

Click Save to apply your changes, or Cancel to discard modifications.
If you deselect all events, your webhook endpoint will not receive any notifications. Make sure to select at least the events your application needs to function properly.

Event Catalog

Go to Developer → Webhooks and open the Event catalog tab. It lists every event type Dodo Payments can send, so you can see what is available before subscribing an endpoint to it. Select an event to view its schema and an example payload, which is the quickest way to check the shape of a field you plan to read.

Webhook Events Guide

Browse the same events as reference documentation, grouped by resource.

Webhook Delivery

Timeouts

Webhooks have a 15-second timeout window for both connection and read operations. Ensure your endpoint responds quickly to avoid timeouts.
Process webhooks asynchronously by acknowledging receipt immediately with a 200 status code, then handling the actual processing in the background.

Automatic Retries

If a webhook delivery fails, Dodo Payments automatically retries with exponential backoff to prevent overwhelming your system.
Maximum of 8 retry attempts per webhook event. For example, if a webhook fails three times before succeeding, the total delivery time is approximately 35 minutes and 5 seconds from the first attempt.
Use the Dodo Payments dashboard to manually retry individual messages or bulk recover all failed messages at any time.

Idempotency

Each webhook event includes a unique webhook-id header. Use this identifier to implement idempotency and prevent duplicate processing.
Always implement idempotency checks. Due to retries, you may receive the same event multiple times.

Event Ordering

Webhook events may arrive out of order due to retries or network conditions. Design your system to handle events in any sequence.
You will receive the latest payload at the time of delivery, regardless of when the webhook event was originally emitted.

Securing Webhooks

To ensure the security of your webhooks, always validate the payloads and use HTTPS.

Verifying Signatures

Each webhook request includes a webhook-signature header, an HMAC SHA256 signature of the webhook payload and timestamp, signed with your secret key. All official SDKs include built‑in helpers to securely validate and parse incoming webhooks. Two methods are available:
  • unwrap(): Verifies signatures using your webhook secret key
  • unsafe_unwrap(): Parses payloads without verification
Provide your webhook secret via DODO_PAYMENTS_WEBHOOK_KEY when initializing the Dodo Payments client.

Manual verification (alternative)

If you are not using an SDK, you can verify signatures yourself following the Standard Webhooks spec:
  1. Build the signed message by concatenating webhook-id, webhook-timestamp, and the exact raw stringified payload, separated by periods (.).
  2. Compute the HMAC SHA256 of that string using your webhook secret key from the Dashboard.
  3. Compare the computed signature to the webhook-signature header. If they match, the webhook is authentic.
We follow the Standard Webhooks specification. You can use their libraries to verify signatures: https://github.com/standard-webhooks/standard-webhooks/tree/main/libraries. For event payload formats, see the Webhook Payload.

स्रोत IP पते

Webhook को authenticate करने के लिए Signature verification समर्थित तरीका है। यह साबित करता है कि request आपके webhook secret के साथ sign की गई थी, जो network-level check नहीं कर सकता। Webhook deliveries हमारे delivery infrastructure से संबंधित source IP addresses के एक pool से भेजी जाती हैं। यह pool समय-समय पर बदलता रहता है, इसलिए इन addresses को integration की स्थायी property के बजाय operational detail मानें।
Authentication mechanism के रूप में source IP allowlist का उपयोग न करें। Allowlist केवल यह दिखाती है कि request कहाँ से आई है, यह नहीं कि वह वास्तविक या अपरिवर्तित है — हर request पर webhook-signature header को verify करें, जैसा कि Signatures verify करना में बताया गया है।
यदि आपका infrastructure ऐसे firewall के पीछे है जिसके लिए explicit allowlist आवश्यक है, तो निम्न बातों का ध्यान रखें:
  • Addresses को स्थायी रूप से hardcode न करें। Ranges समय के साथ जोड़ी और हटाई जाती हैं, और पुराना rule deliveries को चुपचाप block कर देता है।
  • Firewall को lock down करने से पहले support@dodopayments.com से current ranges का अनुरोध करें, ताकि आपके पास updated list हो।
  • Change notices पर नज़र रखें। जब delivery addresses बदलते हैं, तो हम प्रभावित merchants को email से सूचित करते हैं — deliveries छूटने से बचने के लिए बताई गई तारीख से पहले वे updates लागू करें।
  • आपके द्वारा जोड़े गए network rules की परवाह किए बिना signature verification enabled रखें
Serverless और managed hosting platforms पर inbound IP filtering अक्सर उपलब्ध नहीं होती या इसे बनाए रखना व्यावहारिक नहीं होता। इन environments में signature verification सही control है और किसी allowlist की आवश्यकता नहीं है।
Blocked delivery को किसी अन्य failure की तरह ही माना जाता है और Automatic Retries में बताए गए schedule के अनुसार retry किया जाता है। यदि firewall rules के कारण deliveries fail हुई थीं, तो rules ठीक करने के बाद उन्हें फिर से भेज सकते हैं — Messages को replay और recover करना देखें।

Webhooks का उत्तर देना

  • Event प्राप्त होने की पुष्टि करने के लिए आपके webhook handler को 2xx status code return करना होगा।
  • किसी भी अन्य response को failure माना जाएगा और webhook को retry किया जाएगा।

सर्वोत्तम प्रथाएँ

Webhook endpoints के लिए हमेशा HTTPS URLs का उपयोग करें। HTTP endpoints man-in-the-middle attacks के प्रति vulnerable होते हैं और आपका webhook data expose करते हैं।
Webhook प्राप्त होते ही तुरंत 200 status code return करें। Timeouts से बचने के लिए event को asynchronously process करें।
webhook-id header का उपयोग करके idempotency लागू करें, ताकि side effects के बिना उसी event को कई बार सुरक्षित रूप से process किया जा सके।
Environment variables या secrets manager का उपयोग करके अपना webhook secret सुरक्षित रूप से store करें। Secrets को कभी भी version control में commit न करें।

Webhook Payload की संरचना

Webhook payload की संरचना समझने से आपको events को सही ढंग से parse और process करने में सहायता मिलती है।

Request Format

Headers

string
आवश्यक
इस webhook event का unique identifier। Idempotency checks के लिए इसका उपयोग करें।
string
आवश्यक
Webhook की authenticity verify करने के लिए HMAC SHA256 signature।
string
आवश्यक
Webhook भेजे जाने का Unix timestamp (seconds में)।

Request Body

string
आवश्यक
आपका Dodo Payments business identifier।
string
आवश्यक
इस webhook को trigger करने वाला event type (उदाहरण के लिए, payment.succeeded, subscription.active)।
string
आवश्यक
Event होने के समय का ISO 8601 formatted timestamp।
object
आवश्यक
Event के बारे में विस्तृत जानकारी वाला event-specific payload।

Example Payload

Event Types

सभी उपलब्ध webhook event types ब्राउज़ करें

Event Payloads

प्रत्येक event के लिए detailed payload schemas देखें

Handle Payment Failures

payment.failed पर प्रतिक्रिया दें और declined payments recover करें

Webhooks का परीक्षण

Live होने से पहले यह सुनिश्चित करने के लिए कि आपका endpoint सही ढंग से काम कर रहा है, आप Dodo Payments dashboard से सीधे अपने webhook integration का परीक्षण कर सकते हैं।
1

Navigate to Webhooks

अपने Dodo Payments Dashboard पर जाएँ और Developer → Webhooks खोलें।
2

Select Your Endpoint

Details page खोलने के लिए अपने webhook endpoint पर click करें।
3

Open Testing Tab

Webhook testing interface खोलने के लिए Testing tab पर click करें।

Example Event भेजें

Testing tab इस endpoint पर sample payload भेजता है, जिससे आप अपने receiver को verify कर सकते हैं।
1

Select Event Type

जिस event का परीक्षण करना है, उसे चुनने के लिए Select an event type का उपयोग करें, उदाहरण के लिए payment.succeeded या payment.failed
2

Send Example

Send example पर click करें। Sample payload आपके endpoint URL पर वास्तविक event की तरह ही भेजा जाता है और उसी तरह sign किया जाता है।
Testing tab से भेजे गए failed messages को retry नहीं किया जाता। इसका उपयोग अपने receiver को verify करने के लिए करें, retry schedule का परीक्षण करने के लिए नहीं।
3

Check Your Endpoint

यह tab Last example sent के भेजे जाने का समय record करता है। पुष्टि करें कि event प्राप्त हुआ, आपका signature verification सफल रहा और आपने 2xx status code return किया।

Implementation Example

यहाँ Express.js का एक complete implementation है, जो webhook verification और handling दिखाता है:
Production events process करने से पहले dashboard testing interface का उपयोग करके अपने webhook handler का पूरी तरह परीक्षण करें। इससे समस्याओं की जल्दी पहचान और समाधान करने में सहायता मिलती है।

CLI के साथ Webhooks का परीक्षण

Dodo Payments CLI local development के दौरान webhooks का परीक्षण करने के लिए दो commands प्रदान करता है, और इसके लिए आपको अपना terminal छोड़ने की आवश्यकता नहीं होती।

Locally Live Webhooks सुनें

अपने test mode account से वास्तविक webhook events को real time में अपने local development server पर forward करें:
CLI Dodo Payments से WebSocket connection खोलता है और हर webhook event को आपके local endpoint (उदाहरण के लिए, http://localhost:3000/webhook) पर forward करता है। यह verification testing के लिए signature headers सहित सभी headers को सुरक्षित रखता है।
Listener केवल test mode API keys के साथ काम करता है। इस command का उपयोग करने से पहले dodo login चलाएँ और Test Mode चुनें।

Mock Webhook Events Trigger करें

वास्तविक transactions बनाए बिना किसी भी endpoint पर mock webhook payloads भेजें:
यह interactive tool आपको event type चुनने और अपने endpoint पर realistic mock payload भेजने देता है। यह loop करता रहता है, इसलिए आप एक ही session में कई events का परीक्षण कर सकते हैं। Trigger command Dodo Payments द्वारा deliver किए जाने वाले सभी 47 event types को cover करता है, जिनमें subscription, payment, refund, dispute, license key, payout, credit, abandoned checkout, dunning और entitlement grant families शामिल हैं — exact list के लिए Supported Webhook Events देखें।
dodo wh trigger से प्राप्त mock webhook payloads signed नहीं होते। केवल testing के दौरान अपने webhook handler में unwrap() के स्थान पर unsafe_unwrap() का उपयोग करें।

CLI Webhook Testing Docs

CLI webhook testing का पूरा documentation देखें

Advanced Settings

Advanced tab आपके webhook endpoint के behavior को fine-tune करने के लिए अतिरिक्त configuration options प्रदान करता है।

Rate Limiting (Throttling)

अपने system पर अत्यधिक load रोकने के लिए webhook events को आपके endpoint पर deliver किए जाने की rate नियंत्रित करें।
1

Open Advanced Tab

अपने endpoint details page से Advanced tab पर click करें।
2

Configure Rate Limit

“Rate Limit (throttling)” section में rate limit settings बदलने के लिए Edit पर click करें।
डिफ़ॉल्ट रूप से webhooks पर कोई rate limit लागू नहीं होती, यानी events होते ही deliver कर दिए जाते हैं।
3

Set Your Limit

Webhook delivery frequency नियंत्रित करने और system overload रोकने के लिए अपनी इच्छित rate limit configure करें।
जब आपके webhook handler को events process करने के लिए समय चाहिए या आप कई events को एक साथ batch करना चाहते हैं, तब rate limiting का उपयोग करें।

Custom Headers

अपने endpoint पर भेजी जाने वाली सभी webhook requests में custom HTTP headers जोड़ें। यह authentication, routing या metadata जोड़ने के लिए उपयोगी है।
1

Add Headers

“Custom Headers” section में प्रत्येक custom header के लिए Key और Value दर्ज करें।
2

Add Multiple Headers

आवश्यकता के अनुसार अतिरिक्त custom headers जोड़ने के लिए + button पर click करें।
आपके custom headers इस endpoint पर भेजी जाने वाली सभी webhook requests में शामिल किए जाते हैं।

Transformations

Transformations आपको webhook के payload को modify करने और वैकल्पिक रूप से उसे किसी अलग URL पर redirect करने देती हैं। यह शक्तिशाली सुविधा आपको निम्न कार्य करने देती है:
  • Processing से पहले payload structure को modify करना
  • Content के आधार पर webhooks को अलग-अलग endpoints पर route करना
  • Payload में fields जोड़ना या हटाना
  • Data formats को transform करना
1

Enable Transformations

Transformation feature activate करने के लिए Enabled switch को toggle करें।
2

Configure Transformation

JavaScript का उपयोग करके transformation rules define करने के लिए Edit transformation पर click करें।
3

Test Transformation

Live होने से पहले transformation test interface का उपयोग करके verify करें कि आपका transformation सही ढंग से काम करता है।
Transformations webhook delivery performance को प्रभावित कर सकती हैं। पूरी तरह परीक्षण करें और transformation logic को सरल व efficient रखें।
Transformations विशेष रूप से इन कार्यों के लिए उपयोगी हैं:
  • अलग-अलग data formats के बीच convert करना
  • विशिष्ट criteria के आधार पर events को filter करना
  • Payload में computed fields जोड़ना
  • Events को अलग-अलग microservices पर route करना

Webhook Logs की निगरानी

Logs tab आपके webhook delivery status की comprehensive visibility प्रदान करता है, जिससे आप webhook events की प्रभावी रूप से निगरानी, debugging और management कर सकते हैं।
1

Navigate to Logs Tab

Developer → Webhooks पर जाएँ और Logs tab खोलें।
2

Browse Delivery History

सभी webhook delivery attempts की table देखें, जिसमें Event type, Message ID, Event ID, Sent at, Attempted at, Response code और Duration के columns हैं।
3

Search and Filter

ID या event type के आधार पर specific messages खोजने के लिए search bar का उपयोग करें। जिन events की जाँच करनी है उन पर ध्यान केंद्रित करने के लिए status (Succeeded, Failed, Pending आदि) के आधार पर filter करें।
4

View Message Details

Message detail page खोलने के लिए किसी भी message पर click करें, जहाँ यह दिखाई देता है:
  • Complete webhook payload
  • Response code और duration के साथ प्रत्येक delivery attempt
  • प्रत्येक attempt का timestamp
  • आपके endpoint से प्राप्त कोई भी error messages
प्रत्येक attempt में Replay action होता है, इसलिए page छोड़े बिना उस एक message को फिर से भेज सकते हैं।

Activity Monitoring

अपने endpoints के across delivery performance देखने के लिए Developer → Webhooks पर जाएँ और Activity tab खोलें। Delivery activity समय के साथ attempts को plot करता है, जिन्हें window के अनुसार Attempts per 5 minutes, Attempts per hour या Attempts per day में bucket किया जाता है। प्रत्येक bar outcome के अनुसार विभाजित होती है और किसी segment पर hover करने से status, attempts की संख्या और total में उसका share दिखाई देता है। किसी endpoint पर Overview tab में Delivery stats (last 24h) पिछले दिन की यही जानकारी summarize करता है।
Endpoints tab का Error rate (24h) column तुरंत बताता है कि किन endpoints पर ध्यान देने की आवश्यकता है, इससे पहले कि आप उनमें से किसी को खोलें।

Messages को Replay और Recover करना

किसी message को फिर से भेजने का तरीका इस बात पर निर्भर करता है कि आपको कितने messages की आवश्यकता है:
  • एक message — इसे Logs tab से खोलें और attempt पर Replay action का उपयोग करें। Endpoint खोलने की आवश्यकता नहीं है।
  • Messages की एक range — endpoint खोलें, क्योंकि bulk modes एक समय में केवल एक endpoint पर कार्य करते हैं।

Bulk में Replay करना

Developer → Webhooks से endpoint खोलें। तीन modes उपलब्ध हैं और प्रत्येक केवल उसी endpoint पर कार्य करता है। आपके द्वारा set की जाने वाली range mode पर निर्भर करती है:
1

Open More Actions

Endpoint पर More actions खोलें और ऊपर दिए गए तीन modes में से एक चुनें।
2

Set the Range

Table में listed mode के अनुसार, उस mode द्वारा माँगी गई range भरें।
3

Start the Run

चुने गए mode के अनुसार Recover या Replay पर click करें।
हर run endpoint के Overview tab में Replay history के अंतर्गत दिखाई देता है, जिसमें इसका mode, time range, status और फिर से भेजे गए messages की संख्या होती है।

Email Alerts

जब किसी endpoint पर webhook deliveries fail हो रही हों, तब email notification प्राप्त करें, ताकि समस्याएँ backlog बनने से पहले उनका समाधान किया जा सके।
1

Navigate to Settings Tab

Developer → Webhooks पर जाएँ और Settings tab खोलें।
2

Find Email Alerting

Email alerting card खोजें।
3

Configure Email Addresses

Alerts प्राप्त करने वाले addresses दर्ज करें। कई addresses को commas से अलग करें और alerts बंद करने के लिए field खाली छोड़ दें।
4

Save

अपने changes लागू करने के लिए Save पर click करें।
Webhook delivery problems को जल्दी पकड़ने और reliable integrations बनाए रखने के लिए email alerts enable करें।

Cloud Platforms पर Deploy करें

अपने webhook handler को production में deploy करने के लिए तैयार हैं? हम लोकप्रिय cloud providers पर webhooks deploy करने में सहायता के लिए platform-specific guides प्रदान करते हैं, जिनमें प्रत्येक platform के लिए best practices शामिल हैं।

Vercel

Vercel पर serverless functions के साथ webhooks deploy करें

Cloudflare Workers

Cloudflare के edge network पर webhooks चलाएँ

Supabase Edge Functions

Webhooks को Supabase के साथ integrate करें

Netlify Functions

Webhooks को Netlify serverless functions के रूप में deploy करें
प्रत्येक platform guide में उस provider के लिए specific environment setup, signature verification और deployment steps शामिल हैं।

संबंधित API Reference

Create Webhook

Webhook endpoints को programmatically create और configure करने के लिए API reference

List Webhooks

अपने webhook endpoints retrieve और manage करने के लिए API reference
अंतिम संशोधन 21 अगस्त 2026