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!

Powerpay Authorization

paymentmethod=MFG

paymentmethod=MFG

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 1.00

Request and response parameter reference

For a more detailed description of the request and response parameters for Powerpay Authorization 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
Redirects to Powerpay
Redirects to Powerpay
Powerpay
Powerpay<br>
Checks data received
[Not supported by viewer]
 2 
[Not supported by viewer]
 4 
[Not supported by viewer]
Validates client and authorizes
Validates client and authorizes
 5 
[Not supported by viewer]
Receives Result 
Receives Result 
5.1
[Not supported by viewer]
 7 
[Not supported by viewer]
Invokes merchant's
POST URL (Webook)
Invokes merchant's<br>POST URL (Webook)
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
 3 
[Not supported by viewer]
Text
Text

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="3">
 <body merchantId="1000011011" testOnly="no">
  <transaction refno="700912">
   <request>
    <amount>5</amount>
    <currency>CHF</currency>
    <virtualCardno>6004516000000000300</virtualCardno>
    <pmethod>MFG</pmethod>
    <reqtype>NOA</reqtype>
    <transtype>05</transtype>
    <sign>30916165706580013</sign>
   </request>
  </transaction>
 </body>
</authorizationService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<authorizationService version='3'>
    <body merchantId='1000011011' testOnly='yes' status='accepted'>
        <transaction refno='700912' trxStatus='response'>
            <request>
                <amount>5</amount>
                <currency>CHF</currency>
                <virtualCardno>6004516000000000300</virtualCardno>
                <pmethod>MFG</pmethod>
                <reqtype>NOA</reqtype>
                <transtype>05</transtype>
                <sign>30916165706580013</sign>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>successful</responseMessage>
                <uppTransactionId>180917125635668880</uppTransactionId>
                <authorizationCode>635668881</authorizationCode>
                <acqAuthorizationCode>149495</acqAuthorizationCode>
                <mfgBalance>129312</mfgBalance>
                <mfgResponseCode>00</mfgResponseCode>
                <mfgResponseDate>20180917125637</mfgResponseDate>
                <mfgExpirationDate>20250531</mfgExpirationDate>
            </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="705824">
      <request>
        <amount>5</amount>
        <currency>CHF</currency>
        <uppTransactionId>180917125635668880</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>5</amount>
                <currency>CHF</currency>
                <uppTransactionId>180917125635668880</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="700912">
      <request>
        <amount>5</amount>
        <currency>CHF</currency>
        <uppTransactionId>180917125635668880</uppTransactionId>
         <transtype>06</transtype>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='1'>
    <body merchantId='1100016230' status='accepted'>
        <transaction refno='1234987abc' trxStatus='response'>
            <request>
                <amount>5</amount>
                <currency>CHF</currency>
                <uppTransactionId>180917125635668880</uppTransactionId>
                <transtype>06</transtype>
                <reqtype>COA</reqtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>credit succeeded</responseMessage>
                <uppTransactionId>180917125635668880</uppTransactionId>
                <authorizationCode>430939749</authorizationCode>
                <acqAuthorizationCode>092430</acqAuthorizationCode>
            </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="749532">
      <request>
        <amount>5</amount>
        <currency>CHF</currency>
        <uppTransactionId>180917125635668880</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='749532' trxStatus='response'>
            <request>
                <amount>5</amount>
                <currency>CHF</currency>
                <uppTransactionId>180917125635668880</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>180917125635668880</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>180917125635668880</uppTransactionId>
                <reqtype>STX</reqtype>
            </request>
            <response itemNr='1'>
                <responseCode>6</responseCode>
                <responseMessage>DOA Cancel</responseMessage>
                <refno>705824</refno>
                <amount>5</amount>
                <currency>CHF</currency>
                <authorizationCode>635668881</authorizationCode>
                <pmethod>MFG</pmethod>
                <uppTransactionId>180917125635668880</uppTransactionId>
                <maskedCC>600451xxxxxxxxx0300</maskedCC>
                <aliasCC></aliasCC>
                <expm></expm>
                <expy></expy>
                <trxDate>20180917</trxDate>
                <trxTime>125635</trxTime>
                <trtype>05</trtype>
                <settledAmount>5</settledAmount>
            </response>
        </transaction>
    </body>
</statusService>

Powerpay Authorization


Suggested Edits are limited on API Reference Pages

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