search
Your Paytm for business app is working and will keep working beyond March 15th, 2024. Click to know more

POSTTransaction Status API (Query by Transaction ID)

Use Case

This API gets the transaction status corresponding to requested TransactionID for a specific merchant.

Request Attributes

Content Type : JSON

Head

AttributeDescription
requestTimestamp
string
optional

Request time in mili-seconds.

signature
string
mandatory

Paytm validates the request and ensures that parameters are not tempered by verifying the signature in the request.

Body

AttributeDescription
mid
string
mandatory

AI router provides MID as a unique identifier to each merchant. 

Example: 216820000002516036253

txnId
string
mandatory

Transaction Id of the payment

Example: 202005081112128XXXXXX68470101509706

Response Attributes

Content Type : JSON

Head

AttributeDescription
responseTimestamp
string

EPOCH timestamp of the time at which response is being sent.

signature
string

Ensures that parameters are not tempered by the AI router providing the signature in the response.

Body

AttributeDescription
resultInfo
object

This parameter gives the information about the result of the API response

resultInfo
+
AttributeDescription
resultStatus
string

This parameter is the result specific to the phase of the transaction mentioned in the txnType field

resultCode
string

This is the resultCode corresponding to a particular message and is returned to the merchant. It's maximum length is 64.

resultMsg
string

This parameter is the result message which contains information about the result.

txnId
string

Transaction Id of the payment
 

Example: 202005081112128XXXXXX68470101509706

bankTxnId
string

Bank transaction Id from the bank
 

Example: 77700XXXX215242

orderId
string

Unique reference ID for an Order request generated by merchant for payment.
 

Example: OREDRID_98765

txnAmount
string

Payment transaction amount
 

Possible Values: 1.00

gatewayName
string

Name of the gateway used to process the transaction. In the case of AI Router, this is the payment aggregator chosen to process the transaction.

bankName
string

Bank Name used in payment
 

Examples: Paytm Payments Bank, ICICI Bank

mid
string

AI router provides MID as a unique identifier to each merchant. 
 

Example: 216820000456418554321

paymentMode
string

Payment Mode used in payment

refundAmount
string

refund amount of the payment
 

Example: 1.00

txnDate
string

Date on which the pre-auth/capture/release/order was created (depending on the value of txnType)
 

Example: 2020-05-05 14:00:28

udf1
string

Any merchant defined values

udf2
string

Any merchant defined values

udf3
string

Any merchant defined values

subsId
string

Subscription ID - Only Subscription flow

rrnCode
string

Reference number which is also generated by the bank
 

Example: 777001344756752

authCode
string

Authentication code which comes from the bank
 

Example: 123456

merchantUniqueReference
string

Merchant's reference text which is sent in the order's request

cardScheme
string

Card Scheme
 

Example: VISA, MASTER

bin
string

First six digit of the card
 

Example: 438106

lastFourDigit
string

Last four digit of the card
 

Example: 0208

authRefId
string

Authentication ID for the 2FA transaction generated as received from the acquirer.

vpa
string

VPA address used in the transaction

txnPaidTime
string

Paid time of the transaction

gatewayInfo
string

Response provided by the gateway during payment or transaction.

gatewayResultInfo
object

Gives the information about gateway level result codes and messages

gatewayResultInfo
+
AttributeDescription
resultCode
string

Result code from payment gateways / aggregators

resultMsg
string

Result message from payment gateways / aggregators

Response Codes & Messages

resultCoderesultStatusresultMsg
01TXN_SUCCESSTxn Success
501TXN_FAILURESystem error
335TXN_FAILUREMid is invalid
334TXN_FAILUREInvalid Transaction Id
331NO_RECORD_FOUNDNo Record Found
2222TXN_FAILUREInvalid request body
⇾
Staging
Production
https://stage-router.paytm.in/aoa-order-status/v2/orderstatus/querybytransactionidcopy icon
REQUEST
RESPONSE
CURL
JAVA
NODE
PHP
PYTHON
DOTNET
curl --location --request POST 'https://stage-router.paytm.in/aoa-order-status/v2/orderstatus/querybytransactionid' \
--header 'Content-Type: application/json' \
--data-raw '{"head": {"requestTimestamp": 1652701925340,"signature": "MERCHANT_KEY"},"body": {"mid": "YOUR_MID_HERE","txnId": "2022120201054XXXX805386591723814912"}}'

 

copy icon