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 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 webhook to receive the full Merchant object when a merchant connects to your channel. This object will contain useful details, including the merchant_id