Feature #11479
openFeature #11355: Cancellation process for online orders
Implement configurable cancellation policies for products and variants in the product creation and editing modules.
60%
Description
Add an option to allow or prohibit customer cancellation.
Configure whether cancellation is allowed after delivery-partner collection.
Define the last eligible delivery stage and optional cancellation deadline.
Support partial-quantity cancellation.
Configure automatic cancellation or staff approval before handover.
Store a customer-facing cancellation policy explanation.
Allow variants to inherit product settings or override them.
Validate all policy fields on the backend.
Preserve the effective policy snapshot on each purchased order item so future product edits do not change existing orders.
Files
Subtasks
Related issues
Updated by Pavan Kumar Murala 10 days ago
- Status changed from New to In Progress
- Target version set to sprint (10/12/2026 - 10/31/2026)
Updated by Pavan Kumar Murala 9 days ago
- File product_cancellation_business_flow.docx product_cancellation_business_flow.docx added
- % Done changed from 0 to 60
1. Product Create / Edit page
This is where staff configure whether customers can cancel a product.
- Allow customer cancellation: enables or disables cancellation for that product.
- Allow after partner collection: permits a cancellation request after handover. It still requires confirmation that delivery can be stopped.
- Last permitted stage: sets the cancellation cutoff, such as before handover or during transit.
- Time limit: limits cancellation to a configured number of minutes after ordering.
- Approval mode: selects automatic cancellation or staff approval before collection.
- Customer explanation: provides a message explaining the product’s cancellation rules.
- Variant policy: a variant inherits the product policy or uses its own settings.
Customers cancel the full remaining quantity of a selected order line. Delivered items remain blocked.
2. Customer Order Details / Cancel Items modal
This is where the customer chooses products to cancel.
- Loads eligibility from the backend.
- Shows which products can be cancelled immediately, require approval, or are blocked.
- Lets the customer select eligible lines and provide a reason.
- Displays an estimated refund before confirmation.
- Submits an immediate cancellation or an approval request according to the purchased policy.
- Shows cancellation history and refund progress.
The refund estimate is informational; execution recalculates eligibility and the amount.
Updated by Pavan Kumar Murala 9 days ago
- Due date changed from 10/12/2026 to 10/13/2026
Updated by Pavan Kumar Murala 8 days ago
Implemented Stripe refund functionality for single-product cancellations.
Implemented refunds for individual product variants within an order.
Refund amounts are calculated based on the actual amount paid for the cancelled product or variant.
Refunds are processed through Stripe to the original payment method used by the customer, such as the same credit or debit card.
Ensured that the refund amount corresponds to the amount paid for the cancelled item.
Resolved issues related to plan creation and modification, including issues on the checkout page, sidebar menu, and coupons page.
Updated by Pavan Kumar Murala 8 days ago
- Due date changed from 10/13/2026 to 10/14/2026
Updated by Pavan Kumar Murala 7 days ago
1. Order Details page (OrderDetails.tsx)
- A Cancel button shows only when the order is eligible, and only to signed-in users. Signed-out users see "Sign in to cancel this order."
- A green banner shows the refunded amount, for example "$29.19 refunded to your original payment method". It also says card refunds take 5–10 business days.
- Each cancelled line shows a Cancelled tag and "Refund $X", with its own paid breakdown (discounts, tax, shipping).
- It has the cancellation refund summary and the order status timeline.
2. Item Cancel modal (ItemCancelModal.tsx)
- The customer ticks the items to cancel and enters a reason.
- It shows the product's cancellation policy message.
- Items that can't be cancelled show "Unavailable" with the reason, such as "Cancellation request is already pending", or already delivered.
- A "Cancellation requests" history lists the request status, staff review note, refund status and recovery status.
3. Cancellation Management page (/dashboard/cancellation-management, CancellationManagement.tsx)
- It holds the other two admin screens as tabs and has a Back button.
- It shows a short 3-step guide: review the request, execute the cancellation, then track the refund and goods.
4. Requests and recovery tab (CancellationQueue.tsx)
- Summary cards act as filters: To approve / cancel, In progress, Refund problems, Goods coming back, All requests.
- Search by order number.
- A table with a "Your next step" column. Examples are "Approve or reject", "Cancel the items" and "Fix the refund".
- An action history timeline per request: requested, cancelled, refunded, goods received, stock added back.
- Export to CSV, Refresh, and an "Open order" button that jumps to the order.
5. Refunds and money tracking tab (/dashboard/cancellation-money, CancellationMoneyTracking.tsx)
- Totals: refund attempts, refunded, in progress, needs attention.
- Filter by status (Refunded, In progress, Action needed, Sending, Check needed, Failed, Canceled) and search by order.
- A details drawer showing the amount asked, amount refunded, Stripe refund ID, Stripe payment ID, timestamps and any error.
- A Check with Stripe button re-checks a refund whose outcome is unknown.
- Export to CSV and Refresh.
6. Order cancellation panel (inside the admin order view, OrderCancellationPanel.tsx)
- Approve a request, with a partner confirmation reference for each item.
- Reject a request, with a required note.
- Execute an approved cancellation, which cancels the items and starts the refund.
- Repair skipped refund for requests where the refund didn't go through.
- Goods recovery: Receive goods (quantity plus a unique receipt reference), then Inspect them as "Suitable for stock" or "Damaged / unusable". A Reconcile button fixes recovery items stuck in review.
- Inspect order operation and Refresh Stripe refunds buttons.
- Warning alerts for refund errors, inventory errors, adjustment errors and refund notification errors.
7. Cancellation policy section (inside Create Product, CancellationPolicySection.tsx)
- A switch to inherit the policy from the product.
- A switch to allow customer cancellation.
- A switch to allow requests after the delivery partner has collected the item.
- The last permitted stage: before packing, before partner handover, after collection, in transit, or out for delivery.
- Approval before collection: automatic or by staff.
- A time limit in days, hours and minutes, or no limit.
- An optional message shown to the customer.
8. Menu access: the cancellation pages are limited by role. See roleMenuAccess.ts.
If you want these notes as a file (for example CANCELLATION_FEATURES.md), say so and I'll write it. I haven't covered the return request screens (ReturnRequestsPage, OrderReturnTrackingPanel, ReturnRequestModal). I can add those too.
Created a new company and tested orders containing multiple products, including cancelled products. Updated the order display logic to exclude cancelled products from the total product count and show only the active products in each order. Also ensured the overall product count and individual product quantities are calculated and displayed correctly.
- Implemented a centralized Stripe refund tracking page with refund summary cards, order search, status filters, refund transaction details, Stripe refund IDs, transaction dates, refund history, order navigation, CSV export, refresh, and pagination to monitor and manage refund transactions efficiently.
Updated by Pavan Kumar Murala 7 days ago
- Due date changed from 10/14/2026 to 10/15/2026