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=ESY

paymentmethod=ESY

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

:heavy-check-mark+:

Cancel

:heavy-check-mark+:

Alias

:heavy-check-mark+:

Try it

Don't worry you will not be charged

Pay CHF 10.00

Description

Simple and safe payment method for (mobile) internet.

Easypay is the Swisscom simple solution to mobile online payment. With Easypay, Swisscom customers can pay for services conveniently via their monthly bill or prepaid credit.

Payment Method provider website :link+:

Request and response parameter reference

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

EasyPay Alias format

Easypay does not have the same alias format as credit cards. Checkout the different Alias formats.

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
Swisscom
Swisscom
 3 
[Not supported by viewer]
Customer selects ESY
[Not supported by viewer]
 2 
[Not supported by viewer]
 4 
[Not supported by viewer]
Validates and prepares Forwarding
Validates and prepares Forwarding
User enters phone number 
User enters phone number 
 7 
[Not supported by viewer]
Receives Result 
Receives Result 
7.1
[Not supported by viewer]
 8 
[Not supported by viewer]
Invokes merchant's
POST URL (Webhook)
Invokes merchant's<br>POST URL (Webhook)
Receives Result 
Receives Result 
 9 
[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
Authorisation
Authorisation
 5 
[Not supported by viewer]
 6 
[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="4">
  <body merchantId="1000011012">
    <transaction refno="749532">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <aliasCC>2b5004f8-adae-4e5c-ad09-78ec3a6d0ab8</aliasCC>
    	<pmethod>ESY</pmethod>
    	<sign>130930145825488031</sign>    	
      </request>
    </transaction>
  </body>
</authorizationService>
EOF

Response

Alias

<?xml version='1.0' encoding='UTF-8'?>
<authorizationService version='4'>
    <body merchantId='1000011012' status='accepted'>
        <transaction refno='749532' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <aliasCC>2b5004f8-adae-4e5c-ad09-78ec3a6d0ab8</aliasCC>
                <pmethod>ESY</pmethod>
                <sign>130930145825488031</sign>
                <reqtype>NOA</reqtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>EasyPay trx successful</responseMessage>
                <uppTransactionId>180610180302966625</uppTransactionId>
                <authorizationCode>302976626</authorizationCode>
                <acqAuthorizationCode>E2D4D94E-C592-480D-A6FC-EDD4E83A6E0A</acqAuthorizationCode>
            </response>
        </transaction>
    </body>
</authorizationService>

Settlement

Deferred Settlement is technically possible.We recommend to authorize with immediate settlement (reqtype=“CAA”) or with a separate settlement request immediately after successful authorization. An authorization can not be settled after 00:59 of the next day. To settle a smaller amount as initially authorized is not possible.

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="1000011012">
    <transaction refno="999273">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>180610180302966625</uppTransactionId>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='1'>
    <body merchantId='1000011012' status='accepted'>
        <transaction refno='999273' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>180610180302966625</uppTransactionId>
                <reqtype>COA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>settlement succeeded</responseMessage>
            </response>
        </transaction>
    </body>
</paymentService>

Credit

A previously authorised and settled transaction can be refunded. Refunding a transaction with multiple credits (i.e.1 x settled transaction of CHF 100 / 2 x credit of CHF 50) is not supported for Easypay. However, it's possible to refund a partial amount (i.e.CHF 50).

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="1000011012">
    <transaction refno="999273">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>180610181025398453</uppTransactionId>
        <transtype>06</transtype>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='1'>
    <body merchantId='1000011012' status='accepted'>
        <transaction refno='999273' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>180610181025398453</uppTransactionId>
                <transtype>06</transtype>
                <reqtype>COA</reqtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>credit succeeded</responseMessage>
                <uppTransactionId>180610181152318754</uppTransactionId>
                <authorizationCode>152648755</authorizationCode>
                <acqAuthorizationCode>0</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="1000011012">
    <transaction refno="29023">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>180610181513249537</uppTransactionId>
        <reqtype>DOA</reqtype>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='1'>
    <body merchantId='1000011012' status='accepted'>
        <transaction refno='29023' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>180610181513249537</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="1000011012">
    <transaction>
      <request>
        <uppTransactionId>180610181152318754</uppTransactionId>
        <reqtype>STA</reqtype>
      </request>
    </transaction>
  </body>
</statusService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<statusService version='3'>
    <body merchantId='1000011012' status='accepted'>
        <transaction trxStatus='response'>
            <request>
                <uppTransactionId>180610181152318754</uppTransactionId>
                <reqtype>STX</reqtype>
            </request>
            <response itemNr='1'>
                <responseCode>21</responseCode>
                <responseMessage>Trx already settled</responseMessage>
                <refno>999273</refno>
                <amount>100</amount>
                <currency>CHF</currency>
                <authorizationCode>152648755</authorizationCode>
                <pmethod>ESY</pmethod>
                <uppTransactionId>180610181152318754</uppTransactionId>
                <maskedCC></maskedCC>
                <aliasCC></aliasCC>
                <expm></expm>
                <expy></expy>
                <trxDate>20180610</trxDate>
                <trxTime>181152</trxTime>
                <trtype>06</trtype>
                <settledAmount>100</settledAmount>
            </response>
        </transaction>
    </body>
</statusService>

Easypay


Suggested Edits are limited on API Reference Pages

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