How PayPal Rest API handling payment via Echeck? - paypal

I am hosting a service based website. I am allowing the User to pay via Paypal account but I want to restrict the User to pay via Echeck. I believe the classic API has some setting to block check payment but I didn't find anything regarding this in Rest API reference document.

If you're using Express Checkout, you can set PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD=InstantPaymentOnly to disable eChecks.

You must set payment options to "IMMEDIATE_PAY". Solution in PayPal JAVA Rest API:
PaymentOptions paymentOptions = new PaymentOptions();
paymentOptions.setAllowedPaymentMethod("IMMEDIATE_PAY");
Transaction transaction = new Transaction();
transaction.setPaymentOptions(paymentOptions);
...
Successfully removes eCheck option without further configuration.

Related

Paypal webhook instead of return url

Here is my flow of the payment.
Create Payment and return Url for user to verify
Using above Url user opens Paypal account and accepts payment
After accepting payment Paypal returns to success url.
Execute payment (final stage of the sale)
My Question is if there exists any webhook triggered after step 2, before step 3. Right after user verifies payment in it's personal paypal page.
The reason to catch webhook is not to rely on success redirect url rather than use webhook.
The terms you are using do not match the keywords you've used here.
Are you working with REST APIs or are you working with PayPal Standard / Classic APIs?
If you're working with REST APIs, then the simple answer is yes, you should use the Webhooks to handle any automated processing. Specifically, take a look at the SALE Webhooks. That should give you what you're after.
If you're working with Standard / Classic, the answer is the same except that you would use IPN instead of Webhooks.

Paypal Client Website Payment Options

Currently we are using Paypal's REST API to setup a paypal payment process on our client's website.
Our webcontrol sits inside an iframe on their website and it is from this control the the paypal process is started and processed. Currently that works ok.
The issue we have is that this requires each customer of ours to have a business account (which is required any way we go so that bit is ok) but they then need to go the developer portal on their account and setup a an App ClientID and Secret (which is the bit we are hoping to do without to make it as simple as possible for our customers).
I have noticed solutions like wix.com offer paypal integration to their customers and only require the email address of their customer's paypal account and they handle the rest of the setup from there automatically.
I am just looking for some guidance on which product in Paypal's range should I be looking at to implement the same sort of solution setup for our customers?
Your observation is correct: the REST API service does not (currently) support placing API Calls for other users.
Alternatives:
Classic API: You can call the API in the name of a customer (who first needs to grant your API user access to his account) by passing the "SUBJECT=E-Mail Address" Variable. Usually used in conjunction with Express Checkout - see: https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/ht_ec-singleItemPayment-curl-etc/
If you want to go this route, you may want to look into the permission service API under https://developer.paypal.com/docs/classic/products/permissions/ - it allows you to programmatically request the required permissions from a seller.
Adaptive Payments:
Often used by market places, we're dealing with 3 parties within Adaptive Payments:
a. API Caller --> The API caller placing the API calls and receiving all infos
b. The sender --> The person sending money to one or more recipients
c. The receiver(s) --> One or more receivers of the payment. As Adaptive Payments is pretty much using PayPals "Send Money" functionality, no further permissions need to be requested from the receivers.
See: https://developer.paypal.com/webapps/developer/docs/classic/adaptive-payments/integration-guide/APIntro/
Website Payments Standard: Just add a different e-mail address to the "business" variable and you're done.
See: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/cart_upload/

Paypal REST API: add a payment experience to a billing agreement

If you want to customise your store when using the payment endpoint, that's fine, you can create a payment experience and then pass the payment_experience_id to the payment endpoint.
But what if you're using the billing agreement endpoint? I notice there's no payment_experience_id field, so how do you customise the store? Can't find anything about this in the API docs.
In the PayPal standard & express payment payment reference docs, e.g.:
https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/
... see the fields PAGESTYLE for the direct equivalent of the REST payment experience (a group of setting that you set up at an account level and apply to the payment experience as a set), or the fields HRDIMG, PAGEFLOWCOLOR, CARTBORDERCOLOR, LOGOIMG, and BRANDNAME fto override any single piece of the experince for a particular payment.

No shipping info with adaptive payments

I have been able to get a PayPal adaptive payments payment to work with a simple payment call.
But I want to get shipping details.
I have tried setting action type to create, then using the payKey returned sending a SetPaymentOptions call setting RequireShippingAddressSelection = True, then using the returned url from the payment call as before but still no shipping info.
I have seen others with this problem but without an answer.
Thanks
I have the same problem and here's what I got from PayPal Tech Support.
It is not possible for you to supply a shipping address as part of an
Adaptive Payments transaction. However, you can request that the
customer selects a shipping address from the addresses existing on
their PayPal account when they checkout using the embedded flow.
Details of the embedded flow are available here:
https://developer.paypal.com/webapps/developer/docs/classic/adaptive-payments/integration-guide/APIntro/
(Search for Embedded Payments)
If you think this is an option you would also be required to implement
another API call, SetPaymentOptions, which would be sent after the Pay
API request. Within the SetPaymentOptions API request you would add
the parameter requireShippingAddressSelection. Details of the
SetPaymentOptions API are located here:
https://developer.paypal.com/webapps/developer/docs/classic/api/adaptive-payments/SetPaymentOptions_API_Operation/
If your application requires that you supply a custom shipping address
to PayPal at the time of payment then you will need to consider using
Express Checkout instead of Adaptive Payments.
Are you sure the shipping info isn't passing? I don't think it's anything you'll see during the checkout process, but it will show up in the transaction details of the payment in your PayPal account.
I spent hours researching this and it appears to be an API bug from 2011 (great job PayPal!).
Unfortunately, you have to request the shipping info from the user before redirecting them to PayPal.
Source link

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.