Sandbox renewal of subscription - paypal

I am making subscription in the sandbox pay-pal and i just want to know how you guys do for the renew of subscription...example if the customers subscription is expired how can i let him renew his/her subscription do i need to create another button for the subscription just to renew his/her subscription?just what i did in his/her first subscription...and how do i reset the date so that his ending date of subscription will be lesser so that i can test to renew the subscription in the sandbox pay-pal.
Or how do i redirect my customers to my sandbox test(business) site if they're subscriptions are expired.what should i do?...please let me know how to do this.
just like in there first subscription they redirected to my sandbox test site and they can see how much they would pay...
I appreciated much more reply.
Thank you.

If you're using IPN, PayPal sends an IPN post when a subscription is created, a payment is made, and when it expires. You can use that IPN post to trigger a script to send your buyers an e-mail. That e-mail can include a link to your site where the button is located or a link the buyers can click to be redirected to PayPal and resubscribe from there.
There isn't a guaranteed way to have buyers return to your site after their subscription expires. Sending them an e-mail with their different options and an explanation that their subscription has expired is a fair way of handling the situation.

Related

Paypal Subscription, check if user paid for the next month

i have a service, where i use Paypal subscription. Paypal has webhooks. The problem is that I don't understand which one i need to use, to know if user paid for the next month or not.
I used Billing subscription renewed but i was wrong. Actually there is no documentation, that explains Paypal webhooks
Hope you can help me with that
I had the same issue and then I used
PAYMENT.SALE.COMPLETED webhook event
It will be triggered when a subscription is made and when the subscription is renewed.

How to interprete paypal billing agreement creation?

I am building a paypal subscription system but i have some difficulties to understand some points. When using sandbox i can't simulate a payment denial process so when the payment is made, paypal redirect me to my "approval url callback" and a billing agreement is created.
So i want to know , in a real situation, will paypal redirect me to the approval url and create this billing agreement even if the payment didn't occur yet ? or this one can be created if and only if the payment is accepted ? (So if paypal denied the payment the billing agreement will never be created)
In my case, my customers will need to access to some paid features of my website so, should i wait for the "ipn webhook notification (PAYMENT.SALE.COMPLETED)" which can take several minutes to be fired to my endpoint, or can i grant access immediately after the billing agreement is created ?
Which is the most secure thing to do ?
thanks.
If the user cancels the checkout, Paypal will redirect to your cancel URL.
But the failed payment cases are not clear to me either. I believe that the agreement will be created even if the payment fails, since it needs to exist for the payment attempt to be done, but I don't work at Paypal :).
My approach is to activate the subscription on a successful redirect no matter what, [edit: the execute response returns an agreement_details.next_billing_date in the past, so you can't use that] with a short initial subscription expiration (4h). When our webhook receives a PAYMENT.SALE.COMPLETED message, we fetch the agreement billing agreement details, and update the subscription expiration to the new agreement_details.next_billing_date. But if the webhook receives a PAYMENT.SALE.DENIED, we just let the subscription expire.
HTH.

Paypal IPN prior to renewal

I am setting up a Paypal IPN for a subscription service. After reviewing the documentation and speaking with Paypal, I'm still unsure as to whether the IPN feature will send out notifications before a subscription is renewed. I've got it to where it will notify a user when their account is charged for the renewal, but there is no prior notification that this transaction will take place.
Does anyone have any experience with setting this up and if it's possible?
Thanks!
IPN only notifies you when a payment is made or its status changes. For subscriptions you won't get one prior to renewal.
If you're using the Recurring Payments API, you can get that via GetRecurringPaymentsProfileDetails, which will tell you when the next billing cycle is.

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.