Skip to main content

Create Contact

Authentication

Basic Authentication

  • Username: Client Id
  • Password: Secret Key

Example Authorization Header:

Authorization: Basic eGV0dGxlXzgzMjg2NjU5YmRmNzBkZWEzMDUwMzcwNzE1MTYwMzA0MDo3YzE1ZDQyYTZhYjEyOTYzYWI4NzJhMzFkOTk4MDk1ZDMwNTAzNzA3MTUxNjMyMDg5

Request Body

{
"firstName":"Demo",
"lastName":"Kumar",
"email":"demo@gmail.com",
"mobile":"1122334455",
"type":"customer",
"accountType":"bank_account",
"accountNumber":"XXXXXXXXXXXXXX2223",
"ifsc":"YESB000XXXX",
"referenceId":"REFC56789097666"
}

Request Parameters

ParameterTypeRequiredDescription
firstNameStringYesFirst name of the contact
lastNameStringYesLast name of the contact
emailStringYesEmail address of the contact
mobileStringYesMobile number of the contact
typeStringYesType of contact (e.g., "customer")
accountTypeStringYesType of account (e.g., "bank_account")
accountNumberStringYesBank account number
ifscStringYesIFSC code of the bank branch
referenceIdStringYesYour reference ID for this contact

Request Examples

Request Examples

curl --location 'https://xyz.com/v1/service/payout/contacts' --header 'Content-Type: application/json' --header 'Authorization: Basic U0FGRUVfYmNlOTQ4MmUxZmJlZmFiMzEwMjU2MjY2NTg5NTUyMDk6MjRlN2Y3NGMyNjUxZTI3ZGQwOTI0NTA5OTM5YWY5NTgxMDI1NjI2NjU4OTYyNDcx' --data-raw '{
"firstName":"Demo",
"lastName":"Kumar",
"email":"demo@gmail.com",
"mobile":"1122334455",
"type":"customer",
"accountType":"bank_account",
"accountNumber":"XXXXXXXXXXXXXX2223",
"ifsc":"YESB000XXXX",
"referenceId":"REFC56789097666"
}'

Response Examples

{
"code": "0x0200",
"message": "Contact created successfully",
"status": "SUCCESS",
"data": {
"contactId": "CONT_30745919103659994DE3C",
"firstName": "Demo",
"lastName": "Kumar",
"email": "demo@gmail.com",
"mobile": "1122334455",
"type": "customer",
"accountType": "bank_account",
"reference": "REFC56789097666",
"isActive": "1",
"accountNumber": "XXXXXXXXXXXXXX2223",
"accountIFSC": "YESB000XXXX"
}
}

Key indicators of success:

  • code is 0x0200 (SUCCESS_CODE)
  • status is "SUCCESS"
  • data.status is "processed"

Key indicators of transaction failure:

  • code is still 0x0200 because the status check itself succeeded
  • status is "SUCCESS" (referring to the status check, not the transaction)
  • data.status is "failed"

Key indicators of invalid request:

  • code is 0x0202 (FAILED_CODE)
  • status is "FAILURE"
  • No data object is returned
  • message describes the specific error

Key indicators of processing:

  • code is 0x0200 because the status check succeeded
  • status is "SUCCESS" (referring to the status check)
  • data.status is "processing"

Response Codes

The API uses the following response codes to indicate the status of requests:

CodeDescriptionMeaning
0x0200SUCCESSThe request was processed successfully.
0x0201UNAUTHORIZEDAuthentication failed or insufficient permissions.
0x0202FAILEDThe request processing failed for a reason other than those specifically identified.
0x0203MISSING_PARAMETERThe request is missing one or more required parameters.
0x0206PENDINGThe request has been received and is being processed, but processing has not yet completed.
0x0205SOMETHING_WENT_WRONGA server error occurred during processing of the request.