curl --request PATCH \
--url https://api.moonpay.com/platform/v1/customers/{id}/kyc \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"residentialAddress": {
"country": "USA",
"administrativeArea": "CA",
"locality": "San Francisco",
"street": "1 Market Street",
"subStreet": "Apt 4B",
"postalCode": "94105"
},
"basicDetails": {
"firstName": "Jane",
"lastName": "Doe",
"nationality": "CAN",
"dateOfBirth": "1990-05-15"
},
"taxIdentifiers": [
{
"type": "tin",
"country": "PRT",
"value": "987654321"
}
],
"questionnaires": [
{
"type": "customerDueDiligence",
"answers": {
"grossAnnualIncome": {
"amount": "1234.56"
},
"transactionFrequencyPerMonth": 7,
"expectedTransactionAmountPerMonth": {
"amount": "1234.56"
}
}
}
]
}
'import requests
url = "https://api.moonpay.com/platform/v1/customers/{id}/kyc"
payload = {
"residentialAddress": {
"country": "USA",
"administrativeArea": "CA",
"locality": "San Francisco",
"street": "1 Market Street",
"subStreet": "Apt 4B",
"postalCode": "94105"
},
"basicDetails": {
"firstName": "Jane",
"lastName": "Doe",
"nationality": "CAN",
"dateOfBirth": "1990-05-15"
},
"taxIdentifiers": [
{
"type": "tin",
"country": "PRT",
"value": "987654321"
}
],
"questionnaires": [
{
"type": "customerDueDiligence",
"answers": {
"grossAnnualIncome": { "amount": "1234.56" },
"transactionFrequencyPerMonth": 7,
"expectedTransactionAmountPerMonth": { "amount": "1234.56" }
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
residentialAddress: {
country: 'USA',
administrativeArea: 'CA',
locality: 'San Francisco',
street: '1 Market Street',
subStreet: 'Apt 4B',
postalCode: '94105'
},
basicDetails: {
firstName: 'Jane',
lastName: 'Doe',
nationality: 'CAN',
dateOfBirth: '1990-05-15'
},
taxIdentifiers: [{type: 'tin', country: 'PRT', value: '987654321'}],
questionnaires: [
{
type: 'customerDueDiligence',
answers: {
grossAnnualIncome: {amount: '1234.56'},
transactionFrequencyPerMonth: 7,
expectedTransactionAmountPerMonth: {amount: '1234.56'}
}
}
]
})
};
fetch('https://api.moonpay.com/platform/v1/customers/{id}/kyc', 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}/kyc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'residentialAddress' => [
'country' => 'USA',
'administrativeArea' => 'CA',
'locality' => 'San Francisco',
'street' => '1 Market Street',
'subStreet' => 'Apt 4B',
'postalCode' => '94105'
],
'basicDetails' => [
'firstName' => 'Jane',
'lastName' => 'Doe',
'nationality' => 'CAN',
'dateOfBirth' => '1990-05-15'
],
'taxIdentifiers' => [
[
'type' => 'tin',
'country' => 'PRT',
'value' => '987654321'
]
],
'questionnaires' => [
[
'type' => 'customerDueDiligence',
'answers' => [
'grossAnnualIncome' => [
'amount' => '1234.56'
],
'transactionFrequencyPerMonth' => 7,
'expectedTransactionAmountPerMonth' => [
'amount' => '1234.56'
]
]
]
]
]),
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}/kyc"
payload := strings.NewReader("{\n \"residentialAddress\": {\n \"country\": \"USA\",\n \"administrativeArea\": \"CA\",\n \"locality\": \"San Francisco\",\n \"street\": \"1 Market Street\",\n \"subStreet\": \"Apt 4B\",\n \"postalCode\": \"94105\"\n },\n \"basicDetails\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"nationality\": \"CAN\",\n \"dateOfBirth\": \"1990-05-15\"\n },\n \"taxIdentifiers\": [\n {\n \"type\": \"tin\",\n \"country\": \"PRT\",\n \"value\": \"987654321\"\n }\n ],\n \"questionnaires\": [\n {\n \"type\": \"customerDueDiligence\",\n \"answers\": {\n \"grossAnnualIncome\": {\n \"amount\": \"1234.56\"\n },\n \"transactionFrequencyPerMonth\": 7,\n \"expectedTransactionAmountPerMonth\": {\n \"amount\": \"1234.56\"\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.moonpay.com/platform/v1/customers/{id}/kyc")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"residentialAddress\": {\n \"country\": \"USA\",\n \"administrativeArea\": \"CA\",\n \"locality\": \"San Francisco\",\n \"street\": \"1 Market Street\",\n \"subStreet\": \"Apt 4B\",\n \"postalCode\": \"94105\"\n },\n \"basicDetails\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"nationality\": \"CAN\",\n \"dateOfBirth\": \"1990-05-15\"\n },\n \"taxIdentifiers\": [\n {\n \"type\": \"tin\",\n \"country\": \"PRT\",\n \"value\": \"987654321\"\n }\n ],\n \"questionnaires\": [\n {\n \"type\": \"customerDueDiligence\",\n \"answers\": {\n \"grossAnnualIncome\": {\n \"amount\": \"1234.56\"\n },\n \"transactionFrequencyPerMonth\": 7,\n \"expectedTransactionAmountPerMonth\": {\n \"amount\": \"1234.56\"\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonpay.com/platform/v1/customers/{id}/kyc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"residentialAddress\": {\n \"country\": \"USA\",\n \"administrativeArea\": \"CA\",\n \"locality\": \"San Francisco\",\n \"street\": \"1 Market Street\",\n \"subStreet\": \"Apt 4B\",\n \"postalCode\": \"94105\"\n },\n \"basicDetails\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"nationality\": \"CAN\",\n \"dateOfBirth\": \"1990-05-15\"\n },\n \"taxIdentifiers\": [\n {\n \"type\": \"tin\",\n \"country\": \"PRT\",\n \"value\": \"987654321\"\n }\n ],\n \"questionnaires\": [\n {\n \"type\": \"customerDueDiligence\",\n \"answers\": {\n \"grossAnnualIncome\": {\n \"amount\": \"1234.56\"\n },\n \"transactionFrequencyPerMonth\": 7,\n \"expectedTransactionAmountPerMonth\": {\n \"amount\": \"1234.56\"\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
"externalCustomerId": "customer-1234",
"kyc": {
"status": "collecting",
"requirements": {
"basicDetails": {
"status": "incomplete",
"requiredFields": [
"firstName",
"lastName",
"dateOfBirth",
"nationality"
]
},
"residentialAddress": {
"status": "incomplete",
"requiredFields": [
"street",
"locality",
"postalCode",
"administrativeArea"
]
},
"identityDocuments": {
"status": "incomplete"
},
"selfie": {
"status": "incomplete"
},
"taxIdentifiers": {
"status": "incomplete",
"requiredFields": [
"ssn"
]
},
"proofOfAddress": {
"status": "incomplete"
},
"phoneNumber": {
"status": "incomplete"
},
"questionnaires": {
"status": "incomplete",
"requiredFields": [
"customerDueDiligence",
"enhancedDueDiligence"
]
}
},
"challenge": {
"url": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"code": "forbidden",
"message": "Forbidden",
"errors": [
{
"field": "source.amount",
"message": "Source amount must be a numeric string. Example \"100\" or \"10.25\"."
}
]
}{
"code": "unauthorized",
"message": "Not authorized"
}{
"code": "forbidden",
"message": "Forbidden"
}{
"code": "forbidden",
"message": "Forbidden",
"errors": [
{
"field": "source.amount",
"message": "Source amount must be a numeric string. Example \"100\" or \"10.25\"."
}
]
}{
"code": "conflict",
"message": "Conflict"
}Submit KYC data
Submit outstanding KYC requirements for a customer
curl --request PATCH \
--url https://api.moonpay.com/platform/v1/customers/{id}/kyc \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"residentialAddress": {
"country": "USA",
"administrativeArea": "CA",
"locality": "San Francisco",
"street": "1 Market Street",
"subStreet": "Apt 4B",
"postalCode": "94105"
},
"basicDetails": {
"firstName": "Jane",
"lastName": "Doe",
"nationality": "CAN",
"dateOfBirth": "1990-05-15"
},
"taxIdentifiers": [
{
"type": "tin",
"country": "PRT",
"value": "987654321"
}
],
"questionnaires": [
{
"type": "customerDueDiligence",
"answers": {
"grossAnnualIncome": {
"amount": "1234.56"
},
"transactionFrequencyPerMonth": 7,
"expectedTransactionAmountPerMonth": {
"amount": "1234.56"
}
}
}
]
}
'import requests
url = "https://api.moonpay.com/platform/v1/customers/{id}/kyc"
payload = {
"residentialAddress": {
"country": "USA",
"administrativeArea": "CA",
"locality": "San Francisco",
"street": "1 Market Street",
"subStreet": "Apt 4B",
"postalCode": "94105"
},
"basicDetails": {
"firstName": "Jane",
"lastName": "Doe",
"nationality": "CAN",
"dateOfBirth": "1990-05-15"
},
"taxIdentifiers": [
{
"type": "tin",
"country": "PRT",
"value": "987654321"
}
],
"questionnaires": [
{
"type": "customerDueDiligence",
"answers": {
"grossAnnualIncome": { "amount": "1234.56" },
"transactionFrequencyPerMonth": 7,
"expectedTransactionAmountPerMonth": { "amount": "1234.56" }
}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
residentialAddress: {
country: 'USA',
administrativeArea: 'CA',
locality: 'San Francisco',
street: '1 Market Street',
subStreet: 'Apt 4B',
postalCode: '94105'
},
basicDetails: {
firstName: 'Jane',
lastName: 'Doe',
nationality: 'CAN',
dateOfBirth: '1990-05-15'
},
taxIdentifiers: [{type: 'tin', country: 'PRT', value: '987654321'}],
questionnaires: [
{
type: 'customerDueDiligence',
answers: {
grossAnnualIncome: {amount: '1234.56'},
transactionFrequencyPerMonth: 7,
expectedTransactionAmountPerMonth: {amount: '1234.56'}
}
}
]
})
};
fetch('https://api.moonpay.com/platform/v1/customers/{id}/kyc', 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}/kyc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'residentialAddress' => [
'country' => 'USA',
'administrativeArea' => 'CA',
'locality' => 'San Francisco',
'street' => '1 Market Street',
'subStreet' => 'Apt 4B',
'postalCode' => '94105'
],
'basicDetails' => [
'firstName' => 'Jane',
'lastName' => 'Doe',
'nationality' => 'CAN',
'dateOfBirth' => '1990-05-15'
],
'taxIdentifiers' => [
[
'type' => 'tin',
'country' => 'PRT',
'value' => '987654321'
]
],
'questionnaires' => [
[
'type' => 'customerDueDiligence',
'answers' => [
'grossAnnualIncome' => [
'amount' => '1234.56'
],
'transactionFrequencyPerMonth' => 7,
'expectedTransactionAmountPerMonth' => [
'amount' => '1234.56'
]
]
]
]
]),
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}/kyc"
payload := strings.NewReader("{\n \"residentialAddress\": {\n \"country\": \"USA\",\n \"administrativeArea\": \"CA\",\n \"locality\": \"San Francisco\",\n \"street\": \"1 Market Street\",\n \"subStreet\": \"Apt 4B\",\n \"postalCode\": \"94105\"\n },\n \"basicDetails\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"nationality\": \"CAN\",\n \"dateOfBirth\": \"1990-05-15\"\n },\n \"taxIdentifiers\": [\n {\n \"type\": \"tin\",\n \"country\": \"PRT\",\n \"value\": \"987654321\"\n }\n ],\n \"questionnaires\": [\n {\n \"type\": \"customerDueDiligence\",\n \"answers\": {\n \"grossAnnualIncome\": {\n \"amount\": \"1234.56\"\n },\n \"transactionFrequencyPerMonth\": 7,\n \"expectedTransactionAmountPerMonth\": {\n \"amount\": \"1234.56\"\n }\n }\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.moonpay.com/platform/v1/customers/{id}/kyc")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"residentialAddress\": {\n \"country\": \"USA\",\n \"administrativeArea\": \"CA\",\n \"locality\": \"San Francisco\",\n \"street\": \"1 Market Street\",\n \"subStreet\": \"Apt 4B\",\n \"postalCode\": \"94105\"\n },\n \"basicDetails\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"nationality\": \"CAN\",\n \"dateOfBirth\": \"1990-05-15\"\n },\n \"taxIdentifiers\": [\n {\n \"type\": \"tin\",\n \"country\": \"PRT\",\n \"value\": \"987654321\"\n }\n ],\n \"questionnaires\": [\n {\n \"type\": \"customerDueDiligence\",\n \"answers\": {\n \"grossAnnualIncome\": {\n \"amount\": \"1234.56\"\n },\n \"transactionFrequencyPerMonth\": 7,\n \"expectedTransactionAmountPerMonth\": {\n \"amount\": \"1234.56\"\n }\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.moonpay.com/platform/v1/customers/{id}/kyc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"residentialAddress\": {\n \"country\": \"USA\",\n \"administrativeArea\": \"CA\",\n \"locality\": \"San Francisco\",\n \"street\": \"1 Market Street\",\n \"subStreet\": \"Apt 4B\",\n \"postalCode\": \"94105\"\n },\n \"basicDetails\": {\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"nationality\": \"CAN\",\n \"dateOfBirth\": \"1990-05-15\"\n },\n \"taxIdentifiers\": [\n {\n \"type\": \"tin\",\n \"country\": \"PRT\",\n \"value\": \"987654321\"\n }\n ],\n \"questionnaires\": [\n {\n \"type\": \"customerDueDiligence\",\n \"answers\": {\n \"grossAnnualIncome\": {\n \"amount\": \"1234.56\"\n },\n \"transactionFrequencyPerMonth\": 7,\n \"expectedTransactionAmountPerMonth\": {\n \"amount\": \"1234.56\"\n }\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "c1d2e3f4-5678-90ab-cdef-1234567890ab",
"externalCustomerId": "customer-1234",
"kyc": {
"status": "collecting",
"requirements": {
"basicDetails": {
"status": "incomplete",
"requiredFields": [
"firstName",
"lastName",
"dateOfBirth",
"nationality"
]
},
"residentialAddress": {
"status": "incomplete",
"requiredFields": [
"street",
"locality",
"postalCode",
"administrativeArea"
]
},
"identityDocuments": {
"status": "incomplete"
},
"selfie": {
"status": "incomplete"
},
"taxIdentifiers": {
"status": "incomplete",
"requiredFields": [
"ssn"
]
},
"proofOfAddress": {
"status": "incomplete"
},
"phoneNumber": {
"status": "incomplete"
},
"questionnaires": {
"status": "incomplete",
"requiredFields": [
"customerDueDiligence",
"enhancedDueDiligence"
]
}
},
"challenge": {
"url": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
}
}
}{
"code": "forbidden",
"message": "Forbidden",
"errors": [
{
"field": "source.amount",
"message": "Source amount must be a numeric string. Example \"100\" or \"10.25\"."
}
]
}{
"code": "unauthorized",
"message": "Not authorized"
}{
"code": "forbidden",
"message": "Forbidden"
}{
"code": "forbidden",
"message": "Forbidden",
"errors": [
{
"field": "source.amount",
"message": "Source amount must be a numeric string. Example \"100\" or \"10.25\"."
}
]
}{
"code": "conflict",
"message": "Conflict"
}404, see
Capability
enablement.Authorizations
Bearer authentication header using an access token.
Example: Authorization: Bearer <accessToken>
Path Parameters
The customer's unique MoonPay identifier.
Body
Request body for updating an identity by submitting one or more requirements. Submit only the fields whose requirements are still outstanding; at least one outstanding requirement must be provided.
The customer's residential address.
Show child attributes
Show child attributes
The customer's basic personal details.
Show child attributes
Show child attributes
The customer's phone number in E.164 format.
Show child attributes
Show child attributes
Tax identifiers the customer is providing. At most one ssn and one cpf may be submitted; multiple tin entries are allowed only if their country values differ.
1A tax identifier the customer is submitting.
- Option 1
- Option 2
Show child attributes
Show child attributes
Due-diligence questionnaires the customer is submitting. Submit one entry per questionnaire listed under the questionnaires requirement on the identity; each questionnaire type may appear at most once.
1A due-diligence questionnaire the customer is submitting.
- Option 1
- Option 2
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