Let a studio choose its default payment method, and disconnect Stripe again #173

Closed
opened 2026-08-20 15:35:02 +00:00 by thatguygriff · 0 comments
Owner

Problem

Stripe configuration on Studio Settings is currently one-way and all-or-nothing:

  1. Keys can be entered but never removed. The secret fields are write-only — a blank submission keeps the stored value — so once Stripe is set up there is no route back to e-transfer billing short of deleting us_stripe_* rows from wp_options by hand.
  2. Saving keys moves the whole studio onto card billing immediately. BillingMethodResolver::defaultMethod() returns card the moment isStripeConfigured() is true, so there is no way to have Stripe live while proving that card payments actually work. A studio has to switch everyone at once and find out in production.

Together these make trying Stripe a one-way door.

Proposed

Default payment method setting. A studio-wide choice between Credit card and E-transfer for students with no per-student override, stored in a new us_default_payment_method option. Card stays the default, so existing sites are unaffected. Setting it to E-transfer keeps everyone on e-transfer with Stripe live, which makes the staged rollout possible: switch a few students to Credit card on their student detail page (the us_payment_method user meta override already exists), watch their bookings charge for real, then flip the studio default when satisfied.

A card default should still degrade to etransfer while Stripe is unconfigured — a card cannot be charged without keys. comp should not be offered as a studio default; it is a per-student decision and a studio-wide comp would silently stop billing everybody.

Clear Stripe configuration. A button, shown whenever any Stripe value is stored, that deletes the publishable key, secret key and webhook signing secret and returns the mode to Test. It should leave currency, HST, e-transfer and registration settings alone, and not touch payments already recorded.

Notes

  • Options only — no Schema.php change, so no version bump.
  • Disconnecting locally does not remove the webhook endpoint in the Stripe Dashboard; that stays a manual step and the UI should say so.
## Problem Stripe configuration on **Studio Settings** is currently one-way and all-or-nothing: 1. **Keys can be entered but never removed.** The secret fields are write-only — a blank submission keeps the stored value — so once Stripe is set up there is no route back to e-transfer billing short of deleting `us_stripe_*` rows from `wp_options` by hand. 2. **Saving keys moves the whole studio onto card billing immediately.** `BillingMethodResolver::defaultMethod()` returns `card` the moment `isStripeConfigured()` is true, so there is no way to have Stripe live while proving that card payments actually work. A studio has to switch everyone at once and find out in production. Together these make trying Stripe a one-way door. ## Proposed **Default payment method setting.** A studio-wide choice between Credit card and E-transfer for students with no per-student override, stored in a new `us_default_payment_method` option. Card stays the default, so existing sites are unaffected. Setting it to E-transfer keeps everyone on e-transfer with Stripe live, which makes the staged rollout possible: switch a few students to Credit card on their student detail page (the `us_payment_method` user meta override already exists), watch their bookings charge for real, then flip the studio default when satisfied. A `card` default should still degrade to `etransfer` while Stripe is unconfigured — a card cannot be charged without keys. `comp` should not be offered as a studio default; it is a per-student decision and a studio-wide `comp` would silently stop billing everybody. **Clear Stripe configuration.** A button, shown whenever any Stripe value is stored, that deletes the publishable key, secret key and webhook signing secret and returns the mode to Test. It should leave currency, HST, e-transfer and registration settings alone, and not touch payments already recorded. ## Notes - Options only — no `Schema.php` change, so no version bump. - Disconnecting locally does not remove the webhook endpoint in the Stripe Dashboard; that stays a manual step and the UI should say so.
thatguygriff added the enhancementpayments labels 2026-08-20 15:35:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Unsupervised/unsupervised-scheduler#173