What is the short message when refunding a timed-out transaction - PayPal? - paypal

When debiting a user's PayPal account, PayPal server doesn't respond within a certain period of time (timed-out). We decided to assume that money has actually been taken, so we issue a refund. But what happens if money was not taken from user's account? What short message does PayPal return? I have had a look at the API and it doesn't tell me which one is for this situation.
Thanks in advance.

You're going about this the wrong way in my opinion.
The answer to your question would be PayPal's TransactionSearch API to search for the last transaction.
If there are no results, no transaction took place. If there are results, a transaction took place.
You could then pull the transaction ID off of this and call the DoRefund API to refund the buyers.
However, in my opinion you should find out why PayPal would time out in the first place. I'm pretty sure this wouldn't be a time out on the PayPal end, so I'd do some digging as to the actual cause of this time out, rather than trying to work around it with all sorts of hacks (doing a refund because of a time out is nothing more than a quick hack.)

Related

What are all possible scenarios for PayPal's IPN?

Sadly, PayPal's documentation is woefully inadequate.
What are the possible values for payment_status, and when do they occur?
I am aware of:
Completed - pretty self-explanatory
Pending - eCheque payment that hasn't gone through yet
And... that's it. That's all that's mentioned in the documentation.
But I need to know, what other values exist? What do you get if an eCheque is denied? What about when a client (fraudulently, -mutter mutter-) issues a chargeback against a payment (and rips you off for a few hundred quid -more muttering-), what does IPN send in these cases?
Ultimately I want to automate more of the scenarios that come up. For instance, if a Pending transaction arrives then I want to be able to reliably explain to the client that their eCheque is pending and they will be notified when it clears, and then proceed to notify them when it is indeed cleared (or denied).
Since I deal in virtual currency, I want to be able to debit a user's account automatically if they file a chargeback, but then credit them again if the chargeback is resolved and the funds returned to me.
And I really don't like how there might be other scenarios that I can't prepare for, simply because the documentation is shite.
Anyone got some hands-on experience, or are there any actual devs from PayPal who will honour this call?

PayPal's Recurring Payments, Skipped will retry in 5 days time. How do I make it try now?

So, if I am using PayPal for a subscription to a website/service/software and my payment skips because my card expired or there isn't enough funds.
How do I as a user make the payment try and get the money again after fixing my paypal/bank account without having to wait 3-5 days for it to try again?
From a user point of view; based on this discussion I assume there is a bunch of hard-coded rules in PayPal and that is just one of them. It seams to me like this cannot be overridden by user. If you need to pay someone immediately, it might be worth doing it manually and then requesting a refund for future retry from PayPal.
From the developer point of view; this or this might be helpful/related to the topic, but don't explicitly answer the question.

paypal ipn max time for incomplete transaction

Hey guys was hoping you could help me out.
I am integrating paypal (for the first time) in a website using PHP. From what I have read, there are two methods for confirming a successful transaction, PDT and IPN.
Now the thing is, the item's being sold can have a limited stock. So if suppose a person reserves an item and is taken to the PAYPAL site for final payment, I have to stop all other people from making a purchase since the last piece of the item will be "reserved".
But suppose the person (who has reserved the final piece of the item) goes to the paypal page, and then simply closes it. Will this result in a "fail" ipn coming to me (so I should un-reserve the item so others can buy)?
If so, how long will it take for the failed IPN to come?
If not, how exactly should I handle this.
And is there any scenario where an IPN does not come?
You could use the Express Checkout API.
With EC, the payment is a two step process. In the first step, you make an API call (SetExpressCheckout) where you set up the transaction, and redirect the buyer to PayPal. Once there, the buyer authorizes the payment, and returns to your site.
At this point no money has changed hands. You need to make a second API call in order to capture the funds (DoExpressCheckout).
You can hold the item for a specific period, and if the buyer abandons the transaction, or is very slow to approve the payment, you can release the item back to the public. If he eventually approves it, and does come back to your site, you would simply skip the second step, and inform the user that his transaction timed out. No money changes hands, no items are double sold.

PayPal - Unattended charges

Well, I didn't really know how to call this...
I have been surfing PayPal's developer documentation for a while now, but there is nothing that speaks to me with direction as to achieving what I am looking for.
It's probably well documented, but I don't grasp it well enough yet to make sense while reading each part separately.
I have read about Preapproval, though it seem to require that I send the customer's browser to the designated PayPal address.
I have thought about creating a database with credit card information, but that is too scary -- so I am looking to see if there is a way for a customer to allow me to do unattended charges to their PayPal account, much like I would be able to do if I had a database with customer credit card information.
Any direction would be appreciated.
Yes, this is possible. There are two options:
PayPal Express Checkout with a Billing Agreement
This works similarly to Preapprovals (which is Adaptive Payments, a different set of API's). You would need to redirect the buyer to PayPal in order to accept the billing agreement, and from then on you can bill the user using to DoReferenceTransaction API.
PayPal DoDirectPayment (Website Payments Pro) with Reference Transactions
You would need to have an existing transaction, and instead of a billing agreement ID, you would submit a prior transaction ID to the DoReferenceTransaction API. You can then re-bill the user on the card details which are stored with PayPal (up to 1 year. assuming the card details are still valid).
Do note that both options require you having access to the DoReferenceTransaction API, which you will not have access to by default.
For further information on the API itself, see https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_DoReferenceTransaction
Important: You will need to call in to get Billing Agreements activated. Good luck finding someone that knows what you need (no really) :-)
You will eventually find someone who knows what DoReferenceTransaction is and then once you've finally found them they'll probably tell you they can only activate it in the sand box and transfer you to someone in the Business Office. They'll have to then submit it to approval with someone else. Est. Total call time 59 minutes 8 seconds.
The guy I just spoke with said he's probably handled only 2 call in a year about DoReferenceTransaction - so you may need to ask around. They have other subscription billing and that's not what you want.
Also realize that approval is not instant and you may need to have established history. The guy who helped me said this is the best number
888 215 5506. Be sure to explain why you need them carefully and try to reassure them you're legitimate. A reputable website behind the domain for your paypal email will probably help.
Good news: I applied for Reference Transactions Friday and was approved today (Sunday). This was for two accounts - one which had only been established the day before.
Thank you for contacting us about enabling reference transactions on
your PayPal account.
I am pleased to inform you that your request has been approved. You
can begin using this feature immediately.
If you have further questions regarding this email, please contact a
Merchant Services Specialist at 1-888-221-1161.
Sincerely,
AJ Merchant Risk Operations
I was trying to do this recently and I found this question with no luck because the Express Checkout with a Billing Agreement method is deprecated since January 1, 2017.
There is a new REST method called Vault payment methods that recently entered open beta and it's not in the official documentation (to this date), so I leave the link to Create transactions when your buyer isn't present, in case someone needs it.
The process it's explained in the documentation but basically, you need to create a payment token (the source can be a PayPal account or a credit card), and then use that token to capture the payment.

PayPal TimeOut - DoExpressCheckoutPayment

We are using PayPal on a faily large website, integration went well with all code helpers from the integration wizard. Now we had processed a number of transactions in the first day of putting this live but a small percentage (5%) essentially had there transaction processed by PayPal but our system recieved a TimeOut. I believe this happens at the point where we submit the "DoExpressCheckoutPayment" Method. and because of this the system cannot tell if the payment has been complete or not.
This is a real tough one, as the website has a live currency that we need to update so paypal taking the money but the system not updating is not acceptable.
I'm interested to know if this is a common problem and how we should go about handeling it. I'm doing my best to re-create the issue but cannot at this time.
This looks like a similar problem - https://www.x.com/thread/45136
Any help would be appriciated!
Add retry logic to your application. This is a common way of handling this problem.
After looking into this in more depth, retry logic is not a good idea as the TimeOut is due to the response (So paypal has most likly credited the account).
Instant Payment Notification (IPN) seems to be the solution.