(event: any)
| 35 | } |
| 36 | |
| 37 | async function getCommunityId(event: any) { |
| 38 | const { customer: customerId } = event.data.object as any; |
| 39 | const customer = (await stripe.customers.retrieve(customerId)) as any; |
| 40 | return customer.metadata.communityId; |
| 41 | } |
| 42 | |
| 43 | export default async function handler( |
| 44 | request: NextApiRequest, |