search

POSTSale API

Use Case

The API is used to process the sale transaction.

Request Attributes

Content Type : JSON

Head

AttributeDescription
requestTimeStamp
string (25)
mandatory

Request Time (yyyy-MM-dd HH:mm:ss) is the time when a request is sent to the Paytm system.

Example: 2019-10-07 13:15:18

channelId
string (32)
mandatory

Paytm will provide the channel Id to the merchant.

Example: ABC

checksum
string (108)
mandatory

Check sum of whole body. For creating the checksum (signature) refer to the steps given in Checksum Logic.

 Note: Create the checksum using the body parameter of the request.

Example: FFFFFFFFFF2345000004

version
string (64)
optional

client version

Example: 1.0

Body

AttributeDescription
paytmMid
string (20)
mandatory

Paytm generated merchant Id

Example: FINALE32321107827478

paytmTid
string (8)
optional

Paytm generated terminal Id

Example: 12345678

transactionDateTime
string (25)
mandatory

Transaction Time(yyyy-MM-dd HH:mm: ss) Time when the transaction is initiated at the client system.

Example: 2019-10-07 13:15:18

merchantTransactionId
string (8-32)
mandatory

Merchant's system generated Transaction Id(TxnId). It should be unique for each transaction. 
It should be alphanumeric (special characters not allowed)

Example: 2091293484338398383

merchantReferenceNo
string (32)
optional

Merchant's system generated Reference number associated with order ID. This number will be displayed on the payment acceptance pop-up on the device and will be sent back in the status inquiry response. 

Example: 2091293484338398383

transactionAmount
string (12)
mandatory

transaction amount in paise.

Example: 1000

merchantExtendedInfo
string (999)
optional

Transaction-specific parameters can be sent in this field. 

  • If auto accept true is passed, transaction acceptance pop up will not be shown on device. 
  • Payment mode can be used to pre select transaction pay mode. 
  • BrandID, ModelID, EMI tenures, featureType IMEI, phone number, invoice are all EMI related parameters which can be passed pre facto here so that manual entry of EMI params is skipped on device. 
     

Example:


"autoAccept" : "True", "paymentMode": "ALL/CARD/QR", "brandID" : "579507", "modelID" : "TV784", "featureType" : "1,2,3", "emiTenures" : "3,6,9", "imei" : "123456", "phoneNumber" : "9999999999", "invoiceNumber" : "12345", "splitMethod" : "PERCENTAGE", "splitData", [ "vendorID" , "123456" "value" , "50" ]

 

splitInfo
string
optional

Merchant can send split settlement logic (percentage split / amount split) and values in this field for each transaction.

Example: "splitMethod": "PERCENTAGE", "splitData": [ "vendorID" : "123456", "value": "50" ]

extendInfo
string (999)
optional

Merchant can send extra fields as per the use case. The same will be sent back in the transaction status inquiry response. 

Example: "extendInfo": {"key1": "value1","key2": "value2"}

subWalletInfo
string
optional

Cap amount for different user sub wallets (amount in paise) 
The possible values for the User SubWalletType Enum are:
FOOD, GIFT, MULTI_PURPOSE_GIFT, TOLL, CLOSED_LOOP_WALLET, CLOSED_LOOP_SUB_WALLET, FUEL, INTERNATIONAL_FUNDS_TRANSFER, CASHBACK, GIFT_VOUCHER, COMMUNICATION

Example: FOOD:100|GIFT : 100"

displayInfo
Map (3)
optional

These fields will be displayed on the payment acceptance pop-up on the device.

Example: "displayInfo": {"key1": "value1","key2": "value2", "key3": "value3"}

printInfo
Map
optional

These fields will get printed on EDC receipts  under 'Merchant's payment details' section. 

Example: "printInfo": {"key1": "value1", "key2": "value2"}

gstInformation
Object (Invoice max length: 20, invoiceDate :YYYYMMDDHHmss)
optional

gstInformation field is optional, but fields within gstInformation are not optional, they are all mandatory if you decide to add gstInformation in your request. In case any of the fields are missing, GST parameters will be ignored.

Example: "gstInformation" : {"gstIn": "08TESTF0078P1ZP", "gstBrkUp": "CGST:10|SGST:10| IGST:10| CESS:10|GSTIncentive:10| GSTPCT:10", "invoiceNo": "Invoice3423432155555", "invoiceDate": "20210511132200"}

retryCount
string (3)
conditional

Only to be used if retry payment functionality is enabled for the merchant. The value will be incremented on each retry payment attempt (+1).

Example: 1

splitType
string
optional

Possible values: AT_TXN, POST_FACTO

timeoutConfig
string
optional

It can be an integer between 1 and 60.

Example: 2

Response Attributes

Content Type : JSON

Head

AttributeDescription
responseTimeStamp
string (25)

Response Time (yyyy-MM-dd HH:mm:ss) is a time when a response is sent by the Paytm system.

Example: 2019-10-07 13:15:18

channelId
string (32)

Request channelId

Example: ABC

version
string (16)

Request version

Example: 1.0

Body

AttributeDescription
merchantTransactionId
string (8-32)

Merchant's system generated Transaction Id(TxnId) that was sent in the payment request. 

Example: 2091293484338398383

paytmMid
string (64)

Paytm generated merchant Id

Example: FINALE32321107827478

paytmTid
string (16)

Paytm generated terminal Id

Example: 12345678

resultInfo
object (999)

Example: 

"resultInfo":{
"resultStatus":"A",
"resultCode":"ACCEPTED_SUCCESS",
"resultMsg":"ACCEPTED_SUCCESS"
"resultCodeId":"0009",
}

resultinfo
+
AttributeDescription
resultStatus
string (1)

A-Accepted
F-Failed

resultCodeId
string (4)

Numeric Status code

resultCode
string

Alphabetical status code

resultMsg
string

Status message

Response Codes & Messages

resultCoderesultStatusresultMsg
0009ACCEPTED_SUCCESSACCEPTED_SUCCESS
0330FAIL Invalid checksum
1809FAILSubwallet amount greater that transaction amount
1810FAILLength of DisplayInfo Param Greater than Max Length
0007FAILTerminal is not in active state
0333FAILMultiple payment request not allowed for same terminal..!
0002FAILRequest Parameters are not valid
0012FAIL

SYSTEM_ERROR

0022FAIL

BLOCKED_MERCHANT

0029FAIL

NOT_FOUND

0233FAILDuplicate Order Id..!
9001FAIL

MERCHANT_CONFIGURATION_ERROR

0902FAIL

MERCHANT_BLOCKED

1825FAIL

if splitType is other than AT_TXN, POST_TXN

1815FAILTimeout config cannot be passed with split params
1813FAILSplit params cannot be passed with POST_FACTO type
1814FAILTimeout config cannot be passed on along with AT_TXN time
⇾
Staging
Production
https://securegw-stage.paytm.in/ecr/payment/requestcopy icon
REQUEST
RESPONSE
CURL
curl --location 'https://securegw-stage.paytm.in/ecr/payment/request' \
--header 'Content-Type: application/json' \
--data '{"head": {"requestTimeStamp": "2019-10-07 13:15:18","channelId": "RIL","checksum": "FFFFFFFFFF2345000004","version": "3.1"},"body": {"paytmMid": "YOUR_MID_HERE","paytmTid": "12346490","transactionDateTime": "2019-10-07 13:15:18","merchantTransactionId": "123456343245","merchantReferenceNo": "234564323456","transactionAmount": "9000","merchantExtendedInfo": {"PaymentMode": "All"}}}'

 

copy icon