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
1 REPLY 1

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