Guides
These docs are for v1.0.1. Click to read the latest docs for v2.1.0.

Cancel

The Cancel request is often also referred to as “Reversal”. It can be used in order to cancel authorizations and releases the blocked amount. Already settled transactions can not be canceled but can be refunded. Use the <uppTransactionId> from a previously created authorization and <reqtype>DOA</reqtype>

Example

curl -v -X POST https://api.sandbox.datatrans.com/upp/jsp/XML_processor.jsp \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d @- << EOF
<?xml version="1.0" encoding="UTF-8" ?>
<paymentService version="2">
  <body merchantId="1000011011">
    <transaction refno="178892">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>180507112808027192</uppTransactionId>
        <reqtype>DOA</reqtype>
      </request>
    </transaction>
  </body>
</paymentService>
EOF
<paymentService version="2">
    <body merchantId="1000011011" status="accepted">
        <transaction refno="16675" trxStatus="response">
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>180507112808027192</uppTransactionId>
                <reqtype>DOA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>cancellation succeeded</responseMessage>
            </response>
        </transaction>
    </body>
</paymentService>

🚧

Please note

Authorized transactions cannot be canceled partially