Guides
These docs are for v1.0.1. Click to read the latest docs for v2.1.0.

Samsung Pay

120

paymentmethod=SAM

Payment ProcessIntegration
Authorization✔️Payment Page✔️
Deferred Settlement✔️Split Mode✔️
Refund✔️Mobile SDK✔️
Cancel✔️
Alias

Description

Samsung Pay is a wallet that can be used with most Samsung Galaxy Devices.
When integrated within the Payment Page, your web page or native app, Samsung Pay presents users with a common checkout process that leverages Samsung Pay's secure purchase authentication technology, eliminating manual entry or re-entry of card details.
After customer decides to pay by Samsung Pay, the authentication and completions of payment is done with the fingerprint, iris scan, or PIN method of the customer.

Payment Method provider website 🔗

📘

Request and response parameter reference

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

Payment Setup

Since Samsung Pay is a wallet for credit cards your Datatrans setup needs to be set up to process credit card payments

Resources

Samsung Pay Developer Portal: Payment Method provider website 🔗

Merchant Integration

Samsung Pay can also be integrated by the merchant itself. This means that the merchant controls and implements the payment flow up to the point of receiving a payment token. To learn more on how this is done please head over to our Github Sample

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
Samsung
Samsung
 3 
[Not supported by viewer]
Customer selects Samsung Pay
[Not supported by viewer]
 2 
[Not supported by viewer]
 4 
[Not supported by viewer]
Forwards to Samsung Pay login
Forwards to Samsung Pay login
Samsung Pay login
Samsung Pay login
User verifies and accepts payment
User verifies and accepts payment
Samsung forwards encrypted payment data
Samsung forwards encrypted payment data
Decrypts Payment Data
Decrypts Payment Data
Forwards to Acquirer 
Forwards to Acquirer 
10.1
[Not supported by viewer]
 11 
[Not supported by viewer]
Receives Result and Invokes merchant's
POST URL (Webhook)
[Not supported by viewer]
Receives Result 
Receives Result 
 12 
[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
User's Samsung Device
User's Samsung Device
 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]
 10 
[Not supported by viewer]

Server to Server API calls

After a transactionId 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="1100016286">
     <transaction refno="13222">
       <request>
       <samsungPayData><![CDATA[{"resultCode":"0","resultMessage":"SUCCESS","method":"3DS","card_brand":"MC","card_last4digits":"0018","3DS":{"type":"S","version":"100","data":"eyJhbGciOiJSU0ExXzUiLCJraWQiOiJWa3h1cGRUdkI0ZGFscG1adWFialNueXVRZkZ4dkNiZDdYb3AwMXJ2UVkwPSIsInR5cCI6IkpPU0UiLCJjaGFubmVsU2VjdXJpdHlDb250ZXh0IjoiUlNBX1BLSSIsImVuYyI6IkExMjhHQ00ifQ.yymDORseqPsgqvsynfdpy55DW9ehI495mVj25A_np2ThPWwcpa-8g55lTdOJaBYC_gl5QMQv8Yqp8KkXpCn895t432r1gO1I48-mxmYgtm5Py1iYEgtV1p5ldu3zCdBSKO3oXxJ5WSY9w2f4ypwCbi0PKL2CiucDu-9sHlf5eeeXd_g1OWA5n9L8iMggq4eZLiuM8xCJFAFH-BcVR-1olOGfAclmsk_Exx13N8OPOOqYbe83XRTleAhJiAFV3-kw-M53wExWgcOj9wieUY-oK65hklgGBuHUqvz63Kp4VfSdawGVUWG_lzJumKgU2Xmi4kRUvbeTpAL8mCkZXFEKLQ.LMPTUbKUuy3uvyeu.vP1nxP-SkyR9ILefW7FP5vKgUmDh2sFP9GPiDdzmx7qB38XgskTlOIkHXDFgGB7alN8fjm9Ee40B6wZy4rqfNaLLnp6M-Bxmm9-4MW96gnklh6KJ8WjTv8nvB_6ppDN-xzJ9dmY87sMqcIBRjbPt8fHfNqg8q2tQp7kwT4EmCMv15bkCYhcEon54QhVFOZOcTHztEpPBaNixJzcYJ5G8b4rrd4jelwSaQTOXW8mtT_m1FzK4Fxw.qFH3DpkWjijCGpEnTiDq0g"},"wallet_dm_id":"nMpLjujxa0m9GYqU_n-SNa1vkvCMuBNnf-JmSfFN1J0="}
}]]></samsungPayData>
		<sign>180502124654311645</sign>
       </request>
     </transaction>
   </body>
 </authorizationService>
 EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<authorizationService version='6'>
    <body merchantId='1100016286' status='accepted'>
        <transaction refno='13222' trxStatus='response'>
            <request>
                <samsungPayData>
                    <![CDATA[{"resultCode":"0","resultMessage":"SUCCESS","method":"3DS","card_brand":"MC","card_last4digits":"0018","3DS":{"type":"S","version":"100","data":"eyJhbGciOiJSU0ExXzUiLCJraWQiOiJWa3h1cGRUdkI0ZGFscG1adWFialNueXVRZkZ4dkNiZDdYb3AwMXJ2UVkwPSIsInR5cCI6IkpPU0UiLCJjaGFubmVsU2VjdXJpdHlDb250ZXh0IjoiUlNBX1BLSSIsImVuYyI6IkExMjhHQ00ifQ.yymDORseqPsgqvsynfdpy55DW9ehI495mVj25A_np2ThPWwcpa-8g55lTdOJaBYC_gl5QMQv8Yqp8KkXpCn895t432r1gO1I48-mxmYgtm5Py1iYEgtV1p5ldu3zCdBSKO3oXxJ5WSY9w2f4ypwCbi0PKL2CiucDu-9sHlf5eeeXd_g1OWA5n9L8iMggq4eZLiuM8xCJFAFH-BcVR-1olOGfAclmsk_Exx13N8OPOOqYbe83XRTleAhJiAFV3-kw-M53wExWgcOj9wieUY-oK65hklgGBuHUqvz63Kp4VfSdawGVUWG_lzJumKgU2Xmi4kRUvbeTpAL8mCkZXFEKLQ.LMPTUbKUuy3uvyeu.vP1nxP-SkyR9ILefW7FP5vKgUmDh2sFP9GPiDdzmx7qB38XgskTlOIkHXDFgGB7alN8fjm9Ee40B6wZy4rqfNaLLnp6M-Bxmm9-4MW96gnklh6KJ8WjTv8nvB_6ppDN-xzJ9dmY87sMqcIBRjbPt8fHfNqg8q2tQp7kwT4EmCMv15bkCYhcEon54QhVFOZOcTHztEpPBaNixJzcYJ5G8b4rrd4jelwSaQTOXW8mtT_m1FzK4Fxw.qFH3DpkWjijCGpEnTiDq0g"},"wallet_dm_id":"nMpLjujxa0m9GYqU_n-SNa1vkvCMuBNnf-JmSfFN1J0="}
}]]>
                </samsungPayData>
                <reqtype>NOA</reqtype>
                <transtype>05</transtype>
                <sign>1500478827279</sign>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>Authorized</responseMessage>
                <uppTransactionId>180611155111569292</uppTransactionId>
                <authorizationCode>238489293</authorizationCode>
                <acqAuthorizationCode>155238</acqAuthorizationCode>
                <maskedCC>42424242xxxxx4242</maskedCC>
                <aliasCC>70119122433810042</aliasCC>
                <expy>21</expy>
                <expm>12</expm>
            </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="2">
  <body merchantId="1100016286">
    <transaction refno="13222">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>180611155111569292</uppTransactionId>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='2'>
    <body merchantId='1100016286' status='accepted'>
        <transaction refno='13222' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>180611155111569292</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="2">
  <body merchantId="1100016286">
    <transaction refno="13222">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>180611155111569292</uppTransactionId>
        <transtype>06</transtype>
      </request>
    </transaction>
  </body>
</paymentService>

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='2'>
    <body merchantId='1100016286' status='accepted'>
        <transaction refno='13222' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>180611155111569292</uppTransactionId>
                <reqtype>COA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>credit succeeded</responseMessage>
                <uppTransactionId>180611155111569292</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="2">
  <body merchantId="1100016286">
    <transaction refno="13222">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>180611155111569292</uppTransactionId>
        <reqtype>DOA</reqtype>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='2'>
    <body merchantId='1100016286' status='accepted'>
        <transaction refno='13222' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>180611155111569292</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="1100016286">
    <transaction>
      <request>
        <uppTransactionId>180611155111569292</uppTransactionId>
        <reqtype>STX</reqtype>
      </request>
    </transaction>
  </body>
</statusService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<statusService version='5'>
    <body merchantId='1100016286' status='accepted'>
        <transaction trxStatus='response'>
            <request>
                <uppTransactionId>180611155111569292</uppTransactionId>
                <reqtype>STX</reqtype>
            </request>
            <response itemNr='1'>
                <responseCode>6</responseCode>
                <responseMessage>DOA Cancel</responseMessage>
                <refno>13222</refno>
                <amount>100</amount>
                <currency>CHF</currency>
                <authorizationCode>232262916</authorizationCode>
                <pmethod>SAM</pmethod>
                <uppTransactionId>180611155111569292</uppTransactionId>
                <maskedCC>****424242</maskedCC>
                <expm>06</expm>
                <expy>21</expy>
                <trxDate>20171002</trxDate>
                <trxTime>153232</trxTime>
                <trtype>05</trtype>
                <settledAmount>100</settledAmount>
            </response>
        </transaction>
    </body>
</statusService>