Cancel Payment

Cancelling Payments via executePaymentAction API is available generally in 2 cases:

  1. For payment methods where there is 2-step processing (e.g. card deposits, step 1: authorize, step 2: capture) it is possible to cancel/reverse/void the first (authorization) step.
  2. The processing or funds transfer did not take place due to scoring (e.g. last state is BlockedByPaymentScoring or RefusedByPaymentScoring), connectivity (e.g. last state is ExecuteRequestSentToProviderCommunicationErrorOccured) or other technical reasons. The payment is moved to the Cancelled state.

Example executePaymentActionRequest for cancelling a payment:

<?xml version="1.0" encoding="utf-8"?>
<executePaymentActionRequest xmlns="http://www.cqrpayments.com/PaymentProcessing"
                             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <merchantID>KalixaAcceptDEMO</merchantID>
  <shopID>KalixaAcceptDEMO</shopID>
  <paymentID>3a5eff92-3d62-4b8f-bcb1-5cd8a7f56637</paymentID>
  <actionID>1</actionID>
  <remark>Cancel payment TEST</remark>
</executePaymentActionRequest>

Example executePaymentActionResponse for cancelling a payment:

<?xml version="1.0" encoding="utf-8"?>
<executePaymentActionResponse xmlns="http://www.cqrpayments.com/PaymentProcessing"
                              xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <statusCode>1</statusCode>
  <actionResults>
    <result xsi:type="keyStringValuePair">
      <key>lastStateDefinition</key>
      <value>113</value>
    </result>
  </actionResults>
</executePaymentActionResponse>