Available Events for capturing Role Change via Identity Plugin on Netlify Dashboard

Hello Community.

Most of our website on goHugo is ready. Thanks to the community and the wonderful support of Netlify, almost all the issues are now fixed. However, there is a small issue that we see to have cropped up.

When we change the role of a user (via the Identity Widget/Plugin) on Netlify Dashboard, we need some way to catch that event so that we can call up Stripe to incorporate the change for the concerned user as well.
For instance, if we demoted (via the Role field on the Netlify’s Identity) a user due to certain reasons, it does not get automatically reflected on Stripe. Similarly if we escalated the permissions via the Roles on the Netlify’s Identity, the same does not get automatically updated on Stripe.

Any lead on how to accomplish this via codes (probably the Serverless Functions) would be appreciated. We are also open to other proven ways of accomplishing the same (if there are any others).

Thanking you for the time to read and respond.

Cheers,
Sid.

I’d recommend creating a dashboard-like page for yourself where you can change the roles of your users as per this guide: netlify/gotrue-js: JavaScript client library for GoTrue (github.com). Within the function that would handle changing the role, you can then also call your Stripe API to make the required changes.

You can also refer to: Updating users roles via Netlify Serverless function (When logged in as another user) - Support - Netlify Support Forums