search

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

Content Type : JSON

Head

AttributeDescription
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.

 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)
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. 
It should be alphanumeric (special characters not allowed)

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

Content Type : JSON

Head

AttributeDescription
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

AttributeDescription
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
+
AttributeDescription
resultStatus
string (1)

A-Success
F-Failed
 

resultCodeId
string (4)

Numeric Status code

resultCode
string

Alphabetical status code

resultMsg
string

Status message

Response Codes & Messages

resultCoderesultStatusresultMsg
0000SUCCESSSuccess. Hereby, its important to note that the final status, indicates that split request is successful.
1831FAILIncorrect order date and time passed. For instance, if transactionDateTime is before 31 days than the current date
0002FAILRequest parameters are not valid
0330FAILInvalid checksum
1812FAIL

Split settlement info not valid

  • splitMethod is other than PERCENTAGE/AMOUNT
  • percentage is not in range 0-100, where the condition doesn't match 100>=p>0
  • amount sent null for split method AMOUNT
    • total split percent greater than 100%
    • total split amt greater than main order amt
0012FAILInternal Server Error. Please retry
1823FAILOrder id passed in request does not qualify for POST_FACTO split
1816FAILSplit cannot be processed as order was not successful
1822FAILSplit cannot be processed as refund for transaction was already done
1817FAILparameter illegal
1819FAILmerchant relationship illegal/ vendor relation api fail
1820FAILsplit size illegal (when split size in req is more than 50 )
1821FAILsplit method not equals (when every split method in the split info in req is not equal to each other )
1826FAIL
  • >order status invalid- when main order is not success yet
  • >split already success-  one split already success
1828FAILorder does not exist
1829FAILsplit already in progress
1830FAILduplicate request
⇾
Staging
Production
https://securegw-stage.paytm.in/ecr/postFactocopy icon
REQUEST
RESPONSE
CURL
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\"}]"}}'

 

copy icon