Hello,
We are trying to set-up functionality for Merchants to Connect their pay-pal account on our online shop.
We're getting stuck on the Partner Referrals API call.
We did the following steps:
1) Created a business account
2) Create a Sandbox Business Account for testing.
3) Created an App and selected the Sandbox Bussines account made in step 2 for the app.
4) Make a Curl Request to Get an access token (to: https://api.sandbox.paypal.com/v1/oauth2/token)
Received a response that looks like this (notice it has the accessToken):
scope: "......" access_token : A21AAFpGKZ3iIjOcGp7uZl0eZcRMDAqHHTwqZz-H-r9h5kIm80U94dqHke0-FrINbVEjgE1HR4q8s3heNRZEc0JN0iqYz-rQg token_type : Bearer app_id : "............" expires_in: => 32400 nonce: => 2019-07-10T12:00:41ZwHBSrNSZDMlDK59kHeZ6syYporh4FRRS6-am6tTD9jE
5) Make a curl request for Partner Referals (to: https://api.sandbox.paypal.com/v1/customer/partner-referrals).
We get the following Response:
name : AUTHORIZATION_ERROR message : Caller is not authorized to access this resource debug_id : '.....'
This is the data we send in the call:
$data = [ "customer_data" => [ "partner_specific_identifiers" => [ [ "type" => "TRACKING_ID", "value" => "1506721845", ], ], "customer_type" => 'MERCHANT' ], "requested_capabilities" => [ [ "capability" => "API_INTEGRATION", "api_integration_preference" => [ "partner_id" => THE SANDOX ACCOUNT ID from Step 2, "rest_api_integration" => [ "integration_method" => "PAYPAL", "integration_type" => "THIRD_PARTY" ], "rest_third_party_details" => [ "partner_client_id" => the Sandbox app_id of the app we created at Step3, "feature_list" => ["PAYMENT"] ] ], ] ], "web_experience_preference" => [ "partner_logo_url" => Helper::getAbsoluteRelLogoImageUrl(), "return_url" => env('HOME_URL'), "action_renewal_url" => env('HOME_URL') ], "collected_consents" => [ ["type" => "SHARE_DATA_CONSENT", "granted" => true] ], "products" => [ "EXPRESS_CHECKOUT" ] ];
We used the example from here: https://developer.paypal.com/docs/commerce-platform/demo/connected/onboarding/partner-referrals-fee-delay/ Questions: 1) Why are we not authorized for this call? 2) We found this snippet: Send the sandbox client ID shown on the resulting page and the email used on your PayPal business account to your PayPal account manager to begin the vetting process. You will receive confirmation from PayPal when your account has been registered for use with the Partners API, and you can then get an access token. On this page: https://developer.paypal.com/docs/commerce-platform/onboarding/partner-onboarding/ . Do we need to Contact someone to get authorization in our Sandbox environment? We did receive an access_token (like we mentioned in step4), can it be of a wrong type?
Thanks
... View more