Reserve/Hold extra money in paypal - paypal

I am gonna develop a hotel reservation site in which i have integrated paypal payment gateway. I wanna hold some additional money from user in respect of "If a person will reserve my hotel then it will have to pay some additional amount for the damages. if the user will not cause any damage to my hotel paypal will return this amount otherwise any damage occurs the money will not be returned to user. it will be paid to me". What is the paypal method that i can use in this scenario.

One common way to implement this kind of functionality is to use "Auth/Capture". In this case you initially Authorize an amount you want to charge and then at a later point in time you Capture (actually take) that amount of money, or a smaller or larger amount, or completely cancel it.
Note, although you don't actually receive the money until you Capture the payment, the end-user is usually unable to access that amount once it has been authorized.
https://developer.paypal.com/docs/classic/admin/auth-capture/

Related

How to receive PayPal payments from customers who wish to make payments towards a larger amount by a set date. They can pay any amount they wish

I offer a service 2 times a year. Some of my clients desire to make payments rather than pay in one lump sum. They need to choose the amount they desire to pay and when they (date) they want to pay on. I just need PayPal for the processing and also the tracking for the amount they have paid. It also needs to not accept any more funds once they have reached the set amount.
Has anyone heard of this capability?
You time and consideration.
Have a look at https://developer.paypal.com/docs/classic/products/paypal-payments-pro/
They implement payment by instalments on their end with Paypal Credit. I believe you will still receive the entire payment in one go, but the customer will have to pay it off to Paypal directly. Alternatively, you may be able to hack something with recurring payment, though you would need to cancel it once the total amount has been reached; it's definitely not meant for that.
Regardless, you are probably better off contacting paypal support for this, since this isn't really a programming specific question.

Programmatically deny a direct PayPal payment

Is there a way to programmatically deny (or "unclaim") a direct PayPal payment?
Let's say someone sends ten payments of $1 each to a corporate account. This is already an accounting headache, but if you think you can refund them as they never happened, there's a non-refundable part of a commission. Ten payments will cost you $3 USD or about as much in other currencies no matter what. This is infinitesimal amount business-wise, but related accounting expenses can be ten or even hundred times as much depending on which country a business in.
So best case would be to reject such payments before they even happen.
I read about IPN notifications, but nowhere there's mentioned a possibility to respond to a specific payment event with some sort of refusal. Yet I saw sometimes my own payments made by using standard "Pay Now" buttons to some merchants were tagged as Unclaimed until a manual intervention from the merchant. Therefore there must a be a way to do this.

Is it possible to block an amount in Paypal like a credit card

I am starting a business and I would like to offer Paypal as a payment option, but for my business it is essential to be able to block an amount of money, just like a car rental or a hotel does on a credit card. Would it be possible to block an amount from my users PayPal account and release it or book it for good later?
My business is of course an online service, and I want to do this pragmatically in a Spring based application.
I think what you are looking for is Authorization and capture.
I haven't used that feature from Paypal, but have used it elsewhere. What you are looking for is usually called card authorization, preauthorization, or preauth.
Yes it's possible
PayPal's REST API offer 3 primary ways to ensure you paid for product/services that you give to your customers
sale. Makes an immediate payment so you get paid immediately
authorize. Authorizes a payment for capture later.(this is what you see in a car rental or hotel)
https://developer.paypal.com/docs/integration/direct/payments/authorize-and-capture-payments/
order. Creates an order. - which gives you the flexibility to
multiple to do multiple authorizations and captures (these are for
complex use cases such as when you buy a computer from Dell you would
be authorized for the desktop, monitor, keyboard at different points
of time based on availability and then the funds captured when they
are shipped)

PayPal Rest API Capture AUTHORIZATION_AMOUNT_LIMIT_EXCEEDED

For Express checkout, when I create a payment with intent=authorize.
after calculate shipping and tax, if the shipping + tax is greater than 15% of the original payment amount I got the error "AUTHORIZATION_AMOUNT_LIMIT_EXCEEDED".
It is very common that shipping + tax exceeds 15% of the original total especially for smaller and heavy items. What will be the way to go around it?
thanks,
Additional info:
when I look at classic PayPal express checkout's first step, It's not required to set any amount to log in to PayPal in order to retrieve shipping address, how do we do this with REST API?
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECGettingStarted/#id084RM05055Z
That you may consider the PayPal InstantUpdate API, which allows you to update the tax & shipping calculation on the PayPal order review page (with AJAX).
Or alternatively, the common practice is to make the calculation before your payment request API call, on your website checkout flow (when customer fills in the shipping address and select shipping method), submit the precise amount to PayPal and then make the redirection.
You are not getting this error from DoEc, but later when you are later calling DoCapture on the authorization you generated in DoEC, right?
If so, then you are up against one of PayPal's protections for its consumers, which is that they don't allow merchants to get agreement for one price but then charge the buyer a much higher price. This is to avoid bad buyer experiences.
You basically have three options:
1) You can call PayPal CS and ask them to give you special permission to exceed the 115% limit. If you have enough history & volume with PayPal without generating disputes from users, then they may give you this permission. But this permission is usually only extended to large/trusted brands.
2) You can add an estimated tax, shipping and handling charge to the auth in Express Checkout. You would still tell the user that precise tax and shipping will be calculated when the item is shipped and their exact cost will vary. But your estimated charge should get you within 115% of the total. (Note: you usually should be able to get tax precisely at time of sale....)
3) You can decide on a fixed shipping and handling charge that allows you to cover your costs in aggregate and charge that in the EC flow. Yes, on one item that is larger/heavier than you expect you may loose $5, but on another that is smaller & lighter you will come out $5 ahead. This is what most people do.

Booking system to take a deposit and then final amount at a later date

This is more of a question regarding flow than code.
I'm currently working on a booking website for a holiday home. I've implemented a booking system which currently takes full payment at the time of booking. This uses PayPal REST API. It works fine no problems code-wise.
However my client would like the system to take a deposit when booking (20%) of the total. Then take the remaining amount later on (through the site). This seems strange to me and I've never used a website which does this so I'm not sure what the flow should be.
The only way I can think of achieving this is that the user has to come to the website at some point in the future to pay the remaining amount. I could send them email reminders but it seems a bit awkward to do that.
Has anyone done anything like this in the past?
In order to take the money later, you need to store the credit card data in your system, which is not quite legal unless you are authorized payment service provider (and I'm almost sure you're not).
We have the same case in our reservation system. Generally, you'd allow credit card payment only for deposit, and later final amount is paid via bank transfer or cash, for example, and has to be settled manually by an operator.
Your idea is not bad, however. You could inform the user about the final amount and due date in the booking confirmation email and later on send them reminders.
You can utilize reference transactions to handle this without storing/saving any billing information on your server.
Reference transactions can be used in Express Checkout as well as with Payments Pro.
Basically, the way it'll work is that you can process the original 20% and then you'll save that transaction ID in your database. Once you're ready to process the remaining amount you just make a call to DoReferenceTransaction and supply the original transaction ID along with the new amount to charge. PayPal will then charge this new amount using the billing information that they have saved on their server.