Parallel preapproved paypal payment? - paypal

I have parallel payments working on my test server very nicely, i.e. I can send money to more than 1 person at a time in parallel based on the example parallel.php file I downloaded from the developer paypal site.
I also downloaded the preapproval_flow.php file, but in the code, I can't see a variable/array which allows me to set parallel payment receivers, or even a single receiver for that matter.
Is it not possible to preapprove parallel payments with paypal api's?
If it is possible, how do I do it?
With straight forward parallel payments, I can use the following to set the parallel receivers of a payment:
$receiverEmailArray = array(
'email0',
'email1',
'email2',
'email3',
'email4',
'email5',
'email6',
'email7',
'email8',
'email9'
);
According to cms.paypal.com and x.com, the preappoval_flow has an option called feesPayer, for which the documentation says:
SENDER – Sender pays all fees (for personal, implicit
simple/parallel payments; do not use for chained or unilateral
payments)
The bold bit, tells me that it's possible to do pre-approved parallel payments, but I can't figure out how to sent the receivers...
Also, on x.com, it says:
Developers and merchants can combine;
Parallel and preapproved payments.

The first step in pre-approvals, is on obtaining one from the buyer.
This pre-approval is not tied to any specific seller, but rather to the API caller, and it allows you to make a Pay API call in the future without the buyer having to confirm it.
The pre-approval flow is a separate API call from the Payment flow. In it, you specify the total amount you want to pre-approve, the start and end dates that the pre-approval is valid for, and a few other parameters. (See chapter 8 of the Adaptive Payments dev guide for the full spec: https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_AdaptivePayments.pdf )
In this API call, you redirect the buyer to the PayPal site, where he will approve future payments up to the amount you specified. (e.g. if you specified a total amount of $1000, the buyer can make 20 purchases of $50, or 1 big purchase of $1000)
Once the buyer approves this, you have a permission to charge him (In the form of a pre-approval token PA-xxxxxxxxxxxxxx, but at this point no money has changed hands.
Now that you have the token, you can proceed to make the Parallel Payment Pay API call, just like you are doing now, BUT you will specify one additional parameter:
preapprovalKey=<The PA key obtained previously>
(And you also need to make sure that actionType is set to PAY )
As soon as you make this API call, because PayPal sees that you have already obtained permission from the buyer (in the form of the approved PA-key), it will immediately move the money to the receivers specified. There is no need for the buyer to be redirected to approve this payment, since he has already pre approved it. (See the logic here?)
So to recap:
Make call to Pre-Approval API, to obtain permission to charge from the buyer
Make call to Pay API (that includes the PA key from step 1) to execute on the permission given

Related

Can i use pre-approval using PayPal website payments pro?

I am making a system in which user permits pre-approval of amount. I've used pre-approval with chained payment. But the problem is that my customer gets redirected to PayPal site and also he/she must have a PayPal account or need to create one. So can i make pre-approval payment using PayPal website payment pro? So my customers will not get redirected to PayPal account. And the process becomes more fast? Note :- I don't want to use authorization and capture method. Thanks.
Edit
One more question :- If i make the website in the UK and the currency in GBP, can I still use the American Paypal account for this?
Auth and Capture is what you're asking for, but then you say you don't want it..?? That's what gives you the functionality you're after, though.
You could do a $0 auth and then run DoReferenceTransaction when you're ready to process the payment as opposed to capturing an actual auth if you want.
Those are your only options when working with Pro, though, and it would give you the same sort of preapproval experience for the buyer.
Here are the steps to accomplish what you're after.
Use DoDirectPayment to run a $0 Authorization (card verification). Users will enter their credit card details directly into a form on your site without any redirection to PayPal (and without any knowledge PayPal is being used at all unless you notify them some way.)
Save the transaction ID that you get form this card verification into your transaction history for the customer in your database. This ID is what will be used to process future payments using that credit card.
When you're ready to process a payment for this customer, pull the ID out of the database and use it with a DoReferenceTransaction request to process any amount you need to.
So the card verification is your preapproval, and then running reference transactions are the same as running Pay requests with a Preapproval key. Both methods accomplish the same thing, but one is with direct credit cards and the other is not.
If you're using PHP you can use this PayPal PHP SDK to make all of the API calls very quick and easy for you. If you're using some other language then there are SDKs available for those as well I'm sure.
Please correct me if i am wrong, #Andrew Angell #Ved Pandya
Auth and Capture or Capture payments later method allows you to do direct payment, but it comes with additional charges, which might not suitable for crowdfunding model as refund/ cancel payment is very frequent
Auth and Capture: You are required to pay $0.30 for each "Card Verification Transactions"
Capture payments later: You are required to pay $0.30 for each "Uncaptured Authorization" that you triggered
https://www.paypal.com/us/webapps/mpp/merchant-fees

Per-user / per-quantity recurring billing. What are alternatives to Stripe?

I am looking for alternatives to stripe's per-user pricing subscription : I need :
to charge my user a recurring payment which depends on the number of user accounts he has
to be able to change the number of users via an API, with customer validation is ok, but ideally without changing a plan nor creating a new type of plan. Check status, cancel, etc. via the API too.
Ideally with no up-front charge = fee + percentage of transaction
I found out that stripe might be a good option (see per-user pricing here https://stripe.com/docs/subscriptions) and unfortunately Paypal does not seem to offer this kind of feature (plans can only be increased by 20% each 180 days or you need to cancel previous profile and create a new one). Or am I mistaking about Paypal ?
What alternatives would exist for such needs?
What you want are Reference Transactions, in which case you run an original authorization or sale transaction, and then in the future you'd run DoReferenceTransaction with the original transaction ID and any new amount you need to process. It will process immediately without any redirection or additional authorization required at that point.
If you use reference transactions with Payments Pro (direct credit cards) then all you need to do is save the original auth or sale transaction ID to your database so that you can pull it out for the user when you need to process a future payment using DoReferenceTransaction.
For PayPal payments you'll use Express Checkout w/ Billing Agreements, which will give you back a billing agreement ID. In that case, the billing agreement ID is what you'd pass into future calls to DoReferenceTransaction.
In either case you'll need to build your own system to lookup payments that need to be processed each day and loop through them making a call to DoReferenceTransaction for each one.

Credit Card Payment - secondary money receiver

I working on an e-commerce site where I need to do something like this.
When the users is on payment page, he should be doing the following things:
- pays a fee
- authorize the payment of an amount (which could vary, but not with a big amount...)
Up to here, everything goes find with PayPal Direct payment system.
But I need more. I need that the authorized amount at some point to be directly charged by another seller (or transferred)
Any chance I can do this with PayPal Direct (such the the payment would still be made in site)? Or is there any other method?
If you're receiving the money via DoDirectPayment you could use MassPay or Pay to send funds to a 3rd party. If you want the split to happen within the original payment you can use Pay by itself and set it up as a parallel or chained payment. See the Adaptive Payments documentation for more details on that.
(Disclaimer: I am employee) Balanced will work for your use case
capturing cards directly without sending user to a third party site
paying out to a merchant of your choice via ACH payout at a later point in time.
The caveat is it's US only so if your outside the US let me know and I'll see if I can find any other options for you.

PayPal PreApproved Payments

I am using PayPal PreApproved payments for my crowd funding website, where project backers are only charged if the project is successfully backed.
I am worried that high rate of payments will fail when the PayPal API tries to collect the funds when a project is successful:
a backer might not have any funds in their PayPal account
a backer might close their account once the project is successful (to intentionally stop payment)
a backer might remove/cancel their preapproved payment
etc...
There are a number of ways that the payment could fail which would mean that the project owner would not get their funds.
Can anyone suggest a way of tightening or securing payments. Please note, that PayPal will only allow you to use PreApproved payments for crowdfunding. Please also note that project owners need to be able to receive the funds from my site. Sometimes, these funds can be as small as $10 or up to $10,000 so we need to use PayPal to pay them as there is not other method of getting the funds to the project owner
I've implemented Paypal Adaptive payments and used them for payments at http://www.wethetrees.com and we had the exact problems you are describing. The capture rate is almost random, we were down to 35% with one campaign and had to manually send all backers invoices.
When capturing we had backers with closed/unauthorized accounts, insufficient funds, unavailable payment methods etc. We switched to just doing direct capture for a while, which is great since we get 100% of all pledges, but Paypal closed our account without notice when one of our campaigns mentioned the word "Cuba".
The solution in the end was to scrap Paypal so now we're using Wepay and Dwolla, and we're considering Bitpay (Bitcoin) as well. Seems to like Paypal wants to kill crowdfunding or doesn't understand it. Anything less than a 90% capture rate is totally unacceptable and will cause projects to fail.
Preapproval isn't the only thing they'll allow you to use. That's just one part of the Adaptive Payments API, but you could go with a delayed chained payment, too.
This way your account can be treated sort of like an Escrow. You can use the Pay API to create payments in the system that are split between receivers accordingly. Only the primary receiver would get paid at first, though, and then you can call ExecutePayment to submit the secondary payments from the primary account within 90 days.
This way the primary account holds all of the funds so they're available to pay out when the goal is reached. If the goal is not reached the payments could be refunded.

Paypal payment process in 2 step?

I want to make payment process in 2 step , in first step paypal should collect fund from user account but not transfer to the merchant account .
when i send another request with sucess action at that type paypal should transfer fund to merchant account or if i pass fail action then paypal should refund to user.
is there any way to do this ?
i reefer following URL but cant find solution .
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPECIntegration#id0861K0T0WY4
Express Checkout is what you want, but there's better documentation available.
Basically, what you're after is Authorization and Capture. When you create your Express Checkout API requests you'll set the PAYMENTACTION to Authorization. Then, when you're ready to process the payment you call DoCapture and pass in the transaction ID you get back from Express Checkout.
No money is processed until the DoCapture call is processed. If you don't end up needing to process it you can simply do nothing, but that would strand the authorization on the user's account for the default period of time depending on their bank. Usually 30 days.
It's a better practice to call DoVoid at that point, which would cancel the authorization and release those funds back to the user's account immediately.
If you want to do the same thing with credit cards directly you can use Payments Pro. The process is almost identical, except there are actually fewer calls involved.
If you're using PHP I would recommend taking a look at my PHP class library for PayPal. It'll make all of this very simple for you, and I can provide 30 min of free training to help you get going if you want, too.