How to get PayPal user's currencies? - paypal

We need to list currencies associated with a given PayPal account, is there a way to accomplish this using the api?

No. This is buyer-account data and is not available to API callers.

Related

Paypal Adaptive Chained Payment

I am super confused on what this documentation is trying to say.(https://developer.paypal.com/docs/classic/adaptive-payments/integration-guide/APCallsHeadersAndPaymentTypes/)
Basically, I am trying to facilitate payments between 2 users. I also want to have a fee paid to me during this transaction. The confusing part of the documentation are the headers.
According to the reference you need these.
headers.put("X-PAYPAL-SECURITY-USERID", "tok261_biz_api.abc.com");
headers.put("X-PAYPAL-SECURITY-PASSWORD","123456");
headers.put("X-PAYPAL-SECURITY-SIGNATURE","Signature"
headers.put("X-PAYPAL-REQUEST-DATA-FORMAT", "JSON");
headers.put("X-PAYPAL-RESPONSE-DATA-FORMAT", "JSON");
headers.put("X-PAYPAL-APPLICATION-ID", "APP-APPID");
I don't know what to put for X-PAYPAL-SECURITY-USERID or X-PAYPAL-SECURITY-PASSWORD. I do not want to put my actual username and password. Is this what I am supposed to be doing to achieve this?
Those are your API credentials. You obtain those values in your PayPal profile under API Access, then choose the signature method.
Alternatively, you can click this link and login with your PayPal account to quickly obtain those values.

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.

Get Balance of an Addaptive account

Paypal Addaptive Account/Payment APIs don't offer any methods to retrieve their balance. Is this possible via GetBalance from the Merchant API?
You should be able to use GetFundingPlans which is part of Adaptive Payments API:
https://developer.paypal.com/webapps/developer/docs/classic/api/adaptive-payments/GetFundingPlans_API_Operation/
However, this is only allowed to be called on implicitly (you have to be the sender and caller of the API.) If you wish to get other peoples balance you need to use the Classic API call GetBalance, and you would need to use the Permissions API to request permission first.

Get payment history on Paypal API

I need to find a way of getting a Paypal account holders payment history using the Paypal api. If we have a user's consent (i.e. we've already used the Permissions API to redirect them to Paypal, and they've consented to give us permissions to get details of payments to their account), what's the next step?
I've seen a similar question here which talked about using GetTransactionDetails call, but that seems only to get details for a single transaction. Another answer mentioned the Payment.List method, but didn't give an example of how it's used.
Can anyone point me in the right direction?
I would recommend using the TransactionSearch API. This will let you get a list of transactions (up to 100 at a time). You can then use the GetTransactionDetails API to get more information on individual transactions.
https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/TransactionSearch_API_Operation_NVP/

API to get payment history of a customer

I need to show the payment history and balance amount of a customer from paypal account.
It is possible to do by paypal API or we need to maintained the history. If any one knows let me know.
The transaction Search API appears to fit the bill (though you have probably found this by now)...
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_soap_r_TransactionSearch
The user can either enter his own API credentials, or give you third-party permissions to call the GetBalance API call on his/her behalf: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_GetBalance