Bank Account Check (TPV)

Cashfree payments also supports a feature where we can verify if the customer is paying through a specific bank account. This flow is useful for mutual funds and other financial services companies.

While processing payment for a merchant with bank account check enabled, Cashfree Payments verifies that a bank account exists and that the customer is making the payment through the same bank account. We perform the check for every payment. Click here to see the list of supported banks.

📘

TPV Check

Please reach out to your account manager to enable this TPV check for your Cashfree Payment gateway account.

Step 1

To process a payment with bank account check (TPV), you must pass the customer account number (customer_bank_account_number) and IFSC (customer_bank_ifsc) with every create order request. If you want the order to be processed through NetBanking, then you must pass the customer_bank_code as well.

curl --request POST \
  --url https://sandbox.cashfree.com/pg/orders \
  --header 'Content-Type: application/json' \
  --header 'x-api-version: <<x-api-version>>' \
  --header 'x-client-id: xxxx' \
  --header 'x-client-secret: xxxx' \
  --data '{
    "customer_details": {
        "customer_email": "[email protected]",
        "customer_id": "LD09755CSCON10092021",
        "customer_name": "Rohit",
        "customer_phone": "9999911111",
        "customer_bank_ifsc": "CITI0000001",
        "customer_bank_account_number": "1518121112"
       
    },	  
    "order_amount": 1,
	  "order_currency": "INR"
}'
{
  "cf_order_id": 621203980,
  "order_id": "order_1065211zDHKtAsflTH9dczd6itFy1wFv8",
  "payment_link": "https://payments.cashfree.com/order/#NLfmvDBT3AsEqEdKMLuW",
  "entity": "order",
  "order_currency": "INR",
  "order_amount": 2.00,
  "order_expiry_time": "2021-11-07T12:17:57+05:30",
  "customer_details": {
    "customer_id": "LD09755CSCON10092021",
    "customer_name": "Rohit",
    "customer_email": "[email protected]",
    "customer_phone": "9999911111"
  },
  "order_meta": {
    "return_url": null,
    "notify_url": null,
    "payment_methods": null
  },
  "settlements": {
    "url": "https://api.cashfree.com/pg/orders/order_1065211zDHKtAsflTH9dczd6itFy1wFv8/settlements"
  },
  "payments": {
    "url": "https://api.cashfree.com/pg/orders/order_1065211zDHKtAsflTH9dczd6itFy1wFv8/payments"
  },
  "refunds": {
    "url": "https://api.cashfree.com/pg/orders/order_1065211zDHKtAsflTH9dczd6itFy1wFv8/refunds"
  },
  "order_status": "ACTIVE",
  "order_token": "NLfmvDBT3AsEqEdKMLuW",
  "order_note": "5% club",
  "order_tags": null,
  "order_splits": []
}

Pre-Built UI

To process a TPV payment using pre-built Cashfree UI, you just need to use the payment_link parameter from the response of the CreateOrder API. Using this the customer can make a payment only through their linked account.
If the customer tries to complete the payment through a different account, the payment will fail and the order will remain in an ACTIVE state.

Seamless

To process seamless TPV payments. You will have to integrate the /orders/pay API. Below we will show you how to do it for UPI and NetBanking.

UPI

Once the order is created, use the /order/pay api call to initiate a payment to the customer. We support both UPI collect and intent transactions on UPI

curl --request POST \
  --url https://sandbox.cashfree.com/pg/orders/pay \
  --header 'Content-Type: application/json' \
  --data '{
	"order_token": "5v8T6zYfL7CFngk2fKz4",
	"payment_method" : {
		"upi" : { 
			"channel": "collect",
			"upi_id": "testsuccess@gocash"
		}
	}
}'
curl --request POST \
  --url https://sandbox.cashfree.com/pg/orders/pay \
  --header 'Content-Type: application/json' \
  --data '{
	"order_token": "5v8T6zYfL7CFngk2fKz5",
	"payment_method" : {
		"upi" : { 
			"channel": "link"
		}
	}
}'

Net Banking

To process TPV through net banking, you will need to pass the customer_bank_code in the create order API request. Click here to see the list of supported banks.

curl --request POST \
  --url https://sandbox.cashfree.com/pg/orders \
  --header 'Content-Type: application/json' \
  --header 'x-api-version: <<x-api-version>>' \
  --header 'x-client-id: xxxx' \
  --header 'x-client-secret: xxxx' \
  --data '{
    "customer_details": {
        "customer_email": "[email protected]",
        "customer_id": "LD09755CSCON10092021",
        "customer_name": "Rohit",
        "customer_phone": "9999911111",
        "customer_bank_ifsc": "CITI0000001",
        "customer_bank_account_number": "1518121112",
        "customer_bank_code": 3333
       
    },	  
    "order_amount": 1,
	  "order_currency": "INR"
}'

Once the order is created, you can use the orders/pay api to initiate a payment.

curl --request POST \
  --url https://sandbox.cashfree.com/pg/orders/pay \
  --header 'Content-Type: application/json' \
  --header 'x-api-version: <<x-api-version>>' \
  --data '{
	"order_token": "jqAsOQ5jtM8ZusOadyCI",
	"payment_method": {
			"netbanking": {
					"channel": "link",
					"netbanking_bank_code": 3333
		}
	}
}'