Easypay
Payment Process | Integration | ||
---|---|---|---|
Authorization | ✔️ | Payment Page | ✔️ |
Deferred Settlement | ✔️ | Split Mode | ✔️ |
Refund | ✔️ | Mobile SDK | ✔️ |
Cancel | ✔️ | ||
Alias | ✔️ |
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 🔗
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
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="6">
<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
<?xml version='1.0' encoding='UTF-8'?>
<authorizationService version='6'>
<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="2">
<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='2'>
<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="2">
<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='2'>
<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="2">
<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='2'>
<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="5">
<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='5'>
<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>
Updated over 2 years ago