4

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

SUBJECT=somebody@email.com

in the SetExpressCheckout call to ensure that somebody@email.com 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.

user1227914
  • 3,446
  • 10
  • 42
  • 76
  • you cannot choose your receipent in your Express Checkout API calls. The receipeint has to login to paypal or pay with card to complete the payment. – Vimalnath Apr 03 '15 at 07:19
  • The recipient of the payment? You mean the sender of the payment has to login and complete the payment, right? I am trying to choose the person who RECEIVES the money. – user1227914 Apr 03 '15 at 19:08

2 Answers2

6

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.)
Matt Cole
  • 2,552
  • 1
  • 13
  • 21
3

You should be using the concept of Express Checkout parallel payments instead of using the "subject" parameter . In the parallel payments whomever you are going to put under "PAYMENTREQUEST_n_SELLERPAYPALACCOUNTID" will receive the payments . With this you can send the payments to upto 10 sellers at a stretch unlike the "subject" parameter where you can send payment only to one receiver at a time.

I have included the request for SETEXPRESSCHECKOUT call for parallel payment .

NVP Request:
USER=XXXXXXXXXX&PWD=XXXXXXXXXXXX&SIGNATURE=XXXXXXX&VERSION=109.0&METHOD=SetExpressCheckout&RETURNURL=http://XXXXX/index.php?action=ECreturn&CANCELURL=http://XXXXX/index.php?action=ECcancel&LANDINGPAGE=BILLING&SOLUTIONTYPE=SOLE&PAYMENTREQUEST_0_CURRENCYCODE=USD&PAYMENTREQUEST_0_AMT=300&PAYMENTREQUEST_0_ITEMAMT=200&PAYMENTREQUEST_0_TAXAMT=100&PAYMENTREQUEST_0_DESC=Summer Vacation trip&PAYMENTREQUEST_0_INSURANCEAMT=0&PAYMENTREQUEST_0_SHIPDISCAMT=0&PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=Eshan@XXXX.pro&PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false&PAYMENTREQUEST_0_PAYMENTACTION=Order&PAYMENTREQUEST_0_PAYMENTREQUESTID=CART26488-PAYMENT0&PAYMENTREQUEST_1_CURRENCYCODE=USD&PAYMENTREQUEST_1_AMT=200&PAYMENTREQUEST_1_ITEMAMT=180&PAYMENTREQUEST_1_SHIPPINGAMT=0&PAYMENTREQUEST_1_HANDLINGAMT=0&PAYMENTREQUEST_1_TAXAMT=20&PAYMENTREQUEST_1_DESC=Summer Vacation trip&PAYMENTREQUEST_1_INSURANCEAMT=0&PAYMENTREQUEST_1_SHIPDISCAMT=0&PAYMENTREQUEST_1_SELLERPAYPALACCOUNTID=Eshan@XXXXX.com&PAYMENTREQUEST_1_INSURANCEOPTIONOFFERED=false&PAYMENTREQUEST_1_PAYMENTACTION=Order&PAYMENTREQUEST_1_PAYMENTREQUESTID=CART26488-PAYMENT1&L_PAYMENTREQUEST_0_NAME0=Depart San Jose Feb 12 at 12:10PM Arrive in Baltimore at 10:22PM&L_PAYMENTREQUEST_0_NAME1=Depart Baltimore Feb 15 at 6:13 PM Arrive in San Jose at 10:51 PM&L_PAYMENTREQUEST_0_NUMBER0=Flight 522&L_PAYMENTREQUEST_0_NUMBER1=Flight 961&L_PAYMENTREQUEST_0_QTY0=1&L_PAYMENTREQUEST_0_QTY1=1&L_PAYMENTREQUEST_0_TAXAMT0=50&L_PAYMENTREQUEST_0_TAXAMT1=50&L_PAYMENTREQUEST_0_AMT0=50&L_PAYMENTREQUEST_0_AMT1=150&L_PAYMENTREQUEST_0_DESC0=SJC Terminal 1. Flight time: 7 hours 12 minutes&L_PAYMENTREQUEST_0_DESC1=BWI Terminal 1. Flight time: 7 hours 38 minutes&L_PAYMENTREQUEST_1_NAME0=Night(s) stay at 9990 Deereco Road,Timonium, MD 21093&L_PAYMENTREQUEST_1_NUMBER0=300&L_PAYMENTREQUEST_1_QTY0=1&L_PAYMENTREQUEST_1_TAXAMT0=20&L_PAYMENTREQUEST_1_AMT0=180&L_PAYMENTREQUEST_1_DESC0=King No-Smoking; Check in after 4:00 PM; Check out by 1:00 PM

NVP Response:
TOKEN=EC-59G28135S2093963X
TIMESTAMP=2015-04-05T21:51:31Z
CORRELATIONID=419ef62debfd2
ACK=Success
VERSION=109.0
BUILD=16057073 

Then your buyer will see something like below : enter image description here

Eshan
  • 3,647
  • 1
  • 11
  • 14