How to create and test apple server to server notification?

I want to create and test the apple's server to server notification to keep track of the non-renewing subscriptions happening in my backend using php. How do I create that and test the app on phone using sandbox.
How to create and test apple server to server notification?
 
 
Q