Presentation logo

Agent API | {find-order}


This API method will be helpful to check the status of the payment order initiated by {init-checkout}. The order is limited to 15 minutes of the Cashier session lifetime -or- at most one approved transaction within the session. However the transaction may end up with pending status and get it's final processing status after the session timeout.

The {find-order} method returns the transaction details in the response if the transaction has the status other than declined, unless the session has timed out and the latest declined transaction details are returned.

ENDPOINTS

Name URL
Sandbox https://gateway-test.praxispay.com/api/find-order
Live https://gateway.praxispay.com/api/find-order

REQUEST PARAMETERS

Variable Type Description
order_id varchar(50) 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.
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
transaction_type varchar(8) Required. Transaction type. Allowed values are:
sale (deposit)
payout (withdrawal)
refund (return deposit funds)
transaction_status varchar(16) Required.

Deposit
- pending - processing initiated, final response expected from PSP
- authorized - transaction authorized, capture is expected
- approved - processing was successful
- declined - processing failed
- chargeback - customer requested to get funds back
- reversed - refund done at PSP side

Payout
- requested - merchant action/approval expected
- authorized - transaction authorized by manager, manual processing is expected
- in progress - processing at PSP side
- approved - processing was successful
- rejected - processing cancelled by the merchant or client
- reversed - refund done at PSP side
transaction_id varchar(50) Optional. Transaction identifier in PSP
trace_id int(11) Required. Transaction identifier in Praxis
order_id varchar(50) Optional. 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. 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(16) 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
version int(11) Required. API version
timestamp varchar(3) 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.

EXAMPLE

For example below: Merchant Secret = "MerchantSecretKey"

Request

curl -X POST \ 
https://api.merchant.com/v1/api/find-order \
-H 'Content-Type: application/json' \
-d '{
    "frontend":"Praxis TEST USD",
    "merchant_id":"Test-Integration-Merchant",
    "order_id":"deposit-12345",
    "timestamp":1568852538,
    "version":"1.1",
    "signature":"14a0ee795274676d79df09b1f01d0ea2f18d6b67d4b09859b0accbc5a97bd059ed02e8ae73dc136496bfbef561d139a2"
}'

Response (OK)

{
    "account_identifier":null,
    "amount":10300,
    "card_exp":null,
    "card_number":null,
    "card_type":null,
    "cascade_level":null,
    "created_by":"INTERNET",
    "currency":"USD",
    "description":"Order found",
    "edited_by":"INTERNET",
    "error_code":null,
    "error_desc":null,
    "order_id":null,
    "payment_method":null,
    "payment_processor":"PaySec",
    "pin":"27",
    "reference_id":null,
    "status":0,
    "timestamp":1568854216,
    "trace_id":1000000321,
    "transaction_id":null,
    "transaction_status":"approved",
    "version":"1.1",
    "signature":"265b8f6f6b5040437d15afa1ce4dda1bc9e97311f328420c77a0ce220a93bbcb0bf1df9be9fe4282fce9a914d1554933"
}

Response - Order not found (ERR)

{
    "description":"Order not found",
    "status":1,
    "timestamp":1568852739,
    "version":"1.1",
    "signature":"7dceed1232407ddb8212954103b403f6da1636c355e923003fdc2adb4fe6e72b3de8b145db2a38ebf1ee543e84bd4f17"
}

Response - Order is still open (ERR)

{
    "description":"Order is still open",
    "status":3,
    "timestamp":1568852834,
    "version":"1.1",
    "signature":"2bc4cbf7dbf32cce802045b70a1fe95e90a1d1754073a7ed9c0606dedeae08380caf74cb2867bd70ad94f08190c55305"
}

Response - Order timed out with no transactions (ERR)

{
    "description":"Order timed out with no transactions",
    "status":4,
    "timestamp":1568852931,
    "version":"1.1",
    "signature":"dd2b70127e13426826a9e32991244109f33a3eedec7559588aa335b5bcbe361d5a6cfecaeb30b2f2310fcda22f75793c"
}

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