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:
| Setting | Example Value | Description |
|---|---|---|
| Order | {order_id} | Target order |
| Refund Amount | {order_total} | Full or partial |
| Reason | Order cancelled by customer | Refund note |
| Restock Items | Yes | Return 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
- Enable the workflow
- Create a test order and complete payment
- Change status to trigger refund
- Verify refund was processed
- 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
| Scenario | Auto-Refund | Conditions |
|---|---|---|
| Cancel < 1 hour | Full | No shipping started |
| Cancel < 24 hours | Full | Under $500 |
| Cancel < 7 days | Full minus fees | Subscription |
| Cancel > 7 days | Manual review | N/A |
| Defective product | Full | Return received |
| Wrong item shipped | Full | Verified 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