Skip to content

Commit 79ea379

Browse files
committed
zen: fix
1 parent 4863aed commit 79ea379

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/console/app/src/routes/stripe/webhook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export async function POST(input: APIEvent) {
226226
expand: ["discounts", "payments"],
227227
})
228228
const paymentID = invoice.payments?.data[0]?.payment.payment_intent as string
229-
const couponID = (invoice.discounts[0] as Stripe.Discount).coupon?.id as string
229+
const couponID = (invoice.discounts[0] as Stripe.Discount)?.coupon?.id as string
230230
if (!paymentID) {
231231
// payment id can be undefined when using coupon
232232
if (!couponID) throw new Error("Payment ID not found")

0 commit comments

Comments
 (0)