POST
/
vendor
/
create
curl --request POST \
  --url https://api.paytring.com/vendor/create \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "vendor_id": "<string>",
  "name": "Vendor Name",
  "email": "<string>",
  "phone": "<string>",
  "upi_id": "<string>",
  "bank_details": {
    "account_no": "<string>",
    "ifsc_code": "<string>"
  }
}'
"{\n  \"success\": true,\n  \"message\": \"Vendor added successfully\",\n  \"vendor_id\": \"unique_vendor_id\",\n  \"id\": \"unique_vendor_platform_id\"\n}\n"

The API provides a means for merchants or administrators to add new vendors to the system with essential details.

Request Body

{
  "vendor_id": "string", // Provided by merchant
  "name": "string", // Vendor name (no special characters other than space)
  "email": "string", // Valid email address
  "phone": "string", // Vendor phone number (optional)
  "upi_id": "string", // Vendor UPI ID (optional)
  "bank_details": {
    "account_no": "string", // Bank account number
    "ifsc_code": "string" // Bank IFSC code
  }
}

Responses

200 OK

{
  "success": true,
  "message": "Vendor added successfully",
  "vendor_id": "string",
  "id": "string"
}

400 Bad Request

{
  "status": false,
  "error": {
    "message": "Invalid request",
    "code": 400
  }
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
vendor_id
string
required

provided by merchant

name
string
default:Vendor Name
required

Vendor Name, this field will not accept any special char other then space

email
string
required

a valid email address

phone
string
upi_id
string

vpa of merchant, if provided will be used as a default option

bank_details
object

Response

200
application/json
200
success
boolean
default:true
Example:

true

message
string
Example:

"Vendor added successfully"

vendor_id
string
Example:

"unique_vendor_id"

id
string
Example:

"unique_vendor_platform_id"