> For the complete documentation index, see [llms.txt](https://docs.violet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.violet.io/prism/violet-connect/guides/detecting-merchants-post-connection.md).

# Detecting Merchants Connections

Violet recommends storing the Violet `merchant_id` in your database once a merchant has successfully completed Violet Connect Onboarding. This is so that you are able to fetch details about this merchant adhoc to power your own dashboard.

There are two methods to accomplish this:

## Using Redirects

Violet appends `merchant_id` to the end of a [re-direct URL](/prism/violet-connect/setup.md#redirect-url) that you provide us as a query parameter. You can parse the `merchant_id` from this re-direct.

Here is a sample of how you could use the Violet Connect flow and where you can retrieve the `merchant_id`:

1. Merchant starts your onboarding flow
2. You send Merchant to Violet Connect
3. Merchant completes Violet Connect flow
4. Merchant is re-directed back to your dashboard through your re-direct URL
5. Merchant completes your onboarding flow

Step 4 is where Violet takes the re-direct URL you’ve set in the channel dashboard, appends the `merchant_id` as a query parameter show in the end of the URL and directs back to your onboarding dashboard. You can then take this `merchant_id` in Step 5, and store it on your end.

## Using Webhooks

You can subscribe to the [Merchant Connected](/prism/webhooks.md#merchants) webhook to receive the full `Merchant` object when a merchant connects to your channel. This object will contain useful details, including the `merchant_id`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.violet.io/prism/violet-connect/guides/detecting-merchants-post-connection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
