Skip to content

Commit d77349c

Browse files
api_version (#350)
1 parent d86a666 commit d77349c

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/source-stripe/src/client.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,9 @@ export function makeClient(
136136

137137
async createWebhookEndpoint(params: {
138138
url: string
139-
enabled_events: string[]
140-
metadata?: Record<string, string>
139+
enabled_events: string[],
140+
api_version: string,
141+
metadata?: Record<string, string>,
141142
}): Promise<StripeWebhookEndpoint> {
142143
const json = await requestWithRetry('POST', '/v1/webhook_endpoints', params)
143144
return StripeWebhookEndpointSchema.parse(json)

packages/source-stripe/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ export function createStripeSource(
237237
url: config.webhook_url,
238238
enabled_events: ['*'],
239239
metadata: { managed_by: 'stripe-sync' },
240+
api_version: config.api_version ?? BUNDLED_API_VERSION
240241
})
241242
// Secret is only available at creation time — not on list/retrieve
242243
if (!config.webhook_secret && created.secret) {

0 commit comments

Comments
 (0)