上传证明
curl --request POST \
--url https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', 'id_front.jpg');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nid_front.jpg\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nid_front.jpg\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nid_front.jpg\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nid_front.jpg\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "2c4c2f74-7179-4113-83fb-f11dbce9e07d",
"documentId": "2e16d844-4fa9-4295-9a21-83ec32ef241a",
"proofType": "FRONT",
"fileName": "id_front.jpg",
"mimeType": "image/jpeg",
"sizeBytes": 102400,
"verificationStatus": "PENDING",
"verifiedBy": null,
"verifiedAt": null,
"verificationReason": null,
"uploadedBy": "12345",
"uploadedAt": "2024-01-15T17:03:13Z",
"status": "CURRENT",
"supersededAt": null,
"supersededBy": null,
"replacedByProofId": null,
"deletedAt": null,
"deletedBy": null,
"inVerification": false
}
证明材料
上传证明
POST
/
api
/
entity
/
v1
/
documents
/
{docId}
/
proofs
上传证明
curl --request POST \
--url https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileimport requests
url = "https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', 'id_front.jpg');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nid_front.jpg\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nid_front.jpg\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nid_front.jpg\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/entity/v1/documents/{docId}/proofs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nid_front.jpg\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "2c4c2f74-7179-4113-83fb-f11dbce9e07d",
"documentId": "2e16d844-4fa9-4295-9a21-83ec32ef241a",
"proofType": "FRONT",
"fileName": "id_front.jpg",
"mimeType": "image/jpeg",
"sizeBytes": 102400,
"verificationStatus": "PENDING",
"verifiedBy": null,
"verifiedAt": null,
"verificationReason": null,
"uploadedBy": "12345",
"uploadedAt": "2024-01-15T17:03:13Z",
"status": "CURRENT",
"supersededAt": null,
"supersededBy": null,
"replacedByProofId": null,
"deletedAt": null,
"deletedBy": null,
"inVerification": false
}
上传支持已声明文档的文件(身份证件图像、地址证明 PDF、公司章程)。证明将以 verificationStatus: PENDING 状态创建并加密存储;Localpayment 会对其进行审核。上传所有文件后,请调用 Request Verification。
- 每个文档的文件数。一个文档可以包含您所需数量的证明:身份证件的正面、背面和自拍照,合同的各页,收据。每个文档 id 的文件数量没有限制。
- 替换。FRONT、BACK 和 SELFIE 各自只有一个当前文件:再次上传相同类型会替换先前的文件,后者将变为 SUPERSEDED。DOCUMENT 和 OTHER 会累积:每次上传都会新增一个文件(合同的各页、多张收据)。
- 已批准的文件会被保留。替换已为 APPROVED 的 FRONT、BACK 或 SELFIE 会返回 409 PROOF_APPROVED。
- 审核期间。当实体处于 IN_REVIEW 状态时,不能上传、替换或删除任何文件(409 ENTITY_IN_REVIEW)。
- 请检查响应中的 sizeBytes > 0:不含文件部分的 multipart 请求会存储一个空证明。
- 文件永远不会内联返回;请通过 Get a Proof 或 Download a Proof File 下载。
application/problem+json 格式,并附带稳定的 code。完整目录:实体状态和错误代码。授权
请求头
查询参数
响应
已创建。
最后修改于 2026年11月10日

