Confirm uploaded customer files
curl --request POST \
--url https://api.moonpay.com/platform/v1/customers/{id}/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"uploadId": "<string>"
}
]
}
'import requests
url = "https://api.moonpay.com/platform/v1/customers/{id}/files"
payload = { "files": [{ "uploadId": "<string>" }] }
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({files: [{uploadId: '<string>'}]})
};
fetch('https://api.moonpay.com/platform/v1/customers/{id}/files', 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.moonpay.com/platform/v1/customers/{id}/files",
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([
'files' => [
[
'uploadId' => '<string>'
]
]
]),
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.moonpay.com/platform/v1/customers/{id}/files"
payload := strings.NewReader("{\n \"files\": [\n {\n \"uploadId\": \"<string>\"\n }\n ]\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.moonpay.com/platform/v1/customers/{id}/files")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"files\": [\n {\n \"uploadId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonpay.com/platform/v1/customers/{id}/files")
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 \"files\": [\n {\n \"uploadId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalCustomerId": "customer-1234",
"kyc": {
"requirements": {
"basicDetails": {
"requiredFields": []
},
"residentialAddress": {
"requiredFields": []
},
"identityDocuments": {
"requiredFields": []
},
"selfie": {
"requiredFields": []
},
"taxIdentifiers": {
"requiredFields": []
},
"proofOfAddress": {
"requiredFields": []
},
"phoneNumber": {
"requiredFields": []
},
"questionnaires": {
"requiredFields": []
}
},
"challenge": {
"url": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"details": {}
}
]
}{
"code": "unauthorized",
"message": "Not authorized"
}{
"code": "forbidden",
"message": "Forbidden"
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"details": {}
}
]
}{
"code": "conflict",
"message": "Conflict"
}{
"code": "service_unavailable",
"message": "<string>"
}Customers
Confirm uploaded files
Confirm uploaded files and attach them to the customer’s KYC session
POST
/
platform
/
v1
/
customers
/
{id}
/
files
Confirm uploaded customer files
curl --request POST \
--url https://api.moonpay.com/platform/v1/customers/{id}/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"uploadId": "<string>"
}
]
}
'import requests
url = "https://api.moonpay.com/platform/v1/customers/{id}/files"
payload = { "files": [{ "uploadId": "<string>" }] }
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({files: [{uploadId: '<string>'}]})
};
fetch('https://api.moonpay.com/platform/v1/customers/{id}/files', 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.moonpay.com/platform/v1/customers/{id}/files",
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([
'files' => [
[
'uploadId' => '<string>'
]
]
]),
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.moonpay.com/platform/v1/customers/{id}/files"
payload := strings.NewReader("{\n \"files\": [\n {\n \"uploadId\": \"<string>\"\n }\n ]\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.moonpay.com/platform/v1/customers/{id}/files")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"files\": [\n {\n \"uploadId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonpay.com/platform/v1/customers/{id}/files")
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 \"files\": [\n {\n \"uploadId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalCustomerId": "customer-1234",
"kyc": {
"requirements": {
"basicDetails": {
"requiredFields": []
},
"residentialAddress": {
"requiredFields": []
},
"identityDocuments": {
"requiredFields": []
},
"selfie": {
"requiredFields": []
},
"taxIdentifiers": {
"requiredFields": []
},
"proofOfAddress": {
"requiredFields": []
},
"phoneNumber": {
"requiredFields": []
},
"questionnaires": {
"requiredFields": []
}
},
"challenge": {
"url": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"details": {}
}
]
}{
"code": "unauthorized",
"message": "Not authorized"
}{
"code": "forbidden",
"message": "Forbidden"
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"field": "<string>",
"details": {}
}
]
}{
"code": "conflict",
"message": "Conflict"
}{
"code": "service_unavailable",
"message": "<string>"
}Some Platform API capabilities must be enabled on your account by MoonPay
before you can call them. If this endpoint returns an unexpected
404, see
Capability
enablement.Authorizations
AccessTokenAuthSecretApiKeyInHeaderAuth
Bearer authentication header using an access token.
Example: Authorization: Bearer <accessToken>
Path Parameters
The customer's unique MoonPay identifier.
Body
application/json
Request body for confirming one or more uploaded identity-related files.
Files being confirmed. Two-sided documents (driving licence, national identity card, residence permit) must include both front and back entries with the same fileType in a single call.
Show child attributes
Show child attributes
Response
The request has succeeded.
A MoonPay customer as seen by a partner.
Show child attributes
Show child attributes
⌘I