feat: Implement stripe webhooks

This commit is contained in:
Faruk AYDIN
2023-03-07 17:13:20 +01:00
parent 7676bc5836
commit b0b6b72b4c
7 changed files with 97 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import User from '../../models/user';
import PaymentPlan from '../../models/payment-plan.ee';
import UsageData from '../../models/usage-data.ee';
import appConfig from '../../config/app';
import handleWebhooks from './webhooks.ee';
const plans = [
{
@@ -91,6 +92,9 @@ const createPaymentPortalUrl = async (user: User) => {
const billing = {
createSubscription,
createPaymentPortalUrl,
handleWebhooks,
stripe,
plans,
};
export default billing;