About This Article
When points are converted by mistake or an order is cancelled, coupons need to be invalidated and points returned. This article explains the coupon management features and cancellation mechanism.
Coupon Management Overview
Scenarios Requiring Management
Information Available to Administrators
Admin screen features: Search (customer ID/coupon code), Filter (all/unused/used)
Cancellation Feature
Cancellation Flow Overview
Admin selects coupon to cancel
Confirm coupon is unused (used coupons cannot be cancelled)
Delete/invalidate coupon via Shopify Admin API
Restore deducted points via POS API
Update status in customer's coupon info
Email notification of cancellation and point refund
Detailed Flow Diagram
Select target coupon from admin screen
Unused → Continue / Used → Error "Already used"
DELETE /admin/discount_codes/[id] → Code becomes unusable
POST /customers/[id]/points/add → Add deducted amount to restore balance
status: "active" → "cancelled", record cancelled_at
"Your coupon has been cancelled" "500 points have been refunded"
Record all operations for audit
Cancellation Conditions
Conditions for Cancellation
Handling Used Coupons
Scenario: Order was cancelled
Resolution:
- Admin manually grants points in POS
- Grant reason: "Refund due to order cancellation"
- Record in history
Note: Automation possible, but recommend manual review for point returns on order cancellation to prevent fraud
Point Refund Mechanism
Refund Process Details
Cancellation info: Coupon code: 70934-AB12CD-500, Points used: 500pt, Customer ID: 12345
Refund Traceability
Customer 12345 point history:
Point: Reference code links conversion and refund, verifiable for audit consistency
Customer Notification
Cancellation Notification Email Content
Subject: Your coupon has been cancelled
Footer: Please contact us if you have any questions.
Operational Considerations
Cancellation Permission Management
Recording Cancellation Reasons
Fields to enter at cancellation:
Record example: cancelled_by: "Yamada Hanako", cancelled_at: "2024-01-20T15:00:00Z", reason: "Customer request", note: "Said they converted by mistake"
Benefits of This System
For Operations
- Flexible response to errors and cancellations
- All operations recorded for audit compliance
- Permission management prevents fraud
For Customers
- Peace of mind knowing mistakes can be cancelled
- Points reliably refunded
- Status visible through notifications