Coupon Management and Cancellation

How to manage issued coupons and the cancellation and point refund mechanism

coupon managementcancellationrefundoperations
4 min read

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

Select cancellation target

Admin selects coupon to cancel

Verify status

Confirm coupon is unused (used coupons cannot be cancelled)

Invalidate in Shopify

Delete/invalidate coupon via Shopify Admin API

Return points in POS

Restore deducted points via POS API

Update metafield

Update status in customer's coupon info

Notify customer

Email notification of cancellation and point refund

Detailed Flow Diagram

Cancellation Process Details
Admin executes cancellation

Select target coupon from admin screen

Status check

Unused → Continue / Used → Error "Already used"

Invalidate coupon in Shopify

DELETE /admin/discount_codes/[id] → Code becomes unusable

Return points to POS

POST /customers/[id]/points/add → Add deducted amount to restore balance

Update metafield

status: "active" → "cancelled", record cancelled_at

Email customer

"Your coupon has been cancelled" "500 points have been refunded"

Log completion

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