Contents

paysafecard

 

This page explains how to configure your site to accept transactions using paysafecard.

 

PAYMENT PAYSAFECARD
What is paysafecard?

 

  • A “paysafecard” is a pre-paid card that can be purchased by your customers from sales outlets worldwide (e.g. at PayPoint outlets). Each paysafecard contains a unique PIN that the customer can enter on the checkout page in order to complete a purchase.

 

  • “my paysafecard” is a personal online payments account to help customers keep track of multiple paysafecard PINs. The customer can opt to sign in to their “my paysafecard” account at time of purchase, which allows them to pay with paysafecard PINs stored on their account.

Info
Why implement paysafecard?

  • Customers can pay online without entering any personal information, bank or credit card details.
  • Funds are settled into your account immediately.
  • paysafecard is available worldwide at 500,000 sales outlets.
  • Customers can combine up to ten PINs to pay larger amounts.

 

Features

Supported customer countries No restrictions on customer countries.
Supported currencies
ARS, AUD, BGN, CAD, CHF, CZK, DKK, EUR, GBP, HRK, HUF, MXN, NOK, NZD, PEN, PLN, RON, SEK, TRY, USD, UYU
Protect Plus Supported.
Refunds Refunds not supported.
Chargebacks
Payments are not subject to chargebacks.

 


 

Configuration

To enable paysafecard on your account, please get in touch with your account manager.
A test sandbox account will be provided, which you will need when testing your implementation.

 


 

Process overview

What will the customer see?

  • During the checkout process, your website presents paysafecard as a payment method.
  • The customer selects their preferred delivery address on your checkout page and opts to pay using paysafecard.
  • The customer is redirected to paysafecard, where they either enter their PIN(s), or signs into their “my paysafecard” account.
  • The customer reviews their order and agrees to the payment on paysafecard.
  • The customer is redirected to your website, where a confirmation is displayed (e.g. “Payment successful”).

 

 

How does it work behind the scenes?

The paysafecard payment flow can be split into three main parts, as shown below:

1

Initiate the customer

2

Redirect to paysafecard

3

Processing the authorisation

 


 

1. Initiate the customer

When the customer chooses to pay with paysafecard, your system will need to perform an ORDER request and interpret the response returned.

 

ORDER request example


#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

order = {
    "currencyiso3a": "GBP",
    "requesttypedescriptions": ["ORDER"],
    "accounttypedescription": "ECOM",
    "sitereference": "test_site12345",
    "baseamount": "2001",
    "paymenttypedescription": "PAYSAFECARD",
    "returnurl": "https://yourwebsite.com",
    "cancelurl": "https://yourwebsite.com",
    "billingid": "000001",
    "paysafeminage": "18",
    "paysafekyclevel": "SIMPLE",
    "paysafecountryrestriction": "DE"
}

strequest = securetrading.Request()
strequest.update(order)
stresponse = st.process(strequest) #stresponse contains the transaction response
<?php

if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
  throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);

$configData = array(
    'username' => '[email protected]',
    'password' => 'Password1^'
);

$requestData = array(
    'currencyiso3a' => 'GBP',
    'requesttypedescriptions' => array('ORDER'),
    'accounttypedescription' => 'ECOM',
    'sitereference' => 'test_site12345',
    'baseamount' => '2001',
    'paymenttypedescription' => 'PAYSAFECARD',
    'returnurl' => 'https://yourwebsite.com',
    'cancelurl' => 'https://yourwebsite.com',
    'billingid' => '000001',
    'paysafeminage' => '18',
    'paysafekyclevel' => 'SIMPLE',
    'paysafecountryrestriction' => 'DE'
);

$api = Securetradingapi($configData);
$response = $api->process($requestData);
var_dump($response->toArray());

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
"alias": "[email protected]",
"version": "1.00",
"request": [{
    "currencyiso3a": "GBP",
    "requesttypedescriptions": ["ORDER"],
    "accounttypedescription": "ECOM",
    "sitereference": "test_site12345",
    "baseamount": "2001",
    "paymenttypedescription": "PAYSAFECARD",
    "returnurl": "https://yourwebsite.com",
    "cancelurl": "https://yourwebsite.com",
    "billingid": "000001",
    "paysafeminage": "18",
    "paysafekyclevel": "SIMPLE",
    "paysafecountryrestriction": "DE"
}]}'

 

ORDER response example


{
  u 'requestreference': u 'A0bxh87wt',
    u 'version': u '1.00',
    u 'responses': [{
      u 'transactionreference': u '72-32-20002',
      u 'paymenttypedescription': u 'PAYSAFECARD',
      u 'settleduedate': u '2016-12-23',
      u 'transactionstartedtimestamp': u '2016-12-23 15:35:40',
      u 'errormessage': u 'Ok',
      u 'accounttypedescription': u 'ECOM',
      u 'errorcode': u '0',
      u 'customerredirecturl': u 'https://www.paysafecard.com/etc',
      u 'requesttypedescription': u 'ORDER',
      u 'settlestatus': u '0',
      u 'operatorname': u '[email protected]',
      u 'livestatus': u '0',
      u 'paysafeminage': u '18',
      u 'paysafekyclevel': u 'SIMPLE',
      u 'paysafecountryrestriction': u 'DE',
      u 'paysafeid': u '23842'
    }]
}
array(3) {
    ["requestreference"] => string(9) "A349bdehj"
    ["version"] => string(4) "1.00"
    ["responses"] =>array(1) {
    [0] => array(16) {
        ["transactionreference"] => string(11) "72-32-20002"
        ["paymenttypedescription"] => string(11) "PAYSAFECARD"
        ["settleduedate" ]=> string(10) "2016-12-23"
        ["transactionstartedtimestamp"] => string(19) "2016-12-23 15:35:40"
        ["errormessage"] => string(2) "Ok"
        ["accounttypedescription"] => string(4) "ECOM"
        ["errorcode"] => string(1) "0"
        ["customerredirecturl"] => string(137) "https://www.paysafecard.com/etc"
        ["requesttypedescription"] => string(5) "ORDER"
        ["settlestatus"] => string(1) "0"
        ["operatorname"] => string(23) "[email protected]"
        ["livestatus"] => string(1) "0"
        ["paysafeminage"] => string(2) "18"
        ["paysafekyclevel"] => string(6) "SIMPLE"
        ["paysafecountryrestriction"] => string(2) "DE"
        ["paysafeid"] => string(5) "23842"
    }
  }
}
{
  "requestreference": "W23-fjgvn3d8",
  "version": "1.00",
  "response": [{
    "transactionreference": "72-32-20002",
    "paymenttypedescription": "PAYSAFECARD",
    "settleduedate": "2016-12-23",
    "transactionstartedtimestamp": "2016-12-23 15:35:40",
    "errormessage": "Ok",
    "accounttypedescription": "ECOM",
    "errorcode": "0",
    "customerredirecturl": "https://www.paysafecard.com/etc",
    "requesttypedescription": "ORDER",
    "settlestatus": "0",
    "operatorname": "[email protected]",
    "livestatus": "0",
    "paysafeminage": "18",
    "paysafekyclevel": "SIMPLE",
    "paysafecountryrestriction": "DE",
    "paysafeid": "23842"
  }],
  "secrand": "zO9"
}

 

Field specification

Key

Field name Type Length Request Response Description
accounttypedescription Alpha 20 Only “ECOM” (e-commerce) is supported for paysafecard transactions.
baseamount Numeric 11 The amount of the transaction in base units, with no commas or decimal points, so £10 is submitted as 1000. This value must be greater than zero.
billingid Alphanumeric 100 An id provided by you, used to identify the customer.

 You must always submit a billingid:

  • Each customer must be assigned a unique id.
  • This id must be re-used by returning customers.
cancelurl URL 500 The URL that the customer will be returned to if they cancel the authorisation while on paysafecard’s servers.
currencyiso3a Alpha 3 The currency that the transaction will be processed in. paysafecard transactions can be processed in the following currencies:

ARS, AUD, BGN, CAD, CHF, CZK, DKK, EUR, GBP, HRK, HUF, MXN, NOK, NZD, PEN, PLN, RON, SEK, TRY, USD, UYU

Click here for further information on currency codes.

customerredirecturl URL 500 You will need to redirect the customer’s browser to this URL to continue with the payment.
errorcode Numeric 1-5 The error code should be used to determine if the request was successful or not.

  • If the error code is “0” then the transaction was successful.
  • If the error code is not “0” then the transaction was not successful.

Click here for a full list of errorcode and message values.

orderreference Alphanumeric
including
symbols
255 Your unique order reference that can be stored on Secure Trading’s system.
paymenttypedescription Alpha 20 The value in the request must be “PAYSAFECARD”. This will be returned in the response.
paysafecountryrestriction Alpha 2 Restricts the payment to be processed exclusively from the country specified (in iso2a format).

e.g. “GB” for United Kingdom.

Click here for a full list of country codes.

paysafeid Alphanumeric 255 A unique id assigned to the transaction by paysafecard. You can store these ids for future correspondence with paysafecard.
paysafekyclevel Alpha 6 Specifies the required KYC level for the “my paysafecard” account holder. There are two levels:

  • SIMPLE” – The customer has successfully completed the initial registration process and confirmed their mobile number and email address.
  • FULL” – In addition to the above, the customer has also provided proof of identification (e.g. passport, driving license) and proof of address (e.g. utility bill).
paysafeminage Numeric 3 Specifies the minimum age of the “my paysafecard” account holder.

e.g. To restrict to over-18s only, submit “18” in this field.

requesttypedescriptions Alpha 255 You must submit “ORDER”, as shown in the request example.*In the response, the field ‘requesttypedescription’ is returned instead e.g. “requesttypedescription”:”ORDER”
returnurl URL 2048 The URL that the customer will be returned to following a successful authorisation.
sitereference Alphanumeric including
underscore
50 The site reference relates to your individual account which you received on setup. If you do not know your site reference, please contact our Support team.

 


 

2. Redirect to paysafecard

After successfully submitting an ORDER Request, your system will be returned a customerredirecturl in the response. Your system will need to redirect the customer to this URL, which is a page hosted by paysafecard, in order to process the payment.

When testing, you will be redirected to paysafecard’s sandbox page, which simulates the page that will be displayed to your customers (screenshot below).

The customer will be offered the choice between either:

The customer can proceed with the payment by clicking the “Pay” button.

User
If you specify certain restrictions in the ORDER Request (e.g. a minimum age requirement), the customer may be forced to sign in to their “my paysafecard” account to verify their details (e.g. to check their age). For further information, please refer to paysafecard’s own resources.

 

If successful authentication

The customer’s browser is redirected to the returnurl specified in the ORDER Request.

Warning
The payment is not completed until you successfully process the AUTH request described below.
You must wait for the customer to return from paysafecard to the returnurl hosted on your servers before continuing.

 

If customer cancels

The customer can cancel by clicking the cross in the upper-right. This redirects the customer’s browser to the cancelurl specified in the ORDER Request. You can then provide alternative methods of payment. If the customer wants to try again with paysafecard, you must start again by submitting a new ORDER Request.

 

Info
When testing, you will be displayed the sandbox as provided by paysafecard. To complete a test transaction, you will need to follow the instructions displayed on screen. Please contact your account manager for test credentials to enter while on the sandbox.

 


 

3. Processing the authorisation

Status attention
If the customer is redirected to the cancelurl:
Present your customer with alternative payment methods so they can try again.
Status good
If the customer is redirected to the returnurl:
Follow the instructions below.

 

AUTH request example

This example demonstrates how to process an AUTH request for paysafecard.


#!/usr/bin/python
import securetrading

stconfig = securetrading.Config()
stconfig.username = "[email protected]"
stconfig.password = "Password1^"
st = securetrading.Api(stconfig)

auth = {
    "requesttypedescriptions": ["AUTH"],
    "sitereference": "test_site12345",
    "parenttransactionreference": "72-32-20002",
    "paymenttypedescription": "PAYSAFECARD"
}

strequest = securetrading.Request()
strequest.update(auth)
stresponse = st.process(strequest) #stresponse contains the transaction response
<?php

if (!($autoload = realpath(__DIR__ . '/../../../autoload.php')) && !($autoload = realpath(__DIR__ . '/../vendor/autoload.php'))) {
  throw new Exception('Composer autoloader file could not be found.');
}
require_once($autoload);

$configData = array(
    'username' => '[email protected]',
    'password' => 'Password1^'
);

$requestData = array(
                'requesttypedescriptions' => array('AUTH'),
                'sitereference' => 'test_site12345',
                'parenttransactionreference' => '72-32-20002',
                'paymenttypedescription' => 'PAYSAFECARD'
);

$api = Securetradingapi($configData);
$response = $api->process($requestData);
var_dump($response->toArray());

?>
curl --user [email protected]:Password1^ https://webservices.securetrading.net/json/ -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{
	"alias": "[email protected]",
	"version": "1.00",
	"request": [{
                "requesttypedescriptions": ["AUTH"],
                "sitereference": "test_site12345",
                "parenttransactionreference": "72-32-20002",
                "paymenttypedescription": "PAYSAFECARD"
		}]
}'

 

AUTH response example

Here is an example of an AUTH response for paysafecard.


{
  u 'requestreference': u 'A0dcb11e6',
    u 'version': u '1.00',
    u 'responses': [{
      u 'transactionreference': u '72-32-20004',
      u 'merchantname': u 'Test Merchant',
      u 'paymenttypedescription': u 'PAYSAFECARD',
      u 'transactionstartedtimestamp': u '2016-12-23 15:36:31',
      u 'errormessage': u 'Ok',
      u 'parenttransactionreference': u '72-32-20003',
      u 'accounttypedescription': u 'ECOM',
      u 'errorcode': u '0',
      u 'settleduedate': u '2017-05-30',
      u 'currencyiso3a': u 'GBP',
      u 'baseamount': u '2001',
      u 'requesttypedescription': u 'AUTH',
      u 'operatorname': u '[email protected]',
      u 'livestatus': u '0',
      u 'settlestatus': u '0',
      u 'paysafeminage': u '18',
      u 'paysafekyclevel': u 'SIMPLE',
      u 'paysafecountryrestriction': u 'DE',
      u 'paysafeid': u '23842'
    }]
}
array(3) {
  ["requestreference"] => string(9) "A58cdfkpy"
  ["version"] => string(4) "1.00"
  ["responses"] => array(1) {
      [1] =>array(19) {
        ["transactionreference"] => string(11) "72-32-20004"
        ["merchantname"] => string(13) "Test Merchant"
        ["paymenttypedescription"] => string(11) "PAYSAFECARD"
        ["transactionstartedtimestamp"] => string(19) "2016-12-23 15:36:31"
        ["errormessage"] => string(2) "Ok"
        ["parenttransactionreference"] => string(11) "72-32-20003"
        ["accounttypedescription"] => string(4) "ECOM"
        ["errorcode"] => string(1) "0"
        ["settleduedate"] => string(10) "2017-05-30"
        ["currencyiso3a"] => string(3) "GBP"
        ["baseamount"] => string(4) "2001"
        ["requesttypedescription"] => string(4) "AUTH"
        ["operatorname"] => string(23) "[email protected]"
        ["livestatus"] => string(1) "0"
        ["settlestatus"] => string(1) "0"
        ["paysafeminage"] => string(2) "18"
        ["paysafekyclevel"] => string(6) "SIMPLE"
        ["paysafecountryrestriction"] => string(2) "DE"
        ["paysafeid"] => string(5) "23842"
      }
  }
}
{
  "requestreference": "W23-fjgvn3d8",
  "version": "1.00",
  "response": [{
            "transactionreference": "72-32-20004",
            "merchantname": "Test Merchant",
            "paymenttypedescription": "PAYSAFECARD",
            "transactionstartedtimestamp": "2016-12-23 15:36:31",
            "errormessage": "Ok",
            "parenttransactionreference": "72-32-20003",
            "accounttypedescription": "ECOM",
            "errorcode": "0",
            "settleduedate": "2017-05-30",
            "currencyiso3a": "GBP",
            "baseamount": "2001",
            "requesttypedescription": "AUTH",
            "operatorname": "[email protected]",
            "livestatus": "0",
            "settlestatus": "0",
            "paysafeminage": "18",
            "paysafekyclevel": "SIMPLE",
            "paysafecountryrestriction": "DE",
            "paysafeid": "23842"
  }],
  "secrand": "zO9"
}

 

Field specification

The following table describes the fields required in an AUTH request for paysafecard, and the important fields to check in the response returned.

Info
As the response follows the same structure as a standard AUTH response, most of the fields returned in the AUTH response have been omitted from the below. Click here for the full AUTH specification.

Key

Field name Type Length Request Response Description
errorcode Numeric 1-5 The error code should be used to determine if the request was successful or not.

  • If the error code is “0” then the transaction was successful.
  • If the error code is not “0” then the transaction was not successful.

Click here for a full list of errorcode and message values.

parenttransactionreference Alphanumeric
including
hyphens
25 In the request, submit the transactionreference of the preceding ORDER.

This field is returned in the response.

paymenttypedescription Alpha 20 The value in the request must be “PAYSAFECARD”. This will be returned in the response.
paysafecountryrestriction Alpha 2 The payment can only be processed for customers residing in the country returned (in iso2a format), if specified in the ORDER request.

e.g. “GB” for United Kingdom.

paysafeid Alphanumeric 255 A unique id assigned to the transaction by paysafecard. You can store these ids for future correspondence with paysafecard.
paysafekyclevel Alphanumeric 6 The required KYC level for the “my paysafecard” account holder, if specified in the ORDER request.

Either: “SIMPLE” or “FULL”.

paysafeminage Numeric 3 The minimum age of the “my paysafecard” account holder, if specified in the ORDER request.
requesttypedescriptions Alpha 255 * You must submit “AUTH”, as shown in the request example.*In the response, the field ‘requesttypedescription’ is returned instead e.g. “requesttypedescription”:”AUTH”
settlestatus Numeric 3
  • “100” indicates funds will be captured immediately.
  • “3” indicates the request was unsuccessful.
sitereference Alphanumeric
including underscore
50 The site reference identifies your Secure Trading account.

 


 

Settlement

Provided the requests were successful, the funds are settled immediately after the customer has completed the payment. You will not be able to cancel or otherwise update paysafecard transactions after you have submitted the AUTH request.


 

Additional notes

Fraud-prevention

Fraud and duplicate checks

Fraud and duplicate checks are not performed on paysafecard transactions.

 

Address Verification Service (AVS) checks

AVS checks cannot be performed on paysafecard transactions.

 

Protect Plus

Protect Plus can be enabled on your account to check the billing details submitted by the customer. Click here for further information.

 

Frozen cards

At the customer’s request, paysafecards can be “frozen”, to prevent all further purchases. Click here for further information.

 

If the customer fails to enter their PIN

After performing the ORDER request and receiving a successful response, the customer will have 30 minutes to enter their payment details on paysafecard’s website, after which the payment will be flagged as “expired” by paysafecard, and the customer will need to start again with a new ORDER.

 

Currencies

The following is a list of currencies that we support when processing paysafecard transactions:

ARS, AUD, BGN, CAD, CHF, CZK, DKK, EUR, GBP, HRK, HUF, MXN, NOK, NZD, PEN, PLN, RON, SEK, TRY, USD, UYU

Before you can process paysafecard transactions in any of these currencies, you must first ensure that they are enabled on your paysafecard account.

 

Account type

Only “ECOM” (e-commerce) is supported as the account type for paysafecard transactions. The customer must be present at time-of-purchase to enter their PIN, or to sign in to their account.

 

iframes

The paysafecard-hosted page can be hosted in an iframe.

Always allow vertical scrolling or dynamic sizing. Maximum height of 840px.

paysafecard’s payment page is optimised automatically for mobile devices.

If a customer is using a device with a resolution with width smaller than 600px, a payment panel optimised for mobile devices will be automatically shown. This is also the case if the embedded iframe has a smaller width than 600px.