# Payments

### Handling Stripe Test Data

When you run the `npm run setup` command for the first time, Stripe gets seeded with some dummy products and pricing plans.

You can delete the products here: <https://dashboard.stripe.com/test/products?active=true>

Or, you can delete the entire test data (products, prices, logs, etc.) here: <https://dashboard.stripe.com/test/developers>

![Untitled](https://prod-files-secure.s3.us-west-2.amazonaws.com/5f80d4d1-3a21-46b6-a6fe-ce724081cd76/96b8d71b-975a-42d0-87c9-990db1a943a9/Untitled.png)

In case you want to edit the existing products or prices or pricing tiers or add new ones, you can add it directly in your Stripe Dashboard or make the required changes in `prisma/schema.prisma` and `scripts/config.ts` files and run the `npm run setup` command again.

### Stripe Production Guide

* Toggle off the Test Mode.
* Copy the `Secret key` from <https://dashboard.stripe.com/apikeys> and use it as the value of `STRIPE_SECRET_KEY` in your production environment variables.
* Go to <https://dashboard.stripe.com/webhooks>.
* Click on `+ Add endpoint`. Use `https://www.{YOUR_DOMAIN}/api/webhook/`. Select `checkout.session.completed` event and others if you have modified the `api.webhook.ts` file. Copy the signing secret and add it to `STRIPE_ENDPOINT_SECRET` in your production environment variables.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://onemix-docs.saask.ing/features/payments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
