spring-bootpaypalpayment-gatewaypayflowpropaypal-here

how payment can be deposited to merchants acc who(merchants) gave permissions to my application


For account of US based.

Currently merchants gave permission to my application to accept payment on their behalf to accept payments. but issue is i am always getting payment in my account not in registered merchant accounts.

i have used merchant onboarding APIs : https://developer.paypal.com/docs/archive/paypal-here/merchant-onboarding/permissions/

https://api-m.sandbox.paypal.com/v1/oauth2/token
https://www.sandbox.paypal.com/signin/authorize
gettting refresh token for merchant using below api
/v1/identity/openidconnect/tokenservice
.field("grant_type", "refresh_token") .field("refresh_token", refreshToken)

can someone please help me to solve this ? or any other solution then please give me some details about that.


Solution

  • The document you referenced is for PayPal Here, which is a PayPal application. It is probably not related to what you want to be doing.


    With PayPal Checkout, payments can be directed to a different destination account by including a payee object in the purchase_units of the request.

    Example using an email_address:

        {
          intent: 'CAPTURE',
          purchase_units: [{
            amount: {
              currency_code: 'USD',
              value: '220.00'
            },
            payee: {
              email_address: 'receiveraccount@emaildomain.com'
            }
          }]
        }
    

    If you used the correct Multiparty (not PayPal Here) onboarding API, you may have their merchant_id. The merchant_id is more permanent than the email_address (cannot be changed on the PayPal account), so use that instead.

    The merchant id can also be included in the JS SDK line as merchant-id when loading the script, which helps determine payment method eligibility; but you still need to include the payee object in the request as well, and these two ids must match.