Validate an Alias
To check if a particular aliasCC
is still valid, the card check api can be used. The only difference to a normal authorisation is the amount
which has to be set to 0.
Using the Authorization API
curl -v -X POST https://api.sandbox.datatrans.com/upp/jsp/XML_authorize.jsp \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d @- << EOF
<?xml version="1.0" encoding="UTF-8" ?>
<authorizationService version="6">
<body merchantId="1000011011">
<transaction refno="358838">
<request>
<amount>0</amount>
<currency>CHF</currency>
<reqtype>CAA</reqtype>
<aliasCC>70323122544331174</aliasCC>
<expm>12</expm>
<expy>21</expy>
<sign>30916165706580013</sign>
</request>
</transaction>
</body>
</authorizationService>
EOF
<?xml version='1.0' encoding='UTF-8'?>
<authorizationService version='6'>
<body merchantId='1000011011' status='accepted'>
<transaction refno='358838' trxStatus='response'>
<request>
<amount>0</amount>
<currency>CHF</currency>
<aliasCC>70323122544331174</aliasCC>
<expm>12</expm>
<expy>21</expy>
<sign>30916165706580013</sign>
<reqtype>NOA</reqtype>
</request>
<response>
<responseCode>01</responseCode>
<responseMessage>Authorized</responseMessage>
<uppTransactionId>181005110358506719</uppTransactionId>
<authorizationCode>358536720</authorizationCode>
<acqAuthorizationCode>110358</acqAuthorizationCode>
<maskedCC>375811xxxxx1115</maskedCC>
</response>
</transaction>
</body>
</authorizationService>
Updated about 4 years ago