Testing

Saferpay offers an extensive Sandbox, that allows you to simulate transactions, flows and other things, like Mail Phone Order, or the Secure PayGate. When integrating Saferpay, it is very benefitial, to create your own test-account. You can get your own test-account over here.

Everything you need will be sent to you via E-Mail, ncluding things like your test CustomerId, TerminalIds, the login for the Saferpay Test-Backoffice, API user and password etc.

Difference between the Test and Live environments

  • First and foremost, test and live are completely seperated systems. So everything you do on one or the other, cannot be transferred to the other system, like your transactions or your saved cards. Due to this, it is very important, that you also seperate your data accordingly and keep an eye on which system the data belongs to. If actions are performed with data, that does not belong to the respective system, the action will fail. This is so merchants may not confuse one system, with the other. For example by running on the test environment, whilst thinking they're live.

  • To reinforce this philosophy, Saferpay will not accept real credit cards on the test environment and vice versa! The test environment uses especially designed test-card, which can be found further down on this page, alongside information about the simulators.

  • Furthermore, the test environment only runs simulators, that will emulate the behavior of the given payment method. However, no real money will be transferred, of course.

  • The test environment will behave as closely to the live environment, as possible -aside the above mentioned differences-. To ensure this, every function and every URL is mirrored onto the test environment. For example the live backoffice can be found under https://www.saferpay.com/bo/login, whereas the test backoffice can be found under https://test.saferpay.com/bo/login. You can access any URL, by simply changing the www to test and vice versa. This also applies to API URLs. For example https://test.saferpay.com/api/Payment/v1/PaymentPage/Initialize and https://www.saferpay.com/api/Payment/v1/PaymentPage/Initialize. The JSON-Object structure is the same on both systems, making a switch as easy, as possible.

Simulators and Test cards

Saferpay offers an array of simulators and also connections to certain sandboxes.

In this chapter, you will find every information, you need in order to test and, if needed, activate your desired payment method for testing.

These test payment means only work on the Saferpay Test environment and not on any live-account/the production environment.

On production, you must use youir own, real payment means, like a credit card.

While we generally aim to make the simulators as intuitive, as possible:

They are simulators!

Not all test cases may be available, or are triggered the way you'd expect. All Saferpay Simulators do not connect to real sytems (especially important in cases, where a 3rd party is simulated) and thus do not perform end-to-end tests.

However Saferpay does offer the possibility to connect towards Sandboxes, if a 3rd party provider offers such an environment. Please contact the Integration Support, for information on the availability and how to connect towards a sandbox.

If you have questions, problems or other inquiries, about testing, please contact the Integration Support for help.

Account-to-Account Payments

Saferpay offers an A2A that is controlled via the amount and has the following values.

Authorization

Refund

Any other amount may result in a general success.

Please contact the Integration Support, if you want to test Account-to-Account Payments.

Alipay

Please contact the Integration Support, if you want to test Alipay.

American Express

It may be important to test certain flows and responses, during integration. For that, Saferpay offers the following test cards:

Apple Pay

Saferpay does offer an extensive Apple Pay simulator. All test-cases are controlled through the simulator-ui. Unlike production, you do not need an Apple device, or browser, to test Apple Pay!

Please refer to the Activation section, to see, how to activate Applepay on the test-environment.

Note, that the server-to-server method does not use the Saferpay simulator, but instead needs special test-cards provided by Apple, which you can find over here.

Please note: Only the Mastercard PANs are supported at this point!

Bancontact

It may be important to test certain flows and responses, during integration. For that, Saferpay offers the following test cards:

Bancontact uses an authentication-procedure similar to 3D Secure with VISA and MasterCard. However the difference is, that Bancontact will automatically refuse all payments, that aren't fully authenticated. Due to this, there are only these few outcomes possible.

Diners Club International & Discover Card

It may be important to test certain flows and responses, during integration. For that, Saferpay offers the following test cards:

Discover is tested as Diners, due to their similarities.

e-przelewy

Please contact the Integration Support, if you want to test e-przelewy.

eps

Please contact the Integration Support, if you want to test eps.

giropay

Saferpay does offer an extensive giropay simulator. All test-cases are controlled through the simulator-ui, when opening up the payment page.

Please contact the Integration Support, if you want to test giropay.

Google Pay

Simply activate Google Pay for your terminal on the test environment (see Google Pay Activation). That will take care of everything necessary for the Payment Page. Google Pay on the Payment Page also supports

Please only activate the Google Pay Simulator for testing. Activating standard Google Pay will lead to processing-issues and thusly does not work.

For the Server-to-Server method, you can use our normal test cards in conjunction with our Google Pay Token generator, in order to test GooglePay Server-To-Server, using the normal test-cases, our cards offer you. The generated payment tokens just simply have to be submitted to Saferpay, as described above.

iDEAL

Saferpay does offer an extensive iDEAL simulator. All test-cases are controlled through the simulator-ui, when opening up the payment page.

Please contact the Integration Support, if you want to test iDEAL.

Testing Cases

The following cases must be simulated via amount and not GUI. Simply do a redirect, without selecting a case on the GUI!

Values for testing Pre-Selection

The following values can be used, if you want to test the Bank Pre-Selection:

JCB

It may be important to test certain flows and responses, during integration. For that, Saferpay offers the following test cards:

Klarna Payments

Saferpay does offer an extensive Klarna Payments simulator and also the possibility, to work on the Klarna Sandbox. All test-cases are controlled through the ui, however you must follow the rules under Integration, or Klarna won't be displayed.

Please refer to the Activation section, to see, how to activate Klarna Payments on the test-environment.

Maestro International

It may be important to test certain flows and responses, during integration. For that, Saferpay offers the following test cards:

Mastercard

It may be important to test certain flows and responses, during integration. For that, Saferpay offers the following test cards:

paydirekt

Saferpay does offer an extensive paydirekt simulator. All test-cases are controlled through the simulator-ui, when opening up the payment page.

Please contact the Integration Support, if you want to test paydirekt.

PayPal

Saferpay does offer an extensive PayPal simulator. All test-cases are controlled through the simulator-ui, when opening up the payment page.

Postfinance Card & eFinance

Saferpay does offer an extensive Postfinance simulator, for Postfinance E-Finance and Postfinance Card. All test-cases are controlled through the simulator-ui. The Secure Card Data feature is also supported!

PostFinance Pay

Please contact the Integration Support, if you want to test PostFinance Pay.

SEPA Direct Debit

It may be important to test certain flows and responses, during integration. For that, Saferpay offers the following test IBANs:

Sofort by Klarna

Sofort only works via the Sofort Sandbox. In order to test Sofort, please follow the activation-guide here. However you also have to put your newely created project into Test Mode. Once you have activated your project in test-mode, please contact the Integration Support.

Please submit your Sofort project-details (Sofort CustomerId, ProjectId and Password), aswell as the Id of the test-terminal, you want Sofort to be activated on.

We recommend to use a seperate Project from your Live project! However if you decide to use the same project for both, make sure, that you de-activate Test Mode, once you go live. Otherwise, people will be able to "pay" in your shop, by using test-data!

Test-data will be provided by Sofort, once you have activated the Test Mode.

TWINT

On the test environment, Saferpay offers a TWINT Simulator for the Currencies CHF only, since this Payment Method is only avalable for the swiss market. The Simulator is controlled by submitting different amount-values to simulate the following cases:

The "Abort"-button does not work, unless a decline amount is set. It would result in an abort and then, after the 20 seconds (see below) are expired, the transaction is successful.

All test-cases are amount-controlled.

Any other amount will cause a success after 20 seconds!

UnionPay

Saferpay does offer an extensive UnionPay simulator. All test-cases are controlled through the simulator-ui, when opening up the Payment Page. However, you need to use the following test-card, in order to activate it: 9100104952000008.

Visa & V PAY

It may be important to test certain flows and responses, during integration. For that, Saferpay offers the following test cards:

V PAY is tested and processed as Visa.

WeChat Pay

Please contact the Integration Support, if you want to test WeChat Pay.

WL Crypto Payments

Saferpay does offer an extensive WL Crypto Payments simulator. Almost all test-cases are controlled through the simulator-ui, when opening up the payment page.

Please contact the Integration Support, if you want to test WL Crypto Payments.

The following test-cases must be controlled, via the Payment.OrderId:

Last updated