Accessing PayPal Commerce Platform API - paypal

I've created a new sandbox app in paypal and checked all controls under settings.
I'm manually making a request to get an access token using cURL as suggested in the docs.
Then I make a POST request to /v2/customer/partner-referrals. I'm simply copy-pasting the request from the docs from here.
The response I get is:
HTTP/1.1 403 Forbidden
...
{
"name":"NOT_AUTHORIZED",
"message":"Authorization failed due to insufficient permissions.",
"debug_id":"...",
"information_link":"",
"details":[{
"issue":"MISSING_SCOPES",
"description":"User doesn't have this API in their scope"
}],
"links":[]
}
The partner onboarding page says, that I get 401 Unauthorized if the account doesn't have permissions to access the commerce API. But at the same time I can't find a way to request certain APIs to be included in the scope.
How can I authorize a request to PayPal Commerce API ?
UPD
There's an additional question which may actually be a reason for my issue. Am I required to apply and be approved for the Parter Program before I can use sandbox APIs ?
There's a flow chart on the paypal website for PayPal Commerce Platform integration. It clearly shows that develop the app while using sandbox while I wait for the app approval. How show I interpret this image then?
The fastest way to get started is to start the Engineering and
Business workflows at the same time.

When testing this on sandbox you need to have these specific scopes added to your account.
To do this you'll have to contact PayPal-support using this link:
[https://www.paypal-support.com/s/contactsupport?language=en_US.][1]
Let Support know you would like to add the Sandbox Scopes for PayPal Commerce Platform for Partners to your sandbox account and they should be able to help you out!
I hope this can help you!

Are you an approved PayPal partner? The form to request so is linked from the onboarding page in your question...

Related

Obtaining PayPal Partner ID for Onboarding API

I'm using paypal commerce platform to onboard sellers.
Sellers are onboarded successfully and a merchant-id is generated after process is completed.
but when I'm trying to fetch their information from the following api (as provided by paypal docs),
https://api.sandbox.paypal.com/v1/customer/partners/{partner-id}/merchant-integrations/{merchant-id}
I'm confused what is the merchant-id and what is partner-id, I only get merchantId after seller is onboarded. there is no partner-id
And Wow, look at their docs.
please see the doc image here
Partner id is refernenced as merchant account id.
what the heck is this.
If any body could help me. please it would be much appriciated. Please ignore the typos.
When calling partner APIs, you are the partner. Obtain your account's ID from the place explained in the doc image you linked, under Profile and settings.
For sandbox mode you'll need to log into the sandbox API calling partner account via the https://www.sandbox.paypal.com account interface -- using its credentials from the Developer Dashboard.

Transaction description and app name not showing with PayPal REST API

I am using PayPal Payments REST API to accept payments on some website.
Just now I noticed that both the transaction description as well as the app name (which you configure in developer dashboard) are no longer displayed. Why is this? Some recent change? Or something with my account?
It is very bad as I have a single company PayPal account which I use for various websites and the app name & transaction description is to give the corresponding payment flows their own identity. Currently people abort payments because they don't understand why the details in the payment overview on PayPal are completely different/unrelated from where they initiated payment.
Please see image below for what I mean.
If anyone can confirm this is happening for everyone now and/or refer to some PayPal documentation/statement regarding this topic then please share. I could not find anything on PayPal developer resources.
To display a 'custom' name, you need to create a custom 'Web experience profile'.
I was utilising the PHP SDK so did so by following their sample code.
You can also create a 'Web experience profile' with a direct request to the relevant API endpoint.
Once you have created the profile you simply set the identifier on the Payment object (PHP) like so:
$payment->setIntent("sale")
->setPayer($payer)
->setRedirectUrls($redirectUrls)
->setTransactions(array($transaction))
->setExperienceProfileId($this->config->paypal->experienceId);

How to retrieve from Client Buyer's Account his avaliable 'funds' or 'balance' on PayPal API?

I've just setup my PayFlow Service Manager with my admin settings and create a Sandbox Account to have a test environment. I was reading the docs and the SDK specifications, the samples code on Java...But I still can't find how to know how much funds available have the Client on his PayPal account, before execute a payment in my Site...
I found something of the classic API (GetBalance). This request doesn't exists yet on the new REST API. I need to implement on Java code.
Please Help! Thanks!

Paypal App is "Conditionally Approved".What is the timeline to get it approved?

I have created and submitted a Paypal application ( using the classic API). The application is in a conditionally approved state. Paypal reached out and asked additional questions which I responded back with details. The application does not use the Paypal API to make payments. It only reads transactions related data and shows useful reports and insights for users. The API permissions requested are
1.Obtain transaction specific information.
2.Obtain your paypal account balance
3.Search your transaction specific information.
4.Search your transactions for items that match specific criteria and display the results
I was able to get a live app id and also have the API username, password and API signature. However since our app uses Paypal oauth, the permissions part doesn't work . My guess is this is because the app is conditionally approved. Is this the right assumption? Also what is the typical timeline for an app to get approved? My Paypal account from which I created and submitted the app is a verified account. I have sent messages from within my developer portal to support but I haven't heard anything back.
So far we have been working with a sandbox account. The live application I created is in a different account than the sandbox account. I am not sure if this is an issue.Would be great if someone who has been through the process can confirm.
Unfortunately there is not really a "typical" time frame for app approvals as too many factors go into the approval process. The best thing would be to call in to PayPal to inquire on the status.

How to get paypal API credentials?

I am using Paypal recurring payments and direct payment.
I tested it using beta-sandbox and works fine.
Now I want to make to real paypal account.
I have been given real paypal account, and I login with it on https://www.paypal.com/, but I don't know how can I generate API Credentials ?
this looks completely different from sandbox environment.
Check out this guide to Obtaining API Credentials from PayPal. You will find how to create/view/remove your API signature/certificate in PayPal's live setting.
Update
As per the comment, the previously held answer is out of date. To obtain your API credentials, log in here.
If you want to retrieve the api user name, api password and api signature for live then you can get it directly by log in to this url from Paypal.
Log in to Paypal. Click Tools or hover over Tools and click All Tools from the drop down menu. Sort alphabetically and API Credentials will be the first one.
Login to PayPal, go to Profile and then Selling tools. Click the update link on API access and request API credentials. Refer to this link for a detailed step by step guide.