4

Im using cybersource SOAP toolkit API to perform transaction. Transaction capture works fine, but whenever I attempt to void a transaction Im getting response code 246 :"you requested a void for a type of transaction that cannot be voided" . Why is this happening? I have included all parameters required to Void transaction

 RequestMessage request = new RequestMessage();
                request.voidService = new VoidService();
                request.voidService.run = "true";
                request.voidService.voidRequestID = "value";
                request.voidService.voidRequestToken = "value";
                request.merchantID = "value";
                request.merchantReferenceCode = "value";
                TransactionProcessorClient proc = new TransactionProcessorClient();
                proc.ChannelFactory.Credentials.UserName.UserName
            = "merchantID";
                proc.ChannelFactory.Credentials.UserName.Password
                    = "password";

                ReplyMessage reply = proc.runTransaction(request);
Mridul Raj
  • 1,001
  • 4
  • 19
  • 46

2 Answers2

4

I'm encountering the same problem. Basically, error 246 means that the capture information has already been sent to the payment processor. According to the Cybersource server release notes:

A transaction can be voided only if we have not already submitted the information to your processor. Usually we submit that type of information to your processor once a day, so your window for successfully performing a void is relatively small. We will decline your void request if we have already sent the transaction information to the processor.

If you're testing void on the Cybersource sandbox (as I am), I think what is happening is that since the sandbox is a test environment and payments are not actually sent to a payment processor, Cybersource treats captures as if they are sent to the payment processor immediately, so voiding a capture will never work on the sandbox environment.

However, I'm making a few assumptions and I couldn't find any documentation to validate this for certain.

Templar
  • 5,067
  • 7
  • 34
  • 39
  • 4
    Got confirmation from CyberSource's Support Team: "The way the CyberSource Test Environment is configured, it does not permit voids to take place. The reason for this is a "void" simply prevents a transaction from being batched out. However, in the Test Environment, there is no batching of transactions. As a result, you are unable to void any orders in the Test Environment." – Peter Jan 23 '13 at 18:04
  • Thank you for updating this.. It would be much better in my opinion if they defaulted to ACCEPT instead of REJECT (for correctly formatted requests). Waste of time.. – Mahdi.Montgomery May 15 '15 at 00:36
0

Are you trying to make refund request if yes then try ccCreditService Work Perfect if the RequestID is correct. Try ccCreditService for cancelling a payment order.

Vendetta
  • 294
  • 4
  • 11