Skip to content

Commit c2e7bfb

Browse files
author
waleed
committed
update stripe payload, tested webhooks
1 parent 005afc9 commit c2e7bfb

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

apps/sim/lib/webhooks/utils.server.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,6 +1233,23 @@ export async function formatWebhookInput(
12331233
}
12341234
}
12351235

1236+
if (foundWebhook.provider === 'stripe') {
1237+
return {
1238+
...body,
1239+
webhook: {
1240+
data: {
1241+
provider: 'stripe',
1242+
path: foundWebhook.path,
1243+
providerConfig: foundWebhook.providerConfig,
1244+
payload: body,
1245+
headers: Object.fromEntries(request.headers.entries()),
1246+
method: request.method,
1247+
},
1248+
},
1249+
workflowId: foundWorkflow.id,
1250+
}
1251+
}
1252+
12361253
// Generic format for other providers
12371254
return {
12381255
webhook: {

apps/sim/triggers/stripe/webhook.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ export const stripeWebhookTrigger: TriggerConfig = {
172172
type: 'text',
173173
defaultValue: [
174174
'Go to your Stripe Dashboard at <a href="https://dashboard.stripe.com/webhooks" target="_blank" rel="noopener noreferrer">https://dashboard.stripe.com/webhooks</a>',
175-
'Click "Add endpoint" button',
176-
'Paste the <strong>Webhook URL</strong> above into the "Endpoint URL" field',
175+
'Click "Add destination" button',
177176
'In "Events to send", select the events you want to listen to (must match the events selected above, or select "Select all events" to receive everything)',
178-
'Click "Add endpoint" to save',
177+
'Select `Webhook Endpoint`, press continue, and paste the <strong>Webhook URL</strong> above into the "Endpoint URL" field',
178+
'Click "Create Destination" to save',
179179
'After creating the endpoint, click "Reveal" next to "Signing secret" and copy it',
180180
'Paste the signing secret into the <strong>Webhook Signing Secret</strong> field above',
181181
'Click "Save" to activate your webhook trigger',

0 commit comments

Comments
 (0)