Update a draft or correct a failed deposit-KYC profile
curl --request PATCH \
--url https://sandbox.elementpay.net/api/v1/partner/customers/{customer_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"profile": {
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"date_of_birth": "1990-01-15",
"country_of_residence": "GB",
"phone": "+447700900123",
"gender": "f",
"address": {
"line_1": "1 Example Street",
"city": "London",
"country": "GB",
"postal_code": "E1 6AN"
}
}
}
'import requests
url = "https://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}"
payload = { "profile": {
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"date_of_birth": "1990-01-15",
"country_of_residence": "GB",
"phone": "+447700900123",
"gender": "f",
"address": {
"line_1": "1 Example Street",
"city": "London",
"country": "GB",
"postal_code": "E1 6AN"
}
} }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
profile: {
first_name: 'Jane',
last_name: 'Doe',
email: 'jane@example.com',
date_of_birth: '1990-01-15',
country_of_residence: 'GB',
phone: '+447700900123',
gender: 'f',
address: {
line_1: '1 Example Street',
city: 'London',
country: 'GB',
postal_code: 'E1 6AN'
}
}
})
};
fetch('https://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}', 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://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}",
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([
'profile' => [
'first_name' => 'Jane',
'last_name' => 'Doe',
'email' => 'jane@example.com',
'date_of_birth' => '1990-01-15',
'country_of_residence' => 'GB',
'phone' => '+447700900123',
'gender' => 'f',
'address' => [
'line_1' => '1 Example Street',
'city' => 'London',
'country' => 'GB',
'postal_code' => 'E1 6AN'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}"
payload := strings.NewReader("{\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "error",
"message": "Validation error",
"data": {
"field": "country"
}
}Customers
Update a draft or correct a failed deposit-KYC profile
Merge profile fields on a draft. A correction after failed deposit-account KYC invalidates prior approval and returns the customer to incomplete for resubmission and re-review.
PATCH
/
partner
/
customers
/
{customer_id}
Update a draft or correct a failed deposit-KYC profile
curl --request PATCH \
--url https://sandbox.elementpay.net/api/v1/partner/customers/{customer_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"profile": {
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"date_of_birth": "1990-01-15",
"country_of_residence": "GB",
"phone": "+447700900123",
"gender": "f",
"address": {
"line_1": "1 Example Street",
"city": "London",
"country": "GB",
"postal_code": "E1 6AN"
}
}
}
'import requests
url = "https://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}"
payload = { "profile": {
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"date_of_birth": "1990-01-15",
"country_of_residence": "GB",
"phone": "+447700900123",
"gender": "f",
"address": {
"line_1": "1 Example Street",
"city": "London",
"country": "GB",
"postal_code": "E1 6AN"
}
} }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
profile: {
first_name: 'Jane',
last_name: 'Doe',
email: 'jane@example.com',
date_of_birth: '1990-01-15',
country_of_residence: 'GB',
phone: '+447700900123',
gender: 'f',
address: {
line_1: '1 Example Street',
city: 'London',
country: 'GB',
postal_code: 'E1 6AN'
}
}
})
};
fetch('https://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}', 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://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}",
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([
'profile' => [
'first_name' => 'Jane',
'last_name' => 'Doe',
'email' => 'jane@example.com',
'date_of_birth' => '1990-01-15',
'country_of_residence' => 'GB',
'phone' => '+447700900123',
'gender' => 'f',
'address' => [
'line_1' => '1 Example Street',
'city' => 'London',
'country' => 'GB',
'postal_code' => 'E1 6AN'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}"
payload := strings.NewReader("{\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elementpay.net/api/v1/partner/customers/{customer_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "error",
"message": "Validation error",
"data": {
"field": "country"
}
}Authorizations
Path Parameters
Public customer id returned on create
Example:
"pcus_a1b2c3d4e5f6"
Body
application/json
Partial profile merge into the customer vault.
Example:
{
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"date_of_birth": "1990-01-15",
"country_of_residence": "GB",
"phone": "+447700900123",
"gender": "f",
"address": {
"line_1": "1 Example Street",
"city": "London",
"country": "GB",
"postal_code": "E1 6AN"
}
}
Response
Successful Response
⌘I