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

Paysafecard

120

paymentmethod=PSC

Payment ProcessIntegration
Authorization:heavy-check-mark:Payment Page:heavy-check-mark:
Deferred Settlement:heavy-check-mark:Split Mode:x:
Refund:x:Mobile SDK:x:
Cancel:heavy-check-mark:
Alias:x:

Description

paysafecard is the leading prepaid card in Europe and a worthwhile addition to the methods of payment for your internet shop.
Payment Method provider website :link:

📘

Request and response parameter reference

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

Test

Paysafe Test PIN (Test Credentials)

PIN: 7740228278243675 (EUR)

Currencies Available for Testing

It is currently only possible to test payments through Paysafecard with the currencies EUR and CHF. For payment tests using CHF, you may use the same Test PIN provided. Please contact us should you receive the error '10015'. This error means, that your account at Datatrans or at Paysafe is currently not correctly configured for the currency sent.

Unique Transaction Identifier

To avoid further errors, please make sure to send a unique reference identifier (Datatrans Reference Parameter: refno) for each transaction. The reference parameter sent to our systems will be forwarded to Paysafe as the parameter mtid (Paysafe's unique identifier for each disposition). Below are the requirements and suggestions for Paysafecard's mtid. If you wish to add Paysafecard to your checkout, you will have to make sure to follow the following additional requirements for our parameter refno. If you send a mtid which was previously used by another transaction, you may encounter the error '2001'.

DescriptionValue
Maximum length for mtid60 characters
Recommended value for mtidup to 20 characters
Allowed charactersA-Z, a-z, 0-9 as well as – (hyphen) and _ (underline)

Web payment flow

 1 
[Not supported by viewer]
Customer clicks Pay
Customer clicks Pay
Merchant Website
Merchant Website
Merchant Server
Merchant Server
(Customer selects paysafe on payment page) 
Redirects to Paysafe
[Not supported by viewer]
Paysafe
Paysafe<br>
Customer enters paysafe PIN
[Not supported by viewer]
 2 
[Not supported by viewer]
 4 
[Not supported by viewer]
Authorization / Forwarding
Authorization / Forwarding
 5 
[Not supported by viewer]
Receives Result 
Receives Result 
5.1
[Not supported by viewer]
 6 
[Not supported by viewer]
Invokes merchant's
POST URL (Webhook)
Invokes merchant's<br>POST URL (Webhook)
Receives Result 
Receives Result 
 7 
[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]

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

The authorization is only possible through the web interface.

Settlement

The settlement request has to follow the authorization within one hour, except if there is a different agreement with Paysafecard.

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="1000011011">
    <transaction refno="1535706921278">
      <request>
        <amount>100</amount>
        <currency>EUR</currency>
        <uppTransactionId>180831111523445920</uppTransactionId>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='2'>
    <body merchantId='1000011011' status='accepted'>
        <transaction refno='1535706921278' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>EUR</currency>
                <uppTransactionId>180831111523445920</uppTransactionId>
                <reqtype>COA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>settlement succeeded</responseMessage>
            </response>
        </transaction>
    </body>
</paymentService>

Credit

Credit option not available

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="1000011011">
    <transaction refno="1535707318487">
      <request>
        <amount>100</amount>
        <currency>EUR</currency>
        <uppTransactionId>180831112159869446</uppTransactionId>
        <reqtype>DOA</reqtype>
      </request>
    </transaction>
  </body>
</paymentService>

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='2'>
    <body merchantId='1000011011' status='accepted'>
        <transaction refno='1535707318487' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>EUR</currency>
                <uppTransactionId>180831112159869446</uppTransactionId>
                <reqtype>DOA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>02</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
<statusService version="5">
  <body merchantId="1000011011">
    <transaction>
      <request>
        <uppTransactionId>180831111523445920</uppTransactionId>
        <reqtype>STX</reqtype>
      </request>
    </transaction>
  </body>
</statusService>
EOF

Response

<statusService version='5'>
    <body merchantId='1000011011' status='accepted'>
        <transaction trxStatus='response'>
            <request>
                <uppTransactionId>180831111523445920</uppTransactionId>
                <reqtype>STX</reqtype>
            </request>
            <response itemNr='1'>
                <responseCode>21</responseCode>
                <responseMessage>Trx already settled</responseMessage>
                <refno>1535706921278</refno>
                <amount>100</amount>
                <currency>EUR</currency>
                <authorizationCode>537475983</authorizationCode>
                <pmethod>PSC</pmethod>
                <uppTransactionId>180831111523445920</uppTransactionId>
                <maskedCC></maskedCC>
                <aliasCC></aliasCC>
                <expm></expm>
                <expy></expy>
                <trxDate>20180831</trxDate>
                <trxTime>111523</trxTime>
                <trtype>05</trtype>
                <settledAmount>100</settledAmount>
            </response>
        </transaction>
    </body>
</statusService>