Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

submitAttachment

POST /business/attachment/submitAttachment

Use the submitAttachment API to submit attachments required for the register API. Get the unique file key from attachmentKey in the response, and then use the key in the register API.

The attachment that you submit must adhere to the following requirements:

  • Maximum size: 32 MB
  • File format: PNG, JPG, GIF, DOC, DOCX, PDF, XLS, XLSX, CSV

Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:

Note: Set the data type of each field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:

  • If the data type of a field is Integer and its value is 20, set it as "20".
  • If the data type of a field is Boolean and its value is true, set it as "true".

Request parameters

submitAttachmentRequestId string  REQUIRED

The unique ID assigned by the marketplace to identify an attachment submission request.

More information:

  • This field is an API idempotency field. For attachment submission requests that are initiated with the same value of attachmentSubmissionRequestId and reach a final status of S or F, the same result is to be returned for the request.
  • Maximum length: 32 characters

attachmentType string  REQUIRED

The type of the attachment that you submit. Valid values are:

  • AUTHORIZER_SIGNATURE_CONFIRMATION_LETTER​: indicates that the attachment is a document that someone signs on behalf of an individual or a company.
  • ASSOCIATION_ARTICLE​: indicates that the attachment contains the rules and regulations of the company.
  • FINANCIAL_REPORT​: indicates that the attachment is the company's financial report.
  • OWNERSHIP_STRUCTURE_PIC​: indicates that the attachment is the company's ownership structure chart.
  • ADDRESS_PROOF​: indicates that the attachment serves as proof of the company member's residential address.
  • UBO_PROVE​: indicates that the attachment is the declaration of the company's UBO whose shareholding ratio is less than 25%.
  • ENTERPRISE_REGISTRATION​: indicates the enterprise registration certificate.
  • LICENSE_INFO​: indicates that the certificate is a business license.
  • ID_CARD​: indicates that the certificate is an identity card.
  • PASSPORT​: indicates that the certificate is a passport.
  • DRIVING_LICENSE​: indicates that the certificate is a driving license.
  • CPF​: indicates that the certificate is the Cadastro Pessoal de Pessoa Física (CPF) of the Brazilian individual taxpayer.
  • CNPJ​: indicates that the certificate is the Cadastro Nacional da Pessoa Jurídica (CNPJ), which is a federal identification number assigned to companies and businesses operating in Brazil.

More information:

  • Maximum length: 64 characters

fileSha256 string  REQUIRED

The SHA-256 hash value of the file, used to uniquely identify and verify its integrity and authenticity.

For more information, see How to calculate the SHA256 digest of a file.

More information:

  • Maximum length: 64 characters

Response parameters

result object  REQUIRED

The result of the API call.

Show child parameters

submitAttachmentRequestId string  

The unique ID assigned by the marketplace to identify an attachment submission request.

This parameter is returned when the value of result.resultStatus is S.

More information:

  • Maximum length: 32 characters

attachmentType string  

The type of the attachment that you submit. Valid values are:

  • AUTHORIZER_SIGNATURE_CONFIRMATION_LETTER: indicates that the attachment is a document that someone signs on behalf of an individual or a company.
  • ASSOCIATION_ARTICLE: indicates that the attachment contains the rules and regulations of the company.
  • FINANCIAL_REPORT: indicates that the attachment is the company's financial report.
  • OWNERSHIP_STRUCTURE_PIC: indicates that the attachment is the company's ownership structure chart.
  • ADDRESS_PROOF: indicates that the attachment serves as proof of the company member's residential address.
  • UBO_PROVE: indicates that the attachment is the declaration of the company's UBO whose shareholding ratio is less than 25%.
  • ENTERPRISE_REGISTRATION: indicates the enterprise registration certificate.
  • LICENSE_INFO: indicates that the certificate is a business license.
  • ID_CARD: indicates that the certificate is an identity card.
  • PASSPORT: indicates that the certificate is a passport.
  • DRIVING_LICENSE: indicates that the certificate is a driving license.
  • CPF: indicates that the certificate is the Cadastro Pessoal de Pessoa Física (CPF) of the Brazilian individual taxpayer.
  • CNPJ: indicates that the certificate is the Cadastro Nacional da Pessoa Jurídica (CNPJ), which is a federal identification number assigned to companies and businesses operating in Brazil.

This parameter is returned when the value of result.resultStatus is S.

More information:

  • Maximum length: 64 characters

attachmentKey string  

The unique key value of the attachment that you submit. The value of this parameter is used by the fileKeys or fileKey parameters in the register API.

This parameter is returned when the value of result.resultStatus is S.

More information:

  • Maximum length: 256 characters
API Explorer
Sample CodesRun in Sandbox

Request

URL
Request Body

Response

Response Body

How to calculate the SHA256 digest of a file

The following sample shows how to calculate the SHA 256 digest of the Xnip2022-11-24_17-12-56.png file and the output of the digest.

Sample Code

Result process logic

After making an API request, Alipay responds to you with the result of the API call. The possible responses for result.resultStatus are:

  • S: indicates the API call succeeded. You can obtain the value of attachmentKey in the response.
  • F: indicates the API call failed. For more information on why the call failed, see result.resultCode.
  • U: indicates the API call failed due to an unknown reason. Retry using the same request ID.

Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess

No need further action.

INVALID_SIGNATUREFThe signature is invalid.

Check whether the private key used to sign a request matches the public key of Antom Dashboard. The following signature references are useful:

METHOD_NOT_SUPPORTEDFThe server does not implement the requested HTTP method.

Check whether the HTTP method is correct.

PROCESS_FAILFA general business failure occurred.

Human intervention is usually needed. It is recommended that you contact Antom Technical Support to troubleshoot the issue.

PARAM_ILLEGALFThe required parameters are not passed, or illegal parameters exist. For example, a non-numeric input, an invalid date, or the length and type of the parameter are wrong.

Check and verify whether the required request fields (including the header fields and body fields) of the current API are correctly passed and valid.

UNKNOWN_EXCEPTIONUAn API call has failed, which is caused by unknown reasons.

Call the interface again using the same request ID to resolve the issue. If not resolved, contact Antom Technical Support.