whats paypal's subscription checkout flow in business side?

BigChappa
Contributor
Contributor

Paypal document is not clear about the steps business needs to do after user finished checked out.
Here is what I think I as business should do, please correct me if I am wrong.
1. send subscriptionID to backend in onApprove callback
2. backend validates the subscriptionID then save it together with userID if its valid.How?
    Currently I am thinking using https://api.sandbox.paypal.com/v1/billing/subscriptions/<subID> and add 30 days premium to user if the status is Active.
3. there will be a rest api to handle the paypal webhook event PAYMENT.SALE.COMPLETED
    the handler will verify the event
    then add another 30 days permium to the user. (using subscriptionID provided in the event to find the user which I saved the connection earlier)


Any help is appreciated.

 

 

 

Login to Me Too
2 REPLIES 2

Geter
Contributor
Contributor

I'm looking for same information.

About the webhook type you mentioned, 'PAYMENT.SALE.COMPLETED', I don't know if you have tried it out on the webhook simulator, but the ID's sent in the payload have no relation to actual subscriptions. I don't know how to relate them or if it this is the correct webhook event to expect for subscriptions monthly renewals. BUT, if you use the 'BILLING.SUBSCRIPTION.RENEWED' event in the payload you receive and actual subscription ID there that you can relate to your customer you  on your backend, that you previously saved when he signed up for the first time.

 

I see so many questions here never answered, this community forums is just abandoned.

Can some PayPal representative help out?

Login to Me Too

BigChappa
Contributor
Contributor

Thanks for the reply at least letting me know there is not much hope here.

Regarding your question, the billing_agreement_id in the payload.resource is the subscriptionId. 

I also asked in stackoverflow https://stackoverflow.com/questions/58908769/whats-paypals-subscription-checkout-flow-in-business-si...

maybe upvote it can attract some users.

 

 

 

 

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.