Delete all data for sandboxes

Is there a way to delete all the data in a sandbox, similar to Delete all test data in Test mode? If not could that be added?

The reason that we are interested in this feature for sandboxes as well is to allow us to test code that seeds and manipulates products without having to update our publishable and secret keys (and webhook API key) by destroying and creating a new sandbox.

+1 for this feature, exact same usecase

Hi there, this functionality does still exist for Sandboxes! While you are in the sandbox, open up Workbench. On the left side of the Overview tab you will see a section for Test data with a button that says Review test data. Clicking that will allow you to delete the test data in your sandbox.

1 Like

This oddly enough allows the user to delete everything except for features? why is that?

@nilofer-stripe Could you please add this to the API as well? It is essential for CI integration tests.

Could you clarify what you mean by features and what you’re expecting to happen please?

Noted! Thank you for the feature request. We are not currently working on adding this to the API.

1 Like

Thanks! This is very helpful. However I noticed that my Meters are not being deleted by this process. Any way to remove them too? (I create them with an automated process and would like to ensure it works.)

Maybe I’m not using this correctly, but I agree being able to programmatically delete data would be really cool. I mean… we have a button for it in the dashboard, why not an API endpoint?

My use-case is that I want to run automated E2E capybara tests that verify a range of workflows including our Stripe integration. It would be really cool if I could spin up a sandbox (I’m working around this for now) and then programmatically destroy all the data in it.

1 Like

Maybe I’m not using this correctly, but I agree being able to programmatically delete data would be really cool. I mean… we have a button for it in the dashboard, why not an API endpoint?

My use-case is that I want to run automated E2E capybara tests that verify a range of workflows including our Stripe integration. It would be really cool if I could spin up a sandbox (I’m working around this for now) and then programmatically destroy all the data in it.