Guides / Reset a test site

How to reset a Chargebee test site

Last updated

After a few weeks of testing, a Chargebee test site fills up with old plans, half-finished subscriptions and open invoices. Here's how to get it back to a clean starting point.

Why reset at all?

Old test data gets in the way. You can't tell which plan is the current one, reports show numbers from tests you ran a month ago, and new tests behave differently because old subscriptions are still renewing in the background. A clean site makes every test run repeatable.

What a reset involves

A useful reset has four steps:

  1. Clear the product catalog. Remove the plans, add-ons, charges and prices you no longer need.
  2. Rebuild the catalog. Re-create the catalog you actually test against.
  3. Close leftover invoices. Pending invoices from earlier tests get mixed up with new ones.
  4. Load fresh test data. Create the customers and subscriptions your next test needs.

The manual way

1. Clear the catalog

In Product Catalog 2.0, prices hang off items. You can't remove an item while its prices still exist, so the order matters: delete item prices first, then items, then price variants. In the Chargebee UI that means opening each one and deleting it. With the API you list each type and call the delete endpoint for every record.

See our guide on deleting a Chargebee product catalog for the details.

2. Rebuild the catalog

Re-create your plans, add-ons and prices by hand, through Chargebee's bulk import, or with a script against the API. Whichever you use, keep the source (a spreadsheet or script) so the next reset is the same.

3. Close leftover invoices

Filter invoices by status pending and close them one at a time, or call the close endpoint for each invoice through the API.

4. Load fresh test data

Create customers and subscriptions by hand, through bulk import, or by script. See how to create Chargebee test data.

The catch: each step is easy, but doing all four by hand takes hours, and scripts need someone to maintain them. Most teams end up resetting less often than they should.

The one-click way with Testabee

Testabee runs all four steps for you:

Reset only runs on test sites, never on live ones. You confirm every delete by typing the site name, and every change is logged.

Reset your test site in one click

Free for one test site. No credit card needed.

Start free

More guides