Skip to content
WooCommerce WooCommerce

Order Status Changed → Refund Order

Automatically process WooCommerce refunds when order status changes to specific states. Perfect for automated refund policies, cancellation handling, and streamlined returns.

advanced 15 minutes |
#orders #refunds #status #woocommerce #automation

Use Case

When an order’s status changes to a specific state, you want to automatically process a refund. This streamlines refund handling for specific scenarios where manual intervention isn’t needed.

Common scenarios:

  • Auto-refund on cancellation within policy window
  • Instant refund for specific cancellation reasons
  • Automatic refund for failed fulfillment
  • Return-initiated refund processing
  • Subscription cancellation refunds

Step-by-Step Setup

1. Create a New Workflow

Navigate to Sequensy → Workflows in your WordPress admin and click Add New Workflow.

Name your workflow “Auto-Refund on Cancellation” or “Failed Fulfillment Refund”.

2. Configure the Trigger

Select Order Status Changed as your trigger.

Essential filters:

  • To Status: Cancelled, Failed, or custom status
  • From Status: Processing, On-Hold (pending orders)
  • Order Age: Within refund policy window
  • Payment Method: Refund-eligible methods

3. Set Up the Refund Order Action

Configure the automatic refund:

SettingExample ValueDescription
Order{order_id}Target order
Refund Amount{order_total}Full or partial
ReasonOrder cancelled by customerRefund note
Restock ItemsYesReturn items to inventory

4. Add Safeguards

Add conditions to prevent unintended refunds:

  • Order placed within X days
  • Payment status is completed
  • Order total under threshold
  • Customer-initiated cancellation only

5. Test Your Workflow

  1. Enable the workflow
  2. Create a test order and complete payment
  3. Change status to trigger refund
  4. Verify refund was processed
  5. Check inventory restocked

Pro Tips

Use with extreme caution: Automatic refunds have financial impact. Add multiple conditions and safeguards.

Test thoroughly: Test in staging environment before production.

Set limits: Cap automatic refund amounts to prevent large unintended refunds.

Audit trail: Log all automatic refunds for review.

Safety Conditions

Time-Based Limits

Condition: Order created within last 24 hours
Action: Allow auto-refund
Else: Require manual review

Amount Limits

Condition: Order total < $100
Action: Allow auto-refund
Else: Flag for manager approval

Payment Method Restrictions

Condition: Payment method supports auto-refund
- Stripe: Yes
- PayPal: Yes
- Bank Transfer: No (manual)
- Cash on Delivery: No

Workflow Examples

Cancel Within 24 Hours

Trigger: Order Status → Cancelled
Conditions:
- Previous status: Pending or Processing
- Order age: < 24 hours
- Payment status: Completed
- Amount: < $500

Action: Full refund
Note: "Auto-refunded: Cancelled within 24-hour window"

Failed Fulfillment

Trigger: Order Status → Failed
Conditions:
- Fulfillment attempts: > 2
- Shipping failed: Yes

Action: Full refund
Note: "Auto-refunded: Unable to fulfill order"
Email: "We couldn't ship your order - refund processed"

Subscription Cancellation

Trigger: Order Status → Cancelled
Conditions:
- Product type: Subscription
- Days since payment: < 7
- Cancellation reason: Customer request

Action: Prorated refund
Note: "Auto-refunded: Subscription cancellation"

Refund Policies by Scenario

ScenarioAuto-RefundConditions
Cancel < 1 hourFullNo shipping started
Cancel < 24 hoursFullUnder $500
Cancel < 7 daysFull minus feesSubscription
Cancel > 7 daysManual reviewN/A
Defective productFullReturn received
Wrong item shippedFullVerified error

Notification Flow

1. Status changes to Cancelled
2. Conditions evaluated
3. If auto-refund eligible:
   a. Process refund
   b. Restock items
   c. Update order notes
   d. Send customer email
   e. Notify finance team
4. If not eligible:
   a. Flag for manual review
   b. Notify customer of pending review

Troubleshooting

Refund not processing?

  • Check payment gateway supports refunds
  • Verify original payment was captured
  • Review gateway API connection

Wrong amount refunded?

  • Check refund amount calculation
  • Verify partial vs full refund settings
  • Review order total merge tag

Inventory not restocked?

  • Check restock setting enabled
  • Verify stock management is on
  • Review product stock settings

Unintended refunds?

  • Review and tighten conditions
  • Add manual approval step
  • Implement amount limits