Self-service and save flows
Subscribers manage their own subscriptions from My Account. Each action goes through OSub_Self_Service for policy and ownership checks before mutating state.
Available actions
OSub_Self_Service exposes these methods, each gated by a setting in the self_service group:
pause($sub, $resume_at)- gated bypause_enabledresume($sub)- always allowed when status ispausedskip($sub, $count)- gated byskip_enabledpostpone($sub, $days)- movesnext_charge_atforward by N dayschange_frequency($sub, $unit, $count)- gated bychange_freq_enabled- Swap product - gated by
swap_enabled - Cancel - gated by
cancel_enabled - Change shipping address - gated by
change_address - Change payment method - gated by
change_payment
Each mutation writes a row to wp_osub_schedule_changes and dispatches a lifecycle event (OSub_Events::subscription_paused, etc.) that OMailer can pick up.
REST surface
Customer endpoints under /wp-json/osub/v1/me/subscriptions/:
GET /me/subscriptions
GET /me/subscriptions/<id>
POST /me/subscriptions/<id>/pause
POST /me/subscriptions/<id>/resume
POST /me/subscriptions/<id>/skip
POST /me/subscriptions/<id>/cancelAdmin equivalents are at /wp-json/osub/v1/subscriptions/... with manage_options permission.
Save flows
When a customer clicks cancel, OSubscribe runs the active save flow (wp_osub_save_flows with status='active'). A save flow is a multi-step modal:
- Reason - the customer picks why they are cancelling
- Offer - OSubscribe presents a counter-offer based on the reason
- Confirm - the customer accepts the offer or proceeds to cancel
Offer types
- Discount - apply a percentage off the next N charges
- Pause - pause for N days instead of cancelling
- Skip - skip the next charge
- Support - hand off to a support contact form (OFeedback or OForms)
- Feedback - capture cancellation reason and let them cancel anyway
A/B testing
Multiple save flows can be active simultaneously. OSub_Save_Flow_AB deterministically buckets each subscriber into a variant by user-ID hash. Reports show the win-rate per variant.
Run history
Each customer encounter with a save flow writes a row to wp_osub_save_flow_runs with the chosen step path and the outcome (saved, cancelled, support). Reports aggregate these for win-rate, offer-acceptance, and reason analysis.

