cancel
Showing results for 
Search instead for 
Did you mean: 

Charge Credit Card - Displaying Discount Line Item on a Transaction

Hello, 

I'm currently testing adding a discount amount to the transaction line item. 

The Class shows that it's available to use and it does not throw an error. When I view the transaction through the portal, the line items appear as they should but no discount rate. 

https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd

 
XSD Type: lineItemType
 
I also checked the sample code on Github and can't locate an example there.
devray
Member
2 REPLIES 2

After continuing to dig around, I came across this solution: 

https://stackoverflow.com/questions/45112004/add-a-negative-price-line-item-or-discount

It doesn't work the way that I had envisioned but I can at least create a line item with the discount code and pricing to reflect what happened to generate the total charge.

The API doesn't calculate the total charge, so this will work for what I needed. 

devray
Member

I am running in to the same problem. the model seems to indicate that the fields: discountAmount, taxAmount, taxIncludedInTotal,

taxIsAfterDiscount are available, and I am writing to these fields but they don't show up on the other end when I read the resulting transaction. They just show as 0.
 
Whats the deal?
boylec
Member