• Hi!

    Our site generates some discounts as order fees with a negative value.

    We’ve checked that the details for these fees are not being sent to Braintree. The total charged amount is correct, but data seems inconsistent in Braintree’s backend for these orders. We are seeing something like this:

    • Transaction Type: sale
    • Amount: $0.04 AUD
    • Transaction Date: Apr 06 2022, 01:25 PM AEST
    • Tax Amount: $0.00 AUD
    • Shipping Amount: $0.00 AUD
    • Discount Amount: $4.95 AUD`</li>
      </ul>

      And then, in the line items, we can see:

      
      Name
      Product 1 		debit 	1.0000 	5.0000 	$5.00 AUD 	
      Coupon - coupon name 	credit 	1.0000 	4.9500 	$4.95 AUD 	
      

      We miss, at least, a line item with:

      
      Fee - Fee name 		credit 	1.0000 	0.0100 	$0.01 AUD 	
      

      so the data is consistent. If not, it looks like there’s a cent missing in the order without any reason.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @davefx,

    I have not encountered a store that uses the fees API for discounts. Is this a custom solution for your site? Braintree only accepts positive values for line items, and you specify if it’s a credit or debit. Currently, the plugin skips any fee that is not greater than zero because it’s assumed fees are not used as discounts.

    That’s why you see the “credit” and “debit” column so you can distinguish the two.

    There is a filter you could use to add the line item. I am not sure fees are supposed to be used for discounts so changing our plugin logic would require some research.

    Kind Regards,

    Plugin Author Payment Plugins

    (@mrclayton)

    Update to my last reply. After reviewing the WooCommrece code, it appears they expect fees can be used as discounts. In light of that, we will update the plugin logic in the next release to include negative fees in the lineItems transaction property.

    Kind Regards,

    Thread Starter David Marín Carre?o

    (@davefx)

    Thanks a lot!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Negative fees details not appearing in Braintree backend’ is closed to new replies.