Paysafecard
Payment Process | Integration | ||
---|---|---|---|
Authorization | ✔️ | Payment Page | ✔️ |
Deferred Settlement | ✔️ | Split Mode | ❌ |
Refund | ❌ | Mobile SDK | ❌ |
Cancel | ✔️ | ||
Alias | ❌ |
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 🔗
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'.
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
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>
Updated over 2 years ago