文件上传

VCC File Upload API

Upload an identity document before creating or updating a cardholder.

Endpoint

Sandbox

POST https://api.futurepay-develop.com/api/v1/issuing/reference/upload

Production

POST https://api.futurepay.global/api/v1/issuing/reference/upload

Content-Type

multipart/form-data

Request Headers

HeaderTypeRequiredDescription
AuthorizationstringYesMerchant API secret key in the format Bearer YOUR_SECRET_KEY.
merchantIdstringYesMerchant ID. The merchant must be enabled and activated, with VCC product access enabled.
appIdstringYesAn enabled application ID assigned to the same merchant.
Content-TypestringYesmultipart/form-data with a boundary generated by the HTTP client.

Use the credentials assigned to the selected environment. The secret key, merchant ID and application ID must belong to the same merchant.

Request Parameters

Send the parameters as form-data.

ParameterTypeRequiredDescription
filefileYesOne non-empty file with a filename. Supported extensions: .jpg, .jpeg, .png, .pdf (case-insensitive). Maximum file size: 20 MB (20,971,520 bytes). The extension must match the file content type.

Upload the front and back of an identity document using separate requests. Each request accepts one file.

Request Example

Headers

KeyValue
AuthorizationBearer YOUR_SECRET_KEY
merchantIdYOUR_MERCHANT_ID
appIdYOUR_APP_ID

form-data

KeyValue
filefront.png

curl

curl --request POST \
  'https://api.futurepay-develop.com/api/v1/issuing/reference/upload' \
  --header 'Authorization: Bearer YOUR_SECRET_KEY' \
  --header 'merchantId: YOUR_MERCHANT_ID' \
  --header 'appId: YOUR_APP_ID' \
  --form 'file=@/path/to/front.png'

Replace /path/to/front.png with the local file location. For production, use the production endpoint and credentials.

When using curl --form, let curl generate the Content-Type header and multipart boundary. For other HTTP clients, use their multipart upload builder to generate both.

Response

FieldTypeDescription
codestringResult code. 0 indicates a successful upload.
msgstringResult message.
serverTimestringServer timestamp in milliseconds since the Unix epoch.
successbooleanWhether the request succeeded.
data.pathstringGenerated filename used to reference the uploaded file in subsequent cardholder requests. This is not a public URL or a full storage path.

Response Example

{
  "code": "0",
  "msg": "succeeded",
  "serverTime": "1794032836992",
  "success": true,
  "data": {
    "path": "37f9be70bca3462e89cbef4addd73a4d.png"
  }
}

The returned filename is generated by the server and may differ from the original filename. Always use the exact returned value.

Use the Uploaded File

Pass the returned path as individual.idDocFrontPath or individual.idDocBackPath when creating or updating a cardholder.

Example document fields:

{
  "individual": {
    "idDocFrontPath": "37f9be70bca3462e89cbef4addd73a4d.png",
    "idDocBackPath": "fedcba9876543210fedcba9876543210.png"
  }
}

This example shows only the document fields. Include the other required fields for the target operation. See the Cardholder API for the full request structure.

Each file can only be referenced by the merchant that uploaded it. A file uploaded by another merchant cannot be used, even if its filename is known.

Error Codes

CodeDescription
400A required header or file parameter is missing, or a request parameter has an invalid format. Check msg for details.
REQUEST_HEADER_MERCHANT_ID_MISSINGThe merchantId header is missing.
REQUEST_HEADER_MERCHANT_ID_INVALIDThe merchant ID is invalid.
API_APP_ID_INVALIDThe application ID is invalid, disabled, or does not match an eligible application for the merchant.
API_UPLOAD_AUTH_INVALIDThe Bearer credentials are invalid.
MERCHANT_NOT_EXISTThe merchant does not exist.
MERCHANT_STATUS_INVALIDThe merchant is disabled or has not been activated.
VCC_PRODUCT_NOT_ENABLEDThe merchant's VCC product access is not enabled.
API_FILE_REQUIREDThe file is empty.
API_FILE_NAME_REQUIREDThe filename is empty.
API_FILE_TOO_LARGEThe file exceeds 20 MB (20,971,520 bytes).
API_FILE_TYPE_INVALIDThe file extension or content type is not supported.
API_FILE_TYPE_MISMATCHThe file extension does not match the content type.
API_FILE_UPLOAD_FAILEDThe upload could not be completed. Retry later.

Error Response Example

{
  "code": "API_FILE_TYPE_INVALID",
  "msg": "Only jpg, jpeg, png and pdf files are supported",
  "serverTime": "1794032836992",
  "success": false
}

When a filename is submitted to a cardholder API, an unknown or inaccessible file reference returns API_FILE_NOT_FOUND with the message File not found or not accessible.


Did this page help you?