添加文档
curl --request POST \
--url https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "PROOF_OF_ADDRESS",
"id": "POA-0001",
"issuingCountry": "BRA"
}
'import requests
url = "https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents"
payload = {
"type": "PROOF_OF_ADDRESS",
"id": "POA-0001",
"issuingCountry": "BRA"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'PROOF_OF_ADDRESS', id: 'POA-0001', issuingCountry: 'BRA'})
};
fetch('https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents', 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/entities/{entityId}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'PROOF_OF_ADDRESS',
'id' => 'POA-0001',
'issuingCountry' => 'BRA'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/entities/{entityId}/documents"
payload := strings.NewReader("{\n \"type\": \"PROOF_OF_ADDRESS\",\n \"id\": \"POA-0001\",\n \"issuingCountry\": \"BRA\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/entities/{entityId}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"PROOF_OF_ADDRESS\",\n \"id\": \"POA-0001\",\n \"issuingCountry\": \"BRA\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"PROOF_OF_ADDRESS\",\n \"id\": \"POA-0001\",\n \"issuingCountry\": \"BRA\"\n}"
response = http.request(request)
puts response.read_body{
"documentId": "e0ea9515-442e-4bc5-bc82-b8d278255c37",
"entityId": "5aced5da-40c1-4bec-85ff-c8cd1bcb4526",
"type": "PROOF_OF_ADDRESS",
"id": "POA-0001",
"issuingCountry": "BRA",
"issueDate": null,
"expirationDate": null,
"isPrimary": false,
"status": "PENDING",
"metadata": null,
"proofs": [],
"createdAt": "2024-01-15T17:03:11Z",
"updatedAt": "2024-01-15T17:03:11Z"
}
文档
添加文档
POST
/
api
/
entity
/
v1
/
entities
/
{entityId}
/
documents
添加文档
curl --request POST \
--url https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "PROOF_OF_ADDRESS",
"id": "POA-0001",
"issuingCountry": "BRA"
}
'import requests
url = "https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents"
payload = {
"type": "PROOF_OF_ADDRESS",
"id": "POA-0001",
"issuingCountry": "BRA"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'PROOF_OF_ADDRESS', id: 'POA-0001', issuingCountry: 'BRA'})
};
fetch('https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents', 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/entities/{entityId}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'PROOF_OF_ADDRESS',
'id' => 'POA-0001',
'issuingCountry' => 'BRA'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/entities/{entityId}/documents"
payload := strings.NewReader("{\n \"type\": \"PROOF_OF_ADDRESS\",\n \"id\": \"POA-0001\",\n \"issuingCountry\": \"BRA\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/entities/{entityId}/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"PROOF_OF_ADDRESS\",\n \"id\": \"POA-0001\",\n \"issuingCountry\": \"BRA\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/entity/v1/entities/{entityId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"PROOF_OF_ADDRESS\",\n \"id\": \"POA-0001\",\n \"issuingCountry\": \"BRA\"\n}"
response = http.request(request)
puts response.read_body{
"documentId": "e0ea9515-442e-4bc5-bc82-b8d278255c37",
"entityId": "5aced5da-40c1-4bec-85ff-c8cd1bcb4526",
"type": "PROOF_OF_ADDRESS",
"id": "POA-0001",
"issuingCountry": "BRA",
"issueDate": null,
"expirationDate": null,
"isPrimary": false,
"status": "PENDING",
"metadata": null,
"proofs": [],
"createdAt": "2024-01-15T17:03:11Z",
"updatedAt": "2024-01-15T17:03:11Z"
}
为现有实体声明一份附加文件:地址证明、公司章程、授权委托书或任何其他证明文件。文件随后通过“上传证明文件”上传。
- 主文件始终是创建实体时发送的文件。在此处发送 isPrimary: true 将返回 400 VALIDATION_ERROR。
- 实体不得处于 IN_REVIEW、REJECTED、BLOCKED 或 CLOSED 状态。
application/problem+json,并带有稳定的 code。完整目录:实体状态和错误代码。授权
请求头
请求体
application/json
响应
已创建。
最后修改于 2026年11月10日

