Skip to content

Transaction verification

Transaction verification is a way to call a script on one of your own web servers whenever a transaction is being processing. Verification is used in order to accept or decline a transaction.


Set up the verification

To receive a verification request from the Demo PSP system, pass verification_url in transaction request parameters.

{
    ....

    "verification_url":"https://your-domain.com/verification",

    ....
}

A verification request is similar to webhook request and use HTTP Basic authentication with Shop ID and Secret Key.

Accept or decline a transaction

Your web server should return the 200 HTTP status code and POST parameters in order to accept or decline a transaction.

Parameter Type Description
code * required
integer Set to 0 to accept the transaction. Set to any other code to decline the transaction.
uid * required
string Submit the UID copied from the request.
amount * required
integer Submit the amount copied from the request.
message string A message why the transaction is declined, if the value of code is other than 0.
friendly_message string A message to the customer to explain a reason for decline.
created_at string A response time in the ISO-8601 format.
Example of the response to accept a transaction
{
  "code":0,
  "uid": "35153123-9367e7e770",
  "amount": 100,
  "created_at": "2020-08-04T06:16:17.052Z"
}
Example of the response to decline a transaction
{
  "code":1,
  "uid": "36279632-7127y612a6",
  "amount": 100,
  "message":"IP validation failed",
  "friendly_message": "Your transaction is declined. For details please contact our customer service",
  "created_at": "2020-08-04T06:16:22.141Z"
}