How to get paypal fees returned from "PayPal Website Payments Pro" NVP "DoDirectPayment" call

DustinAPI
New Community Member

We are using "PayPal Website Payments Pro" NVP  "DoDirectPayment"  for credit card sales and "PayPal Express Checkout" forpay with  paypal sales on our website and want to retain the PayPal fees for each purchase.  From the API docs (https://developer.paypal.com/docs/classic/api/merchant/DoDirectPayment_API_Operation_NVP/) DoDirectPayment will not return paypal fees.  

 

I understand you can call "GetTransactionDetails" to get FEEAMT which I assume are all the fees?  But we do not want to make 2 API calls for every purchase.

 

Is there a way to get fees returned in a single API call?

 

Login to Me Too
1 REPLY 1

MTS_Jennifer
Moderator
Moderator

You can use the Transaction Search API and specify a date range and TRANSACTIONCLASS=Fee to return only transactions in the specific date range involving fees. This would provide you with one API Call and a list of all fees paid.

Note: The maximum number of transactions that can be returned from a TransactionSearch API call is 100.

Here are the minimum variables Required:

METHOD (Required) Must be TransactionSearch.

STARTDATE (Required) The earliest transaction date at which to start the search.

Character length and limitations:

Must be a valid date, in UTC/GMT format; for example, 2013-08-24T05:38:48Z. No wildcards are allowed.

ENDDATE (Optional) The latest transaction date to be included in the search.

Character length and limitations:

Must be a valid date, in UTC/GMT format; for example, 2013-08-24T05:38:48Z. No wildcards are allowed.

TRANSACTIONCLASS  (Optional) Search by classification of transaction. Some kinds of possible classes of transactions are not searchable with this field. You cannot search for bank transfer withdrawals, for example. Value is: Fee — Only transactions involving fees

Thank you,

Jennifer

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.