get
https://hq.staging.netevia.dev/api/v1/merchant/generateMPAPDF
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Get Merchant Processing Agreement (MPA) PDF
Generates a Merchant Processing Agreement in PDF format using the merchant's stored information. The document is returned as a Base64-encoded PDF string within the API response envelope. This endpoint is used in the MPA signing workflow before requesting a merchant signature.
Endpoint
GET /api/v1/merchant/generateMPAPDF
Authentication
Basic HTTP Authentication required.
Encode username:password in Base64 and pass in the Authorization header:
Authorization: Basic {base64(username:password)}
When to use
Use this endpoint after the merchant application data has been fully populated to generate the legally binding MPA document. The returned PDF should be reviewed by the merchant before initiating the signature request via requestSignature. This is a required step in the MPA signing workflow.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer (int32) | Yes | The unique internal ID of the merchant application |
Response
200 OK
| Field | Type | Description |
|---|---|---|
| data | object | Wrapper for the MPA response payload |
| data.base64Pdf | string | Base64-encoded PDF content of the Merchant Processing Agreement |
| status | string | HTTP status string (e.g., "OK") |
| error | string | Error message if the request failed |
| warning | string | Non-fatal warning message |
| validationResults | array | List of validation errors, each with memberNames and errorMessage |
| requestId | integer (int32) | Internal request tracking ID |
{
"data": {
"base64Pdf": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL0NhdGFsb2c..."
},
"status": "OK",
"error": null,
"warning": null,
"validationResults": [],
"requestId": 48291
}Error Codes
| Code | When it happens |
|---|---|
| 400 | The id query parameter is missing or not a valid integer |
| 401 | Invalid or missing Basic Auth credentials |
| 403 | User does not have permission for this operation |
| 404 | No merchant application found for the given id |
| 500 | Internal server error while generating the PDF |
Common Mistakes
- Passing a string value for
idinstead of an integer — the parameter must be a numeric merchant application ID. - Attempting to call this endpoint before the merchant application data is complete; the resulting PDF may be missing required fields.
- Confusing this endpoint with
getSignedMPA— this endpoint generates the unsigned MPA for review, whilegetSignedMPAretrieves the signed copy. - The response body is JSON (not a raw binary stream); decode
data.base64Pdfclient-side to obtain the PDF bytes.
Related Endpoints
POST /api/v1/merchant/requestSignature— send the generated MPA to the merchant for electronic signingGET /api/v1/merchant/getSignatureStatus— poll the signing status after a signature request is initiatedGET /api/v1/merchant/getSignedMPA— retrieve the completed, signed copy of the MPA
Example
curl -X GET "https://hq.staging.netevia.dev/api/v1/merchant/generateMPAPDF?id=10045" \
-H "Authorization: Basic $(echo -n 'username:password' | base64)" \
-H "Accept: application/json"