Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

Does FoxyCart collect data about PayPal transaction fees? (want to send fees to QuickBooks)

consolibyteconsolibyte Member, Integration Developer, Consolibyte Quickbooks
in Bugs & Feature Requests edited November 2012
Does FoxyCart collect any information about the fees that PayPal charges when someone checks out with PayPal?

This should be do-able with the PayPal web hooks/callbacks stuff - they can call back to you and tell you how much the PayPal fee was. We'd like to collect that data, and send a record of those fees to QuickBooks with our integration (http://consolibyte.com/quickbooks-integration/foxycart-quickbooks/).

Does FoxyCart collect that info per transaction right now?

Is it transmitted via the data feed?
Tagged:
Comments
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    No, but you do get the PayPal transaction ID number so you could call PayPal and get the info. Would that work?
  • consolibyteconsolibyte Member, Integration Developer, Consolibyte Quickbooks
    It would... it'd just be painful because we'd have to walk every user through the process of getting us API access to PayPal, right?

    It'd be a lot nicer if FoxyCart would register an IPN callback and just pass the data through the data feed.
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    I agree... and every user would have to get you API access. Although the PayPal connections to FoxyCart don't have API access either -- I think they just do a straight purchase and return. The only time the API is concerned is when they are doing subscriptions.

    Maybe if someone particularly needed or wanted the PayPal fees noted they'd be able to fill in that section in the CB admin which would then trigger the PayPal API connection. Sort of like an optional add-on to ConsoliBYTE's service.
  • consolibyteconsolibyte Member, Integration Developer, Consolibyte Quickbooks
    Although the PayPal connections to FoxyCart don't have API access either -- I think they just do a straight purchase and return.

    FoxyCart wouldn't need API access - when you send someone over to PayPal, you can pass PayPal a "notify_url" parameter. If you do that, PayPal will automatically call out to that URL to provide you with information about payment status and fees - no API access necessary at all, and thus no extra steps for the end-user either.

    The "notify_url" callbacks are pretty trivial to implement as well.

    Bret / Luke - think we could get this on the feature request list?
  • evgevg FoxyCart Team
    @sparkweb: David, what do you mean by "the PayPal connections to FoxyCart don't have API access"?
    @luke: can you join?
  • consolibyteconsolibyte Member, Integration Developer, Consolibyte Quickbooks
    I think David is thinking that you need access to the PayPal API (it's a JSON or SOAP API or something) to fetch this data.

    You can fetch this data without PayPal API access though, using an IPN notify_url listener.
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    @consolibyte: yup, I missed that. Makes sense. I don't quite know how this would work, though, since the PayPal IPN and the FoxyCart datafeed are both async processes. So maybe FoxyCart would have to wait till they hear back from the IPN before delivering the datafeed?

    Over the weekend I was thinking about getting the transaction information later and saving the transaction fees as a transaction attribute. This would require API access, but it could be triggered through the datafeed.
  • consolibyteconsolibyte Member, Integration Developer, Consolibyte Quickbooks
    Ah, that is a good point... maybe the FoxyCart guys can provide some thoughts on that. It sure would be neat. :-)
  • lukeluke FoxyCart Team
    We're already using the IPN (instant payment notification) integration with FoxyCart for handling PayPal subscriptions, so I don't think we could point the notify url to something else. That being said, we probably could expand our IPN capabilities to handle more than just recurring billing changes.

    @evg: Can you add to your list to take a look at the IPN options and see how difficult it would be to capture this data?

    It may not be ideal, but I'm thinking one way to handle this might be to setup an attribute on the transaction which included the Paypal charges. That way, the data would be attached to the transaction when we get the IPN response. The datafeed wouldn't have the data, but any API call (or datafeed refeed) after the IPN would.

    Maybe a daily "update today's transaction attributes" call to the API would work?

    Either way, let's start the discussion by first getting up to speed with what the IPN is already sending us.
  • consolibyteconsolibyte Member, Integration Developer, Consolibyte Quickbooks
    Thinking about this further... I'm actually wondering if you actually already wait until after you get the IPN callback to send the data feed. Otherwise, how would you know if the transaction was actually successful, right?
  • lukeluke FoxyCart Team
    Pinging @evg again on this one.

    And yes, the IPN is how we mark a subscription transaction as completed in FoxyCart when it comes in via PayPal Express.
  • consolibyteconsolibyte Member, Integration Developer, Consolibyte Quickbooks
    What about something that's NOT a subscription? e.g. for just a normal purchase via PayPal Express? Do you use IPN there too?
  • evgevg FoxyCart Team
    Actually for CC transactions PayPal Express Checkout returns a fee amount immediately, in a DoExpressCheckout response.
    This is an example:
    <GrossAmount xsi:type="cc:BasicAmountType" currencyID="USD">12.00</GrossAmount>
    <FeeAmount xsi:type="cc:BasicAmountType" currencyID="USD">0.65</FeeAmount>
    <TaxAmount xsi:type="cc:BasicAmountType" currencyID="USD">0.00</TaxAmount>
    

    What if we pass the fee amount in the processor_response_details field?
    Then you'll be receiving the following:
    <processor_response><![CDATA[PayPal Transaction ID:7BT29846FH3794228]]></processor_response>
    <processor_response_details>
        <PaymentType><![CDATA[instant]]></PaymentType>
        <FeeAmount><![CDATA[0.65]]></FeeAmount>
    </processor_response_details>
    
  • evgevg FoxyCart Team
    FYI when a customer pays with a non-instant payment method (i.e. eCheck) there's no immediate information about the fee amount. But when the PayPal transaction is complete, a notification comes to our IPN and it contains information about fee.
  • consolibyteconsolibyte Member, Integration Developer, Consolibyte Quickbooks
    That would be great if you could pass any fee data you have in the processor_response_details!
  • evgevg FoxyCart Team
    @consolibyte: is it enough to have fee amount for instant payment methods only (credit cards via PayPal / PayPal balance)? Unfortunately there's no ETA on this task if you need eCheck support as it involves much more changes.
  • consolibyteconsolibyte Member, Integration Developer, Consolibyte Quickbooks
    @evg Yes, I think so. 99% of payments that come through PayPal are credit card/PayPal balance anyway, and something would be better than nothing.
  • lukeluke FoxyCart Team
    Hey @consolibyte. We just pushed out a change for 1.0 yesterday that will include the "FeeAmount" in the payment response details. Please let us know if that helps you.
  • consolibyteconsolibyte Member, Integration Developer, Consolibyte Quickbooks
    @luke Woohoo! We're going to get this implemented on our end soon. Thanks!
Sign In or Register to comment.