What are the steps to catch charge:confirmed webhook in custom wordpress theme in php

I am a bit new with coinbase API so please forgive if my question is silly but I have been looking for the answer for the past 1 month and can’t find it.
I have created a custom wordpress theme where I have added the deposit functionality for users. Now I have successfully created the charge and redirected users to the link to pay. But Now I have to verify the status of the charge and for that I am using default notifications. I have connected the php file to a url and inserted that URL in the notification.
Now I don’t know what code to add in that php file which when run could verify that it’s a valid request from coinbase commerce and then use the charge id to execute further.
I would really appreciate the help.

Hey @extm, sincere apologies for delayed response.

We appreciate your interest in using Commerce APIs. Once a charge, or request for payment, is created, Coinbase starts monitoring these unique addresses on the respective networks to detect any inbound payments. Please refer here for the Commerce Payment Statuses: Commerce Payment Statuses | Coinbase Cloud

However, Coinbase support is not able to provide specific guidance on how to develop your application such as writing or reviewing code in specific programming languages and frameworks; we are only able to provide guidance and troubleshooting for issues with the raw Coinbase APIs.

We hope this helps. Thank you!