Paypal REST API and custom checkout pages - rest

Does anyone know if it's possible to use a custom checkout page when doing Paypal REST API payments?
So far, I've not found anything, but the REST API is ever-evolving, but unfortunately still lacks some key components.

You can change the business name and the your company logo by creating the different "Experience Profiles" using REST API and passing the profile id in your Payment call . You can check the documentation here :
https://developer.paypal.com/webapps/developer/docs/api/#create-a-web-experience-profile
Apart from that you can change the business name from your PayPal account maunally by going to this url after logging in :
https://www.paypal.com/us/cgi-bin/webscr?cmd=_profile-business-info

Related

How to pass a custom logo image and user note in PayPal API billing-agreements/agreement-tokens

How to pass a custom logo image and user note in PayPal API billing-agreements/agreement-tokens ? The same can be passed in payment API using "experience_profile_id" parameter
Found it out. This is available in the new PayPal Reference transactions / pre-approved payments API. It shoule be passed as experience_id under merchant_preferences . the experience id can be created from hereExperience Profile. . Docs are available herePayPal docs Rest API

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);

PayPal API for funding business account

All the users on my site have a personal account. I would like to add paypal as a payment method to fund a user account. Upon a fund the user account will be credited so he will be able to pay for the services I provide. Is it possible?
Yes, this is possible you can write a script that after the users payment several lines of code get executed that activates your service and credits your account.
The easiest way of doing this is by using a payment provider that sits between paypal and your site. They can deliver you directly the scripts and API you need.
Ofcourse you can also make them yourself. Not sure if the PayPal API already includes this functionality.
I hope that this is of any help
Paypal provides an API to integrate and customize its payment platform to your website.
For starters this limk will give you a breakdown on what you can do with the api.
https://developer.paypal.com/docs/classic/api/gs_PayPalAPIs/
try this link if you are keen on developing that part of your site.
https://developer.paypal.com/docs/api/

How to tell if refund was issued via API or through the regular web interface?

Is there anyway to know if the refund was issued directly from PayPal web ui or via API (of some kind)?
Unfortunately there isn't one that I know of. They show up in the website and API the same way.
This is why I log all my API calls. Makes it easier to find out what your API calls have done.
While performing the refund thru API or PayPal account you can make use of the "note" field which will be displayed on the Transaction detail page . So you can pass the different text( some standard text ) while performing refund through API and different text while doing from PayPal account .
In this way you can differentiate between two types of refunds.

Paypal REST api and configuring direct payment page

With the paypal NVP api, we were able to set some options for the generated paypal checkout page using SetExpressCheckout. Is there a way to do the following with the new REST api?
NOSHIPPING to tell paypal that I don't need a shipping address.
LOCALECODE to set the gateway in the user's language.
HDRIMG to change the title of the page to a logo.
EMAIL to pre-populate the email in the gateway. NOTE: I've tried using $payerInfo->setEmail() but apparently this method is only for credit_card and not paypal requests.
SOLUTIONTYPE to set the billing info by default.
LANDINGPAGE to set the landing page.
I cannot find it in the paypal developer REST api docs.
Unfortunately not at this time. We are trying to implement a better mechanism to configure the payment experience than overloading the API calls. Until then please use the classic ExpressCheckout API if these are something that you really need.