Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Choose the recipient of the payment in PayPal Express Checkout

I am creating a marketplace-type checkout process with PayPal's Express Checkout. Am I correct to call the Classic API with

[email protected]

in the SetExpressCheckout call to ensure that [email protected] is the recipient of the payment, not myself?

I'll need to do this for a bunch of sellers on the marketplace, so that everybody can receive payments directly from buyers to their PayPal account.

It's not in the documentation at https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/ but I found it searching on Google.

Am I calling this correctly?

UPDATE 1:

Or should I be using PAYMENTREQUEST_n_SELLERPAYPALACCOUNTID?

UPDATE 2:

I tried using PAYMENTREQUEST_n_SELLERPAYPALACCOUNTID? and it didn't work, saying I did not have authorization. But then I used SUBJECT= and it worked fine, even though that account never granted me permissions.

Is this the correct way? I just need people being able to send payments to multiple sellers. I don't need to do anything fancy like refunds or things like that.

like image 659
user1227914 Avatar asked Jan 08 '23 15:01

user1227914


1 Answers

Are you trying to pass PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID without any other credentialing parameters (e.g., USER, PWD, and SIGNATURE)? This might be your problem.

There are three different ways that you can process payments for another user without API permissions:

  1. Pass SUBJECT by itself.
  2. Pass USER, PWD, SIGNATURE, and SUBJECT.
  3. Pass USER, PWD, SIGNATURE, and PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID. (Note that it should be PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID, not PAYMENTREQUEST_n_SELLERPAYPALACCOUNTID.

Here are the caveats:

  • Option 1 can be (and, in some instances, has been) shut off at any time — so really, option 2 or option 3 is your best option. (Option 1 is really best for downloadable shopping carts that want to offer merchants a quick way of enabling PayPal.) Some people will tell you that option 3 is the preferred way to do it, but really, option 2 and option 3 both work equally well.
  • If the subject hasn't granted you any API permissions, you'll be limited to Sale transactions — so make sure that PAYMENTREQUEST_0_PAYMENTACTION is set to Sale.
  • There's a setting in the merchant's account to block payments from uncredentialed shopping carts. If this option is turned on, none of these approaches will work unless the merchant grants you API permissions. (However, this option is turned off by default, and most merchants don't know about it.)
like image 189
Matt Cole Avatar answered Apr 21 '23 02:04

Matt Cole