post
https://test-accounts.payu.in/api/v3/merchants//kyc_document
The Upload KYC Document API uploads one KYC document per required category from Step 14 (Step 15 of 16).
HTTP Method: POST
Environment
| URL | |
|---|---|
| Test Environment | https://test-partner.payu.in/api/v3/merchants/{mid}/kyc_document |
| Production Environment | https://partner.payu.in/api/v3/merchants/{mid}/kyc_document |
Sample request
Sample request
curl --location 'https://test-partner.payu.in/api/v3/merchants/{{mid}}/kyc_document' \
--header 'Authorization: Bearer {{access_token}}' \
--form 'merchant[document_category]="PAN Card of Signing Authority"' \
--form 'merchant[document_type]="PAN Card"' \
--form 'merchant[processed_document]=@"/path/to/pan.pdf"'Sample response
Success scenario
Success scenario
{
"merchant": {
"mid": "8390925",
"kyc_document_name": "PAN Card of Signing Authority",
"kyc_document_uuid": "11ef-587e-4383...",
"kyc_document_status": "DOCUMENT_SUBMITTED",
"error_message": null,
"created_at": "2024-08-12T07:41:19.000Z"
}
}Failure scenario
Failure scenario
- 422 — Invalid category/type, missing file, too large, or unsupported format
{
"error": {
"document": "must be present"
}
}Response parameters
Response parameters
| Parameter | Description | Example |
|---|---|---|
| merchant.mid | string — Merchant ID | 8390925 |
| merchant.kyc_document_name | string — Uploaded category name | PAN Card of Signing Authority |
| merchant.kyc_document_uuid | string — Document UUID for show/delete | 11ef-587e-4383... |
| merchant.kyc_document_status | string — e.g. DOCUMENT_SUBMITTED, DOCUMENT_APPROVED, DOCUMENT_REJECTED | DOCUMENT_SUBMITTED |
| merchant.error_message | string/null — Error detail if any | null |
| merchant.created_at | string — Upload timestamp | 2024-08-12T07:41:19.000Z |
Additional request parameters info
Header parameters
Header parameters
| Header | Description | Example |
|---|---|---|
Authorizationmandatory | string — Bearer token from Step 00 (GetToken) | Bearer {{access_token}} |
Content-Typemandatory | string — Must be multipart/form-data | multipart/form-data |
Path parameters
Path parameters
| Parameter | Description | Example |
|---|---|---|
midmandatory | string — Numeric merchant ID (mid) from Step 01 | 8390925 |
Body parameters
Body parameters
| Parameter | Description | Example |
|---|---|---|
merchant[document_category]mandatory | string — Exact document_categories[i].name from Step 14 | PAN Card of Signing Authority |
merchant[document_type]mandatory | string — Exact document_types[j].name from Step 14 | PAN Card |
merchant[processed_document]mandatory | file — JPG/PNG/PDF, max 5 MB | pan.pdf |
400Bad Request
401Unauthorized - Invalid or expired token
403Forbidden - No access to this resource
404Not Found
422Validation Failed
500Internal Server Error
