From d4de4defd673bc4e2953ab15982d3a61f65543d8 Mon Sep 17 00:00:00 2001 From: Jack Bridger Date: Fri, 13 Nov 2026 15:47:18 +0000 Subject: [PATCH 1/2] fix(core): correct Stripe, Discord and Autumn webhook setup prompts The Stripe prompt said the signing secret is only available from the CLI or API, but the Dashboard can reveal it. The Discord prompt saved the Endpoint URL before the public key, so Discord's PING failed. The Autumn prompt still said webhooks were in beta. --- .changeset/webhook-setup-prompts.md | 5 +++++ packages/core/src/v3/webhooks/index.ts | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .changeset/webhook-setup-prompts.md diff --git a/.changeset/webhook-setup-prompts.md b/.changeset/webhook-setup-prompts.md new file mode 100644 index 00000000000..c40f20c451b --- /dev/null +++ b/.changeset/webhook-setup-prompts.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/core": patch +--- + +Correct the Stripe, Discord and Autumn webhook setup prompts. The Stripe prompt now covers revealing the signing secret in the Dashboard, the Discord prompt sets the public key before the Endpoint URL so Discord's PING verifies, and the Autumn prompt drops the outdated beta note. diff --git a/packages/core/src/v3/webhooks/index.ts b/packages/core/src/v3/webhooks/index.ts index 0731e111304..0e8c3a360a2 100644 --- a/packages/core/src/v3/webhooks/index.ts +++ b/packages/core/src/v3/webhooks/index.ts @@ -524,10 +524,11 @@ const svixFamilySetupPrompt = [ */ export const webhookSetupPrompts: Partial> = { stripe: [ - "Stripe issues the signing secret when a webhook endpoint is created, and returns it only in the create response.", - "Create the endpoint with the Stripe CLI or API, not the Dashboard, so you can read the secret from the response:", + "Stripe issues a signing secret (it starts with whsec_) for each webhook endpoint.", + "Create the endpoint with the Stripe CLI or API to read the secret from the response:", ' stripe webhook_endpoints create -d url="" -d "enabled_events[]="', "or POST https://api.stripe.com/v1/webhook_endpoints with `url` and `enabled_events[]`. The response's `secret` field is the signing secret.", + "In the Stripe Dashboard, the user can instead open the Webhooks tab in Workbench, choose Create an event destination with the Snapshot payload format and the webhook URL, then choose Reveal secret on the destination's settings page.", "Choose enabled_events from the subscribers' filters, which compare `event.type`. Use `*` only when a subscriber has no filter.", "Use a test mode key for dev and staging environments and a live mode key for production.", ].join("\n"), @@ -543,8 +544,8 @@ export const webhookSetupPrompts: Partial Webhooks, choose Add Endpoint, enter the webhook URL and select the event types the subscribers need. Autumn delivers through Svix, which shows the endpoint's signing secret (it starts with whsec_); store it on Trigger.dev.", + "Send Test Event on the endpoint confirms delivery.", "Subscribers' filters compare `event.type`, for example `billing.updated`.", ].join("\n"), supabase: [ From b91d732b84925fe1d823e94333d8769976ee3546 Mon Sep 17 00:00:00 2001 From: Jack Bridger Date: Fri, 13 Nov 2026 16:50:26 +0000 Subject: [PATCH 2/2] fix(webapp): store key-pair public keys before registering the webhook URL The generic setup steps told agents to register the URL first, which contradicted the Discord instructions. Key-pair sources now store the public key in step 1 and register the URL in step 2. Shared-secret sources keep the existing order. --- .changeset/webhook-setup-prompts.md | 2 +- apps/webapp/app/v3/webhookSetupPrompt.ts | 11 +++++++++-- apps/webapp/test/webhookSetupPrompt.test.ts | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.changeset/webhook-setup-prompts.md b/.changeset/webhook-setup-prompts.md index c40f20c451b..94b34f4da76 100644 --- a/.changeset/webhook-setup-prompts.md +++ b/.changeset/webhook-setup-prompts.md @@ -2,4 +2,4 @@ "@trigger.dev/core": patch --- -Correct the Stripe, Discord and Autumn webhook setup prompts. The Stripe prompt now covers revealing the signing secret in the Dashboard, the Discord prompt sets the public key before the Endpoint URL so Discord's PING verifies, and the Autumn prompt drops the outdated beta note. +Webhook setup prompts now match each provider's current setup. Stripe webhooks can be set up from the Dashboard by revealing the signing secret there, Discord endpoints verify on the first try because the public key is stored before the Endpoint URL is saved, and Autumn webhooks can be added self-serve without contacting support. diff --git a/apps/webapp/app/v3/webhookSetupPrompt.ts b/apps/webapp/app/v3/webhookSetupPrompt.ts index a9363f05785..892190a0bbb 100644 --- a/apps/webapp/app/v3/webhookSetupPrompt.ts +++ b/apps/webapp/app/v3/webhookSetupPrompt.ts @@ -120,12 +120,19 @@ export function renderWebhookSetupPrompt( } } + const registerStep = `Register the webhook URL with ${source}, following the ${source} instructions below.`; + // A public key exists before the webhook does, and some key-pair sources send a signed + // verification request as soon as the URL is saved, so store the key first. + const [firstStep, secondStep] = asymmetric + ? [`${secretStep(endpoint, asymmetric)} Do this before registering the URL.`, registerStep] + : [registerStep, secretStep(endpoint, asymmetric)]; + lines.push( "", "## Steps", "", - `1. Register the webhook URL with ${source}, following the ${source} instructions below.`, - `2. ${secretStep(endpoint, asymmetric)}`, + `1. ${firstStep}`, + `2. ${secondStep}`, `3. Call \`get_webhook_endpoint_details\` and check that \`secretSet\` is true. If ${source} can send a test event, send one and confirm it shows up on the dashboard page above.`, "", "Treat the signing secret as a credential: pass it straight to the tool or API, and never print it, log it, write it to a file or commit it.", diff --git a/apps/webapp/test/webhookSetupPrompt.test.ts b/apps/webapp/test/webhookSetupPrompt.test.ts index 8108dadc1ae..88b12ea952a 100644 --- a/apps/webapp/test/webhookSetupPrompt.test.ts +++ b/apps/webapp/test/webhookSetupPrompt.test.ts @@ -88,6 +88,25 @@ describe("renderWebhookSetupPrompt", () => { expect(prompt).toContain("pass `previousSecretTtlSeconds`"); }); + it("stores an asymmetric source's public key before registering the URL", () => { + const discord = renderWebhookSetupPrompt( + endpoint({ + source: "discord", + setupPrompt: webhookSetupPrompts.discord ?? null, + verifierArtifact: { kind: "preset", preset: "discord", config: discordVerifierConfig() }, + }), + context + ); + expect(discord).toMatch( + /1\. discord signs deliveries with a key pair\..*before registering the URL\./ + ); + expect(discord).toContain("2. Register the webhook URL with discord"); + + const stripe = renderWebhookSetupPrompt(endpoint(), context); + expect(stripe).toContain("1. Register the webhook URL with stripe"); + expect(stripe).toContain("2. stripe issues the signing secret"); + }); + it("asks which events to send when nothing subscribes yet", () => { const prompt = renderWebhookSetupPrompt(endpoint({ routingTargets: [] }), context);