cancel
Showing results for 
Search instead for 
Did you mean: 

refundTransaction requires expiration date in XML but never did in legacy AIM Credit (Refund)

I am converting my in-house form/value pair AIM application to using the Java SDK.

 

One problem I've just run into is that the refundTransaction in the new XML Gateway apparently requires providing an expiration date while the AIM gateway only required the transaction id with an optional last four digits for a Credit (Refund).

 

Why is the expiration date needed in the new XML gateway?   This is problematic because the expiration date is no longer available in many situations, only the last four digits of the card and the original transaction id.   We do not want to store an expiration date for a card that the customer has specified should be deleted.   Why require us to pass something that is obviously not necessary?

 

Are there any plans to change this?

 

 

form/value gateway docs:

 

At least the last four digits of the credit card number (x_card_num) used for the
original, successfully settled transaction are submitted. An expiration date is not
required.

 

SDK docs for refundTransaction (verified by practice as well):

 

  
cardNumberRequired.
The customer’s credit card number.
4 digits without spaces

Only the last four digits are required for credit card transactions.
expirationDateRequired.
The customer’s credit card expiration date.
Optional for Card Present.

This is sensitive cardholder information and must be stored securely and in accordance with the Payment Card Industry (PCI) Data Security Standard.

For more information about PCI, please refer to the Standards, Compliance and Security developer training video at http://developer.authorize.net/training.
One of the following:

MMYY,
MM/YY,
MM-YY, MMYYYY,
MM/YYYY,
MM-YYYY
mkienenb
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

@mkienenb

 

OK, I got some further clarification and what I said before wasn't completely correct.  You are still required to pass the last 4 of the card number but you can use getTransactionDetails and it will return the exact <payment> object you need.

 

We still need to update our documentation to make this more clear.

 

Richard

View solution in original post

7 REPLIES 7

Hello @mkienenb

 

If you pass a masked card number you must also include an expiration date.  Or you can use just the transactionID which doesn't require any other data&colon;

 

refTransId Required.
Transaction ID of the original settled transaction.
String.

 

I've created a ticket with our documentation team to make this more clear in the API Reference.

 

Richard

RichardH
Administrator Administrator
Administrator

Thanks!   That works even better.

Unfortunately, if you do not specify the credit card information, you still get back an error stating "

Credit card number is required."

.

Here's the results of trying an refundTransaction without specifying a payment section (via the SDK):

 

HttpUtility: Posting request to Url: 'https://apitest.authorize.net/xml/v1/request.api'
HttpUtility: Request: '
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
    <merchantAuthentication>
        <name>[removed]</name>
        <transactionKey>[removed]</transactionKey>
    </merchantAuthentication>
    <transactionRequest>
        <transactionType>refundTransaction</transactionType>
        <amount>2.08</amount>
        <refTransId>2249321640</refTransId>
        <userFields>
            [removed]
        </userFields>
    </transactionRequest>
</createTransactionRequest>

HttpCallTask: Raw Response:
'<?xml version="1.0" encoding="utf-8"?>
<createTransactionResponse
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
	<messages>
		<resultCode>Error</resultCode>
		<message>
			<code>E00027</code>
			<text>The transaction was unsuccessful.</text>
		</message>
	</messages>
	<transactionResponse>
		<responseCode>3</responseCode>
		<authCode />
		<avsResultCode>P</avsResultCode>
		<cvvResultCode />
		<cavvResultCode />
		<transId>0</transId>
		<refTransID>2249321640</refTransID>
		<transHash>7576A7CF33450F95407A046F4E80F4AE</transHash>
		<testRequest>0</testRequest>
		<accountNumber />
		<accountType>Visa</accountType>
		<errors>
			<error>
				<errorCode>33</errorCode>
				<errorText>Credit card number is required.</errorText>
			</error>
		</errors>
		<userFields>
			[removed]
		</userFields>
	</transactionResponse>
</createTransactionResponse>

@mkienenb

 

OK, I got some further clarification and what I said before wasn't completely correct.  You are still required to pass the last 4 of the card number but you can use getTransactionDetails and it will return the exact <payment> object you need.

 

We still need to update our documentation to make this more clear.

 

Richard

@RichardH,

 

Wow.  That is really incredibly ugly.

 

Sending a request to fetch information the gateway already has only to send it back to the gateway again.

 

Having only the original transaction required (like for void) makes far more sense.   Do I need to post this "feature request" to the ideas forum, or can you submit it directly without me doing so?

 

If you post in the ideas forum, it allows other developers with similar thoughts to vote and increase it's potential.  But I can pass on the suggestion as well.

 

Richard

I've went ahead and posted it in the ideas forum here: https://community.developer.authorize.net/t5/Ideas/refundTransaction-should-not-require-anything-oth....

 

Thanks for your help.  I'll go ahead and mark your message about using getTransactionDetail as a solution since it can work, although it's more like a bug workaround with performance issues.