Which api calls to make to enable a specific type of payment on Paypal

I have integrated a php-based application with paypal.
I have the following functions enabled:

- Do Direct Payment
- Set Express Checkout
- Create Recurring Payments Profile
- Manage Recurring Payments Profile Status

This means I have figured out four things:
- Take a payment
- setup automatic payments
- receive status of automatic payments
- cancel account.

I have one task left: pay for something adhoc.  Unlike "Do Direct Payments", I do not want to take credit cards each time.  Here's the scenerio:

I have two users.  User A wants to connect to User B.  Think like facebook "friending".  If User A clicks "connect", a warning appears that says this:

"to connect with this individual will cost you 3 dollars now, and 1 dollar if they accept, do you agree?"

If they say yes, I take 3 dollars from them.  Later on, User B agrees, and I take another dollar from User A.

what are the paypal procedures to allow for this?  I have been talked to about "reference transactions", but it appears like the payment can only happen once.  Do I authorize a reference transaction every time user A wants to connect?

What calls do I make to enable this?  
Evan CutlerVolunteer Chief Information OfficerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
I don't think you can cause PayPal to just "take money" without a deliberate client action. Think about what that could mean for anyone with a PayPal account.  There might be some way to send User A a message when User B accepts, then User A can make an additional payment.  Or you might be able to fudge something in the recurring payments or subscription process.  But this sounds like a very unusual business arrangement, and I'd be surprised if PayPal had any easy-to-use support for this.
You can use reference transactions i.e. unknown amount whenever (kinda like a direct debit) but PayPal has to enable it for you - which means are you turning over hundreds of thousands of dollars+++ and are a well known brand name?
Else as Cd& said it will be individually authorised payments.
Andrew AngellCo-Owner / DeveloperCommented:
Reference transactions would technically work, but PayPal released the Adaptive Payments API to sort of replace that need.

For this what I would recommend is setting up Preapproval Profiles for your users. This allow you to submit payments (or take money) on their behalf at any time without further approval so long as the payment falls in the profile terms, which can be configured with the API request, and you can setup options for your users accordingly.  

You'll use the Preapproval API to create the profiles for people, and then you'll use the Pay API to submit payments using that preapproval key.

If you're working with PHP you might want to check out my class library for PayPal.  It makes all of this very easy for you.

If you're working with low dollar amounts like that you'll want to make sure and get setup with a Digital Goods account, too, so that you can get the micropayment rates and save money on fees.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I said Cd& - I must have been obsessing over him at the time - I meant Ray
Evan CutlerVolunteer Chief Information OfficerAuthor Commented:
Thanks guys,....this helps alot....I'm negotiating with my client on how to proceed.  Thanks much.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.