An Authorization is an approval of a request to exchange money. Usually a merchant asks through Datatrans if they are allowed to request the amount needed for the transaction. In most cases, depending on the payment method, there is an acquirer or issuer. The authorization is given by the party which manages the consumer account. As an example the issuing bank answers the acquirer if the given consumer has enough money and if the requesting merchant is seen enough trustworthy to proceed with the transaction. If so, the response is then forwarded through the acquirer to Datatrans and back to the merchant. Once a transaction is authorized the requested amount is reserved. Only after a settlement the money flow starts.
Each response of an authorization with Datatrans holds a
uppTransactionId is the main and unique identifier for a payment.
uppTransactionId in your database for later usage. Possible use cases where the
uppTransactionId is needed:
- Calling the Credit, Cancel, Status or Deferred Settlement APIs
- Lookup transactions in Webadmin.
- Contacting Support in case of issues.
- The payment method selection can be provided by the Payment Page in Redirect Mode or in Lightbox Mode.
- By your own web application using Secure Fields for Credit Cards combined with custom integration of the Payment Page for Other Payment Methods .
- Charging an alias which has been previously created.
Using Payment Page in Redirect Mode.
<a href="https://pay.sandbox.datatrans.com/upp/jsp/upStart.jsp? &merchantId=1000011011 &amount=1000 ¤cy=CHF &refno=929787 &sign=30916165706580013" class="btn btn-primary">Payment Page authorization</a>
Try it out for yourself. Click the button below to start a payment.
Charging an Alias
curl -v -X POST https://api.sandbox.datatrans.com/upp/jsp/XML_authorize.jsp \ -H 'Content-Type: application/xml' \ -H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \ -d @- << EOF <?xml version="1.0" encoding="UTF-8" ?> <authorizationService version="6"> <body merchantId="1000011011"> <transaction refno="929787"> <request> <amount>1000</amount> <currency>CHF</currency> <reqtype>NOA</reqtype> <aliasCC>70323122544331174</aliasCC> <expm>12</expm> <expy>21</expy> <sign>30916165706580013</sign> </request> </transaction> </body> </authorizationService> EOF
<authorizationService version='6'> <body merchantId='1000011011' status='accepted'> <transaction refno='929787' trxStatus='response'> <request> <amount>1000</amount> <currency>CHF</currency> <reqtype>NOA</reqtype> <aliasCC>70323122544331174</aliasCC> <expm>12</expm> <expy>21</expy> <sign>30916165706580013</sign> </request> <response> <responseCode>01</responseCode> <responseMessage>Authorized</responseMessage> <uppTransactionId>TRANSACTION-ID</uppTransactionId> <authorizationCode>807310863</authorizationCode> <acqAuthorizationCode>110807</acqAuthorizationCode> <maskedCC>375811xxxxx1115</maskedCC> </response> </transaction> </body> </authorizationService>
In the above example
<reqtype>NOA</reqtype> is used. This means that the transaction needs to be settled at a later step. Refer to Deferred Settlement for more information.
Updated about a month ago
Check out how your server can retrieve a Webhook (POST URL) for each transaction.