POSTPayment Request API
Use Case
Allows merchants to send customer payment request from the Billing POS to Paytm POS machine.
Request Attributes
Head
Attribute | Description |
---|---|
clientId string mandatory | Unique key for each merchant Example: abcd |
reqHash string mandatory | A security hash generated by you, using specific fields in a specific order. While generating a hash, the order (sequence) of fields in the request is important. Therefore, the merchant needs to generate the hash in the order of fields as mentioned in the request body. Example: YFymAA3KvswYjLEkRRoqGofJqyMxiqHmPc9noS4fvMc |
Body
Attribute | Description |
---|---|
txnDate string optional | Date and time of the transaction (Must not have future date/time entry) Example: 2023-06-19 15:10:07 |
merchantTxnId string mandatory | Merchant transaction ID Example: 1234 |
txnAmount string mandatory | Payment amount to be collected. This should be without decimals as the last 2 digits will be considered after decimals. Eg.: 50000 will be considered as Rs 500.00 Example: 2000 |
txnNumber string optional | Transaction number (if applicable) Example: 354565 |
mid string (20) mandatory | Paytm Merchant ID (MID) Example: ABCD123 |
Response Attributes
Head
Attribute | Description |
---|---|
responseTimestamp string | Date Time value when the response is being returned. Example: 2023-06-19 15:10:07 |
Body
Attribute | Description |
---|---|
resultStatus string | Response status Possible values: SUCCESS, FAILURE |
resultCode string | Response status code Possible values: S, F |
resultMsg string | Response message Possible values: Success, Failure, Not able to generate Payment Request ID (CPay), Request parameters are not valid, JWT authentication fails, Merchant not configured |
resultCodeId string | Result code id Example: EDC_0000, EDC_0016, EDC_0007, EDC_0017, EDC_0021 |
cpayId string | Payment Request ID (CPay) is a random number generated by the Paytm system Example: 100005 |
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
EDC_0000 | SUCCESS | Success |
EDC_0016 | FAIL | Not able to generate cpayId |
EDC_0019 | FAIL | Merchant not configured |
EDC_0007 | FAIL | Request parameters are not valid |
EDC_0014 | FAIL | JWT authentication fails |
curl --location 'https://securegw-stage.paytm.in/edc-integration-service/payment/request' \
--header 'Content-Type: application/json' \
--data '{"head": {"clientId": "abc","reqHash": "YFymAA3KvswYjLEkRRoqGofJqyMxiqHmPc9noS4fvMc"},"body": {"txnDate": "2023-06-1915:10:07","merchantTxnId": "1234","txnAmount": "2000","txnNumber": "354565","mid": "YOUR_MID_HERE"}}'