We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d247b57 commit ff9662bCopy full SHA for ff9662b
src/server/stripe.ts
@@ -83,7 +83,7 @@ export const manageSubscriptionStatusChange = async (
83
where: { id: customerId },
84
});
85
86
- invariant(customer, "Customer lookup failed");
+ invariant(customer?.id, "Customer lookup failed");
87
88
const subscription = await stripe.subscriptions.retrieve(subscriptionId, {
89
expand: ["default_payment_method"],
@@ -96,7 +96,7 @@ export const manageSubscriptionStatusChange = async (
96
const id = subscription.id;
97
98
const data = {
99
- customerId: customer?.id,
+ customerId: customer.id,
100
metadata: subscription.metadata,
101
status: subscription.status,
102
priceId: item.price.id,
0 commit comments