Generate a new Merchant Processing Agreement (PDF) populated with the merchant’s information and save it to the merchant's ticket.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Generate Merchant Processing Application (MPA PDF)

Generates a Merchant Processing Agreement (MPA) PDF document pre-populated with the merchant's current profile data and saves it to the merchant's underwriting ticket. The generated PDF is also returned in the response as a Base64-encoded string, allowing you to display or download it directly without an additional fetch call.

Endpoint

POST /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

Call this endpoint after the merchant application data has been fully populated and is ready for the merchant's signature. The generated PDF is the document the merchant will review and sign. It must be generated before initiating the online signature request (POST /api/v1/merchant/requestSignature). If the merchant's data changes after the PDF is generated, regenerate it by calling this endpoint again before requesting a new signature.

Request Body

FieldTypeRequiredDescription
idinteger (int32)YesThe merchant profile ID for which to generate the MPA PDF
{
  "id": 48291
}

Response

200 OK

FieldTypeDescription
data.base64PdfstringThe generated MPA PDF encoded as a Base64 string — decode to get the raw PDF bytes
requestIdintegerUnique identifier for this API request
successbooleantrue if the PDF was generated and saved successfully
errorstringError message if generation failed
validationErrorsarrayList of field-level validation errors with field and error properties
{
  "data": {
    "base64Pdf": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9LaWRzIFszIDAgUl0KL0NvdW50IDEKPD4KZW5kb2JqCg=="
  },
  "requestId": 91047,
  "success": true,
  "error": null,
  "validationErrors": []
}

Error Codes

CodeWhen it happens
400id is missing or invalid
401Invalid or missing Basic Auth credentials
403User does not have permission for this operation
404Merchant with the specified id not found
500Internal server error or PDF generation failure

Common Mistakes

  • Calling this endpoint before the merchant's application data is complete — the generated PDF will reflect whatever data is currently on the record; incomplete fields will appear blank in the MPA.
  • Not regenerating the PDF after data changes — if the merchant's information is updated after the PDF is generated, a new PDF must be generated to reflect those changes before requesting a signature.
  • Attempting to decode the base64Pdf without proper Base64 decoding — use a standard Base64 decoder to convert the string to a PDF binary.
  • Skipping this step and calling the signature request endpoint directly — the signature request depends on an existing generated MPA attached to the merchant's ticket.

Related Endpoints

  • POST /api/v1/merchant/requestSignature — initiate the online signature request after generating the MPA
  • POST /api/v1/merchant/signatureCertificate — upload the completed signed certificate
  • GET /api/v1/merchant/getSignedMPA — retrieve the signed version of the MPA after signing is complete

Example

curl -X POST https://hq.staging.netevia.dev/api/v1/merchant/generateMPAPDF \
  -H "Authorization: Basic $(echo -n 'username:password' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "id": 48291
  }'
Body Params
int32
required
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/json