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!

Masterpass

paymentmethod=MPW

paymentmethod=MPW

Payment Process
Integration

Authorization

:heavy-check-mark+:

Payment Page

:heavy-check-mark+:

Deferred Settlement

:heavy-check-mark+:

Split Mode

:heavy-check-mark+:

Refund

:heavy-check-mark+:

Mobile SDK

:x+:

Cancel

:heavy-check-mark+:

Alias

:heavy-check-mark+:

Try it

Don't worry you will not be charged as you can use a test card

Pay CHF 10.00

Description

With Masterpass, Mastercard is simplifying the payment process for your online customers. Following a one-off registration for Masterpass, your customers can quickly, securely and easily pay with one mouse click or one tap of a finger on any device with internet capability.
Payment Method provider website :link+:

Masterpass Full Checkout Mode and Masterpass connected checkout mode

Masterpass supports two enhanced checkout modes called "Full Checkout" and "Connected checkout". For details on how to integrate those modes please contact us.

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
Master Card
Master Card
 3 
[Not supported by viewer]
Customer selects Masterpass
[Not supported by viewer]
 2 
[Not supported by viewer]
Starts Master Pass
Starts Master Pass
User selects Method of Payment
User selects Method of Payment
Masterpass returns tokens
Masterpass returns tokens
Gets payment credentials from Mastercard servers by token 
[Not supported by viewer]
Forwards credentials to Acquirer 
Forwards credentials to Acquirer 
9.1
[Not supported by viewer]
10
[Not supported by viewer]
Receives Result and Invokes merchant's
POST URL (Webook)
[Not supported by viewer]
Receives Result 
Receives Result 
 11 
[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
Acquirer
Acquirer
Authorization
Authorization
 4 
[Not supported by viewer]
 5 
[Not supported by viewer]
 6 
[Not supported by viewer]
 7 
[Not supported by viewer]
 8 
[Not supported by viewer]
 9 
[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

Authorizations can only be done through the web interface.

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>

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>50</amount>
        <currency>CHF</currency>
        <transtype>06</transtype>
        <uppTransactionId>171002152752145299</uppTransactionId>
      </request>
    </transaction>
  </body>
</paymentService>

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='1'>
    <body merchantId='1000011011' status='accepted'>
        <transaction refno='999273' trxStatus='response'>
            <request>
                <amount>50</amount>
                <currency>CHF</currency>
                <uppTransactionId>171002152752145299</uppTransactionId>
                <transtype>06</transtype>
                <reqtype>COA</reqtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>credit succeeded</responseMessage>
                <uppTransactionId>171002152752145299</uppTransactionId>
                <authorizationCode>206224339</authorizationCode>
                <acqAuthorizationCode>183206</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="29023">
      <request>
        <amount>50</amount>
        <currency>CHF</currency>
        <uppTransactionId>171002152752145299</uppTransactionId>
        <reqtype>DOA</reqtype>
      </request>
    </transaction>
  </body>
</paymentService>

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='1'>
    <body merchantId='1000011011' status='accepted'>
        <transaction refno='29023' trxStatus='response'>
            <request>
                <amount>50</amount>
                <currency>CHF</currency>
                <uppTransactionId>171002152752145299</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>171002152752145299</uppTransactionId>
        <reqtype>STX</reqtype>
      </request>
    </transaction>
  </body>
</statusService>

Response

<?xml version='1.0' encoding='UTF-8'?>
<statusService version='3'>
    <body merchantId='1000011011' status='accepted'>
        <transaction trxStatus='response'>
            <request>
                <uppTransactionId>171002152752145299</uppTransactionId>
                <reqtype>STX</reqtype>
            </request>
            <response itemNr='1'>
                <responseCode>6</responseCode>
                <responseMessage>DOA Cancel</responseMessage>
                <refno>999273</refno>
                <amount>1000</amount>
                <currency>CHF</currency>
                <authorizationCode>900053308</authorizationCode>
                <pmethod>VIS</pmethod>
                <uppTransactionId>171002152752145299</uppTransactionId>
                <maskedCC>375811xxxxx1115</maskedCC>
                <aliasCC>70323122544331174</aliasCC>
                <expm>12</expm>
                <expy>18</expy>
                <trxDate>20180610</trxDate>
                <trxTime>182900</trxTime>
                <trtype>05</trtype>
                <settledAmount>50</settledAmount>
            </response>
        </transaction>
    </body>
</statusService>

Masterpass


Suggested Edits are limited on API Reference Pages

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