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!

paymentmethod=ACC

paymentmethod=ACC

Payment Process
Integration

Authorization

:heavy-check-mark+:

Payment Page

:heavy-check-mark+:

Deferred Settlement

:heavy-check-mark+:

Split Mode

:x+:

Refund

:heavy-check-mark+:

Mobile SDK

:x+:

Cancel

:heavy-check-mark+:

Alias

:x+:

Try it

Don't worry you wont be charged

Pay CHF 10.00

Description

Accarda offers online merchants the "Purchase on account" payment method with optional payment in instalments. The well-established Swiss company is a specialist in payment solutions for the retail trade, with over 40 years of experience in creditworthiness checks, risk management, invoice issuing and accounts receivable management.
Payment Method provider website :link+:

Request and response parameter reference

For a more detailed description of the request and response parameters for Accarda
please check the API Reference

Web payment flow

 1 
[Not supported by viewer]
Customer clicks Pay
Customer clicks Pay
Merchant Website
Merchant Website
Merchant Server
Merchant Server
Payment Page loaded from Datatrans
Payment Page loaded from Datatrans
Acquirer
Acquirer<br>
 3 
[Not supported by viewer]
Customer enters account information and selects mode of payment (e.g. installments, purchase on account)
[Not supported by viewer]
 2 
[Not supported by viewer]
 4 
[Not supported by viewer]
Validates and prepares forwarding to Acquirer
Validates and prepares forwarding to Acquirer
Authorization /  Credit Check / Forwarding
Authorization /  Credit Check / Forwarding
 6 
[Not supported by viewer]
Receives Result 
Receives Result 
6.1
[Not supported by viewer]
 7 
[Not supported by viewer]
Invokes merchant's
POST URL (Webhook)
Invokes merchant's<br>POST URL (Webhook)
Receives Result 
Receives Result 
 8 
[Not supported by viewer]
Redirects customer back to merchant
Redirects customer back to merchant
Customer gets redirected to merchant page
Customer gets redirected to merchant page
 5 
[Not supported by viewer]

Server to Server API calls

After a transactionId or alias was received by completing the payment flow on the web, the following server to server API calls can be used to do other actions.

Authorization

Request

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="1">
                    <body merchantId="1000011011">
                        <transaction refno="1234"  referenceNumber="1234">
                            <request>
                                <amount>33110</amount>
                                <currency>CHF</currency>
                                <reqtype>NOA</reqtype>
                                <pmethod>ACC</pmethod>
                                <sign>30916165706580013</sign>
                                <sub_pmethod>INSTALLMENT</sub_pmethod>           
                                <accardaAttachments>
                                    <attachment mimeType="text/xml" name="invoicetext.xml">
                                        <value>base64 encoded content 1</value>
                                    </attachment>
                                    <attachment mimeType="text/xml" name="invoicetext.xml">
                                        <value>base64 encoded content 1</value>
                                    </attachment>
                                </accardaAttachments>
                                <uppCustomerDetails>
                                    <accardaOtherPaymentMeansAmount>1000</accardaOtherPaymentMeansAmount>
                                    <accardaPreferredRateModel>3x3</accardaPreferredRateModel>
                                    <accardaRiskTakerShift>IN_ANY_CASE</accardaRiskTakerShift>
                                    <accardaInvoiceChannel>INSURANCE</accardaInvoiceChannel>
                                    <accardaEnableStreetSplit>true</accardaEnableStreetSplit>
                                    <accardaCustomerOrderNumber>ORDER-NUMBER-1</accardaCustomerOrderNumber>                                    
                                    <uppCustomerType>P</uppCustomerType>
                                    <uppCustomerGender>male</uppCustomerGender>
                                    <uppCustomerPhone>0795658005</uppCustomerPhone>
                                    <uppCustomerTitle>Herr</uppCustomerTitle>
                                    <uppCustomerFirstName>Peter</uppCustomerFirstName>
                                    <uppCustomerLastName>ABCDE</uppCustomerLastName>
                                    <uppCustomerBirthDate>25.08.1979</uppCustomerBirthDate>
                                    <uppCustomerLanguage>DE</uppCustomerLanguage>
                                    <uppCustomerStreet>Obere Kirchgasse</uppCustomerStreet>
                                    <uppCustomerStreet2>18</uppCustomerStreet2>
                                    <uppCustomerCity>Meilen</uppCustomerCity>
                                    <uppCustomerZipCode>8706</uppCustomerZipCode>
                                    <uppCustomerCountry>CH</uppCustomerCountry>
                                    <uppInvoiceType>physical</uppInvoiceType>
                                    <uppArticle_1_Id>PK4000</uppArticle_1_Id>
                                    <uppArticle_1_Name>Bottle opener</uppArticle_1_Name>
                                    <uppArticle_1_Type>goods</uppArticle_1_Type>
                                    <uppArticle_1_Quantity>1</uppArticle_1_Quantity>
                                    <uppArticle_1_Price>10000</uppArticle_1_Price>
                                    <uppArticle_1_Tax>8</uppArticle_1_Tax>
                                    <uppArticle_1_PriceWithoutVAT>9259</uppArticle_1_PriceWithoutVAT>
                                    <uppArticle_1_TaxAmount>741</uppArticle_1_TaxAmount>
                                    <uppArticle_1_SingleItemPrice>10000</uppArticle_1_SingleItemPrice>
                                    <uppArticle_1_SingleItemPriceWithoutVAT>9259</uppArticle_1_SingleItemPriceWithoutVAT>
                                    <uppArticle_2_Id>PK5000</uppArticle_2_Id>
                                    <uppArticle_2_Name>Nice product</uppArticle_2_Name>
                                    <uppArticle_2_Type>goods</uppArticle_2_Type>
                                    <uppArticle_2_Quantity>1</uppArticle_2_Quantity>
                                    <uppArticle_2_Price>20000</uppArticle_2_Price>
                                    <uppArticle_2_Tax>2.5</uppArticle_2_Tax>
                                    <uppArticle_2_PriceWithoutVAT>19512</uppArticle_2_PriceWithoutVAT>
                                    <uppArticle_2_TaxAmount>488</uppArticle_2_TaxAmount>
                                    <uppFee_1_Id>PF000</uppFee_1_Id>
                                    <uppFee_1_Name>Payment Fee</uppFee_1_Name>
                                    <uppFee_1_Type>fee</uppFee_1_Type>
                                    <uppFee_1_Quantity>1</uppFee_1_Quantity>
                                    <uppFee_1_Price>1000</uppFee_1_Price>
                                    <uppFee_1_Tax>3.8</uppFee_1_Tax>
                                    <uppFee_1_PriceWithoutVAT>963</uppFee_1_PriceWithoutVAT>
                                    <uppFee_1_TaxAmount>37</uppFee_1_TaxAmount>
                                    <uppFee_2_Id>DF000</uppFee_2_Id>
                                    <uppFee_2_Name>Delivery Fee</uppFee_2_Name>
                                    <uppFee_2_Type>fee</uppFee_2_Type>
                                    <uppFee_2_Quantity>1</uppFee_2_Quantity>
                                    <uppFee_2_Price>3000</uppFee_2_Price>
                                    <uppFee_2_Tax>3.8</uppFee_2_Tax>
                                    <uppFee_2_PriceWithoutVAT>2890</uppFee_2_PriceWithoutVAT>
                                    <uppFee_2_TaxAmount>110</uppFee_2_TaxAmount>
                                    <uppFee_3_Id>ROUNDING</uppFee_3_Id>
                                    <uppFee_3_Name>Rounding</uppFee_3_Name>
                                    <uppFee_3_Type>fee</uppFee_3_Type>
                                    <uppFee_3_Quantity>1</uppFee_3_Quantity>
                                    <uppFee_3_Price>110</uppFee_3_Price>
                                    <uppFee_3_Tax>0</uppFee_3_Tax>
                                    <uppFee_3_PriceWithoutVAT>110</uppFee_3_PriceWithoutVAT>
                                    <uppFee_3_TaxAmount>0</uppFee_3_TaxAmount>
                                </uppCustomerDetails>
                            </request>
                        </transaction>
                    </body>
                </authorizationService>
 EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<authorizationService version='1'>
  <body merchantId='1000011011' status='accepted'>
    <transaction refno='1234' referenceNumber='1234' trxStatus='response'>
      <request>
        <amount>33110</amount>
        <currency>CHF</currency>
        <reqtype>NOA</reqtype>
        <pmethod>ACC</pmethod>
        <sign>30916165706580013</sign>
        <sub_pmethod>INSTALLMENT</sub_pmethod>        
        <accardaAttachments>
          <attachment mimeType='text/xml' name='invoicetext.xml'>
            <value>base64 encoded content 1</value>
          </attachment>
          <attachment mimeType='text/xml' name='invoicetext.xml'>
            <value>base64 encoded content 1</value>
          </attachment>
        </accardaAttachments>
        <uppCustomerDetails>
          <accardaOtherPaymentMeansAmount>1000</accardaOtherPaymentMeansAmount>
          <accardaPreferredRateModel>3x3</accardaPreferredRateModel>
          <accardaRiskTakerShift>IN_ANY_CASE</accardaRiskTakerShift>
          <accardaInvoiceChannel>INSURANCE</accardaInvoiceChannel>
          <accardaEnableStreetSplit>true</accardaEnableStreetSplit>
          <accardaCustomerOrderNumber>ORDER-NUMBER-1</accardaCustomerOrderNumber>         
          <uppCustomerType>P</uppCustomerType>
          <uppCustomerGender>male</uppCustomerGender>
          <uppCustomerPhone>0795658005</uppCustomerPhone>
          <uppCustomerTitle>Herr</uppCustomerTitle>
          <uppCustomerFirstName>Peter</uppCustomerFirstName>
          <uppCustomerLastName>ABCDE</uppCustomerLastName>
          <uppCustomerBirthDate>25.08.1979</uppCustomerBirthDate>
          <uppCustomerLanguage>DE</uppCustomerLanguage>
          <uppCustomerStreet>Obere Kirchgasse</uppCustomerStreet>
          <uppCustomerStreet2>18</uppCustomerStreet2>
          <uppCustomerCity>Meilen</uppCustomerCity>
          <uppCustomerZipCode>8706</uppCustomerZipCode>
          <uppCustomerCountry>CH</uppCustomerCountry>
          <uppInvoiceType>physical</uppInvoiceType>
          <uppArticle_1_Id>PK4000</uppArticle_1_Id>
          <uppArticle_1_Name>Bottle opener</uppArticle_1_Name>
          <uppArticle_1_Type>goods</uppArticle_1_Type>
          <uppArticle_1_Quantity>1</uppArticle_1_Quantity>
          <uppArticle_1_Price>10000</uppArticle_1_Price>
          <uppArticle_1_Tax>8</uppArticle_1_Tax>
          <uppArticle_1_PriceWithoutVAT>9259</uppArticle_1_PriceWithoutVAT>
          <uppArticle_1_TaxAmount>741</uppArticle_1_TaxAmount>
          <uppArticle_1_SingleItemPrice>10000</uppArticle_1_SingleItemPrice>
          <uppArticle_1_SingleItemPriceWithoutVAT>9259</uppArticle_1_SingleItemPriceWithoutVAT>
          <uppArticle_2_Id>PK5000</uppArticle_2_Id>
          <uppArticle_2_Name>Nice product</uppArticle_2_Name>
          <uppArticle_2_Type>goods</uppArticle_2_Type>
          <uppArticle_2_Quantity>1</uppArticle_2_Quantity>
          <uppArticle_2_Price>20000</uppArticle_2_Price>
          <uppArticle_2_Tax>2.5</uppArticle_2_Tax>
          <uppArticle_2_PriceWithoutVAT>19512</uppArticle_2_PriceWithoutVAT>
          <uppArticle_2_TaxAmount>488</uppArticle_2_TaxAmount>
          <uppFee_1_Id>PF000</uppFee_1_Id>
          <uppFee_1_Name>Payment Fee</uppFee_1_Name>
          <uppFee_1_Type>fee</uppFee_1_Type>
          <uppFee_1_Quantity>1</uppFee_1_Quantity>
          <uppFee_1_Price>1000</uppFee_1_Price>
          <uppFee_1_Tax>3.8</uppFee_1_Tax>
          <uppFee_1_PriceWithoutVAT>963</uppFee_1_PriceWithoutVAT>
          <uppFee_1_TaxAmount>37</uppFee_1_TaxAmount>
          <uppFee_2_Id>DF000</uppFee_2_Id>
          <uppFee_2_Name>Delivery Fee</uppFee_2_Name>
          <uppFee_2_Type>fee</uppFee_2_Type>
          <uppFee_2_Quantity>1</uppFee_2_Quantity>
          <uppFee_2_Price>3000</uppFee_2_Price>
          <uppFee_2_Tax>3.8</uppFee_2_Tax>
          <uppFee_2_PriceWithoutVAT>2890</uppFee_2_PriceWithoutVAT>
          <uppFee_2_TaxAmount>110</uppFee_2_TaxAmount>
          <uppFee_3_Id>ROUNDING</uppFee_3_Id>
          <uppFee_3_Name>Rounding</uppFee_3_Name>
          <uppFee_3_Type>fee</uppFee_3_Type>
          <uppFee_3_Quantity>1</uppFee_3_Quantity>
          <uppFee_3_Price>110</uppFee_3_Price>
          <uppFee_3_Tax>0</uppFee_3_Tax>
          <uppFee_3_PriceWithoutVAT>110</uppFee_3_PriceWithoutVAT>
          <uppFee_3_TaxAmount>0</uppFee_3_TaxAmount>
        </uppCustomerDetails>
      </request>
      <response>
        <responseCode>01</responseCode>
        <responseMessage>Accarda trx successful.</responseMessage>
        <uppTransactionId>171123142929405931</uppTransactionId>
        <authorizationCode>929415932</authorizationCode>
        <acqAuthorizationCode>50258</acqAuthorizationCode>
        <purchaseInInstallementGranted>true</purchaseInInstallementGranted>
        <purchaseOnInvoiceGranted>true</purchaseOnInvoiceGranted>
        <decisionInstallment>OK</decisionInstallment>
        <decisionInvoice>OK</decisionInvoice>
        <decisionRiskTaker>MERCHANT</decisionRiskTaker>
        <installmentPlan>
          <totalRateAmount>349.0</totalRateAmount>
          <interestRate>0.0</interestRate>
          <billingDate>2017-11-23</billingDate>
          <rateModel>4X12</rateModel>
          <rates>
            <rateAmount>87.25</rateAmount>
            <rateDate>2017-12-23</rateDate>
            <interestAmount>17.9</interestAmount>
          </rates>
          <rates>
            <rateAmount>87.25</rateAmount>
            <rateDate>2018-03-23</rateDate>
            <interestAmount>0.0</interestAmount>
          </rates>
          <rates>
            <rateAmount>87.25</rateAmount>
            <rateDate>2018-07-21</rateDate>
            <interestAmount>0.0</interestAmount>
          </rates>
          <rates>
            <rateAmount>87.25</rateAmount>
            <rateDate>2018-11-18</rateDate>
            <interestAmount>0.0</interestAmount>
          </rates>
        </installmentPlan>
        <info>
          <status>AUTHORIZED</status>
          <validUntil>2017-12-23</validUntil>
          <isSuitableForDelivery>false</isSuitableForDelivery>
        </info>
        <authorizationId>50258</authorizationId>
      </response>
    </transaction>
  </body>
</authorizationService>

Settlement

Request

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="1234">
      <request>
        <amount>33110</amount>
        <currency>CHF</currency>
        <uppTransactionId>171123142929405931</uppTransactionId>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='1'>
    <body merchantId='1000011011' status='accepted'>
        <transaction refno='1234' trxStatus='response'>
            <request>
                <amount>33110</amount>
                <currency>CHF</currency>
                <uppTransactionId>171123142929405931</uppTransactionId>
                <reqtype>COA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>settlement succeeded</responseMessage>
                <info>
                    <status>SUBMITTED</status>
                    <validUntil>2018-01-07</validUntil>
                    <isSuitableForDelivery>true</isSuitableForDelivery>
                </info>
            </response>
        </transaction>
    </body>
</paymentService>

Credit

Request

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="1234">
            <request>
                <amount>33110</amount>
                <currency>CHF</currency>
                <uppTransactionId>171123142929405931</uppTransactionId>
                <transtype>06</transtype>
            </request>
        </transaction>
    </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='1'>
    <body merchantId='1000011011' status='accepted'>
        <transaction refno='1234' trxStatus='response'>
            <request>
                <amount>33110</amount>
                <currency>CHF</currency>
                <uppTransactionId>171123142929405931</uppTransactionId>
                <transtype>06</transtype>
                <reqtype>COA</reqtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>credit succeeded</responseMessage>
                <uppTransactionId>171123143440057122</uppTransactionId>
                <authorizationCode>442487132</authorizationCode>
                <acqAuthorizationCode>0</acqAuthorizationCode>
                <info>
                    <status>CREDITED</status>
                    <validUntil>2018-01-07</validUntil>
                    <isSuitableForDelivery>true</isSuitableForDelivery>
                </info>
            </response>
        </transaction>
    </body>
</paymentService>

Cancel

Request

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="1234">
            <request>
                <amount>27475</amount>
                <currency>CHF</currency>
                <uppTransactionId>171123143518817427</uppTransactionId>
                <reqtype>DOA</reqtype>
            </request>
        </transaction>
    </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='1'>
    <body merchantId='1000011011' status='accepted'>
        <transaction refno='1234' trxStatus='response'>
            <request>
                <amount>27475</amount>
                <currency>CHF</currency>
                <uppTransactionId>171123143518817427</uppTransactionId>
                <reqtype>DOA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>cancellation succeeded</responseMessage>
                <info/>
            </response>
        </transaction>
    </body>
</paymentService>

Status

Request

curl -v -X POST https://api.sandbox.datatrans.com/upp/jsp/XML_status.jsp \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d @- << EOF
<?xml version="1.0" encoding="UTF-8" ?>
<statusService version="3">
  <body merchantId="1000011011">
    <transaction>
      <request>
        <uppTransactionId>171123143518817427</uppTransactionId>
        <reqtype>STX</reqtype>
      </request>
    </transaction>
  </body>
</statusService>
EOF

Response


<?xml version='1.0' encoding='UTF-8'?>
<statusService version='3'>
    <body merchantId='1000011011' status='accepted'>
        <transaction trxStatus='response'>
            <request>
                <uppTransactionId>171123143518817427</uppTransactionId>
                <reqtype>STX</reqtype>
            </request>
            <response itemNr='1'>
                <responseCode>7</responseCode>
                <responseMessage>MOA Cancel</responseMessage>
                <refno>1234</refno>
                <amount>33110</amount>
                <currency>CHF</currency>
                <authorizationCode>518827428</authorizationCode>
                <pmethod>ACC</pmethod>
                <uppTransactionId>171123143518817427</uppTransactionId>
                <maskedCC></maskedCC>
                <aliasCC></aliasCC>
                <expm></expm>
                <expy></expy>
                <trxDate>20171123</trxDate>
                <trxTime>143518</trxTime>
                <trtype>05</trtype>
            </response>
        </transaction>
    </body>
</statusService>

Accarda


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.