POSTProcess Transaction API
Use Case
It is used to process the transaction with respect to paymentMode provided by merchant in the request. We either return bank form for paymentMode like NET_BANKING, CREDIT_CARD, DEBIT_CARD or provide the result of payment in case of paymentMode like BALANCE, PAYTM_DIGITAL_CREDIT etc.
Request Attributes
Head
Attribute | Description |
---|---|
version string optional | Version of the API. Example: v1 |
requestTimestamp string optional | EPOCH timestamp of the time at which request is being sent. |
channelId string optional | The parameter value identifies the Channel for which API call is initiated. Possible values:
WEB
,
For websites, the value to be passed should be "WEB"
WAP
For Mobile websites/App, the value to be passed should be "WAP"
|
txnToken string mandatory | This is the unique transaction token received in the response of Initiate Transaction API or Initiate Subscription API. It is valid for 15 minutes. Example:f0bed899539742309eebd8XXXX7edcf61588842333227 |
Body
Attribute | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mid string mandatory | Paytm provides MID as a unique identifier to each merchant. For your staging MID, click here. You get the production MID post the account activation. Example: INTEGR7769XXXXXX9383 | ||||||||||||||||||||||||
orderId string mandatory | It is unique reference ID for a transaction passed in Initiate Transaction API or Initiate Subscription API. Example: OREDRID_98765 | ||||||||||||||||||||||||
paymentMode string mandatory | The payment mode used by customer for transaction. Possible values:
BALANCE
,
For Paytm Wallet
PAYTM_DIGITAL_CREDIT
,
For Paytm Postpaid
UPI
,
For Bhim Upi
UPI_INTENT
,
For Upi Intent
CREDIT_CARD
,
For Credit Card
DEBIT_CARD
,
For Debit Card
NET_BANKING
,
For Net Banking
EMI
For emi options
| ||||||||||||||||||||||||
cardInfo string optional | It contains the details of the saved and new card in the format below: Possible Values: | ||||||||||||||||||||||||
authMode string optional | Authentication mode for cards Possible values:
otp
,
For Mobile OTP
pin
For ATM PIN
| ||||||||||||||||||||||||
channelCode string optional | BankCode (only in NET_BANKING) Possible Values: PYTM, SBI, ICICI, HDFC, Refer here for other bank codes | ||||||||||||||||||||||||
paymentFlow string optional | Define the payment flow applied on merchant. Possible values:
NONE
,
For Default
ADDANDPAY
,
For Add and Pay
HYBRID
For Hybrid
| ||||||||||||||||||||||||
payerAccount string optional | VPA, this is needed for a UPI transaction. Example: 7777777777@paytm | ||||||||||||||||||||||||
planId string optional | This is the plan chosen for EMI, Input could be: BankCode|Month. Example: ICICI|3 | ||||||||||||||||||||||||
requestType string mandatory | Request type Possible Values: NATIVE | ||||||||||||||||||||||||
walletType string optional | Only required for Intelligent Router when paymentMode is WALLET. Possible Values: PAYTMPG | ||||||||||||||||||||||||
emiType string conditional | Mandatory, in case of transaction for Debit card EMI Possible Values: DEBIT_CARD, CREDIT_CARD | ||||||||||||||||||||||||
preferredOtpPage string optional | Possible Values: bank, merchant In case the merchant chooses to authenticate on the merchant page and Paytm cannot honour the request then Paytm will fail the transaction. | ||||||||||||||||||||||||
coftConsent object optional | Consent to tokenize the instrument or not. Possible values: 1 , 0 | ||||||||||||||||||||||||
coftConsent +
| |||||||||||||||||||||||||
cardTokenInfo object optional | Token data required to process a token transaction. | ||||||||||||||||||||||||
cardTokenInfo +
| |||||||||||||||||||||||||
mobileNumber string conditional | Merchant should take mobile number from user for checking the Debit Card EMI eligibility |
Example of sample inputs based on different paymentMode
-
Card transaction (without saved card):
paymentMode: DEBIT_CARD ( CREDIT_CARD or DEBIT_CARD as per the card )
cardInfo: |4111111111111111|123|092017
storeInstrument: 1 -
Card transaction (with saved card):
paymentMode: CREDIT_CARD (CREDIT_CARD or DEBIT_CARD as per the card )
cardInfo: 123456||123| -
Card transaction (with auth mode option):
paymentMode: DEBIT_CARD (CREDIT_CARD or DEBIT_CARD as per the card )
cardInfo: |4111111111111111|123|092017
storeInstrument: 1
authMode: atm (atm and otp in case of user selected option) -
Net banking transaction:
paymentMode: NET_BANKING
channelCode : PYTM, SBI, ICICI, HDFC, Refer here for other bank codes -
Paytm wallet transaction:
paymentMode: BALANCEFor intelligent router, please use below:
paymentMode: WALLET
walletType: PAYTMPG -
UPI Payment Transaction:
paymentMode: UPI
channelCode : collect
payerAccount: abcdefgh@paytm -
Paytm Payments Bank
paymentMode: PPBL -
Add and Pay with Cards
paymentMode: DEBIT_CARD (CREDIT_CARD or DEBIT_CARD as per the card )
cardInfo: |4111111111111111|123|092017
paymentFlow: ADDANDPAY
Response Attributes
Head
Attribute | Description |
---|---|
version string | Version of the API passed in the request. |
responseTimestamp string | EPOCH timestamp of the time at which response is being sent. |
Body
Attribute | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resultInfo object | This parameter gives the information about the result of the API response | ||||||||||||||||||||||||||||||||||||||||||||||||
ResultInfo +
| |||||||||||||||||||||||||||||||||||||||||||||||||
txnInfo object | Basic information about this transaction | ||||||||||||||||||||||||||||||||||||||||||||||||
TxnInfo +
| |||||||||||||||||||||||||||||||||||||||||||||||||
callBackUrl string | Call back URL which is given in Initiate Transaction API or Initiate Subscription API. | ||||||||||||||||||||||||||||||||||||||||||||||||
bankForm object | BankForm Details returned in case of following paymentModes: | ||||||||||||||||||||||||||||||||||||||||||||||||
BankForm +
| |||||||||||||||||||||||||||||||||||||||||||||||||
deepLinkInfo object | Information of DeepLink. | ||||||||||||||||||||||||||||||||||||||||||||||||
DeepLinkInfo +
|
Response Codes & Messages
resultCode | resultStatus | resultMsg |
---|---|---|
0000 | S | Success |
0001 | F | FAILED |
RC-00018 | F | Payment failed as merchant has crossed his daily/monthly/weekly acceptance limit |
309 | F | Invalid Order ID |
312 | F | This card is not supported. Please use another card. |
315 | F | Invalid Year |
372 | F | Retry count breached |
501 | F | System Error |
510 | F | Merchant Transaction Failure |
931 | F | Incorrect Passcode |
1001 | F | Request parameters are not valid |
1005 | F | Duplicate payment request exception |
1006 | F | Your Session has expired. |
1007 | F | Missing mandatory element |
2004 | F | Invalid User Token |
curl -X POST 'https://securestage.paytmpayments.com/theia/api/v1/processTransaction?mid={mid}&orderId=ORDERID_98765' \
--header 'Content-Type: application/json' \
--data '{"head":{"txnToken":"f0bed899539742309eebd8XXXX7edcf61588842333227"},"body":{"requestType":"NATIVE","mid":"{mid}","orderId":"ORDERID_98765","paymentMode":"CREDIT_CARD","authMode":"otp","cardInfo":"|4111111111111111|111|122032"}}'