Contacts

Lists of APIs to create, update and delete a Contact in RazorpayX.


A contact is an entity to whom payouts can be made through supported modes such as UPI, IMPS, NEFT and RTGS.

You can try out our APIs on the Razorpay Postman Public Workspace.

Run in Postman

Create a Contact🔗

Use the below endpoint to create a contact:

/contacts

Handy Tips

  • A new contact is created if any combination of the following details is unique: name, email, contact, type and reference_id.
  • If all the above details match the details of an existing contact, the API returns details of the existing contact.
  • Use the Update Contact API if you want to make changes to an existing contact.

Request Parameters🔗

namemandatory
string The contact's name. This field is case-sensitive. A minimum of 3 characters and a maximum of 50 characters are allowed. Name cannot end with a special character, except .. Supported characters: a-z, A-Z, 0-9, space, , - , _ , / , ( , ) and , .. For example, Gaurav Kumar.
emailoptional
string The contact's email address. For example, gaurav.kumar@example.com.
contactoptional
string The contact's phone number. For example, 9123456789.
typeoptional
string Maximum 40 characters. Classification for the contact being created. For example, employee. The following classifications are available by default:
  • vendor
  • customer
  • employee
  • self

    Handy Tips
    Additional Classifications can be created via the Dashboard and then used in APIs. It is not possible to create new Classifications via API.
reference_idoptional
string Maximum 40 characters. A user-entered reference for the contact. For example, Acme Contact ID 12345.
notesoptional
object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

Response Parameters🔗

id
string The unique identifier linked to the contact. For example, cont_00000000000001.
entity
string The entity being created. Here, it will be contact.
name
string The contact's name. For example, Gaurav Kumar.
contact
string The contact's phone number. For example, 9123456789.
email
string The contact's email address. For example, gaurav.kumar@example.com.
type
string A classification for the contact being created. For example, employee.
reference_id
string A user-entered reference for the contact. For example, Acme Contact ID 12345.
batch_id
string This parameter is populated if the contact was created as part of a bulk upload. For example, batch_00000000000001.
active
boolean Possible values:
  • true (default) = active
  • false = inactive
notes
object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
created_at
integer Timestamp, in Unix, when the contact was created. For example, 1545320320.

Update a Contact🔗

Use the below endpoint to update details for an existing contact. Only send parameters you want to change in the request body.

/contacts/:id

Path Parameter🔗

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

Request Parameters🔗

nameoptional
string The contact's name. This field is case sensitive. Minimum 3 characters. Maximum 50 characters. Supported characters: a-z, A-Z, 0-9, space, , - , _ , / , ( , ) and , .. For example, Gaurav Kumar.
emailoptional
string The contact's email address. For example, gaurav.kumar@example.com.
contactoptional
string The contact's phone number. For example, 9123456789.
typeoptional
string Maximum 40 characters. Classification for the contact being created. For example, employee. The following classifications are available by default:
  • vendor
  • customer
  • employee
  • self

    Handy Tips
    Additional Classifications can be created via the Dashboard and then used in APIs. It is not possible to create new Classifications via API.
reference_idoptional
string Maximum 40 characters. A user-generated reference given to the contact. For example, Acme Contact ID 12345.
notesoptional
object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

Activate or Deactivate a Contact🔗

Use the below endpoint to activate or deactivate a contact. This helps you block payouts to certain contacts, as and when required.

/contacts/:id

Path Parameter🔗

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

Request Parameters🔗

activemandatory
boolean Represents the state to which you want to move the contact. A contact can have the following two states:
  • true (default) = active
  • false = inactive

    Pass false to deactivate an active contact and pass true to activate a deactivated contact.

Fetch all Contacts🔗

Use the below endpoint to fetch details of all contacts:

/contacts

Query Parameters🔗

name
string Name by which results should be filtered. For example, Gaurav.
email
string Email address by which results should be filtered. For example, gaurav.kumar@example.com.
contact
string Phone number by which results should be filtered. For example, 9123456789.
reference_id
string The user-generated reference by which results should be filtered. For example, Acme Contact ID 12345. Maximum length 40 characters.
active
boolean The state by which results should be filtered. Possible values:
  • 1= active
  • 0= inactive
type
string The classification by which results should be filtered. Possible values:
  • vendor
  • customer
  • employee
  • self
from
integer Timestamp, in Unix, from when contacts are to be fetched.
to
integer Timestamp, in Unix, till when contacts are to be fetched.
count
integer The number of contacts to be fetched. Default = 10. Maximum = 100. This can be used for pagination, in combination with skip.
skip
integer The number of contacts to be skipped. Default = 0. This can be used for pagination, in combination with count.

Fetch a Contact by ID🔗

Use the below endpoint to fetch details of a specific contact:

/contacts/:id

Path Parameter🔗

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