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 the TPV check for your Cashfree Payment gateway account.

Cashfree supports processing TPV payments through our Payment Gateway and Payment Links product.

To process a TPV payment through Cashfree, you must send us the specific customer details in the create order API request. When authorizing the payment from the customer, Cashfree will verify the customer details received in this API call with the actual payment instrument used by the customer.

To process a TPV payment, we mandatorily require customer_bank_account_number and customer_bank_ifsc. The IFSC is a alphanumeric code (SBIN000001) which uniquely identifies a bank branch in India.

Payment Gateway

This integration is useful for someone who is integrating with Cashfree's Payment Gateway APIs for payment processing.

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: 2022-09-01' \
  --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",
  "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",
  "payment_session_id": "NLfmvDBT3dfdflkjlu1JNHDcSDFACAsEqEdKMLuW",
  "order_note": "5% club",
  "order_tags": null,
  "order_splits": []
}

Pre-Built UI

To process a TPV payment using pre-built Cashfree UI, open checkoutX using the payment_session_id parameter generated 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/sessions \
  --header 'Content-Type: application/json' \
  --data '{
	"payment_session_id": "5v8T6zYfL7CFngk2fKz4",
	"payment_method" : {
		"upi" : { 
			"channel": "collect",
			"upi_id": "testsuccess@gocash"
		}
	}
}'
curl --request POST \
  --url https://sandbox.cashfree.com/pg/orders/sessions \
  --header 'Content-Type: application/json' \
  --data '{
	"payment_session_id": "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: 2022-09-01' \
  --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"
}'
curl --request POST \
  --url https://sandbox.cashfree.com/pg/orders/sessions \
  --header 'Content-Type: application/json' \
  --header 'x-api-version: <<x-api-version>>' \
  --data '{
	"payment_session_id": "jqAsOQ5jtM8ZusOadyCI",
	"payment_method": {
			"netbanking": {
					"channel": "link",
					"netbanking_bank_code": 3333
		}
	}
}'

Payment Links

If you want to process a TPV payment using Cashfree Payment Links, you can either use the Payment Link API or the upload a file to bulk create Payment Links or through Dashboard as well.

Bulk Upload

When using File upload to create payment links, you can pass on the customer bank information to Cashfree in the CSV file being uploaded. You will use the Notes columns to fill in the specific values. For example, you can use the Notes 1 columns for bank code, Notes 2 for customer bank account number and Notes 3 for IFSC. Here is an example of a sample file.

Link Id,Expiry Time,Currency,Amount,Min Amount,Description,Customer Name,Customer Phone,Customer Email,Note 1 Title,Note 1 Description,Note 2 Title,Note 2 Description,Note 3 Title,Note 3 Description,Webhook URL
Order-12zzsa,2023-02-11,INR,22.5,10,Payment for order with id 1234,John Doe,9999999999,[email protected],customer_bank_code,3044,customer_bank_account_number,37866911583,customer_bank_ifsc,SBIN0001882,https://cashfree.com/callback-webhook

Order-12zsdca,2023-02-11,INR,22.5,10,Payment for order with id 1234,John Doe,9999999999,[email protected],customer_bank_code,3026,customer_bank_account_number,6633835901,customer_bank_ifsc,IDIB000V018,https://cashfree.com/callback-webhook

Payment Link API

To use TPV with Payment Link API, you need to pass on the customer bank information in the customer_details object. See the below request and response for reference.

curl --request POST \
  --url https://api.cashfree.com/pg/links \
  --header 'Content-Type: application/json' \
  --header 'x-api-version: 2022-09-01' \
  --header 'x-client-id: xxxx' \
  --header 'x-client-secret: xxxx' \
  --data '{
     "customer_details": {
          "customer_phone": "9908734803",
          "customer_email": "[email protected]",
          "customer_name": "Rohit",
			 	  "customer_bank_account_number": "78123123",
			 		"customer_bank_ifsc": "SBIN0000001",
			    "customer_bank_code": "3044"
     },
		"link_notify": {
          "send_sms": true
     },     
		 "link_id": "testlink12354",
     "link_amount": 4,
     "link_currency": "INR",
     "link_purpose": "Test for TPV"
}'
{
	"cf_link_id": 14796319,
	"link_id": "testlink12354",
	"link_status": "ACTIVE",
	"link_currency": "INR",
	"link_amount": 4,
	"link_amount_paid": 0,
	"link_partial_payments": false,
	"link_minimum_partial_amount": null,
	"link_purpose": "Test for TPV",
	"link_created_at": "2023-02-09T23:25:16+05:30",
	"customer_details": {
		"customer_name": "Rohit",
		"country_code": "+91",
		"customer_phone": "9908734803",
		"customer_email": "[email protected]"
	},
	"link_meta": {
		"payment_methods": "",
		"upi_intent": "false"
	},
	"link_url": "https://payments.cashfree.com/links/U4dfsav0ug50",
	"link_expiry_time": "2023-03-11T23:25:16+05:30",
	"link_notes": {
		"customer_bank_account_number": "5178191812",
		"customer_bank_code": "3044",
		"customer_bank_ifsc": "CITI0000001"
	},
	"link_auto_reminders": false,
	"link_notify": {
		"send_email": false,
		"send_sms": true
	}
}