POSTSale API
Use Case
The API is used to process the sale transaction.
Request Attributes
Head
Attribute | Description |
---|---|
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.
Example: FFFFFFFFFF2345000004 |
version string (64) optional | client version Example: 1.0 |
Body
Attribute | Description |
---|---|
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. 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.
Example:
|
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) 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
Head
Attribute | Description |
---|---|
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
Attribute | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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":{ | ||||||||||
resultinfo +
|
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
0009 | ACCEPTED_SUCCESS | ACCEPTED_SUCCESS |
0330 | FAIL | Invalid checksum |
1809 | FAIL | Subwallet amount greater that transaction amount |
1810 | FAIL | Length of DisplayInfo Param Greater than Max Length |
0007 | FAIL | Terminal is not in active state |
0333 | FAIL | Multiple payment request not allowed for same terminal..! |
0002 | FAIL | Request Parameters are not valid |
0012 | FAIL | SYSTEM_ERROR |
0022 | FAIL | BLOCKED_MERCHANT |
0029 | FAIL | NOT_FOUND |
0233 | FAIL | Duplicate Order Id..! |
9001 | FAIL | MERCHANT_CONFIGURATION_ERROR |
0902 | FAIL | MERCHANT_BLOCKED |
1825 | FAIL | if splitType is other than AT_TXN, POST_TXN |
1815 | FAIL | Timeout config cannot be passed with split params |
1813 | FAIL | Split params cannot be passed with POST_FACTO type |
1814 | FAIL | Timeout config cannot be passed on along with AT_TXN time |
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"}}}'