Abuja Digital Studio · Est. 2018
Start a Project
DocsOSubscribeSelf-service and save flows
Reference

Self-service and save flows

OSubscribeorravo.com/docs/osubscribe/self-service-save-flows

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 by pause_enabled
  • resume($sub) - always allowed when status is paused
  • skip($sub, $count) - gated by skip_enabled
  • postpone($sub, $days) - moves next_charge_at forward by N days
  • change_frequency($sub, $unit, $count) - gated by change_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>/cancel

Admin 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:

  1. Reason - the customer picks why they are cancelling
  2. Offer - OSubscribe presents a counter-offer based on the reason
  3. 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.

Self-service and save flows · OSubscribe Docs | Orravo