Skip to content

Commit

Permalink
chore: update stripe client
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanleecode committed May 21, 2024
1 parent a86f36c commit 57a1411
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion integrations/stripe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@trigger.dev/integration-kit": "workspace:^3.0.0-beta.33",
"@trigger.dev/sdk": "workspace:^3.0.0-beta.33",
"stripe": "^12.14.0",
"stripe": "~15.7.0",
"zod": "3.22.3"
},
"engines": {
Expand Down
6 changes: 3 additions & 3 deletions integrations/stripe/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class Stripe implements TriggerIntegration {

this.native = options.apiKey
? new StripeClient(options.apiKey, {
apiVersion: "2022-11-15",
apiVersion: "2024-04-10",
typescript: true,
timeout: 10000,
maxNetworkRetries: 0,
Expand Down Expand Up @@ -115,7 +115,7 @@ export class Stripe implements TriggerIntegration {
stripe._io = io;
stripe._connectionKey = connectionKey;
stripe._client = new StripeClient(apiKey, {
apiVersion: "2022-11-15",
apiVersion: "2024-04-10",
typescript: true,
timeout: 10000,
maxNetworkRetries: 0,
Expand Down Expand Up @@ -1148,7 +1148,7 @@ async function webhookHandler(event: HandlerEvent<"HTTP">, logger: Logger) {
const signature = request.headers.get("stripe-signature");

if (signature) {
const stripeClient = new StripeClient("", { apiVersion: "2022-11-15" });
const stripeClient = new StripeClient("", { apiVersion: "2024-04-10" });

try {
const event = await stripeClient.webhooks.constructEventAsync(rawBody, signature, source.secret);
Expand Down
18 changes: 13 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 57a1411

Please sign in to comment.