# Transactions external validation

This feature allows you to validate or refuse end users payments, in real-time and based on your own criteria.

Info icon

Information – Treezor offers its own Transaction Rules Engine

Therefore, you no longer need to implement your criteria with the external validation.

Contact your Treezor Account Manager to find out which option works best for you.

# General process

The external validation process works as follows.

Transaction External Validation
  1. Authorization Request – The end user makes a purchase with a Card.
  2. External Validation Request – Treezor sends you an HTTP Request to a predefined endpoint of your own REST API.
  3. External Validation Response – Your software makes a decision based on your own criteria and returns the decision in the HTTP Response.
    • If you refuse, the transaction is declined.
    • If you fail to answer within the allowed timeframe, the transaction is declined.
    • If you accept, Treezor handles the Authorization request like it would normally (Authorized Balance verifications, MID/MCC restrictions, etc.).
  4. A cardtransaction.create webhook is sent. It includes the requestId of the External Validation request.
Info icon

Information – Your response must be provided within an allotted timeframe

The timeframe is defined on a per-client basis. In the absence of a response in the allotted time, the Authorization is automatically declined.

# Request example

A POST request is sent to your own API endpoint, as defined during the subscription to this feature.

# Response example

All requests must be answered to.

# If you approve the transaction

You can answer with the following JSON response

# If you refuse the transaction

You can answer with the following JSON response

# Responses Codes (responseCode)

You can anwser to an External Validation request with the following codes:

Code
yes checkmark AUTHORIZED
no cross DECLINED
no cross DECLINED_INSUFFICIENT_FUNDS
no cross DECLINED_LOCAL_CURRENCY_INVALID
no cross DECLINED_DATETIME_INVALID
no cross DECLINED_CARD_UNKNOW
no cross DECLINED_MCC_INVALID
no cross DECLINED_MERCHANTID_INVALID
no cross DECLINED_MERCHANT_CITY_INVALID
no cross DECLINED_MERCHANT_COUNTRY_INVALID
Info icon

Information – Other responses may occur

Any other response will be considered as DECLINED.

# Special case of Balances not managed by Treezor

In the use case where you manage the Balance and Authorized Balance yourself:

  • No funds withholding will take place, as Treezor doesn't manage the funds
  • At settlement, the funds will be debted or credited on your main Wallet (which should be provisioned accordingly).
Updated on: 4/12/2024, 2:32:53 PM