The developer.datatrans.com Developer Hub

Welcome to the developer.datatrans.com developer hub. You'll find comprehensive guides and documentation to help you start working with developer.datatrans.com as quickly as possible, as well as support if you get stuck. Let's jump right in!

Deferred Settlement

The Settlement request is often also referred to as “Capture” or “Clearing”. It can be used for the settlement of previously authorized transactions. Set reqtype=NOA during authorization to defer the settlement. On the subsequent settlement request, the transaction id uppTransactionId is needed.

Direct Debits

Transactions get directly settled during the authorization request using the Payment Page and reqtype=CAA (default behaviour). Please check out our API Reference for more details.

Please note

  • The authorized amount must usually not be exceeded.
  • Authorized transactions can only be settled once. Partial settlement requests are not supported in most cases. Some payment methods allow this, please consult the according payment method documentation.
  • Deferred settlement is not supported by all payment methods. Verify first before applying.

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="1">
  <body merchantId="1000011011">
    <transaction refno="929787">
      <request>
        <amount>1000</amount>
        <currency>CHF</currency>
        <uppTransactionId>TRANSACTION-ID</uppTransactionId>
      </request>
    </transaction>
  </body>
</paymentService>
EOF
<paymentService version="1">
    <body merchantId="1000011011" status="accepted">
        <transaction refno="929787" trxStatus="response">
            <request>
                <amount>1000</amount>
                <currency>CHF</currency>
                <uppTransactionId>TRANSACTION-ID</uppTransactionId>
                <reqtype>COA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>settlement succeeded</responseMessage>
            </response>
        </transaction>
    </body>
</paymentService>