Feature #11021
openFeature #11019: Subscription Updates for Cancellation by Admin and Customer
Subscription Refund
100%
Description
- Contract Model: Added credit tax, settlement tracking, and refund tracking fields (`refundMethod`, `refundStatus`, `stripeRefundId`, `expenseId`) to .
`subscriptionContract.model.js`
- Stripe Webhooks: Updated and to record credit tax and payment mode on POS invoices for settlement payments.
`checkoutCompleted.js`
`invoicePaid.js`
- Subscriber Details API: Updated `getServiceSubscriberById` in to link settlement POS invoices and credit tax to subscriber installments.
`subscripiton.service.js`
- Transactions Table UI: Updated to accurately display the Credit Tax column for settlement payment rows.
`PaymentProgress.tsx`
- Settlement Email Template: Removed upfront card processing fee from so Total Due reflects only the jobs balance.
`subscriptionSettlementInvoice.ejs`
- Stripe Checkout Line Item: Updated `sendSettlementInvoice` in to charge the exact jobs balance without adding the card fee upfront.
`subscripiton.service.js`
- Refund Processing Service: Implemented `processSettlementRefund` in supporting automatic Stripe refunds, 6 payment methods, optional POS expense creation, and contract history logging.
`subscripiton.service.js`
- Cancellation Service Refund Trigger: Updated `cancelSubscription` in to automatically execute immediate refunds if selected during cancellation.
`subscripiton.service.js`
- Refund Controller & Route: Added `processSettlementRefund` in and registered `POST /subscription/process-settlement-refund/:id` in .
`subscription.controller.js`
`subscription.route.js`
- Refund Email Template: Created for customer itemized refund receipts.
`subscriptionSettlementRefund.ejs`
- Refund Email Dispatcher: Added `sendSubscriptionSettlementRefundEmail` to .
`email.service.js`
- Cancel Modal Refund UI: Updated to include the 6 refund payment methods (Card, Bank, Zelle, Check, Cash), reference inputs, and POS expense checkbox.
`ProductSubscriberDetails.tsx`
- Subscriber Refund Dialog & Status UI: Added the "Process Refund" button, interactive refund modal, and "Refunded" status banner to .
`Subscribers.tsx`
Subtasks
Related issues