The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Merge branch 'main' into staging-sandbox
Kiran K9a75ecf17607
diff --cc apps/web/app/(ee)/api/stripe/integration/webhook/customer-subscription-created.tsindex 5cf6fb54b0,1ecf530a5d..8499f53779--- a/apps/web/app/(ee)/api/stripe/integration/webhook/customer-subscription-created.ts+++ b/apps/web/app/(ee)/api/stripe/integration/webhook/customer-subscription-created.ts@@@ -16,10 -17,37 +17,37 @@@ export async function customerSubscriptworkspace,}: WebhookHandlerInput<Stripe.CustomerSubscriptionCreatedEvent>): Promise<WebhookHandlerResponse> {const createdSubscription = event.data.object;- const stripeAccountId = event.account as string;++ const stripeAccountId = workspace.stripeConnectId!;+ const stripeCustomerId = createdSubscription.customer as string;+ // Non-trial subscription created — clear any prior cancellation timestampif (createdSubscription.status !== "trialing") {+ const customer = await prisma.customer.findUnique({+ where: {+ stripeCustomerId,+ },+ select: {+ id: true,+ },+ });++ if (!customer) {+ return {+ response: `Customer with stripeCustomerId ${stripeCustomerId} not found, skipping...`,+ };+ }++ await prisma.customer.update({+ where: {+ id: customer.id,+ },+ data: {+ subscriptionCanceledAt: null,+ },+ });+return {- response: "Subscription is not in trialing status, skipping...",+ response: `Subscription created (non-trial), cleared subscriptionCanceledAt for customer ${customer.id}`,};}diff --cc apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/success/page.tsxindex f87171ed4d,aa49713f52..3e1329a8c5--- a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/success/page.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/success/page.tsx@@@ -87,10 -91,7 +91,10 @@@ export default async function SuccessPa}): null;- const hasPartnerProfile = !!enrollmentId;+ const hasPartnerProfile = !!enrollmentId || !!application?.partnerId;+ const isNonProduction = !isProductionEnvironment(+ program.workspace.environment,+ );return (<divdiff --cc packages/email/src/templates/partner-payout-confirmed.tsxindex 905d22dccd,648be8ecd5..aa0f1a233f--- a/packages/email/src/templates/partner-payout-confirmed.tsx+++ b/packages/email/src/templates/partner-payout-confirmed.tsx@@@ -12,10 -12,8 +12,9 @@@ importTailwind,Text,} from "@react-email/components";- import { addBusinessDays } from "date-fns";+import { EnvironmentBanner } from "../components/environment-banner";import { Footer } from "../components/footer";-import { PartnerPayoutMethod } from "../types";+import { PartnerPayoutMethod, WorkspaceEnvironment } from "../types";const PAYOUT_METHOD_LABELS: Record<PartnerPayoutMethod, string> = {connect: "Stripe Express",