Skip to main content

Introduction

The Discord integration posts payment, subscription, dispute, and other Dodo Payments events to a Discord channel you choose. Your team sees each event where it already collaborates, without polling an API or checking a dashboard.
You need access to Developer → Webhooks in the Dodo Payments dashboard, and the Manage Webhooks permission in the Discord server.

Getting Started

1

Create a Discord Webhook

In Discord, open the channel that should receive notifications and click Edit Channel. Go to Integrations → Webhooks → New Webhook, name the webhook, confirm the channel, and click Copy Webhook URL.
2

Open the Webhook Section

In the Dodo Payments dashboard, go to Developer → Webhooks and click Add endpoint.
Add endpoint dialog with Discord selected in the Integration dropdown
3

Select Discord

In Integration, select Discord. The How to connect Discord panel repeats the steps for creating the Discord webhook.
4

Paste the Webhook URL

Paste the Discord webhook URL, which starts with https://discord.com/api/webhooks/, into Endpoint URL. Discord doesn’t need an API key.
5

Select Events

In Subscribed events, select the events your transformation handles. Discord rejects a message that has no content or embeds, so an event the transformation doesn’t convert fails to deliver.
6

Edit Transformation Code

Under Transformation code, tailor how each event maps to a Discord embed, or start from the examples.
7

Test & Create

Under Test this code, click Simulate to preview the embed for a sample payload. Then click Create endpoint.
8

Done

Your Discord channel now receives a message for each subscribed event.

Transformation Code Examples

Each handler replaces webhook.payload with a Discord message that contains one embed. Dodo Payments amounts are in the smallest currency unit, so the examples divide by 100 and show the currency code.

Minimal Payment Embed

Post an embed when a payment succeeds (payment.succeeded):
payment_embed.js

Subscription Events

Post an embed when a subscription becomes active (subscription.active) or is cancelled (subscription.cancelled):
subscription_embed.js

Dispute Alerts

Post an embed for every dispute event, such as dispute.opened, dispute.won, and dispute.lost. The title and color follow the dispute’s dispute_status:
dispute_embed.js

Tips

  • Use embeds for rich formatting and colors.
  • Keep titles short, and put details in fields.
  • Use colors that signal the outcome: green for success, red for failure, and orange for warnings.

Troubleshooting

  • Confirm that the webhook still exists under the channel’s Integrations → Webhooks, and that Endpoint URL matches its URL.
  • Check that the transformation returns a JSON object with embeds.
  • Check that Subscribed events includes the events you expect.
  • Open the endpoint’s delivery attempts in the Logs tab of Developer → Webhooks to see Discord’s response code.
  • Validate your code in the editor. Syntax errors block delivery.
  • Check that field names match the webhook payload structure.
Last modified on September 26, 2026