get
https://test-accounts.payu.in/api/v1/merchants//generate_merged_document_for_esign
The Generate Agreement for E-Sign API generates the merged merchant agreement document for electronic signing (Step 16 of 16 — final step).
HTTP Method: GET
Environment
| URL | |
|---|---|
| Test Environment | https://test-partner.payu.in/api/v1/merchants/{uuid}/generate_merged_document_for_esign |
| Production Environment | https://partner.payu.in/api/v1/merchants/{uuid}/generate_merged_document_for_esign |
Note: Ensure the token includes
refer_merchantand eitherclient_manage_agreementorclient_manage_kyc_details. Contact your PayU Key Account Manager (KAM) if scopes need enablement.
Sample Request
Sample request
curl --location 'https://test-partner.payu.in/api/v1/merchants/{{uuid}}/generate_merged_document_for_esign' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Accept: application/json'Sample Response
Success scenario
Success scenario
{
"agreement_url": "https://esign.example.com/document/...",
"agreement_status": "Generated",
"message": "Agreement generated successfully"
}Failure scenario
Failure scenario
- 401 Unauthorized — Missing required scopes (
client_manage_agreementorclient_manage_kyc_details)
{
"error": "unauthorized",
"message": "Insufficient scope"
}Response parameters
Response parameters
| Parameter | Description | Example |
|---|---|---|
| agreement_url | string — URL for the merchant to complete e-sign | https://esign.example.com/document/... |
| agreement_status | string — Agreement status after generation | Generated |
| message | string — Status message | Agreement generated successfully |
Request parameters
Header parameters
Header parameters
| Header | Description | Example |
|---|---|---|
Authorizationmandatory | string — Bearer token from Step 00 (GetToken) | Bearer {{access_token}} |
Acceptoptional | string — Preferred response media type | application/json |
Path parameters
Path parameters
| Parameter | Description | Example |
|---|---|---|
uuidmandatory | string — Merchant UUID from Step 01 (CreateMerchant) | 11ef-d968-6b042d6c-9b94-02975f21d323 |
400Bad Request
401Unauthorized - Invalid or expired token
403Forbidden - No access to this resource
404Not Found
422Validation Failed
500Internal Server Error
