I'm integrating PayPal payment gateway into my application. I'm using the PayPal REST API's. I'm able to authorize the request and webhook. Also, API and webhooks are working fine for me. The only thing about I'm little confused that which event and sequences of events will be if subscription payment failed?
Asked
Active
Viewed 66 times
1 Answers
0
For subscriptions, the only event you need to act on is PAYMENT.SALE.COMPLETED. When you receive this event, update the profile's valid date through the next cycle (e.g. 1 month in the future). If you don't receive a new PAYMENT.SALE.COMPLETED in time, the subscription has lapsed.
When creating the subscription you can set a custom_id
which is useful for reconcilliation.

Preston PHX
- 27,642
- 4
- 24
- 44
-
Should I check for user profiles for due date. I have to add some cron job – Umer Waheed Dec 01 '22 at 09:00
-
Whatever your plan's cycle period is, add that to the current time and round ahead – Preston PHX Dec 01 '22 at 09:55