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 -

  1. 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
}
  1. 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.

  1. 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

30063006

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

21482148

Seamless OTP Payment - Collection of OTP at merchant's page

Banks supporting Seamless OTP Payments

Bank NamePayment ModeCard Type
STATE BANK OF INDIACREDIT CARDvisa
STATE BANK OF INDIACREDIT CARDmastercard
STATE BANK OF INDIADEBIT CARDvisa
STATE BANK OF INDIADEBIT CARDmastercard
AXIS BANKCREDIT CARDvisa
AXIS BANKCREDIT CARDmastercard
AXIS BANKDEBIT CARDvisa
AXIS BANKDEBIT CARDmastercard
HDFC BANKCREDIT CARDvisa
HDFC BANKCREDIT CARDmastercard
HDFC BANKDEBIT CARDmastercard
HDFC BANKDEBIT CARDvisa
ICICI BANKDEBIT CARDvisa
KOTAK MAHINDRA BANKCREDIT CARDvisa
IDFC FIRST BANKCREDIT CARDvisa
IDFC FIRST BANKDEBIT CARDvisa