# Problem Subscriptions, test mode and billing option

**URL:** https://meta.discourse.org/t/problem-subscriptions-test-mode-and-billing-option/355416
**Category:** Bug
**Tags:** subscriptions
**Created:** [March 3, 2025, 10:12am UTC](https://meta.discourse.org/t/problem-subscriptions-test-mode-and-billing-option/355416 "2025-03-03T10:12:17Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![MadPenguin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/madpenguin/32/323935_2.png) [@MadPenguin](https://meta.discourse.org/u/MadPenguin)
#### Post date: [March 3, 2025, 12:17pm UTC](https://meta.discourse.org/t/problem-subscriptions-test-mode-and-billing-option/355416/2 "2025-03-03T12:17:52Z")

</div>

Ok, so I think I’ve fixed it (!)

In summary, using test mode seems to have left artifacts against users who tried test subscriptions, I’m guessing the subscriptions weren’t cancelled in the right or expected way. On switching into production mode, the billing tab errors.

### What I’ve tried …

First, don’t take this absolutely literally, I’m mostly guessing based on other posts and these are the commands I used however I might have used literals and had to repeat a few .. but this is the general gist;

```plaintext
./launcher enter app
rails c
u = User.find_by_username(<username>)
c = DiscourseSubscriptions::Customer.find_by(user_id: u.id)
subscription = DiscourseSubscriptions::Subscription.where(customer_id: c[:customer_id])
subscription.destroy_all
c.destroy

```

It seems “subscription.destroy\_all” removes hanging external references to Stripe, and “c.destroy” removes the local subscription. Was this Ok, or have I broken something under the hood?

---

_[View the full topic](https://meta.discourse.org/t/problem-subscriptions-test-mode-and-billing-option/355416)._
