If you want set recurring payments, it’s all the same method when creating a payment link. Just set recurring to yes and send in recurring_duration as Daily, Weekly, Monthly, Quarterly, Half-Yearly or Yearly.
The call back URL you have specified would receive a response when the user has paid for the invoice, cancelled or has failed. We shall send the following as POST to your call back URL;
call_method == recurring
secret == ‘the secret key sent when creating the payment link’
response == paid, cancelled or failed
api-secret-key == we shall send your secret key via the headers
paid: means the user has paid for the subscription
cancelled: means the user has cancelled the subscription, you should further delete or terminate the service.
failed: means the user doesn't have not enough to pay the subscription, you should further delete or terminate the service.
Peerwallet would continue to send those values to your call back URL until it receives a response.
The expected response is; success (json response)
Returning success via json would indicate that your script has received and has acted accordingly based on the response received.