Seamless OTP Payments
While doing card payments, customers are redirected to the bank page to collect OTP. However, you can opt for collecting OTP at your page and submitting it to Cashfree using our Authentication APIs.
Note
This feature is only enabled on request. Please reach out to us at [email protected] to get this feature.
For seamless OTP payments, follow these steps -
- While calling order pay API, pass the ‘channel’ object for card payments as ‘post’. Here's an example request and response for the same.
curl --request POST \
--url https://sandbox.cashfree.com/pg/orders/pay \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"payment_method": {
"card": {
"channel": "post",
"card_number": "4111111111111111",
"card_holder_name": "Tushar Gupta",
"card_expiry_mm": "06",
"card_expiry_yy": "22",
"card_cvv": "900"
}
},
"order_token": "hyj120nbvt12831"
}
'
{
"payment_method": "card",
"channel": "post",
"action": "post",
"data": {
"url": "https://api.cashfree.com/pg/orders/pay/authenticate/1312864305",
"payload": null,
"content_type": "application/json",
"method": "post"
},
"cf_payment_id": 1312864305,
"payment_amount": 10000.00
}
- If the native OTP flow is enabled for the account, response will return action as 'post' and an authentication API in url which you need to call to submit the OTP.
Important!
This API is probabilistic in nature, we do our best to serve seamless response, however, it might be possible that it fall back to regular link based response. In that case, action would be "link" and you'll need to redirect to bank's page which is provided in url. Make sure to handle this case as well.
- Collect the OTP from your page and submit it to cashfree using Authentication API - Submit or Resend OTP
Difference between Bank OTP Payment and Seamless OTP Payment

Bank OTP Payment - Collection of OTP at bank's page

Seamless OTP Payment - Collection of OTP at merchant's page
Banks supporting Seamless OTP Payments
Bank Name | Payment Mode | Card Type |
---|---|---|
STATE BANK OF INDIA | CREDIT CARD | visa |
STATE BANK OF INDIA | CREDIT CARD | mastercard |
STATE BANK OF INDIA | DEBIT CARD | visa |
STATE BANK OF INDIA | DEBIT CARD | mastercard |
AXIS BANK | CREDIT CARD | visa |
AXIS BANK | CREDIT CARD | mastercard |
AXIS BANK | DEBIT CARD | visa |
AXIS BANK | DEBIT CARD | mastercard |
HDFC BANK | CREDIT CARD | visa |
HDFC BANK | CREDIT CARD | mastercard |
HDFC BANK | DEBIT CARD | mastercard |
HDFC BANK | DEBIT CARD | visa |
ICICI BANK | DEBIT CARD | visa |
KOTAK MAHINDRA BANK | CREDIT CARD | visa |
IDFC FIRST BANK | CREDIT CARD | visa |
IDFC FIRST BANK | DEBIT CARD | visa |
Updated 6 months ago