API Test Keys

Activate or Deactivate a Fund Account

PATCH
/v1/fund_accounts/:id

Click to copy

Use this endpoint to activate or deactivate a fund account. This helps you block payouts to certain fund accounts, as and when required.

Is this page helpful?

Curl

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
2
-X PATCH https://api.razorpay.com/v1/fund_accounts/fa_00000000000001 \
3
-H "Content-Type: application/json" \
4
-d '{
5
"active": false
6
}'

Success

1
{
2
"id": "fa_00000000000001",
3
"entity": "fund_account",
4
"contact_id": "cont_00000000000001",
5
"account_type": "bank_account",
6
"bank_account": {
7
"ifsc": "HDFC0000053",
8
"bank_name": "HDFC Bank",
9
"name": "Gaurav Kumar",
10
"account_number": "765432123456789"
11
},
12
"active": false,
13
"batch_id": null,
14
"created_at": 1545312598
15
}
Path Parameters
id

*

string

The unique identifier linked to the fund account. For example, fa_00000000000001.

Request Parameters
active

*

boolean

The state to which you want to move the fund account. Possible values:

  • true (default): active
  • false: inactive
    Pass false to deactivate an account and pass true to activate an account.

Response Parameters
id
string

The unique identifier linked to the fund account. For example, fa_00000000000001.

entity
string

Here it is fund_account.

contact_id
string

The unique identifier linked to the contact. For example, cont_00000000000001.

account_type
string

The fund account type being created. Here it will either be bank_account, vpa or card.

Show child parameters (3)

active
boolean

Possible values of Fund Account status:

  • true: active
  • false: inactive

batch_id
string

This value is returned if the fund account was created as part of a bulk upload.
For example, batch_00000000000001.

status
string

The status of the account validation transaction. Possible values:

  • created
  • completed
  • failed

results
object

Result of the validation. If the account validation is complete and the account is invalid, the value in the below parameters is invalid.

Show child parameters (2)

created_at
integer

Timestamp, in Unix, when the fund account was created. For example, 1543650891.

Errors

<fund account id> is not a valid id.

Error Status: 4xx

The fund account ID entered is invalid.

Solution

Activate or Deactivate a Fund Account

PATCH
/v1/fund_accounts/:id

Click to copy

Use this endpoint to activate or deactivate a fund account. This helps you block payouts to certain fund accounts, as and when required.

Is this page helpful?

Path Parameters
id

*

string

The unique identifier linked to the fund account. For example, fa_00000000000001.

Request Parameters
active

*

boolean

The state to which you want to move the fund account. Possible values:

  • true (default): active
  • false: inactive
    Pass false to deactivate an account and pass true to activate an account.

Response Parameters
id
string

The unique identifier linked to the fund account. For example, fa_00000000000001.

entity
string

Here it is fund_account.

contact_id
string

The unique identifier linked to the contact. For example, cont_00000000000001.

account_type
string

The fund account type being created. Here it will either be bank_account, vpa or card.

Show child parameters (3)

active
boolean

Possible values of Fund Account status:

  • true: active
  • false: inactive

batch_id
string

This value is returned if the fund account was created as part of a bulk upload.
For example, batch_00000000000001.

status
string

The status of the account validation transaction. Possible values:

  • created
  • completed
  • failed

results
object

Result of the validation. If the account validation is complete and the account is invalid, the value in the below parameters is invalid.

Show child parameters (2)

created_at
integer

Timestamp, in Unix, when the fund account was created. For example, 1543650891.

Errors

<fund account id> is not a valid id.

Error Status: 4xx

The fund account ID entered is invalid.

Solution

Curl

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
2
-X PATCH https://api.razorpay.com/v1/fund_accounts/fa_00000000000001 \
3
-H "Content-Type: application/json" \
4
-d '{
5
"active": false
6
}'

Success

1
{
2
"id": "fa_00000000000001",
3
"entity": "fund_account",
4
"contact_id": "cont_00000000000001",
5
"account_type": "bank_account",
6
"bank_account": {
7
"ifsc": "HDFC0000053",
8
"bank_name": "HDFC Bank",
9
"name": "Gaurav Kumar",
10
"account_number": "765432123456789"
11
},
12
"active": false,
13
"batch_id": null,
14
"created_at": 1545312598
15
}