submitAttachment

POST: /aps/api/business/onboard/submitAttachment

Signature required

According to regulatory requirements of China, the Customer needs to submit photocopies of certifications for the registration process.

A Partner can use this API to upload files of certificate photocopies to WorldFirst(Alipay):

  • For an enterprise merchant, upload the photocopy of the business license.
  • For an individual merchant, upload photocopies of the front and back sides of the ID card.

If the submission is successful, WorldFirst(Alipay) responds to the Partner with URLs of the photocopy files.

Structure

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

Request parameters

Field

Data type

Required

Description

attachmentId

String

Yes

The unique identifier of a photocopy attachment. This parameter is used only to identify a request, not for idempotence control.

More information:

  • Maximum length: 64 characters

attachmentType

String

Yes

Type of the attachment file.

Valid values are:

  • BUSINESS_LICENSE: The merchant is an enterprise.
  • ID_CARD_FRONT_SIDE: The merchant is an individual.
  • ID_CARD_BACK_SIDE: The merchant is an individual.

For more details about each value, refer to the AttachmentType section.

attachmentContent

String

Yes

Photocopy content in Base64 encoding format.

Note:

  • The maximum file size is 1 MB. The original image format is limited to JPG or PNG.

More information:

  • Maximum length: 1048576 characters

Response parameters

Field

Data type

Required

Description

result

Result object

Yes

Indicates whether this API is called successfully.

attachmentUrl

String

Yes(Conditional)

The URL generated for the photocopy attachment.

Note:

  • This URL can be used in the registerCustomer API as the value of the attachment.file field.
  • WorldFirst(Alipay) returns this field when result.resultStatus is S.

More information:

  • Maximum length: 512 characters

Result processing logic

After calling the API, a response is returned. The possible responses for result.resultStatus are:

Result status

Description

S

This indicates the API call succeeded.

F

This indicates the API call failed. For more information on why the call failed, see result.resultCode.

U

This indicates the API call result is unknown. Call the interface again. If the issue is not resolved, contact WorldFirst(Alipay) Technical Support.

Result codes

result.resultCode

resultCode

resultStatus

resultMessage

Further action

SUCCESS

S

Success

PROCESS_FAIL

F

A general business failure occurred. Do not retry.

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

PARAM_ILLEGAL

F

Illegal parameters exist. For example, a non-numeric input, or an invalid date.

Check and verify whether the request fields, including the header fields and body fields, are correct and valid.

For details on the fields of each API, see the specific API Structure section.

INVALID_SIGNATURE

F

The signature is invalid.

Make sure the request is properly signed with a valid signature. For more details, refer to the following chapter:

REPEAT_REQ_INCONSISTENT

F

Repeated requests are inconsistent.

Ensure all the fields in the requests are the same and try again.

UNKNOWN_EXCEPTION

U

The API call is failed, which is caused by unknown reasons.

The service might be down, retry later. If the issue persists, contact WorldFirst Technical Support.

REQUEST_TRAFFIC_EXCEED_LIMIT

U

The request traffic exceeds the limit.

Call the interface again to resolve the issue. If the issue persists, contact WorldFirst Technical Support.

Samples

The following example assumes that the Partner attempts to register an individual Customer and submit the backside of the Customer's ID card.

Request

copy
{
 "attachmentId":"2021********",
 "attachmentType":"ID_CARD_BACK_SIDE",
 "attachmentContent":""
}

Response

copy
{
  "attachmentUrl": "2021****_********",
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "success",
    "resultStatus": "S"
  }
}

@2024 WorldFirst