How can I cancel a paypal recurring payment from my website? - paypal

I'm currently integrating the paypal recurring payment process in my website (thanks to https://www.paypal.com/uk/cgi-bin/webscr?cmd=_pdn_subscr_techview_outside) and, for the moment, it works.
But I have a simple question, and I don't find the answer on Internet. Let's say a user deletes his account on my website after 2 months. How can I cancel automatically his subscription ?
Thank you!

It takes a bit of effort to find, but Paypal does publish a guide on subscriptions.
To cancel someone's subscription, you need to create a link to Paypal -- see page 171 of that reference. There doesn't appear to be an API which allows you to cancel their subscription for them: they need to click a link to Paypal and cancel the subscription themselves.
The guide actually says
Paste the code onto you webpage [sic] near text that explains how subscription cancellations work.

Apparently it's possible to cancel recurring payments with the API. See:
Can you cancel a PayPal automatic payment via API? (Subscription created via Hosted button)
This is certainly more complex than the "unsubscribe" button that paypal gives you, but... it could actually work. The "unsubscribe" button requires that people's payments are coming from their PayPal account, which is not the case if they set up recurring payments on a credit card (without logging into PayPal.)

Related

PayPal Checkout API - Defining payments as a donation

I have set up the option to pay payments from my site with the PayPal system API. Everything has been fine for several months.
In a conversation with PayPal customer service I was told that I am sending the payments in a state of payment (for the purchase of a product) and not a donation
And that makes for mistakes
The problem is that because these are non-profit organizations it should be defined as a donation and not a payment
In this guide I have not found how to set it up: https://developer.paypal.com/docs/checkout/integrate/
You are using a Checkout flow, probably with a Smart Button.
If you want to use the Donation flow instead, you can create a Donate button via https://www.paypal.com/buttons
If you want the button to be editable so as to change the email of the receiving 'business' account, in step 2 uncheck the option to save the button at PayPal, and when viewing the code click the option above to remove code protection.

paypal integration types confusion

I new to paypal integration in asp.net . I found very difficult to understand the paypal api .
I under stood two types -
inline html form ( i.e is also called buy button )
payflow api
my questions are :
which one must be used for recurring payment ( subcription packages for end user)?
in first type , few sites suggested to use IPN for confirmation of payment. I want to know is it neccessary since without using IPN, also using notify_url we can confirm the payment success (as per my knowledge notify_url returns to your site when payment is completed at paypal site)?
for recurring payment , do i need to store user account details (i.e credt card or paypal account ) in my databas?
please do reply with you suggestion .
Thanks
1) You can do it with both, actually. If you want to stick with basic HTML forms then you'd be using Payments Standard, and they call it "Subscriptions". You can easily create a Subscription button from within your PayPal account.
If you're using the API then they call it Recurring Payments (or Recurring Billing). You would use Express Checkout for the PayPal signups, and Payments Pro if you want to handle credit cards directly on your site without any redirect to PayPal.
IPN is useful regardless of what integration method you're using, however, don't get it confused with PDT. PDT sends data back to your site's thank you page, or whatever final page you setup for it, and it only works with Payments Standard. When PDT is configured on Payments Standard, even with Auto-Return enabled, there is no guarantee the user will make it back to your return URL. IPN is very similar, but data will always be POSTed to your IPN listener regardless of whether or not the user makes it back to your site.
You'll also want to use IPN to handle updates for future payments on a subscription / recurring profile. For example, the actual payments, cancelations, suspensions, reactivations, etc.
The notify_url parameter you mentioned is used for IPN. Again, though, this is separate from PDT. A common mistake I've seen many times is when people have their PDT and IPN both set to the same URL. Then when people do make it back to your thank you page, the code actually runs twice. Once from the user actually hitting it, and once again from PayPal's IPN server hitting it. So make sure to avoid that sort of thing.
3) No, you will never save credit card details to your server. The subscription / recurring system handles that using the data that PayPal saves on their servers.

Need some light on PayPal's Website Payments Pro

After having a good read through PayPal's docs, I'm still lost.
FYI in Canada and US it's called "Website Payments Pro", otherwise it's "PayPal Payments Pro".
I need to setup a way of:
User subscribing to a yearly fee
User can setup subscriptions WITHOUT a paypal account (pro feature)
This sounds really simple, but when you start searching for more technical docs about that matter I can only find articles like these:
http://net.tutsplus.com/tutorials/php/how-to-setup-recurring-payments/
Which is fine, but this isn't for PayPal Payments Pro. I heard I'll have to use server-side calls to the API but all I can find is people telling me to "create a button".
But the buttons, for some reason, doesn't support Pro features and ask users to register on PayPal to get subscribed which my client doesn't want at all.
Could anyone share me some light about those?
I find PayPal's docs misleading. I really really need to get this done as soon as possible but I cannot seem to find good docs or a good working example for this.
Thanks for your help, it's greatly appreciated!
PayPal Payments Pro is the new name for Website Payments Pro. The button way of doing things is called PayPal Payments Standard.
See https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-pro/integration-guide/WPRecurringPayments/. Recurring payments can be set up with ExpressCheckout (buyer has a paypal account and logs in to paypal site to approve subscription during setup) or DoDirectPayment (you provide buyer's credit card info when setting up the subscription)
There are a few ways to do it, but if you don't want to mess around with API calls, then I would suggest using a subscription button and signing up for Enhanced Recurring Payments. This allows you to accept subscriptions from buyers who don't have a PayPal account and don't want to sign up for one. To sign up, go to https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/Marketing/merchant/ERPOverview.

PayPal Subscription Cancellation from Merchant Website

we have a paypal payment system integrated into our website so people can register and choose a subscription. The subscription part works fine as the payment goes through and the IPN hits our website and updates our systems. Now we want users to be able to cancel their subscription from within our website so we have a custom cancellation button which when clients click, should send a request to paypal and cancel their subscription. We managed to get this going on sandbox test system however since we have brought the system into live testing we can not get the cancellation feature to work. So currently when the user clicks on cancel button, i think paypal is not being notified and hence no IPN received from PayPal.
Do you know what all info we need in order to cancel the subscription from our website. I know there is a way where users can log into paypal and cancel their subscription or we can log into our paypal and cancel their subscription but we want it to work from our website.
Please help!
Thanks.
When you say you have it working on the sandbox but not live, what exactly is going wrong when you try it live?
I'm actually a little confused by that, because my initial answer was going to be that you can't kill subscriptions via the API unless you're using Recurring Payments. Standard subscriptions aren't accessible via the API.
If you're saying you're doing that in the sandbox, though, then there must be something I'm unaware of..??
On that note, I know the PayPal system pretty well, so I'm thinking maybe you did Recurring Payments on the sandbox, but live you're using Standard Subscriptions..?? If that's accurate then you'll need to move to recurring payments instead of standard subscriptions on the live site.

PayPal IPN Unsubscribing

I'm using the PayPal IPN (Instant Payment Notification) api for subscriptions but I can't find a way to let users UNSUBSCRIBE themselves. The solutions I've found so far require the customer to login to paypal but what about the users who paid with a creditcard/don't have paypal? This is very frustrating. I've the entire day today looking for a solution to this.
If you create a saved button you can 'view' the button and there is a link to create an unsubscribe button. I do not know of a way to create an unsubscribe button if you don't use a saved button.
The subscription process is initiated in your site because it need to carry the product information from your site. After the subscription process done, the buyer should see this in their paypal account and can unsubscribe from there.
The reason for this maybe because you cannot store the buyer's paypal username and password and use it to fetch that buyer's subscription list from paypal. That's why it's must be done by the buyer in the paypal website, not in your site.