search

POSTFetch Transaction API

Use Case

Fetch Transaction API would be used to fetch the transactions against a link.

Request Attributes

Content Type : JSON

Head

AttributeDescription
timestamp
string(15)
optional

EPOCH timestamp of the time at which request is being sent.
Example: 1588402269

clientId
string(3)
optional

Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key.

Example: C11

version
string(4)
optional

Version of the API.

Example: v2

Note:Use v2 api if you want to fetch details for EMI subvention, Bank offers and Customer details.
channelId
string(3)
optional

The parameter value identifies the Channel for which API call is initiated.

Possible values:
WEB
For websites, the value to be passed should be "WEB"
,
WAP
For Mobile websites/App, the value to be passed should be "WAP"
tokenType
string
mandatory

This parameter identifies whether the API works on checksum authentication. The value to be sent in tokenType is 'AES' for this API.

signature
string
mandatory

Paytm validates the request and ensures that parameters are not tempered by verifying the signature in the request. For creating the checksum (signature) refer to the steps given in Checksum Logic.
Note: Create the signature using the body parameter of the request.

Body

AttributeDescription
mid
string(20)
mandatory

Paytm provides MID as a unique identifier to each merchant. For your staging MID, click here. You get the production MID post the account activation.

Example: INTEGR7769XXXXXX9383

linkId
long
mandatory

Unique Identifier for each Link

pageNo
int
optional

Page Number

pageSize
int
optional

Page Size = Total Links/Total no. of Pages

searchStartDate
string
optional

From Date

searchEndDate
string
optional

To Date

fetchAllTxns
boolean
optional

Fetch all transaction done on the link (i.e. success, failed and pending).
Possible values: true, false

Response Attributes

Content Type : JSON

Head

AttributeDescription
timestamp
string(15)

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

clientId
string(3)

Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key.

Example: C11

version
string(2)

Version of the API passed in the request.
Example: v1

channelId
string(3)

The parameter value identifies the Channel for which API call is initiated.

Possible values:
WEB
For websites, the value to be passed should be "WEB"
,
WAP
For Mobile websites/App, the value to be passed should be "WAP"
tokenType
string

This parameter identifies whether the API works on checksum authentication. The value to be sent in tokenType is 'AES' for this API.

signature
string(108)

Paytm validates the request and ensures that parameters are not tempered by verifying the signature in the request. For creating the checksum (signature) refer to the steps given in Checksum Logic.
Note: Create the signature using the body parameter of the request.

Body

AttributeDescription
resultInfo
object

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

ResultInfo
+
AttributeDescription
resultCode
string

This is the resultCode corresponding to a particular message and is returned to the merchant. It's maximum length is 64. The different result codes corresponding to this API are mentioned below.

resultStatus
string

This parameter indicates the status of API call.

 

Possible Values: SUCCESS, FAILED

resultMessage
string(256)

This parameter is the result message which contains information about the result.The different result messages corresponding to this API are mentioned below.
 

orders
object

Order Details

Orders
+
AttributeDescription
txnId
string

Paytm Transaction Id

orderId
string

Unique Order ID

mercUniqRef
string

Link ID or Invoice ID

orderCreatedTime
string

Time of Order Creation

orderCompletedTime
string

Time of Order completion

orderStatus
string

Status of the Order

customerPhoneNumber
string

Paytm Registered Number used by customer to make payment

customerEmail
string

Paytm Registered Email used by customer to make payment

customerName
string

Paytm Registered Name used by customer to make payment.

txnAmount
double

Transaction Amount

reconId
string

Unique Order ID

paymentFormData
string

Infomation which is sent by Customer at the of Payment

customerComment
string

Customer Comment Details

payableAmount
string

Original order value before offer was applied.
Only for SimplifiedPaymentOffers (Bank Offers).

paymentPromoCheckoutData
Object

Only for simplifiedPaymentOffers (Bank Offers).

paymentPromoCheckoutData
+
AttributeDescription
promocode
string

Actual promocode which got applied

promotext
string

Promo message

savings
string

Benefit amount

redemptionType
string

discount/cashback

emiSubventionInfo
Object

Only for simplifiedSubvention (EMI subvention).

emiSubventionInfo
+
AttributeDescription
plan
string

EMI pan which got applied

tenure
string

Tenure of the EMI plan

gratificationDiscount
string

Amount of discount applied

gratificationCashback
string

Amount of cashback applied

gratificationType
string

discount/cashback

subventionAmount
string

Amount on which subvention was to be applied for this transaction

merchantId
string

Unique Identifier for Merchant

merchantName
string

Merchant Name

validateAccountNumber
string

Flag signifies whether to match user's registered account number to the one which is being used for the payment.

allowUnverifiedAccount
string

Flag signifies if a transaction should proceed even if account number mismatched

accountNumber
string

User account number to validate.

additionalInfo
string

Map for any extra information in form of key value pair.

transactionType
string

Transaction type of the payment.

merchantLinkRefId
string

Merchant reference ID

customerId
string

Customer ID

customerContact
Object

Customer related information passed during link creation

customerContact
+
AttributeDescription
customerName
string

Customer name

customerEmail
string

Customer email ID

customerMobile
string

Customer mobile number

Response Codes & Messages

resultCoderesultStatusresultMessage
200SUCCESSSuccess
404FAILEDData Not Found
501FAILEDInternal Server Error
502FAILEDUnknown Error Occurred
5004FAILEDempty merchant Id.
5021FAILEDExpiry date is invalid.
5023FAILEDMerchant Id is invalid.
5028FAILEDChecksum provided is invalid.
5029FAILEDrequest body cannot be empty
5030FAILEDrequest head cannot be empty
⇾
Staging
Production
https://securegw-stage.paytm.in/link/fetchTransactioncopy icon
REQUEST
RESPONSE
CURL
JAVA
NODE
PHP
PYTHON
DOTNET
curl -X POST 'https://securegw-stage.paytm.in/link/fetchTransaction' \
--header 'Content-Type: application/json' \
--data '{"body":{"mid":"{mid}","linkId":"31309"},"head":{"tokenType":"AES","signature":"{signature}"}}'
copy icon