Praxis Wiki logo

Cashier API | Validation


Validation request is sent upon Cashier login (see InitPayIn, InitPayOut) when the customer has entered the payment details and submitted the deposit and payout request form. The validation call lets you apply the logic on the CRM side in order to confirm or reject this submission before the processing has been attempted.

REQUEST PARAMETERS

Variable Type Description
transaction_type varchar(8) Required. Transaction type. Allowed values are:
sale (deposit)
payout (withdrawal)
refund (return deposit funds)
transaction_status varchar(16) Required. pending - processing initiated, final response expected from PSP
requested - merchant action expected (approval)
transaction_id varchar(50) Optional. Transaction identifier in PSP
trace_id int(11) Required. Transaction identifier in Praxis
order_id varchar(50) sale - Optional. Transaction identifier in your system
payout - Required. Transaction identifier in your system
frontend varchar(50) Required. Cashier FrontEnd name, normally it is a common name of the website. Linked to a specific base currency.
pin varchar(50) Required. Unique customer id in your system
amount int(20) Required. Amount in cents.
Please note: for certain currencies (JPY, CLP, KRW, VND, BHD, IQD, JOD, LYD, OMR, TND) the amount is sent as-in without being converted to cents, this is important if you multiply by 100 to send the amount in cents
currency varchar(10) Required. Payment currency
payment_method varchar(50) Required. Payment method
created_by varchar(50) Optional. Transaction was created by
auth_token varchar(75) Optional. Auth token provided upon Cashier session init call
merchant_id varchar(50) Required. Merchant API client account identifier
version varchar(3) Required. API version
timestamp int(11) Required. Request time. URL will be active during 1 min after this time
signature varchar(96) Required. Request signature. Please refer to How to Build Signature for details on signing the request.

RESPONSE PARAMETERS

Variable Type Description
status int Required.
- 0 if the request was successful
- Negative integer if internal server/network error occurs
- Positive integer if application/logical error occurs
description varchar(256) Required. Accurate description of the result. Return the actual error for any exception as it helps to diagnose issues in production
signature varchar(256) Required. Hash of the response parameters

EXAMPLE

For example below: Merchant Secret = "MerchantSecretKey"

Request

curl -X POST \ https://merchant-site.com/praxis/validation \
-H 'Content-Type: application/json' \
-d '{
    "amount":1200,
    "auth_token":"a60927468a5b32afe31468d780c57a32",
    "created_by":"INTERNET",
    "currency":"EUR",
    "frontend":"Praxis TEST USD",
    "merchant_id":"Test-Integration-Merchant",
    "order_id":null,
    "payment_method":"VISA",
    "pin":"7",
    "timestamp":1560932472,
    "trace_id":null,
    "transaction_id":null,
    "transaction_status":"pending",
    "transaction_type":"sale",
    "version":"1.1",
    "signature":"9ba4889832ad368490068f682e233587020b4721f877f4ea696eb69bf5140b540fc169d4e26548ce122404fb375d0378"
}'    

Response (OK)

{
    "description":"Success",
    "status":0,
    "timestamp":1560861455,
    "version":"1.1",
    "signature":"449769a52977210706273133ff9dfb3709c6e2ad25980376d60820bc27b85d9a1df6a14e3bc4e42478851f26c07f8511"
}

Response (ERR)

{
    "description":"Deposit count exceeded",
    "status":1,
    "timestamp":1560861512,
    "version":"1.1",
    "signature":"5c96de757c0fa0ac6702d3860d878e140d0fdbceebcae73513d40aca297859d31d6cf62d0882403afedf00a778eb83f4"
}

You are currently viewing version 3.1 Latest version here