I use Stripe and Paypal REST PHP apis for recurring billing subscriptions. When subscription is cancelled I have webhooks which removes user account.
So, If user doesn't have money on bank account - Stripe & PayPal cancels their subscription, and then my webhook removes this user's account.
I have a question: how to get customers last payment date within Stripe & PayPal apis? I need that because, If user pays for 1 month forward and then cancels the subscription their account would be canceled right away and they will lose access for the month which he already payed for.
I want to let them use website service for 1 month and then cancel the subscription.
I searched last payment date in subscription details - https://stripe.com/docs/api?lang=php#retrieve_subscription
But I can't find that, please, help me to find this for stripe and paypal if possible
Thanks,