PayPal - Payment on hold - paypal

I have next scenario.
I have person A and person B. Person A wants to buy some item from person B via PayPal but he wants to first get that item then confirms the payment to the person B when he makes sure he got the item and that everything is ok with an item.
Is that possible via PayPal API?

What your describing is something that an "escrow" service would offer. i.e. hold the money till the buyer is happy with the purchase and then release it to the seller and if not happy manage the dispute. The seller has the guarantee that funds are secured and the buyer has a guarantee that it's not released prematurely. This is not available out of the box with PayPal but the way you can get around it is via
https://www.paypal.com/us/webapps/mpp/paypal-safety-and-security
Click on "i am a seller" and "i am a buyer" both sides of the equation are protected especially is such obvious cases that buyer ordered "A" and they got "B".

Related

Paypal automatic refund from IPN

having an issue.
I want a way to do a paypal transaction automatically when the paypal IPN sends a notifications.
To give some context.
I am developing a online seat booking system (school plays etc.) and have implemented a paypal button to buy the seats once you click your seats but i want to have a way for the paypal transaction to timeout so that the booked seats can be made available again if the payment doesn't go through.
so what i have currently is a time stamp on the booked seats that gives 10 mins before they are available again. But the paykey (i think i have that right) is still valid. so the first person could (in theory) go back and pay for the seats, therefor the seats are booked out twice.
so on my IPN i have a check to see if the booking is timed out.
And this is where i am, what code can i use to issue a refund in that case?
thanks
You can call paypal refund API:
https://developer.paypal.com/docs/integration/direct/payments/refund-payment/
I would also suggest that you have check on your website when someone clicks on Pay to see if the session is expired so that payment is never done. If you implement the solution where you will call refund based on ipn you will end up paying transaction fees anyways and customer experience will also be below par.

Paypal API, What are its capabilities?

Well I asked though the paypal site, but have got no answer. I got the famous email with "Your question has been received. To review the status of your ticket, click on the link below." with no link in it. So I'm hoping I can get an answer here.
This is what I sent them:
It appears you have multiple APIs available and I'm having a hard time figuring out what the each API is capable of doing exactly. I want to create a site that in short, brings buyers and seller together. Here is what I am looking for:
Buyer and Seller make an agreement through site.
Buyer sends money, seller is unable to touch it yet though. (Basically can paypal secure a payment?)
Seller gets notice of money sent and notice to ship product ship product.
Alternative paths for step 4:
Buyer gets product and there are no issues, the buyer confirms the transaction and payment is released to the seller and a set % is sent to me. (Can paypal split payments?)
Seller never ships product or problem arise in shipping that cannot be resolved, paypal returns money to buyer without penalty. (Can paypal return funds without penalty?)
Product arrives, but has issues. There will be set penalties for said issues. Penalities are returned to the buyer, then rest is sent to seller and set % sent to me. (can paypal enact a penalty?)
Any general information or answers to my specific questions would be greatly appreciated. thank you for your time.
For #2, since you're the service provider, you'll be liable for product delivery. Paypal won't do it for you.
An ideal workflow would be:
Your buyers pay you
You withold the payment
Buyer okays the shipment
You keep your cut and pay the rest to the seller
If you have to refund your buyer (order cancellation, or some other reason), you can use paypal's refund api
To summarize, paypal is just a payment processor and would ensure that payment reaches from endpoint A to endpoint B. How you use paypal for your particular use cases is totally upto you.

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.

Preventing duplicates with Paypal IPN

is there possibly a way that the paypal api checks for duplicate IDs and return "invalid" on finding one?
Example:
If a user puts a product in her cart, browses on for a while, then checks out, can Paypal return INVALID (before she actually log into paypal to pay) because another user has bought this product (= same productID) meanwhile?
Of course I could do this check myself, but only after the user has logged into Paypal and returned to my site.
Thx for your Help
I think the expression you are searching for is "inventory management". And no, PayPal does not seem to provide this.
Roughly speaking, the traditional approach to this is to allow UserA to reserve an instance of Product#1 for a certain period of time, P. If you only have quantity=1 of Product#1 in stock, then during this time, Product#1 would appear sold out - e.g. UserB could not put an instance of it in their cart.
After period P, if you have not received confirmation from PayPal (either via PDT or IPN) that UserA has completed their purchase, then UserA's reservation expires, and Product#1 is available for sale again.
This has nothing to do with PayPal; I assume you're not interacting with PayPal API's whenever a buyer adds something to the cart on your own site.
Unless you're talking about the cmd=_cart (Website Payments Standard cart) functionality, in which case; no, this is not available as a featuer per se. You could use the 'prevent duplicate invoice' functionality for this and pass the product ID in in the 'invoice' field.
This would prevent any payments to go through for a specific 'invoice' (product ID), ensuring you can only get 1 order per unique product.
E.g.,
And turn on the following option in the PayPal account:
Profile > Website Payment Preferences > Block accidental payments

How to do PayPal/Google Checkout in an Auction style web application?

I'm curious if there is a way to process/connect buyers and sellers on my site without the site having to charge the buyer and credit the seller. In other words, I don't want to touch the money, but I do want to integrate the process as much as possible on my site.
I guess what I'm asking is how do auction sites manage the transactions between buyer and seller? I really don't want my site to resort to emailing the buyer with the seller's contact information and saying .... "here's the sellers info. Good luck with that."
Ebay seems to allow a buyer to go to PayPal and pay the seller, but returns back to Ebay with payment confirmation. Even though the transaction is between Buyer and Seller, Ebay is able to retrieve some details about that transaction. Is this simply because Ebay owns PayPal, or can other sites do the same?
-This is an old question but the information is a bit off so I will try to re-answer.
It is all doable. There is no custom code going on like codingspace is suggesting.
Paypal has a number of checkout types, I have some decent experience with express checkout so I will try to answer with an example of those calls.
You set up the payment with a SetExpressCheckout call using your call back uri (so you see if the customer confirms) and the sellers info in the request (you will need appropriate information from the seller).
With that, once they confirm you can bill them with DoExpressCheckoutPayment using the sellers and info and the returned information from SetExpressCheckout.
And that is effectively the process. Pretty simple really.
In terms of taking a commission, you can't do it via that specific transaction. What most mass retailers do is keep a record of all the commissions and bill the seller at the end of the month. The other option is forcing sellers to buy prepay credit which is then used on commisions of each sale, this is what trademe.co.nz does (NZ's ebay.)
Let me know any questions.
I'm guessing you don't want to take a commission off of each sale on your site then. The only thing that comes to mind is to have the seller provide their own paypal "buy now" button after the sale that you can then give to the buyer.