Open API
首页
首页
  1. API
  • Document Revision History
  • Overview of Study Abroad Payment API Access
  • API Call Address
  • Request for serial number generation instructions
  • API Request Parameter Description
  • API Response Parameter Description
  • Interface encryption and signing steps
  • Interface decryption and verification process
  • Constant Description
    • pay_type description
    • order_status description
    • status_code description
    • fee_type description
    • attachment_type description
    • country_code description
    • currency_code description
    • Gender Description
    • ID type Description
  • API
    • Order interface
      POST
    • Attachment upload interface
      POST
    • Interface for obtaining payment address
      POST
    • Order batch query interface
      POST
  • Asynchronous notification description v1
    • [Successful Payment] Asynchronous notification parameter description for successful payment
    • Explanation of Asynchronous Notification Signature Generation Process
  • Asynchronous notification description v2
    • Asynchronous Notification Description
    • Asynchronous Notification Signature Generation Process
    • [Order Status Change] Asynchronous notification parameter description for order status change
  1. API

Attachment upload interface

POST
https://api.easytransfer.cn/server
英文
server_type value upload_attachment
The limit for uploading attachments of each attachment type is 5

Request

Body Params application/json
serial_number
string 
Request serial number
required
Each request must pass a unique serial number. The rules for generating serial numbers refer to the instructions for generating serial numbers.
merchant_number
string 
Merchant ID
required
Provided by ET
sub_merchant_number
string 
Second level merchant account
required
Provided by ET
server_type
enum<string> 
Service Type
required
Different interfaces pass different values for service types.
Allowed value:
upload_attachment
version
string 
Version
required
Default 2.0.0
callback_process
integer 
required
Do you need special treatment? Please contact ET for details
data
object 
required
Json string, the data content varies for different interfaces, please refer to the documentation for each interface for details.
order_id
string 
order id
required
ET order id
attachment_type
integer 
attachment type
required
See the attachment type description in the constant description for details.
base64
string 
attachement Base64
required
Base64 encoding of attachments
file_name
string 
file name
required
Image support formats jpg, jpeg, png, gif, pdf Each image cannot exceed 5M in size.
sensitive_data
object 
required
Sensitive data in Json format. The interface needs to return sensitive data, and special instructions will be requested in the interface parameters. When there is no value, an empty string will be passed. Encryption process reference interface encryption and decryption steps
sign
string 
required
If the signature verification method provided by Yisihui is not used, both parties need to negotiate and discuss the signature verification method. The signature process refers to the encryption and signature steps of the interface.
aeskey
string 
required
Used for AES encryption, key and iv are the same value and need to be encrypted. The encryption process refers to the encryption and decryption steps of the interface. If no encryption is required, the value is empty
extend_info
string 
required
The default is empty.
return_info
string 
required
For example, when calling, if this value is passed as 1, there will also be a field that returns 1.
Example
{
  "serial_number": "string",
  "merchant_number": "string",
  "sub_merchant_number": "string",
  "server_type": "upload_attachment",
  "version": "string",
  "callback_process": 0,
  "data": {
    "order_id": "string",
    "attachment_type": 0,
    "base64": "string",
    "file_name": "string"
  },
  "sensitive_data": {},
  "sign": "string",
  "aeskey": "string",
  "extend_info": "string",
  "return_info": "string"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.easytransfer.cn/server' \
--header 'Content-Type: application/json' \
--data-raw '{
    "serial_number": "string",
    "merchant_number": "string",
    "sub_merchant_number": "string",
    "server_type": "upload_attachment",
    "version": "string",
    "callback_process": 0,
    "data": {
        "order_id": "string",
        "attachment_type": 0,
        "base64": "string",
        "file_name": "string"
    },
    "sensitive_data": {},
    "sign": "string",
    "aeskey": "string",
    "extend_info": "string",
    "return_info": "string"
}'

Responses

🟢200成功
application/json
Body
status_code
string 
Status Code
required
"000000: Indicates a successful return. Please refer to the status code explanation for further details."
>= 6 characters<= 6 characters
Example:
000000
message
string 
Message
required
For example, the request was Request successful
>= 0 characters<= 100 characters
count
integer 
Count
optional
The following data is a list representing the length of the data list.
data
array[string]
Data
required
Json format, list. The data content returned by different interfaces is different. Please refer to the description of each interface for details.
sensitive_data
array [object] 
Sensitive Data
required
Json format, list. The interface needs to return sensitive data, and will return special instructions in the parameters. If there are no sensitive data fields, there is no need to process.
return_info
string 
return_info
required
If this parameter is passed when requesting, the original value will be returned when returning.
extend_info
string 
Extend Info
required
Expand information and reserve for use
sign
string 
Sign
required
If you do not use the verification method provided by Easihub, you need to discuss the verification method with both parties.
aeskey
string 
aes encryption key
required
For aes encryption, the key and iv are the same value and need to be encrypted. Refer to the interface encryption and decryption steps for the encryption process. If there is no need for encryption, the value is empty
Example
{
  "status_code": "000000",
  "message": "string",
  "count": 0,
  "data": [
    "string"
  ],
  "sensitive_data": [
    {}
  ],
  "return_info": "string",
  "extend_info": "string",
  "sign": "string",
  "aeskey": "string"
}
Previous
Order interface
Next
Interface for obtaining payment address
Built with