For the complete documentation index, see llms.txt. This page is also available as Markdown.

Upload Material Document

Uploads a supporting document and returns the file identifier used by material and compliance requests.

Endpoint

POST /remittance/material/upload-material-document

Sandbox base URL: https://rem-api-sandbox.pagsmile.com Content-Type: application/json; charset=UTF-8

The request uses the standard Remittance API request envelope. The fields below describe the decrypted biz_data object.

Requirement: M = Mandatory, O = Optional, and C = Conditional. A conditional field is mandatory only when the condition stated in its description applies.

Request body

Decrypted biz_data fields

Field
Type
Requirement
Description

merchant_id

long

M

Pagsmile-assigned unique identifier of the merchant.

file_type

Integer

M

Category of the uploaded supporting document. Supported values: 5 — PI/CI/PO contract 15 — Store and backend screenshot 26 — Payment contract or agreement 99 — Other. Use the category that matches the material's business and transaction type

file_content

string

M

Base64-encoded content of the document being uploaded.

file_name

string

M

Original name of the uploaded document, including its file extension. Maximum UTF-8 byte length: 256.

file_desc

string

O

Human-readable description of the uploaded document.

Plaintext biz_data example

This example includes mandatory fields and representative optional or conditional fields. Submit fields marked C only when the condition in the field description applies.

{
  "merchant_id": 100398,
  "file_type": 5,
  "file_content": "JVBERi0xLjQK...",
  "file_name": "document.pdf",
  "file_desc": "Example reference"
}

Request example

Use the partner_id and app_id assigned to your integration. The values above are placeholders.

Response

The data field in the response envelope is AES-encrypted. Decrypt random_key with your RSA private key, then use the resulting AES key to decrypt data. See Security for implementation details.

Encrypted response example

Decrypted data example

Response data fields

Field
Type
Requirement
Description

file_id

long

O

Pagsmile-assigned unique identifier of the uploaded document.

Related APIs

Last updated