I have 3 webhooks that I am using for my subscription account.
BILLING.SUBSCRIPTION.CREATED
BILLING.SUBSCRIPTION.ACTIVATED
PAYMENT.SALE.COMPLETED
When I'm running my sandbox account and I have the subscriber subscribe, the webhooks for the BILLING.SUBSCRIPTION.* show up fairly quickly and sometimes the PAYMENT.SALE.COMPLETED is right there. But there are times where the PAYMENT.SALE.COMPLETED can take up to 15-20 minutes or longer before it shows up in my webhook events.
14 Jul 2023 17:51:33 Billing subscription activated
14 Jul 2023 17:50:48 Billing subscription created
14 Jul 2023 17:33:01 Billing subscription activated
14 Jul 2023 17:32:37 Billing subscription created
Here are two subscriptions that I have done. Note the times. 20 mins had passed between the first and second subscription and there is still no webhook for the PAYMENT.SALE.COMPLETED for either of them.
Question: Are there high traffic times when the responses slow down?
Question 2: When I have a subscriber purchase a subscription, can I utilize the information from the BILLING.SUBSCRIPTION.ACTIVATED and BILLING.SUBSCRIPTION.CREATED to set up part of their account then hope that I get a response from the PAYMENT.SALE.COMPLETED later on to finish setting up their account? Would that be prudent? If not, should I put a notice or disclaimer stating it could take up to a half an hour or longer for their subscription to become active??
The webhooks don't seem to be very proficient if they are not going to be handled in a matter of seconds rather than half an hour.
EDIT This page was brought to my attention:
PayPal sandbox webhooks like PAYMENT.SALE.COMPLETED for subscriptions very slow
It does answer my question. Now I have another question.
Question I know virtually nothing about javascript. All the javascript sdk's are created for me by paypal. Could someone put some javascript snippets that would do the fetch thing and how would I implement it to my server call? What is the flow and payloads? How would I know which side completes first, i.e. client side vs server side?
Thank You guys.