Check subscription renewal

fausto94
New Community Member

Hello everyone,

I have an angular 5 client web app with just some basic server side in PHP. I need to integrate a subscription and I think I already did 50 -60 % of the whole job. What I need now is a rest api call I can make(so consume a rest service) that helps me in the renewals:
The subscription has a monthly rate, but when a month has passed how can I "call" paypal to get the new transaction ID? I don't specifically need the transaction ID but something that tells me if the user stopped the subscription. My actual logical flow is:
-start subscription
-set deadline (monthly rate)
-when it comes the deadline I need a rest api to call that tells me "you can trust the user, he renewed the subscription" or "don't trust him, block him, he didn't pay for the new month"
-update deadline or block the user based on the previous step.

Any help?

Thank you very much for all of your help and time. Have a nice day

Login to Me Too
1 REPLY 1

MTS_Jennifer
Moderator
Moderator

One way you can receive information on any billing agreements or subscriptions is to setup and subscribe to webhooks. Webhooks help your app stay informed about different payment events.

If you setup a Webhooks listener and subscribe to the below even you will know if your subscribers have cancelled their billing agreement:

BILLING.SUBSCRIPTION.CANCELLED A billing agreement is canceled. Cancel agreement

Here is a listing of all Webhook events:

Webhook event names

 

Here is information on Rest API Billing Plans and Agreements.

Thank you,

Jennifer

 

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.