kzap
kzap

Reputation: 1491

Getting Mass Pay Information via API

Using the NVP Classic API: I am trying to get information on Mass Payment that was sent via our PayPal account. I can find the Mass Pay using TransactionSearch but when I try to get the TransactionsDetails of it, but I get a permission error. I tried adding all permissions possible but its the same error:

"You do not have permission to get the details of this transaction"

I really would like to get the details of this Mass Pay rather than having to rely on the 1 IPN URL in my account to receive it.

Also I notice I can find the individual transactions that were sent because of the Mass Pay but they have no information in them relating them to a Mass Payment or the Unique ID I assigned them. The best I can think of to verify if a Mass Payment was sent is to search for the email and amount using TransactionSearch and see if a matching one within the same date range exists. Not very fun.

Upvotes: 4

Views: 973

Answers (1)

Wolfram
Wolfram

Reputation: 8052

It seems you dug into this quite a lot, so this might not be any news to you, but still for reference and hopefully some affirmation and clarification:

There does not seem to be a way to pull transaction details about the individual payments using the NVP-API at the moment. As you might already know, the official documentation points to either the Account History or IPN for Mass Payments reporting.

Account history

As you want to access the transaction details programmatically, logging into the site to access your account history is not feasible. However, the simplest solution seems to (automatically) download the transaction logs for your Mass Payments and extract the information (mainly the status of each payment) from it. You could do this periodically or even on demand to check the status of all your payments.

You can either download a Mass Payments transaction as a whole or download information about the individual transactions generated by the Mass Payments transaction.

This seems to be the best solution to get a machine readable list of all the transactions at once. Also, this can work as a fallback if for some reason your IPN listener misses status updates (also: you can resend them later on).

IPN listeners

Setting up an IPN listener seems to be the best solution to get "real-time" updates about the payments. I do not know specifics about your use case, so I don't know why you kind of ruled this solution out.

As the NOTIFYURL field is not available for Mass Payments, you are stuck with the one IPN endpoint set for your account/profile. This does not seem to be a big problem (again: I don't know any details), as you should be able to filter and sort the notifications using the IPN MassPay variables, which give you the mass payment reference that you were looking for. This might require some sort of persistence on your side to keep track about status changes. Or you could combine this with the CSV report.


There doesn't seem to be a (documented) way to access the individual payments in the context of the Mass Payment via the NVP-API, but I am confident that you can set up a monitoring system that suits your needs. I know that the PayPal documentation and APIs are sometimes cumbersome, but at least I learned today that they started to deprecate their PDF specs in favor of online documentation.

Upvotes: 4

Related Questions