The "country" field in the PayPal transaction history CSV exports is almost always empty. However, PayPal must know the country where a transaction originates, and in fact tools such as Putler can display the country for nearly all transactions.
I wish to obtain this data myself, but since the export doesn't appear to have it, should I obtain it by using the API? And which of the APIs wold be appropriate to use for this purpose?
Thanks in advance.
Yes you can probably do this using the API. First you'll need to search your account's transaction history. After that you'll get a list of transaction ID's, you can then retrieve information about a specific ID which includes the country code of the buyer.
You can see more details here: https://developer.paypal.com/docs/classic/express-checkout/ht_searchRetrieveTransactionData-curl-etc/
Related
Assume the following situation:
I have a 3rd party service offering some kind of analytics/report/whatever... on a paypal user's transaction history.
Is it possible to fetch payments (only amount - in case that matters) of private paypal accounts (ofc assuming they somehow granted access by registering to my service), even though they didn't buy anything of me directly?
I hope the situation is somewhat clear, unfortunately I coulnd't find any matching questions on the web.
Thanks in advande!
It's easier to download activity and import a CSV than to query transactions via API, but there is a Transaction Search API that can be used.
I could not find info in the documentation on how to grab an order id out of the capture id that I receive from the daily transaction detail report. The only way I found was to check the links field in the capture after the capture gets the request, however, that does not seem like the best way to do it.
Does anyone know how to achieve it directly?
If you are using the Orders V2 API, the Order ID is only used during checkout approval. It is not persisted after transaction creation, and looking up captured payment details with the transaction/capture id: https://developer.paypal.com/docs/api/payments/v2/#captures_get , will not return the Order ID used during checkout, since it is not useful for anything at that point.
I'm calling this API: https://api.paypal.com/v1/reporting/transactions?start_date=2019-10-01T00:00:00-0700&end_date=2019-10-30T23:59:59-0700&fields=all, and it is returning all transactions but I want to retrieve cart details options although in the fields I have set it to all.
I have read https://developer.paypal.com/docs/integration/direct/sync/#list-transactions.
What I want is the following (but via API):
As a general rule, using PayPal APIs for reporting is a bad idea, for various reasons -- including slowness. But even if they were good for this use case, I know of no way to get the shopping cart data you mention in a list via an API. The only possible solution might be to first get the list without shopping cart data and then query each transaction individually (one API cal per transaction) to get its shopping cart details, but this is incredibly inefficient.
So basically, you should:
Record and save all shopping cart details at transaction time, in your own database, using IPN/webhooks as a listener if necessary
Manually use the activity download of your screenshot to download a CSV, if it's ever necessary to backfill information from the past.
Not use reporting APIs.
I am trying to insert an invoice, credit memo, and invoice using IPP.Net. How do I know what the AccountID, ClassID, or EntityID is? When I used the Web Connector to write a previous interface, I was able to specify these things by FullName. Do I need to do some type of query to get all of the IDs for future use? If I do that, will the IDs ever change through any processes, such as re-indexing, or is the ID permanent?
If you're integrating with QuickBooks Online:
Yes, the IPP APIs for QuickBooks Online only accept Id values. You will have to query for the objects so that you can get their Id values to use them in future invoice/credit memo add requests.
If you're integrating with QuickBooks for Windows:
The IPP APIs for QuickBooks desktop for Windows can accept either Name values, or Id values. So you could either query to get the Id values, or just use the Names like you do in the SDK.
A few things worth noting:
The next version of data services Intuit is releasing (v3) will likely be released summer/fall 2013. v3 data services will only accept Id values like QuickBooks Online does in v2. So, if you want to plan ahead for the future, start querying. :-)
Regarding this:
If I do that, will the IDs ever change through any processes, such as re-indexing, or is the ID permanent?
The Id values are permanent - they should never change. The one exception to this is if something gets really fubar'd on Intuit's end and they reset someone's Sync Manager to force QuickBooks to sync to a new online realm. But this generally shouldn't happen in production.
I tried a few things, and I seem to have found the answer. The Id property does not bind on its own through Autogenerate of the gridview. That seems to be because it is a class and not a simple property. You have to specifically bind Id.value.
From PayPal's documentation:
"PayPal returns related variables for each kind of IPN message. Not all variables are returned for each type of transaction."
I was initially planning to create a table in the database with the message fields but now after I read this it doesn't seem like a good a idea anymore (esp. that I see a lot of fields in their IPN documentation).
I have a few ideas (e.g. using tabs and new lines character separate fields and values. Or, saving the the whole thing in XML in the database) but just wondering how you handle logging IPN messages?
What I do is save it to a database table with columns for information that is important to me along with a "raw" column. I take the form parameters collection and serialize it like a query string and push it in. That way all of the original information is available if I should need it but my database schema remains simple and reflects the information that is important to me.
I'd agree with the previous comment. IPN messages can be quite variable, and can be about 40-50 fields per submission. Just pull the few fields you need for your application (amount, customer info, etc) and drop the rest into an XML or TEXT field just in case you need it later.
I faced the same challenges when I integrate PayPal adaptive Payment. The fastest way I did is to store the IPN details (when PayPal calls the IPN handler that I did) to static variable so that the values can be shown regardless of browsers I used.