/merchant/files Upload Onboarding File
Background
/merchant/files is the second step of sub-merchant creation. One request uploads one file and attaches it to the onboarding record returned by Submit sub-merchant profile. The record must belong to the primary merchant in the request header, and its status must be draft.
Before confirmation, upload at least one file in each of the five required categories. The same onboarding record can be uploaded to more than once. A later file in the same category is appended and does not replace earlier files. After the uploads, call Confirm submission.
Integration
The request headers X-Merchant-Id, X-Timestamp, X-Nonce, Digest, and Authorization are required. Digest is computed over the final raw multipart bytes. This endpoint does not accept seqNo.
Endpoint
| Item | Value |
|---|---|
| Method | POST |
| Path | /merchant/files |
| Content-Type | multipart/form-data |
| Purpose | Upload one material and attach it to the onboarding record |
The request Content-Type must be multipart/form-data. It only means the body is a form that contains a file. The file format is declared by the form field contentType below. The Content-Type of the file part itself is neither read nor stored.
Request Fields
| Field | Location | Type | Length | Required | Description |
|---|---|---|---|---|---|
onboardingNo | form | string | 36 | Yes | Onboarding number returned by the profile endpoint. |
category | form | string | 32 | Yes | Material category. See the enum below. |
contentType | form | string | 32 | Yes | File format. See the enum below. After validation, this value is stored. The response does not return it. |
file | form | file | - | Yes | File content. Greater than 0 and no larger than 8MB. The file name is the last segment of filename. |
category enum
PSP and ISV sub-merchants use the same document checklist. Send one category and one file per upload. The platform attaches the file by category; do not send arrays of file IDs in the create or confirm JSON.
Upload category | Corresponding document field | Document | Required for review |
|---|---|---|---|
oms_ | company | Company registration certificate | At least one |
oms_ | articles | Articles of association and applicable amendments | At least one |
oms_ | legal | Legal representative’s identity document | At least one |
oms_ | shareholder | Evidence of shareholders and ultimate beneficial owners | At least one |
oms_ | company | Proof of company address | At least one |
oms_other_file | otherFile | Other supporting documents | Optional |
contentType enum
| Value | Description |
|---|---|
application/pdf | |
image/jpeg | JPEG |
image/png | PNG |
image/webp | WebP |
image/gif | GIF |
Request Example
POST /merchant/files HTTP/1.1
Content-Type: multipart/form-data; boundary=----AdopayBoundary
X-Merchant-Id: 92315566000120
X-Timestamp: 1790200000
X-Nonce: 550e8400-e29b-41d4-a716-446655440001
Digest: SHA-256=<Base64 digest>
Authorization: Signature keyId="v1",alg="ES256",headers="(request-target) x-timestamp x-nonce digest",signature="<ES256_SIGNATURE_BASE64>"
------AdopayBoundary
Content-Disposition: form-data; name="onboardingNo"
6f1c0e3a-1b2c-4d5e-8f90-a1b2c3d4e5f6
------AdopayBoundary
Content-Disposition: form-data; name="category"
oms_company_registration
------AdopayBoundary
Content-Disposition: form-data; name="contentType"
application/pdf
------AdopayBoundary
Content-Disposition: form-data; name="file"; filename="business-license.pdf"
Content-Type: application/octet-stream
<file bytes>
------AdopayBoundary--The Content-Type: application/octet-stream on the file part in this example is not the format. The format is the form field contentType.
Response Fields
status 200 means the file has been stored and attached to the matching material. Confirm does not send fileId again.
| Field | Type | Length | Always Returned | Description |
|---|---|---|---|---|
status | int | 4 | Yes | Response code. |
msg | string | 128 | Yes | Corresponds to status. |
data. | string | 32 | Yes | File id. |
data. | string | 255 | Yes | Stored file name. |
data. | int | 19 | Yes | Size in bytes. |
data. | string | 32 | Yes | Same as the request category. Values are in the enum above. |
Response Example
{
"status": 200,
"msg": "sucesso",
"data": {
"fileId": "10086001",
"fileName": "business-license.pdf",
"fileSize": 204800,
"category": "oms_company_registration"
}
}Business Rules
The following cases are rejected and do not produce a fileId:
- The onboarding number does not exist, does not belong to this primary merchant, or the status is not
draft. categoryis not in the enum, or does not match the access mode of the onboarding record.contentTypeis empty, is not in the enum, or does not match the file content.- The file is empty, or larger than 8MB.
Each category may contain at most 5 files when the partner confirms submission. This endpoint still appends one file per call and does not reject by count.