Praxis Wiki 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 rejected, unless the session has timed out and the latest rejected transaction details are returned.

ENDPOINTS

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

REQUEST PARAMETERS

Variable Type Description
order_id varchar(50) Required. Transaction identifier in your system
application_key varchar(32) Required. Identifier of your application (website)
merchant_id varchar(50) Required. Merchant API client account identifier
version varchar(3) Required. API version
timestamp varchar(16) 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
order_status varchar(16) Required. - pending - session is open
- authorized - transaction authorized within session, capture is expected
- approved - session closed with successful transaction
- rejected - session closed due to time restrictions, no approved transactions made
transaction_type varchar(16) Required. Transaction type. Allowed values are:
sale (deposit)
payout (withdrawal)
refund (return deposit funds)
authorize (authorization and capture)
transaction_status varchar(16) Required.

Deposit
- pending - processing initiated, final response expected from PSP
- pending_async - customer is sent to 3DSecure verification or EWallet to finalize the transaction
- authorized - transaction authorized, capture is expected
- approved - processing was successful
- declined (obsolete)- processing failed
- rejected - processing failed
- chargeback - customer requested to get funds back
- reversed - refund done at PSP side
- cancelled - transaction cancelled by agent (manager) using the Agent API or the merchant dashboard at Praxis
- error - processing or configuration error

Payout
- requested - merchant action/approval expected
- pending_async - customer is sent to 3DSecure verification or EWallet to finalize the transaction
- 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
- error - processing or configuration error
transaction_id varchar(50) Optional. PSP transaction identifier
trace_id int(11) Required. transaction identifier
order_id varchar(50) sale - Optional. Transaction identifier in your system
payout - Required. 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. Transaction 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(3) Required. Transaction currency
charge_amount int(20) Required. Amount (in actual processing currency) 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
charge_currency varchar(3) Required. Actual currency processed
payment_method varchar(50) Required. Payment method
payment_processor varchar(50) Required. Payment processor
gateway varchar(32) Optional. Gateway doing the processing
created_by varchar(50) Optional. Transaction was created by
edited_by varchar(50) Optional. Transaction was edited by
auth_token varchar(32) Optional. Auth token provided upon Cashier session init call
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 (AMEX, DinersClub, Discover, Electron, JCB, Maestro, MasterCard, Mir, VISA)
card_exp varchar(8) Optional. Customer card exp (10/2023)
account_identifier varchar(256) Optional. Customer account ID or login at PSP
cascade_level int(2) Optional. Transaction retry number
is_cascade int(1) Optional. Is this transaction goes through cascade
error_code varchar(32) Optional. Error code for rejected transactions
error_details varchar(256) Optional. Error description for rejected transactions
reference_id int(11) Optional. ID of transaction to reverse
version varchar(16) Required. API version
timestamp int(11) Required. Request time. URL will be active during 1 min after this time
variable1 varchar(256) Optional. Your custom field which will consist some neсessary information
variable2 varchar(256) Optional. Your custom field which will consist some neсessary information
signature varchar(96) Required. Request 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://gateway.praxispay.com/api/find-order \
-H 'Content-Type: application/json' \
-d '{
    "application_key": "Sandbox",
    "merchant_id": "Test-Integration-Merchant",
    "order_id": "deposit-12345",
    "timestamp": 1578880072,
    "version": "1.2",
    "signature": "18d9d0be7968c88eeca38494c0fdd5f5857244e14440ea5fcfabfd4c3d20dfeaf80e8db59d43f3cc7f2cc6be5579e913"
}'

Response (OK)

{
    "account_identifier": null,
    "amount": 2500,
    "application_key": "Sandbox",
    "auth_token": "a60927468a5b32afe31468d780c57a32",
    "card_exp": "12\/2024",
    "card_number": "411111******1111",
    "card_type": "VISA",
    "cascade_level": null,
    "created_by": "INTERNET",
    "currency": "EUR",
    "description": "Order found",
    "edited_by": "INTERNET",
    "error_code": null,
    "error_details": null,
    "gateway": "s-pTSZyK23E1Ee5KZpcNbX_aFl0HuhQ0",
    "merchant_id": "Test-Integration-Merchant",
    "order_id": null,
    "payment_method": null,
    "payment_processor": "TestPP",
    "pin": "7",
    "reference_id": null,
    "session_status": "approved",
    "status": 0,
    "timestamp": 1578878718,
    "trace_id": 756850,
    "transaction_id": "13348",
    "transaction_status": "approved",
    "transaction_type": "sale",
    "version": "1.2",
    "signature": "4e5a7c0efb34b30addedd2b0d46f7f67acdb553083aa54b6419d6207cf7a5dfeeafadc8feef19a50fb881ed301b926f8"
}

Response - Order not found (ERR)

{
    "description": "Order not found",
    "status": 1,
    "timestamp": 1579210301,
    "version": "1.2",
    "signature": "e2fdbd1ef36237ee19f03744c8c7dc4cd46ac4ea8e74f4bfce4dd8488669f357a762fdc036c2923c51297a5139d10b27"
}

Response - Order is still open (ERR)

{
    "description": "Order is still open",
    "status": 3,
    "timestamp": 1579210318,
    "version": "1.2",
    "signature": "b2e69456d77bcdef2bd9d1bad033abf0dbeef6832e0637a2b09f82db8f92158f51dff0f6a489d12f4f7c3d616f19d8bc"
}

Response - Order timed out with no transactions (ERR)

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

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

You are currently viewing version 3.4 Latest version here