API Test keys

API Test keys

Create a Fund Account of Type Wallet

POST
/v1/fund-accounts/

Click to copy

Use this endpoint to create a Fund Account of the type wallet. A new Fund Account is created if any combination of the following details is unique: contact_id, wallet.phone.number, wallet.phone.country_code, and wallet.email.

  • If all the above details match the details of an existing Fund Account, the API returns details of the existing Fund Account.
  • You cannot edit the details of a Fund Account.

Is this page helpful?

Curl

1
curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET> \
2
-X POST https://api.razorpay.com/v1/fund_accounts \
3
-H "Content-Type: application/json" \
4
-d '{
5
"contact_id": "cont_00000000000001",
6
"account_type": "wallet",
7
"wallet": {
8
"provider": "amazonpay",
9
"phone": "+919876543210",
10
"email": "gaurav.kumar@example.com",
11
"name": "Gaurav Kumar"
12
}
13
}'

Success

1
{
2
"id": "fa_00000000000001",
3
"entity": "fund_account",
4
"contact_id": "cont_00000000000001",
5
"account_type": "wallet",
6
"wallet": {
7
"provider": "amazonpay",
8
"phone": "+919876543210",
9
"email": "gaurav.kumar@example.com",
10
"name": "Gaurav Kumar"
11
},
12
"active": true,
13
"batch_id": null,
14
"created_at": 1543650891
15
}
Request Parameters
contact_id

*

string

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

account_type

*

string

The account type you want to link to the contact ID. Here, it is wallet.

wallet

*

object

The contact's wallet details.

Show child parameters (4)

Response Parameters
id
string

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

entity
string

Here it will be fund_account.

contact_id
string

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

account_type
string

The fund account type created. Here it is wallet.

wallet
object

The contact's wallet details.

Show child parameters (4)

active
boolean

Possible values:

  • true: active
  • false: inactive

batch_id
string

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

created_at
integer

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

Create a Fund Account of Type Wallet

POST
/v1/fund-accounts/

Click to copy

Use this endpoint to create a Fund Account of the type wallet. A new Fund Account is created if any combination of the following details is unique: contact_id, wallet.phone.number, wallet.phone.country_code, and wallet.email.

  • If all the above details match the details of an existing Fund Account, the API returns details of the existing Fund Account.
  • You cannot edit the details of a Fund Account.

Is this page helpful?

Request Parameters
contact_id

*

string

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

account_type

*

string

The account type you want to link to the contact ID. Here, it is wallet.

wallet

*

object

The contact's wallet details.

Show child parameters (4)

Response Parameters
id
string

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

entity
string

Here it will be fund_account.

contact_id
string

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

account_type
string

The fund account type created. Here it is wallet.

wallet
object

The contact's wallet details.

Show child parameters (4)

active
boolean

Possible values:

  • true: active
  • false: inactive

batch_id
string

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

created_at
integer

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

Curl

1
curl -u <YOUR_KEY_ID>:<YOUR_KEY_SECRET> \
2
-X POST https://api.razorpay.com/v1/fund_accounts \
3
-H "Content-Type: application/json" \
4
-d '{
5
"contact_id": "cont_00000000000001",
6
"account_type": "wallet",
7
"wallet": {
8
"provider": "amazonpay",
9
"phone": "+919876543210",
10
"email": "gaurav.kumar@example.com",
11
"name": "Gaurav Kumar"
12
}
13
}'

Success

1
{
2
"id": "fa_00000000000001",
3
"entity": "fund_account",
4
"contact_id": "cont_00000000000001",
5
"account_type": "wallet",
6
"wallet": {
7
"provider": "amazonpay",
8
"phone": "+919876543210",
9
"email": "gaurav.kumar@example.com",
10
"name": "Gaurav Kumar"
11
},
12
"active": true,
13
"batch_id": null,
14
"created_at": 1543650891
15
}