Skip to content

Testing of receiving payments

The present API supports working with dozens of online payment systems, and we strongly recommend you to test the receiving of payments for you shop before its running. In order to avoid testing with real payments Demo PSP API supports pseudo request mechanism for testing purposes that allows to confirm you that everything is fine with the receiving of payments.

You can test the user's actions on the payment method site (check status depending on user's actions on site) or the proper operation of Demo PSP API independently of user's activity on the payment method site. Let's look at this closer.

To initiate testing the payment for your shop and to check that the right result is received depending on user's actions on site you need to add parameter test: true to payment request and also add testing data of specific payment method, if available, to the request. Testing data are submitted in the method section instead of real data, after which the prepared request is sent to the appropriate Demo PSP API URL. If all parameters in the request are correct you could go to the test online payment method site, make the payment (successfully or not, as you wish) and check that your shop receives the correct status.

Info

For test of receiving payment independently of user's actions on payment method sites you need add to request to API the following argument:

"method":{ "type":"bogus" }

In case of accepting this parameter Demo PSP API will check the value of amount parameter and depending on its value will return specific status. If the value is 0 < amount < 10000 Demo PSP API will return status successful. If the value is 10000 < amount < 20000 Demo PSP API will return status failed.