Credit
Use the Credit API to credit a previously authorized and settled transaction. The only difference to the Deferred Settlement API call is the <transtype>
parameter. Use<transtype>06</transtype>
to indicate a credit request.
Please note
- The previously settled amount must not be exceeded.
- Transactions can also be partially credited.
- Credits and partial credits are 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="2">
<body merchantId="1000011011">
<transaction refno="479509">
<request>
<amount>100</amount>
<currency>CHF</currency>
<uppTransactionId>TRANSACTION-ID</uppTransactionId>
<transtype>06</transtype>
</request>
</transaction>
</body>
</paymentService>
EOF
<paymentService version="2">
<body merchantId="1100004624" status="accepted">
<transaction refno="509183" trxStatus="response">
<request>
<amount>100</amount>
<currency>CHF</currency>
<uppTransactionId>TRANSACTION-ID</uppTransactionId>
<transtype>06</transtype>
<reqtype>COA</reqtype>
</request>
<response>
<responseCode>01</responseCode>
<responseMessage>credit succeeded</responseMessage>
<uppTransactionId>180507104204173177</uppTransactionId>
<authorizationCode>204203178</authorizationCode>
<acqAuthorizationCode>104204</acqAuthorizationCode>
</response>
</transaction>
</body>
</paymentService>
A credit API call creates a new transactionId
As you can see from the above example, making a call against the Credit API results in a new transactionId being created.
Updated about 4 years ago