I am new to using Authorize.net so pardon my newbie question. I have opened a test account and built the software to process a charge. When I get the successful response back it includes the authCode, transID etc but it does not include the total amount charged. In our other systems such as Paypal we get this information to verify nothing went wrong at the processor. I found the API call to getTransactionDetailsRequest and thought that would work since it appeared to have the information. However when I called that API function it did not return the amount. Is this the right way to get that type of verification? If so is the reason it failed is because I am in the sandbox and the actual transaction does not get processed?
โ02-02-2016 10:26 AM
Which api function? http://developer.authorize.net/api/reference/index.html#payment-transactions
Should have the amount in the response.
โ02-02-2016 11:20 AM
The code I am using is the sample where the code is:
response = controller.GetApiResponse()
I serialized the response object I got and here it is:
{"transactionResponse":{"responseCode":"1","rawResponseCode":null,"authCode":"4NAWJ8","avsResultCode":"Y",
"cvvResultCode":"P","cavvResultCode":"2","transId":"2250143193","refTransID":"","transHash":"1F21E029E64784441BB8E684C93E9AA5",
"testRequest":"0","accountNumber":"XXXX1111","accountType":"Visa","splitTenderId":null,"prePaidCard":null,
"messages":[{"code":"1","description":"This transaction has been approved."}],"errors":null,"splitTenderPayments":null,
"userFields":null,"shipTo":null,"secureAcceptance":null},"profileResponse":null,"refId":null,"messages":{"resultCode":0,
"message":[{"code":"I00001","text":"Successful."}]},"sessionToken":null}
Nowhere in here do I see an amount. This was to that sandbox - is that possibly the issue?
โ02-02-2016 12:39 PM
โ02-02-2016 12:49 PM
That is what I have found - there is no value in this listing for approved amount. I also found this in the docs
Amount approved.
Present if the current transaction is for a prepaid card or if the splitTenderId field was sent in.
This indicates that the amount approved will only be there in the response if it was a prepaid or the splitTenderId was sent in. Since a simple credit card capture does not have this I guess it just doesnt come back. It seems the only way to get the amount is execute another Api call
getTransactionDetailsController() sending the transID of the transaction that just happened. However when I do that in the Sandbox it tells me that I dont have authorization to retrieve this information. If that is true because it is the sandbox then I can live with it but it really seems you should be able to validate the amount the Api approved all in one call.
โ02-02-2016 01:18 PM
However when I do that in the Sandbox it tells me that I dont have authorization to retrieve this information.
You will need to enable detail transaction api on the merchant account settings
https://sandbox.authorize.net/
I'm think about the old AIM api, which do return the transaction amount. Look like you will need to either use the detail transaction api or get it from the request that your send.
โ02-02-2016 01:26 PM
Hello @CTBSTerry
You are correct, the amount is not reflected in the response except in the case of a split tender. If your transaction is accepted, the amount will be what was submitted in the request.
The amounts are shown in get transaction details:
authAmount | The amount authorized or refunded. This is the amount submitted in the original authorization request. |
settleAmount | The amount that was submitted for settlement. This will be the same as the authAmount element, with the exception of voids, which will show $0.00, and potentially Prior Authorize and Capture transactions, which could have an amount less than the authAmount value. For declined and errored transactions, this will not be $0.00. |
Richard
โ02-02-2016 01:31 PM - edited โ02-02-2016 01:36 PM