How can I cancel a PayPal Billing Agreement via an API call - paypal

I'm using PayPal NVP API to do reference transactions with express checkout. I create billing agreements and charge using the agreements in sandbox and in a production environment, however when I try to call BAUpdate (METHOD=BillingAgreementUpdate in the NVP API) I get the a response with error code 81002 and description
Method specified is not Supported
I can't find anywhere in PayPal's docs if this method is deprecated or if I need to send something else.

The proper call is BillAgreementUpdate (confusing, I know). That should let you cancel your billing agreement.

Related

Paypal REST API - Billing agreement

Using Paypal Classic API Billing agreement can be created. Agreement Id can be used for future payment using Paypal reference transaction.
Can this same functionality achieved using Paypal REST API? If yes please help me providing reference. I'm aware Billing Plan and Billing agreement can be created using Paypal REST API but without Billing Plan billing agreement can't be created.
Regards,
"Billing agreement" in RESTful APIs is specificly for Recurring Payments, and that might have misled you.
The terms are slightly different between Classic APIs and the RESTful APIs, and Reference Transactions is pretty equivalent to what is called "future payments" in RESTful APIs.
Technical specs are listed HERE, pls be noted that as of now, future payment has to work with mobile integration on top of PayPal MSDK (to obtain user consent and auth code)
Now this feature is available in REST APIs also. But please note this is a vetted product from PayPal. Not every merchant will be approved to use the Pre-Approved payments . Docs are available - But as a limited release
Docs for PayPal Reference transaction API. Also called as pre-approved payments

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 equivalent of GetExpressCheckoutDetails

As far as I can tell, this doesn't exist yet, but I was wondering if anyone knew if there was an equivalent of the PayPal Payments Pro NVP call "GetExpressCheckoutDetails" in the new PayPal REST API.
The REST API documentation lists information on authorizing the sale and the redirect contains the token that would be used in Payments Pro but there's no docs on how to retrieve the Billing/Shipping info prior to executing the sale (after which I assume you can retrieve that information through the "Look up a payment resource" call of payments/payment/{id}
Tangential question in case PayPal official response comes in: Is recurring payment support coming to the REST API soon or will it be exclusive to PayPal Payments Pro?
You can look up a payment resource even before you execute it. However, we have a bug in the API that doesn't currently return the shipping information.

Paypal Billing Agreement with Do DIrect Payment/CreditCard

I have been working on Reference Transactions. Is it possible to create a Billing Agreement using Do Direct Payment as it is not returning any token in the response ??
Thanks
There is no billing agreement that gets created with the DoDirectPayment API. In order to charge the buyer again, all you have to do is make the API call for a reference transaction and pass over the previous successful transaction id. Express Checkout would be the API that you would want to use if you want to set up a billing agreement.

How to use Paypal API with payflow pro

I have a site which runs smoothly with PayPal and express checkout. NOw my client wants a refrence transaction (billed directly from customer when he ordered via cellphone etc without involving him). He asked me to use payflow pro for this but I am really really confused how to use payflow pro with paypal API. Please Guide me . I already read their payflow guideness PDF but didn't get any idea from there. Thanks
Payflow Pro is an entirely different set of API calls, separate from PayPal.
Is your client sure he wants to use the Payflow Pro API, if he has already integrated with PayPal Express Checkout?
If all you want to do is a reference transaction, all you have to do is add 'L_BILLINGTYPE0=MerchantInitiatedBilling' to your initial SetExpressCheckout API call and call the DoReferenceTransaction API call to create this reference transaction.