Outgoing payments, API

Kaven01
Contributor
Contributor

Hi, I am developing a web page that accepts paypal payments, but sometimes will also give money to users. I am using PayPal PHP SDK ( https://paypal.github.io/PayPal-PHP-SDK/ ). I was successful with ingoing payments (user paying to my website for some services) but I cannot find much info on how to create outgoing payments (website pays to users). I was able to create a payment and define receiver as Payee, but payment then needs to be approved. But how? Website merchant should approve it.

 

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

Kaven01
Contributor
Contributor

Never mind, got it. Sender id the account connected to the app. Logically 🙂 Okay, it works now, thank you for support

View solution in original post

Login to Me Too
3 REPLIES 3

MTS_Ciaran
Moderator
Moderator

So Payouts is probably the best solution if the API caller is always the person paying out, with Payouts the payment to a defined reciever is implicity approved since the API caller is the payer so there is no need to redirect user to PayPal to approve it. Check it out here for more details:

https://developer.paypal.com/docs/integration/direct/payouts/

 

 

Login to Me Too

Kaven01
Contributor
Contributor

Thank you, that's probably what I wanted. But one more question - when testing in sandbox, how do I specify what sandbox account will be the sender? I am receiving Insufficient funds error, and I need to specify who should pay the money.

Login to Me Too
Solved

Kaven01
Contributor
Contributor

Never mind, got it. Sender id the account connected to the app. Logically 🙂 Okay, it works now, thank you for support

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.