Integration of php website with Gumroad API

How to integrate my Php website with Gumroad API to verify whether a buyer has bought my online products or not and depending on the result status I will edit a column in the database

I have a php website where I sell online courses and my payment gateway is gumroad I want to get back an API so I can verify whether a user has bought my online course or not – depending on the status I want to edit something in the database

I have signup/login system already