Skip to content

Commit 84eea53

Browse files
committed
remove destructuring of stripe webhook
1 parent 2434165 commit 84eea53

File tree

1 file changed

+6
-46
lines changed

1 file changed

+6
-46
lines changed

apps/sim/triggers/stripe/webhook.ts

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -219,46 +219,9 @@ export const stripeWebhookTrigger: TriggerConfig = {
219219
description: 'Unix timestamp when the event was created',
220220
},
221221
data: {
222-
type: 'object',
223-
description: 'Event data containing the affected Stripe object',
224-
properties: {
225-
object: {
226-
type: 'object',
227-
description: 'The Stripe object affected by this event (structure varies by event type)',
228-
properties: {
229-
id: { type: 'string', description: 'Unique identifier for the object' },
230-
object: {
231-
type: 'string',
232-
description: 'Object type (e.g., payment_intent, customer, invoice)',
233-
},
234-
amount: {
235-
type: 'number',
236-
description: 'Amount in smallest currency unit (for payment objects)',
237-
},
238-
amount_received: {
239-
type: 'number',
240-
description: 'Amount received (for payment_intent)',
241-
},
242-
currency: { type: 'string', description: 'Three-letter ISO currency code' },
243-
status: { type: 'string', description: 'Status of the object' },
244-
client_secret: {
245-
type: 'string',
246-
description: 'Client secret for client-side confirmation',
247-
},
248-
customer: { type: 'string', description: 'Customer ID' },
249-
metadata: {
250-
type: 'json',
251-
description: 'Custom metadata key-value pairs (user-defined)',
252-
},
253-
created: { type: 'number', description: 'Created timestamp (Unix)' },
254-
},
255-
},
256-
previous_attributes: {
257-
type: 'json',
258-
description:
259-
'Previous values of changed attributes (dynamic - only present for update events)',
260-
},
261-
},
222+
type: 'json',
223+
description:
224+
'Event data containing the affected Stripe object. Structure varies by event type - access via data.object for the resource (PaymentIntent, Customer, Invoice, etc.)',
262225
},
263226
livemode: {
264227
type: 'boolean',
@@ -269,12 +232,9 @@ export const stripeWebhookTrigger: TriggerConfig = {
269232
description: 'Number of webhooks yet to be delivered for this event',
270233
},
271234
request: {
272-
type: 'object',
273-
description: 'Information about the request that triggered this event',
274-
properties: {
275-
id: { type: 'string', description: 'Request ID' },
276-
idempotency_key: { type: 'string', description: 'Idempotency key of the request' },
277-
},
235+
type: 'json',
236+
description:
237+
'Information about the API request that triggered this event (id, idempotency_key)',
278238
},
279239
},
280240

0 commit comments

Comments
 (0)