Paypal IPN for subscription agreement - paypal

I have integrated Paypal subscription plan, and subscribing the plan in rails app. Now I am looking to integrate webhooks for paypal payments. I am really struggling hard to make paypal work. This is my third question related with Paypal subscription, however I have solved earlier questions by myself. But could do better if there was good documentation in paypal.
I found there are IPN for subscription/recurring payment but I can not find the field with which I can relate the IPN with existing subscription. I am storing subscription_id i.e. agreement_id but in IPN i am not able to find agreement_id.
Please suggest what to do.
Thanks in Advance.

You can put the agreement_id value in the custom field. You should get the custom field back during each IPN.

Related

Recurring payment on PayPal Express Checkout

Im trying set up recurring payment on my site by using Paypal Express Checkout. I did read through the official docs and I couldnt find anything useful related to recurring payment.
https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/add-paypal-button/
Im just wondering does Express Checkout support recurring payment? If so, how can I achieve that or Where can I get some good example to start with?
Thank you for your help in advance. Much appreciated
Cheers
We have a similar issue before. You might wanted to take a look at this thread.
I'm trying to understand the use case here. When you say recurring payment for express checkout,it has to be something a customer is buying regularly like restocking an item, in that case it's not an express checkout, it's a recurring purchase by a returning customer. They must have opted to restock at a regular interval like every 30 days, 2 months etc. They also must be registered users on your website.
So your logic must include — Checking all the customers who have set up an automatic purchase for an item.
—Check their frequency of purchase and charge them for the amount of the item at that frequency.
—For this purpose PayPal has a REST API :
This is the accurate place to look for to implement PayPal recurring payments:
https://developer.paypal.com/docs/api/payments/#payment_create
In case they also allow you to authorize payments through the following API
https://developer.paypal.com/docs/api/payments/#authorization
you could use it as well.
But at least this narrows down your choices in terms of regular payment authorization.
This API will allow you to request PayPal services to authorize payment on a regular basis for that customer. You will still have to have your own logic to check the 'subscription' for your products and the intervals.
—The CreateRecurringPaymentsProfile API Operation (NVP) at the link below looks to be for personal payments. For example something an Inventory Management System will do.
https://developer.paypal.com/docs/classic/api/merchant/CreateRecurringPaymentsProfile_API_Operation_NVP/
It's an API specific to adding recurring payments functionality.
Since you're a developer, PayPal Developers' Resources will answer any queries you have regarding the API functionality and usage. You will have to just know what to ask for. You are their B2B customer trying to understand their API system. You can also file a bug on their Developer portal if you're not getting proper answers.

Lack of Transaction ID on successful PayPal payment?

We are using PayPal's express check-out in order to handle payments in some scenarios. Occasionally we run into situations when it appears that a successful payment has gone through, but there is no transaction id returned when PayPal POSTs the transaction details back to our site. Has anyone else run into this situation? It seems like it might be related to payments that are flagged as "Pending" but we have not been able to successfully recreate the scenario.
Kindly contact PayPal Merchant Technical Support for further assistance on this.
https://www.paypal-techsupport.com/app/ask

paypal one time login during paypal payment

I need a help regarding paypal.
That is. Once I have logged in with paypal and made payment, Then for another payment no login will be asked, Direct payment will be done using paypal. Please comment your suggestions. Thanks in Advance.
You have a couple of options for this.
First, you could take a look at Preapproval, which is part of the Adaptive Payments platform. It allows users to create a Preapproval profile that your application can then use to trigger payments at any time without further approval as long as the payment fits within the guidelines of the preapproval profile.
Another option would be to look into Express Checkout with Reference Transactions. This would give you a little bit more flexibility and would be more in line what you're asking for, I think. Users would agree during their first payment with you to allow you to auto-charge this same account in the future. Then you would use DoReferenceTransaction to trigger future payments based on that "billing agreement" which is what it would be called that way.
I would recommend going with Express Checkout, and you might want to look at Digital Goods, too, which just adds some more functionality with quicker PayPal checkout in various ways.
It's all handled through a few simple API calls, so don't let all the info scare you.
My PHP class library for PayPal will make all of the API calls very simple for you regardless of which method you choose. Again, though, I'd recommend Express Checkout.

can't see completed payment in PayPal sandbox

we test our application on PayPal sandbox.
I was able to make payment form one account (ewa.tkacz#zoho.com) to another (ewa.tkacz-facilitator#mmigroup.pl), and status of this payment is completed on payer account (payment ID 3F335538TV000622E), but on receiver business account I can't see this payment and can't get it by API.
This question is to PayPal, as You recommend to ask on Your forum on Stackoverflow, however if anyone faced similar issue, please vote or response.
I don't believe in what I see; it seems I make some stupid mistake... I wasn't able to find any such issue on Google, here and in PayPal technical support.
I have reviewed both test accounts and I see transaction 3F335538TV000622E (buyer transaction ID)/28A51825L7124154N (seller transaction ID) appearing correctly. There is a difference in the date for the two payments due to the default timezone for the accounts. Based on your screenshots, you are seeing the correct information as the transaction would show on 6/3/14 in the ewa.tkacz-facilitator#mmigroup.pl as it defaults to PDT and 6/4/14 in the ewa.tkacz#zoho.com which defaults to BST.

How do I deal with PayPal customers who can't direct return

PayPal states:
Note: If you have turned on Auto
Return and have chosen to turn on
PayPal Account Optional for new users,
a new user will not be automatically
directed back to your website, but
will be given the option to return.
But if some of the customers don't get "Auto Returned", how do I handle them programmatically?
Paypal does not guarantee autoreturn especially when Paypal Account - optional setting is on.
The right way to handle the integration is with Instant Payment Notification (IPN) option. Using IPN Paypal will make POSTS to your page notifying you of payment events. The following link explains the IPN process pretty well.
To summarize, you will write code that will trap posts from Paypal and then make sure to update your billing data accordingly.
Also, IPN messages might be slightly delayed.
Create a script (cron or what) that does check for such payments at paypal perodically (e.g. every hour).
Is this what you mean?
https://www.paypal.com/cgi-bin/webscr?cmd=p/mer/express_return_summary-outside
If not, you may need to be a little more specific with your question. Like - are you using paypal pro? How are your customers checking out? etc. And now that I read the answer below mine, I wonder if you are even talking about the payment process and not something else.