POSTPost Facto API
Use Case
The API is called if the post facto identifier is enabled in the Sale API, if the merchant wants to use the split settlement functionality for the transactions.
Note: Currently This API can be used only on production environment.
Request Attributes
Head
Attribute | Description |
---|---|
requestTimeStamp string (25) mandatory | Request Time (yyyy-MM-dd HH:mm:ss). Time when request sent to 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) optional | Paytm generated merchant Id Example: FINALE32321107827478 |
paytmTid string (8) mandatory | Paytm generated terminal Id Example: 12345678 |
transactionDateTime string (25) mandatory | Transaction Time(yyyy-MM-dd HH:mm:ss) Time when transaction initiated at 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 |
splitMethod string mandatory | The possible value will be PERCENTAGE OR AMOUNT Example: AMOUNT |
splitInfo string mandatory | vender id with a split amount or percentage Example: [{\"vendorId\":\"xyz\",\"value\":\"50\"},{\"vendorId\":\"ABC\",\"value\":\"10.5\"}, {\"vendorId\":\"bhj\",\"value\":\"45\"}] |
Response Attributes
Head
Attribute | Description |
---|---|
responseTimeStamp string (25) | Response Time (yyyy-MM-dd HH:mm:ss). Time when response sent by paytm system. Example: 2019-10-07 13:15:18 |
channelId string (32) | Request chanelId 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 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) | resultInfo Example: "resultInfo":{ "resultStatus":"S", "resultCode":"SUCCESS", "resultMsg":"Success", "resultCodeId":"0000"} | ||||||||||
resultinfo +
|
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
0000 | SUCCESS | Success. Hereby, its important to note that the final status, indicates that split request is successful. |
1831 | FAIL | Incorrect order date and time passed. For instance, if transactionDateTime is before 31 days than the current date |
0002 | FAIL | Request parameters are not valid |
0330 | FAIL | Invalid checksum |
1812 | FAIL | Split settlement info not valid
|
0012 | FAIL | Internal Server Error. Please retry |
1823 | FAIL | Order id passed in request does not qualify for POST_FACTO split |
1816 | FAIL | Split cannot be processed as order was not successful |
1822 | FAIL | Split cannot be processed as refund for transaction was already done |
1817 | FAIL | parameter illegal |
1819 | FAIL | merchant relationship illegal/ vendor relation api fail |
1820 | FAIL | split size illegal (when split size in req is more than 50 ) |
1821 | FAIL | split method not equals (when every split method in the split info in req is not equal to each other ) |
1826 | FAIL |
|
1828 | FAIL | order does not exist |
1829 | FAIL | split already in progress |
1830 | FAIL | duplicate request |
curl --location 'https://securegw-stage.paytm.in/ecr/postFacto' \
--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": "12345XXXX245","splitMethod": "PERCENTAGE","SplitInfo": "[{\"vendorId\":\"xyz\",\"value\":\"50\"},{\"vendorId\":\"ABC\",\"value\":\"10.5\"}, {\"vendorId\":\"bhj\",\"value\":\"45\"}]"}}'