Refunds & Cancellations
How refunds are processed when bookings are cancelled.
Overview
DigiWedge TeeTime includes a multi-method refund engine that automatically processes refunds based on configurable policies. The system supports multiple refund destinations with automatic fallback.
Refund Methods
| Method | Description | Use Case |
|---|---|---|
| Wallet | Credit to player's digital wallet | Members with active wallet accounts |
| Voucher | Issue a booking voucher | Guests, expired wallet, promotional credits |
| PSP | Refund to original payment method | Card payments via Stripe/Peach/etc. |
| Manual | Flag for staff processing | Edge cases, disputes, partial refunds |
Refund Flow
flowchart TD
A[Booking Cancelled] --> B{Policy Allows Refund?}
B -->|No| C[No Refund - Log Reason]
B -->|Yes| D{Determine Method}
D --> E{Try Primary Method}
E -->|Success| F[Refund Complete]
E -->|Fail| G{Fallback Available?}
G -->|Yes| H[Try Fallback Method]
H --> E
G -->|No| I[Mark for Manual Review]
Refund Policies
Policy Configuration
Each course can configure:
- Auto-refund enabled: Process automatically or require approval
- Primary refund method: Default destination (WALLET, VOUCHER, PSP)
- Fallback methods: Ordered list if primary fails
- Per-player-type overrides: Different rules for members vs visitors
Example Policy
{
"autoRefund": true,
"method": "WALLET",
"fallbackMethods": ["VOUCHER", "PSP"],
"perType": {
"member": {
"autoRefund": true,
"method": "WALLET",
"fallbackMethods": ["VOUCHER"]
},
"visitor": {
"autoRefund": true,
"method": "PSP",
"fallbackMethods": ["VOUCHER"]
}
}
}
Wallet Refunds
Refunds to the player's digital wallet account:
Requirements
- Player must have an active wallet account
- Wallet must be linked to the same club/tenant
- Wallet currency must match booking currency
- Wallet status must be OPEN (not CLOSED or SUSPENDED)
Failure Reasons
| Reason | Meaning |
|---|---|
wallet_requires_email | Player email required for lookup |
member_not_found_for_email | No member record found |
wallet_account_missing | Member exists but no wallet |
wallet_club_missing | Wallet not linked to this club |
wallet_tenant_mismatch | Multi-tenant mismatch |
wallet_closed | Wallet is closed or suspended |
wallet_currency_mismatch | Different currencies |
When wallet refund fails, the system automatically tries fallback methods.
Voucher Refunds
Issues a booking voucher for future use:
Requirements
- Club must have voucher system enabled
- Player email required for voucher delivery
Voucher Details
- Voucher value equals refund amount
- Validity period set by club policy
- Single-use or multi-use configurable
- Sent via email with redemption code
PSP Refunds
Refunds to the original payment method:
Requirements
- Original payment must have PSP transaction reference
- Payment provider must support refunds
- Refund must be within provider's refund window
Supported Providers
- Stripe
- Peach Payments
- Rapyd
- Braintree
Partial Cancellations
When players are removed from a booking (not full cancellation):
- Refund calculated for removed players only
- Pro-rata calculation based on player count
- Same method cascade applies
- Booking continues for remaining players
Cancellation Timeline
Refund amounts often depend on notice period:
| Notice Period | Typical Refund |
|---|---|
| 48+ hours | 100% |
| 24-48 hours | 75% |
| 12-24 hours | 50% |
| Under 12 hours | 0% (or credit only) |
Each club configures their own cancellation policy. The above are typical values.
Admin Override
Club administrators can:
- Force a specific refund method
- Override policy for individual cancellations
- Process manual refunds
- View refund audit trail
Refund Status
| Status | Meaning |
|---|---|
PENDING | Refund queued for processing |
PROCESSING | Currently being executed |
COMPLETED | Successfully refunded |
FAILED | All methods failed - needs manual review |
MANUAL | Flagged for staff action |
Metrics & Reporting
The refund engine tracks:
- Refund outcomes by method
- Fallback rates
- Processing times
- Failure reasons
Access via Reports > Refunds in the admin portal.
Environment Configuration
| Variable | Description | Default |
|---|---|---|
TEETIME_ENABLE_WALLET_AUTO_REFUNDS | Enable wallet refunds | true |
PAYMENTS_API_BASE_URL | Payments service URL | Required for PSP |
Troubleshooting
Refund Not Processing
- Check booking has payment transaction
- Verify refund policy allows auto-refund
- Check player has valid refund destination
- Review fallback methods configured
Wrong Refund Destination
- Check per-player-type overrides
- Verify primary method requirements met
- Review fallback cascade order
Partial Refund Issues
- Verify correct player count in cancellation
- Check pro-rata calculation
- Review any rounding rules
API Reference
Cancel Booking with Refund
DELETE /api/bookings/{bookingId}
Response includes refund decision:
{
"cancelled": true,
"refund": {
"action": "wallet",
"amountCents": 45000,
"walletAccountId": "wa_xxx",
"status": "completed"
}
}
Check Refund Status
GET /api/bookings/{bookingId}/refund
Returns current refund status and audit trail.