Praxis Wiki logo

Agent API {find-session}


This API method will be helpful to check the status of the Cashier login session initiated by {init-pay-in}. The session is limited to 15 minutes. However the transaction may end up with pending status and get it's final processing status after the session timeout.

The {find-session} method returns the list of transactions opened within the session. The method will result with error if the session is still open.

{danger.fa-exclamation-triangle} IMPORTANT: Signature does not include the values from the array of transaction objects

ENDPOINTS

Name URL
Sandbox https://pci-gw-test.praxispay.com/api/find-session
Live https://gw.praxisgate.com/api/find-session

REQUEST PARAMETERS

Variable Type Description
auth_token varchar(75) Required. Session identifier. Special token that allows the customer to login during 15 min
frontend varchar(256) Required. Cashier FrontEnd name, normally it is a common name of the website. Linked to a specific base currency.
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(75) Required. Accurate description of the result. Return the actual error for any exception as it helps to diagnose issues in production
version varchar(3) Required. API version
timestamp int(11) Required. Response time. URL will be active during 1 min after this time
signature varchar(96) Required. Response signature. Please refer to How to Build Signature for details on signing the request.
transactions Array(Object) Required. Array of objects representing the transactions that occurred within the session (see below - TRANSACTION OBJECT EXAMPLE)

TRANSACTION OBJECT EXAMPLE

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
order_id varchar(50) sale - Optional. Transaction identifier in your system
payout - Required. Transaction identifier in your system
frontend varchar(256) 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. Processed 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
payment_processor varchar(50) Required. Payment processor
created_by varchar(50) Optional. Transaction was created by
merchant_id varchar(50) Required. Merchant API client account identifier
card_number varchar(19) Optional. Customer card number (4444 44** **** 1233)
card_type varchar(10) Optional. Customer card type (VISA, MC)
card_exp varchar(8) Optional. Customer card exp (10/2023)
account_identifier varchar(256) Optional. CRM account identifier
cascade_level int(2) Optional. Transaction retry number
is_cascade int(1) Optional. Is this transaction goes through cascade
error_code int(10) Optional. Error code for rejected transactions
error_details varchar(256) Optional. Error description for rejected transactions
reference_id varchar(256) Optional. ID of transaction to reverse

EXAMPLE

For example below: Merchant Secret = "MerchantSecretKey"

Request

curl -X POST \ 
https://gateway.praxispay.com/api/find-session \
-H 'Content-Type: application/json' \
-d '{
    "frontend":"Praxis TEST USD",
    "auth_token": "a60927468a5b32afe31468d780c57a32",
    "merchant_id":"Test-Integration-Merchant",
    "timestamp":1568763057,
    "trace_id":1000000321,
    "version":"1.1",
    "signature":"9b9746639eba275f2351583bd71210706b9153cd571d07e5649cf26107ae451e7a9c0d8b127e97908abddd6a5624479e"
}'

Response (OK)

{
    "description":"Sessions found - 1",
    "status":0,
    "timestamp":1568854478,
    "transactions":[
        {
            "account_identifier":null,
            "amount":10300,
            "card_exp":null,
            "card_number":null,
            "card_type":null,
            "cascade_level":null,
            "created_by":"INTERNET",
            "currency":"USD",
            "edited_by":"INTERNET",
            "error_code":null,
            "error_desc":null,
            "order_id":null,
            "payment_method":null,
            "payment_processor":"PaySec",
            "pin":"27",
            "reference_id":null,
            "trace_id":1000000321,
            "transaction_id":null,
            "transaction_status":"approved"
        }
    ],
    "version":"1.1",
    "signature":"f8aef3edd0f2ee9972f26387e49cdc596710b60b8225d84e857765c5d233c69f9116a261864c4f92c0030c6e4a303343"
}

Response - Session not found (ERR)

{
    "description":"Session not found",
    "status":1,
    "timestamp":1568854001,
    "version":"1.1",
    "signature":"38f722ccbfb6d85fbd725fc732b084ba9415b48f123ac5a0c6f22dfcc623d7bfecac89cce75b12b93ca947d1a5566a3b"
}

Response - Session is still open (ERR)

{
    "description":"Session is still open",
    "status":1,
    "timestamp":1568854019,
    "version":"1.1",
    "signature":"65b1b0e5360cf05b6188856e6e2bdc2347281a47dd75d1735c2380ee44d2df361c7968dc1a062d27abf8728516831906"
}

Please refer to How to Build Signature for details on signing the request.

You are currently viewing version 3.3 Latest version here