Order Validation API

Verify the status and details of a transaction using the SSLCommerz Validation API for maximum security.

Order Validation API

After knowing that the post keys are valid and no alteration was done with the request, now it is the time to validate your transaction for amount and transaction status. It will only be treated as valid if amount and transaction status are valid at SSL End.

So, Let's call the API and the example given below

REST API

Request Parameters

Param Name Data Type Description
val_id string (50) Mandatory - A Validation ID against the successful transaction which is provided by SSLCOMMERZ.
store_id string (30) Mandatory - Your SSLCOMMERZ Store ID.
store_passwd string (30) Mandatory - Your SSLCOMMERZ Store Password.
format string (10) json or xml. By default it returns json format.

Returned Parameters

Param Name Data Type Description
status string (20) Transaction Status.
  • VALID : A successful transaction.
  • VALIDATED : A successful transaction but called by your end more than once.
  • INVALID_TRANSACTION : Invalid validation id (val_id).
tran_id string (30) Transaction ID (Unique) that was sent by you during initiation.
amount decimal (10,2) The total amount.
bank_tran_id string (80) The transaction ID at Bank's End.

Sample Request

$ curl -X GET 'https://sandbox.sslcommerz.com/validator/api/validationserverAPI.php?val_id=1709162025351ElIuHtUtFReBwE&store_id=testbox&store_passwd=qwerty&format=json'
        

Security Check Points:

  • Track your order by transaction ID and check it in your database for existence.
  • Must validate amount and incoming amount from your Database.
  • Also check the currency type to avoid frauds.
  • Check for the status - VALID, FAILED, CANCEL to update your order status.