search

POSTDirect Bank Request API

Use Case

When JSON request is made to processTransaction API, and merchant has preference nativeOtpSupported, we return APIs for direct bank page which can be used by merchant on its own bank page.

Request Attributes

Content Type : JSON

Body

AttributeDescription
otp
string
conditional

bank otp (only when request type is submit)

Example: 888888

requestType
string
mandatory

Bank form request type

Possible values:
submit
Form for submit the transaction
,
cancel
Form for cancel the transaction
,
resend
Form for resend the OTP
txnToken
string
mandatory

This is the unique transaction token received in the response of Initiate Transaction API. It is valid for 15 minutes.

Example: f0bed899539742309eebd8XXXX7edcf61588842333227

Response Attributes

Content Type : JSON

Head

AttributeDescription
version
string

Version of the API passed in the request.
Example: v1

responseTimestamp
string

EPOCH timestamp of the time at which response is being sent.
Example: 1588402269

Body

AttributeDescription
resultInfo
object

This parameter gives the information about the result of the API response

ResultInfo
+
AttributeDescription
resultCode
string

This is the resultCode corresponding to a particular message and is returned to the merchant. It's maximum length is 64. The different result codes corresponding to this API are mentioned below.

resultStatus
string

This parameter indicates the status of API call.

Possible values:
S
For Success
,
F
For Failure
resultMsg
string(256)

This parameter is the result message which contains information about the result.The different result messages corresponding to this API are mentioned below.
 

isRedirect
boolean

This flag indicates that number of retries are over and user is to be redirected from cashier page.

bankRetry
boolean

This flag indicates that retry is allowed at bank's end or not.

retry
boolean

This flag indicates whether retry is allowed or not.

txnInfo
object

Map of txnInfo

TxnInfo
+
AttributeDescription
MID
string

This is a unique identifier provided to every merchant by Paytm.

Example: INTEGR7769XXXXXX9383

TXNID
string

This is a unique Paytm transaction ID that is issued by Paytm for each merchant.

Example: 202005081112128XXXXXX68470101509706

ORDERID
string

Unique reference ID for a transaction which is generated by merchant and sent in the request

Example: OREDRID_98765

BANKTXNID
string

The transaction ID sent by the bank. In case of Paytm proprietary instruments too, there is unique reference number generated by Paytm's system. In case the transaction does not reach the bank, this will be NULL or empty string. Primary reason for this is user dropping out of the payment flow before the transaction reaches to bank servers.

Example: 77700XXXX215242

TXNAMOUNT
string

Amount to be paid by customer in INR

Example: 1.00

CURRENCY
string

This parameter indicates the currency in which transaction amount is to be deducted.

Possible Values: INR

STATUS
string

This contains the transaction status.

Possible Values: TXN_SUCCESS, TXN_FAILURE and PENDING

RESPCODE
string

Codes refer to a particular reason of payment.

RESPMSG
string

Description message is linked with each respcode.

TXNDATE
string

Date and Time of transaction.

Example: 2015-11- 02 11:40:46.0

GATEWAYNAME
string

Gateway used by Paytm to process the transactions.

Example: HDFC

PAYMENTMODE
string

The payment mode used by customer for transaction.

Possible values:
PPI
For Paytm Wallet
,
UPI
For Bhim Upi
,
CC
For Credit Card
,
DC
For Debit Card
,
NB
For Net Banking
CHECKSUMHASH
string

You should validate the txnInfo object parameter values by verifying the CHECKSUMHASH comes in txnInfo object. It ensures that parameter values are not tempered. CHECKSUMHASH string can be verified by using Paytm checksum library

BANKNAME
string

Name of the Bank

Example: HDFC

deepLinkInfo
string

Information of DeepLink.
UPI_INTENT only

Example:upi://pay?pa=test-testmi@paytm&pn=TestMIDOne&mc=5641&tid=PYTM9020XXXXXXXXX971597&tr=90200XXXXX0158971597&tn=txn&am=1&cu=INR

Response Codes & Messages

resultCoderesultStatusresultMsg
0000SSuccess
0001FFail
⇾
Staging
Production
https://securestage.paytmpayments.com/theia/api/v1/directBankRequest?mid={mid}&orderId={order-id}copy icon
REQUEST
RESPONSE
CURL
JAVA
NODE
PHP
PYTHON
DOTNET
curl -X POST 'https://securestage.paytmpayments.com/theia/api/v1/directBankRequest?mid={mid}&orderId=ORDERID_98765' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '{"txnToken":"f0bed899539742309eebd8XXXX7edcf61588842333227","requestType":"submit","otp":"123123"}'
copy icon