Praxis Wiki logo

Agent API {find-transaction}


This API method will return the transaction in the same format as the notification that was sent with the last transaction status change.

ENDPOINTS

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

REQUEST PARAMETERS

Variable Type Description
trace_id int(11) Required. Transaction identifier in
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 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
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
- rejected - processing cancelled by the merchant or client
- 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
- cancelled - payout was cancelled by merchant
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
application_key varchar(32) Required. Identifier of your application (website)
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
edited_by varchar(50) Optional. Transaction was edited 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_desc 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://gateway.praxispay.com/api/find-transaction \
-H 'Content-Type: application/json' \
-d '{
    "application_key": "Sandbox",
    "merchant_id": "Test-Integration-Merchant",
    "timestamp": 1578880026,
    "trace_id": 1000000321,
    "version": "1.2",
    "signature": "693a9c2eb641ee126cb88d48ff57190ab614d6303d76177e0fe90348589c165f868a1dd01ecb0ad22450797eb29e720f"
}'

Response (OK)

{
    "account_identifier": null,
    "application_key": "Sandbox",
    "merchant_id": "Test-Integration-Merchant",
    "amount": 10300,
    "card_exp": null,
    "card_number": null,
    "card_type": null,
    "cascade_level": null,
    "created_by": "INTERNET",
    "currency": "USD",
    "description": "Transaction 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": 1579210407,
    "transaction_type": "sale",
    "trace_id": 1000000321,
    "transaction_id": null,
    "transaction_status": "approved",
    "version": "1.2",
    "signature": "2cd4e96d463f42d4782454219bbe58c7b58c2a88b99ab7a71251a0a4b950925f779b0b723af1ce4b13b6446405fbe541"
}

Response (ERR)

{
    "description": "Transaction not found",
    "status": 1,
    "timestamp": 1579210424,
    "version": "1.2",
    "signature": "6a16050382810aa983ca89bb8589124c04b056d4daadaa4f761c7d62873e3ab61a91bf4399af1c3e6e4c19e2608e54c7"
}

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