search

POSTPayment Request API

Use Case

Allows merchants to send customer payment request from the Billing POS to Paytm POS machine.

 

Request Attributes

Content Type : JSON

Head

AttributeDescription
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

AttributeDescription
txnDate
string
optional

Date and time of the transaction (Must not have future date/time entry)
Format - yyyy-MM-dd HH:mm:ss

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

Content Type : JSON

Head

AttributeDescription
responseTimestamp
string

Date Time value when the response is being returned.
Format - yyyy-MM-dd HH:mm: ss

Example: 2023-06-19 15:10:07

Body

AttributeDescription
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

resultCoderesultStatusresultMsg
EDC_0000SUCCESSSuccess
EDC_0016FAILNot able to generate cpayId
EDC_0019FAILMerchant not configured
EDC_0007FAILRequest parameters are not valid
EDC_0014FAILJWT authentication fails
⇾
Staging
Production
https://securegw-stage.paytm.in/edc-integration-service/payment/requestcopy icon
REQUEST
RESPONSE
CURL
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"}}'
copy icon