-1

I have searched Google and SO and I cannot seem to find (or am overlooking) a basic answer to my question.

I have a custom-built website I want to charge monthly access to. Since most site users will be using Paypal anyway, I thought the easiest solution would be to use Paypal for my automatic payments. I want to offer a 7-day trial and then change them monthly. That seems straight forward enough.

That said, in my business account, can I just:

  1. Create an automatic payment and add the code to my signup page
  2. Add my URL to the IPN section to process the webhook calls

And be good? My main concern is if someone cancels I make sure to update their account to expire at the proper time. I can go the API route, but would like to keep it simple if I can.

TIA!

Joel F.
  • 59
  • 8

1 Answers1

0

IPN is very old and should be deprecated; use webhooks.

The only subscription webhook event you need to act on is PAYMENT.SALE.COMPLETED . When you receive this event, update your records for that subscription as being valid through the next time you expect a payment (e.g. 1 month from then). If you then don't receive another PAYMENT.SALE.COMPLETED in time, the subscription expired/lapsed.

When creating the subscription, you can set a custom_id value which can be useful for reconciliation to e.g. identify which user/profile it is for.

Preston PHX
  • 27,642
  • 4
  • 24
  • 44