cancel
Showing results for 
Search instead for 
Did you mean: 

Refund transcation for CIM

Hi

 

I am trying the following code to refund a transaction. The CustomerProfileID, PaymentProfileID and TransactionID all have values for the transaction I have just authorized.

 

I get the error E00014 : customerProfileId and customerPaymentProfileId OR creditCardNumberMasked OR bankRoutingNumberMasked and bankAccountNumberMasked are required.

 

     CIMSOAPAPIUtilities.MerchantAuthentication.name = UserName;

            CIMSOAPAPIUtilities.MerchantAuthentication.transactionKey = Key;

            ProfileTransRefundType refund = new ProfileTransRefundType();

            refund.customerProfileId = profile_id;

            refund.customerPaymentProfileId = payment_profile_id;

          //refund.creditCardNumberMasked = "XXXX"+last4DigitCC;

            refund.amount = RefundAmount;

            refund.transId = transactionId;

            ProfileTransactionType trans = new ProfileTransactionType();

            trans.Item = refund;

 

            CreateCustomerProfileTransactionResponseType response = CIMSOAPAPIUtilities.Service.CreateCustomerProfileTransaction(CIMSOAPAPIUtilities.MerchantAuthentication, trans, null);

            return new CIMAuthorizationDotNetServices(response.directResponse.ToString());

 

 

If I go ahead and add in the XXXX1111 card number then I get this

 

3,2,54,The referenced transaction does not meet the criteria for issuing a credit.,,P,0,,,1.00,CC,credit,12129,egb test test,test,,2300 gree dr,Vally city,oh,44123,,,,,,,,,,,,,,,,,,E6D5A707CFEC84A00919AE1F9E4049ED,,,,,,,,,,,,,XXXX1111,Visa,,,,,,,,,,,,,,,,

 

My guess is ,I am getting this error because I am trying to refund a transaction that is not finalized yet. However I am connected to developer environment. Is this true in the developer environment too.

Any help is grately appriciated.

ggollapinni
Member
16 REPLIES 16

You are correct. You can not refund a unsettled transaction. You can only void it.

They(Authorize.net) seem to be settling transaction every day on the time(I think is default at 5pm) you set on the test account.

So just wait until tomorrow.

RaynorC1emen7
Expert

Hi

 

I am trying to submit a refund against a previous CIM transcation that was settled. I am passing the right 

 

customerProfileId, customerPaymentProfileId, and transId and I receive the following error

"customerProfileId and customerPaymentProfileId OR creditCardNumberMasked OR bankRoutingNumberMasked and bankAccountNumberMasked are required."

 

But if I include the last 4 digits of CC then the refund was successful.

 

 

 

According to CIM_SOAP documentation page 39, last4digts cc is not required if it is a previous CIM transcation.

 

 

 

Can you please confirm if last4digits is required for a previous CIM transcation.Below is my code sample

 

 

 

 

 

 

public static CIMAuthorizationDotNetServices RefundTransaction(long profile_id, long payment_profile_id,string UserName, string Key,decimal amount, string

transactionId)

 

{

 

CreateCustomerProfileTransactionResponseType response = null

;

 

try

 

{

 

CIMSOAPAPIUtilities

.MerchantAuthentication.name = UserName;

 

CIMSOAPAPIUtilities

.MerchantAuthentication.transactionKey = Key;

 

ProfileTransRefundType refund = new ProfileTransRefundType

();

 

refund.customerProfileId = profile_id;

 

refund.customerPaymentProfileId = payment_profile_id;

 

refund.amount = amount;

 

refund.transId = transactionId;

 

ProfileTransactionType trans = new ProfileTransactionType

();

 

trans.Item = refund;

 

response =

 

CIMSOAPAPIUtilities.Service.CreateCustomerProfileTransaction(CIMSOAPAPIUtilities.MerchantAuthentication, trans, null

);

 

return new CIMAuthorizationDotNetServices

(response.directResponse);

 

}

 

catch (Exception e)

{

}

 

 

 

 

 

CIM documentation For Refund Transactions

 

If you are submitting a refund against a previous CIM transaction, the following guidelines apply: include customerProfileId, customerPaymentProfileId, and transId.

 

customerShippingAddressId is optional.

 

creditCardNumberMasked, bankRoutingNumberMasked, and bankAccountNumberMasked do not need to be included, but will be validated if they are included.

 

If you are submitting a refund against a previous transaction that is not a CIM transaction, the following guidelines apply:

 

you must include transId, creditCardNumberMasked (or bankRoutingNumberMasked and bankAccountNumberMasked).

 

do not include customerProfileId, customerPaymentProfileId, and customerShippingAddressId

 

 

 

 

 

They are not required but if you are including them as null values you will get an error that they are required because if they are included they will be validated.

 

Thank you,

 

Elaine

Elaine
Trusted Contributor
Trusted Contributor

Our company currently uses AIM, we are thinking of migrating to CIM.Is it possible to refund a previous AIM transaction thru CIM?If so, what are the requirements?

 

What merchant authentication (username,key) should i include in request.The one that is used in AIM at the creation of transaction or the new CIM authentication (username,key) ?

 

In order to refund via CIM API you must have created a payment profile in the account for your customer and in order to refund a transaction that was processed via AIM that payment profile must have the same credit card number on file that is stored on file in the payment profile. If this is the case, you can refund an AIM transaction via CIM API using the original transaction ID assigned to the charge transaction.

 

The API Login ID and Transaction Key used for merchant authentication are the same for AIM and CIM API. You do not use different API credentials for each API method.

 

 

Thank you,

 

Elaine

Elaine
Trusted Contributor
Trusted Contributor

Try setting customerProfileIdSpecified and customerPaymentProfileIdSpecified in ProfileTransRefundType

Can one of you guys post the minimum required xml for processing a refund via CIM with ECC enabled?  I've tried going by what I learned from the manual http://www.authorize.net/support/CIM_XML_guide.pdf but it doesn't seem to be working.

 

Thanks!

Post your XML please. So we can see why it is not working.

Basically the same rules as a regular refund, except you do not include transId, creditCardNumberMasked, bankRoutingNumberMasked, or bankAccountNumberMasked. Probably something like this:

 

<?xml version="1.0" encoding="utf-8"?> 
<createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/ 
AnetApiSchema.xsd"> 
  <merchantAuthentication> 
    <name>YourUserLogin</name> 
    <transactionKey>YourTranKey</transactionKey> 
  </merchantAuthentication> 
  <transaction> 
    <profileTransRefund> 
      <amount>10.95</amount> 
      <customerProfileId>10000</customerProfileId> 
      <customerPaymentProfileId>20000</customerPaymentProfileId> 
    </profileTransRefund> 
  </transaction> 
</createCustomerProfileTransactionRequest>

Note that when you're creating XML for Authorize.net, order -does- matter, so if you switch the order of two items it's going to give you missing data errors or other weird stuff like that.