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!

Swissbilling

paymentmethod=SWB

paymentmethod=SWB

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

:heavy-check-mark+:

Cancel

:heavy-check-mark+:

Alias

:x+:

Try it

Don't worry you wont be charged

Pay CHF 10.00

Description

SWISSBILLING enables you to offer your clients payment of their online purchases on invoice in one or several installments. SWISSBILLING guarantees the payment for the order within the period agreed.

Request and response parameter reference

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

 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
Swissbilling
Swissbilling<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="4">
    <body merchantId="1000011011">
        <transaction refno="749532">
            <request>
                <testOnly>yes</testOnly>
                <amount>20200</amount>
                <pmethod>SWB</pmethod>                
                <language>DE</language>
                <currency>CHF</currency>
                <taxAmount>1460</taxAmount>
                <sign>30916165706580013</sign>
                <uppCustomerDetails>
                    <uppCustomerEmail>eshop@example.com</uppCustomerEmail>
                    <uppShippingDetails>no</uppShippingDetails>
                    <uppCustomerFirstName>Good</uppCustomerFirstName>
                    <uppCustomerCountry>CH</uppCustomerCountry>
                    <uppCustomerCity>Zurich</uppCustomerCity>
                    <uppCustomerZipCode>8001</uppCustomerZipCode>
                    <uppCustomerStreet>Limmatquai 55</uppCustomerStreet>
                    <uppCustomerPhone>+41584333034</uppCustomerPhone>
                    <uppCustomerLastName>Customer</uppCustomerLastName>
                    <uppCustomerBirthDate>1969-09-19</uppCustomerBirthDate>  
                    <uppCustomerSubscription>test</uppCustomerSubscription>
                </uppCustomerDetails>
                <order>
                         <article>
                            <quantity>1</quantity>
                            <taxPercent>6.94</taxPercent>
                            <type>goods</type>
                            <id>PK123423</id>
                            <price>7200</price>
                            <description>XBox Live Gold Card 12+1 Monate im FiFA 14 Design</description>
                            <name>XBox Live+Gold Card</name>
                            <tax>500</tax>
                        </article>
                        <article>
                            <id>PK43563456</id>
                            <quantity>1</quantity>
                            <price>13000</price>
                            <type>goods</type>
                            <taxPercent>7.38</taxPercent>
                            <name>Kinect Sensor</name>
                            <tax>960</tax>
                            <description>Kinect Adventures</description>
                        </article>
                   
                </order>
            </request>
        </transaction>
    </body>
</authorizationService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<authorizationService version='4'>
  <body merchantId='1000011011' status='accepted'>
    <transaction refno='749532' trxStatus='response'>
      <request>
        <testOnly>yes</testOnly>
        <amount>20200</amount>
        <pmethod>SWB</pmethod>
        <language>DE</language>
        <currency>CHF</currency>
        <taxAmount>1460</taxAmount>
        <sign>30916165706580013</sign>
        <uppCustomerDetails>
          <uppCustomerEmail>eshop@example.com</uppCustomerEmail>
          <uppShippingDetails>no</uppShippingDetails>
          <uppCustomerFirstName>Good</uppCustomerFirstName>
          <uppCustomerCountry>CH</uppCustomerCountry>
          <uppCustomerCity>Zurich</uppCustomerCity>
          <uppCustomerZipCode>8001</uppCustomerZipCode>
          <uppCustomerStreet>Limmatquai 55</uppCustomerStreet>
          <uppCustomerPhone>+41584333034</uppCustomerPhone>
          <uppCustomerLastName>Customer</uppCustomerLastName>
          <uppCustomerBirthDate>1969-09-19</uppCustomerBirthDate>
          <uppCustomerSubscription>test</uppCustomerSubscription>
        </uppCustomerDetails>
        <order>
          <article>
            <quantity>1</quantity>
            <taxPercent>6.94</taxPercent>
            <type>goods</type>
            <id>PK123423</id>
            <price>7200</price>
            <description>XBox Live Gold Card 12+1 Monate im FiFA 14 Design</description>
            <name>XBox Live+Gold Card</name>
            <tax>500</tax>
          </article>
          <article>
            <id>PK43563456</id>
            <quantity>1</quantity>
            <price>13000</price>
            <type>goods</type>
            <taxPercent>7.38</taxPercent>
            <name>Kinect Sensor</name>
            <tax>960</tax>
            <description>Kinect Adventures</description>
          </article>
        </order>
        <reqtype>NOA</reqtype>
      </request>
      <response>
        <responseCode>01</responseCode>
        <responseMessage>Acknowledged</responseMessage>
        <uppTransactionId>190109124758131982</uppTransactionId>
        <authorizationCode>758161983</authorizationCode>
        <acqAuthorizationCode>1547034478187</acqAuthorizationCode>
      </response>
    </transaction>
  </body>

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="705824">
      <request>
        <amount>50</amount>
        <currency>CHF</currency>
        <uppTransactionId>171002152752145299</uppTransactionId>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='1'>
    <body merchantId='1000011011' status='accepted'>
        <transaction refno='705824' trxStatus='response'>
            <request>
                <amount>50</amount>
                <currency>CHF</currency>
                <uppTransactionId>171002152752145299</uppTransactionId>
                <reqtype>COA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>settlement succeeded</responseMessage>
            </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="999273">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>171002153232242915</uppTransactionId>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='1'>
    <body merchantId='1000011011' status='accepted'>
        <transaction refno='999273' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>171002153232242915</uppTransactionId>
                <reqtype>COA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>settlement succeeded</responseMessage>
            </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="29023">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>171002153232242915</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='29023' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>171002153232242915</uppTransactionId>
                <reqtype>DOA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>cancellation succeeded</responseMessage>
            </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>171002153232242915</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>171002153232242915</uppTransactionId>
                <reqtype>STX</reqtype>
            </request>
            <response itemNr='1'>
                <responseCode>6</responseCode>
                <responseMessage>DOA Cancel</responseMessage>
                <refno>999273</refno>
                <amount>100</amount>
                <currency>CHF</currency>
                <authorizationCode>232262916</authorizationCode>
                <pmethod>SWB</pmethod>
                <uppTransactionId>171002153232242915</uppTransactionId>
                <expm>06</expm>
                <expy>21</expy>
                <trxDate>20171002</trxDate>
                <trxTime>153232</trxTime>
                <trtype>05</trtype>
                <settledAmount>100</settledAmount>
            </response>
        </transaction>
    </body>
</statusService>

Swissbilling


Suggested Edits are limited on API Reference Pages

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