1
import { TriggerClient } from "@trigger.dev/sdk";
2
import { Stripe } from "@trigger.dev/stripe";
4
const client = new TriggerClient({ id: "jobs-showcase" });
6
const stripe = new Stripe({
8
apiKey: process.env.STRIPE_API_KEY!,
13
id: "stripe-on-subscription-created",
14
name: "Stripe: on subscription created",
16
trigger: stripe.onCustomerSubscriptionCreated(),
17
run: async (payload, io, ctx) => {
18
await io.logger.info("A new subscription was created.");
23
import { createExpressServer } from "@trigger.dev/express";
24
createExpressServer(client);