It's probably a noob question, but I've been searching for a while and haven't been able to find the answer so far.
I'm currently building a webpage with strapi and snipcart. I've got a user login system on strapi, users can buy courses and do the checkout process with snipcart without registering a user account there.
After buying the online course, I need to give the user access to the course in strapi. I just can't figure out how I can send a request from snipcart to strapi to confirm that a user has bought the course and therefore is allowed to view it in whilst being logged in.
Since snipcart and strapi are not connected I'm trying to figure out how I can send a request from snipcart to strapi. I've been stumbling across webhooks, but I'm not sure if this is what I'm supposed to be using yet.
Any help is appreciated.
So I figured it out, but didn't have time to reply yet.
After an item is bought, the snipcart sdk can send a cart.confirmed event where you can listen to.
After listening to the event you can send the snipcart information to your strapi backend to save it. Here you can for example have a boolean which gets updated if the user has bought a course/item.
https://docs.snipcart.com/v3/sdk/events#cartconfirmed