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!

Paysafecard

paymentmethod=PSC

paymentmethod=PSC

Payment Process
Integration

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+:

Try it

Don't worry you wont be charged

Pay EUR 1.00

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 Byjuno
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'.

Description
Value

Maximum length for mtid

60 characters

Recommended value for mtid

up to 20 characters

Allowed characters

A-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 (Webook)
Invokes merchant's<br>POST URL (Webook)
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="1">
  <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='1'>
    <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="1">
  <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='1'>
    <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="3">
  <body merchantId="1000011011">
    <transaction>
      <request>
        <uppTransactionId>180831111523445920</uppTransactionId>
        <reqtype>STX</reqtype>
      </request>
    </transaction>
  </body>
</statusService>
EOF

Response

<statusService version='3'>
    <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>

Paysafecard


Suggested Edits are limited on API Reference Pages

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