cancel
Showing results for 
Search instead for 
Did you mean: 

How to refund to multiple transactions?

Hi

 

We are offering multiple payments (EMI's) for a single product on our website. Now some users wants refund after say 4-5 payments. How to implement this using single transaction?

 

Issues:

1) We have implemented refunds functionality provided by API but this only refunds the amount which is equal to or less to amount paid.

 

I have searched and found there is unlinked Credit card feature. We have activated this on our account by still there is no code available, we are using C#.

Priest
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Assuming you have unlinked credits turned on, the code to make a credit transaction is exactly the same as any other refund. The only difference is that you don't send any transaction ID in the refTransId field, and you have to send the complete card number and expiration date.

View solution in original post

4 REPLIES 4

HI @Priest,

 

When you say you've turned on unlinked credits, do you mean you've gone through the application process and been approved? That's something that's generally available by approval only.

Aaron
All Star

Assuming you have unlinked credits turned on, the code to make a credit transaction is exactly the same as any other refund. The only difference is that you don't send any transaction ID in the refTransId field, and you have to send the complete card number and expiration date.

I have tested the code and it is working fine when I pass “Credit Card Number” and “Expiry Date”.

I have one question: Is it possible to get saved credit card details of the customer so that we do not have to manually input “Credit Card Number” and “Expiry Date”?

 

I have checked some examples from API and they are only returning credit card number like “xxxx1456” which is not working during refund.

Hi @Priest,

 

There is no way to retrieve the full credit card number from a previous transaction. In that case, when a customer wants a refund of all of the previously charged amounts, and separate refund transactions aren't acceptable to the customer, your only option would be to have the customer provide the card number again.

 

If you had previously stored the card details by using our Customer Profiles feature, in that case, you could do an unlinked refund transaction without knowing the original card number by just sending the request with the profile information instead of the card information, like this:

 

 

<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
	<merchantAuthentication>
		<name>{{loginId}}</name>
		<transactionKey>{{transKey}}</transactionKey>
	</merchantAuthentication>
	<transactionRequest>
		<transactionType>refundTransaction</transactionType>
		<amount>5</amount>
		<profile>
			<customerProfileId>1810737734</customerProfileId>
			<paymentProfile>
				<paymentProfileId>1805285138</paymentProfileId>
			</paymentProfile>
		</profile>
	</transactionRequest>
</createTransactionRequest>