Praxis Wiki logo

Cashier API Validation


Validation request is sent upon Cashier login (see {init-pay-in}, {init-pay-out}) 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.

{danger.fa-exclamation} IMPORTANT: For {init-checkout} and {init-pay-out-order} the validation is not called because both assume that the customer is sent to Cashier to do at most one successful deposit or payout request for the predefined amount. So the validation is ommitted and only the notifications are sent for these methods.

REQUEST PARAMETERS

Variable Type Description
transaction_type varchar(16) 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
order_id varchar(50) Optional. Transaction identifier in your system
application_key varchar(32) Required. Identifier of your application (website)
pin varchar(50) Required. Unique customer id in your system
amount int(20) Required. Amount in cents.
Please note: for certain currencies (see full list here) there is a fraction other than 100 cents per unit, 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(32) 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(96) Required. Hash of the response parameters
version varchar(3) Required. API version
timestamp int(11) Required. Responce time

EXAMPLE

For example below: Merchant Secret = "MerchantSecretKey"

Request

curl -X POST https://api.merchant.com/praxis/validation/ \
-H 'Content-Type: application/json' \
-d '{
    "amount": 1200,
    "application_key": "Sandbox",
    "auth_token": "a60927468a5b32afe31468d780c57a32",
    "created_by": "INTERNET",
    "currency": "EUR",
    "merchant_id": "Test-Integration-Merchant",
    "order_id": null,
    "payment_method": "VISA",
    "pin": "7",
    "timestamp": 1578878687,
    "trace_id": null,
    "transaction_id": null,
    "transaction_status": "pending",
    "transaction_type": "sale",
    "version": "1.2",
    "signature": "1631c64c3fdebd18ae9dd1462eecfb6fa62b7913efebcbe0b36187ec76503b80762604dd3708dd6c6a355c3d57fe8ba6"
}'    

Response (OK)

{
    "description": "Success",
    "status": 0,
    "timestamp": 1579214373,
    "version": "1.2",
    "signature": "f4ffb09f9203f8f20a5050929e3a6b3f7560fb0001f550ea7cc56bbffd5d818eca4eaaa3a85771f1c583f043a5b4fda9"
}

Response (ERR)

{
    "description": "Deposit count exceeded",
    "status": 1,
    "timestamp": 1579214385,
    "version": "1.2",
    "signature": "af1619ab813b67f825081c5ced1ef2b6af903f91b2d77d320a96ab89d507eb79869516a55400790fb32be28cc33b231c"
}

You are currently viewing version 3.4 Latest version here