How to send money via PayPal API to complete a user's bank account?

I watched Ryan Bate's rails on PayPal integration . I even got it to work with the Rails 3.1 test application and the PayPal sandbox.

However, the approach highlighted on rails is more suitable for end users paying YOU (your business). What if you need to send money to your customers? Is there a tutorial / video / documentation on how to do this?

Ideally, I would like to use my Paypal account to send money to a client’s bank account, which in some cases may not belong to Paypal.

+6
source share
2 answers

The right approach to send user money is to use the PayPal payout API. To do this, you will need a (verified) set of letters. Then the following API documents provide some information about the required calls:

https://developer.paypal.com/docs/integration/direct/create-single-payout/ https://developer.paypal.com/docs/integration/direct/create-batch-payout/

PayPal provides the Ruby gem ( https://github.com/paypal/PayPal-Ruby-SDK/ ) for this integration. Evens include a few sample fragments to show how to integrate:

https://github.com/paypal/PayPal-Ruby-SDK/tree/master/samples/payouts

+2
source

When I was in the same situation, but I also could not understand. The only thing that occurred to me was to save important information for further transactions, and then set up a cronjob using a script that transfers money from your account to the party.
Example: CustomerA wants to buy SiteOperator from you through CustomerB
CustomerA offers a free article from SiteOperator
You store information about the amount that you need to send to CustomerB (calculate the fee, etc.)
Cronjob cycle every 15 minutes and calls the PayPal API to send money to CustomerB.

This is how I do it.

-1
source

Source: https://habr.com/ru/post/897591/


All Articles