Hello, this is an example of Razorpay payment gateway orders API integration. You can make use of it your application. It also consists a webhook controller and I have destructured response array so that it will be easy for you to go further.
Well, to work with this you need Razorpay-php library and you can find it Here or else you can download it from official GitHub repo.