Detecting Merchant 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 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
:
- Merchant starts your onboarding flow
- You send Merchant to Violet Connect
- Merchant completes Violet Connect flow
- Merchant is re-directed back to your dashboard through your re-direct URL
- 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
Was this page helpful?