curl --request PATCH \
--url https://api.sandbox.rails.wayex.com/v1/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact": {
"email": "jsmith@example.com",
"name": "<string>"
},
"metadata": {}
}
'import requests
url = "https://api.sandbox.rails.wayex.com/v1/customers/{id}"
payload = {
"contact": {
"email": "jsmith@example.com",
"name": "<string>"
},
"metadata": {}
}
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({contact: {email: 'jsmith@example.com', name: '<string>'}, metadata: {}})
};
fetch('https://api.sandbox.rails.wayex.com/v1/customers/{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://api.sandbox.rails.wayex.com/v1/customers/{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([
'contact' => [
'email' => 'jsmith@example.com',
'name' => '<string>'
],
'metadata' => [
]
]),
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.sandbox.rails.wayex.com/v1/customers/{id}"
payload := strings.NewReader("{\n \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"metadata\": {}\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.sandbox.rails.wayex.com/v1/customers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/customers/{id}")
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 \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"counterpartyId": "<string>",
"type": "individual",
"contact": {
"email": "jsmith@example.com",
"name": "<string>"
},
"verificationStatus": "in_progress",
"entitlements": [
{
"entitlement": "aud_onramp",
"status": "in_progress"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"externalCustomerId": "<string>",
"businessDetails": {
"companyName": "<string>",
"registrationNumber": "<string>",
"country": "<string>"
},
"individualDetails": {
"firstName": "<string>",
"lastName": "<string>",
"dob": "<string>",
"nationality": "<string>",
"country": "<string>"
},
"metadata": {}
}Update a customer
Updates supported fields on an existing customer without replacing the whole record.
curl --request PATCH \
--url https://api.sandbox.rails.wayex.com/v1/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact": {
"email": "jsmith@example.com",
"name": "<string>"
},
"metadata": {}
}
'import requests
url = "https://api.sandbox.rails.wayex.com/v1/customers/{id}"
payload = {
"contact": {
"email": "jsmith@example.com",
"name": "<string>"
},
"metadata": {}
}
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({contact: {email: 'jsmith@example.com', name: '<string>'}, metadata: {}})
};
fetch('https://api.sandbox.rails.wayex.com/v1/customers/{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://api.sandbox.rails.wayex.com/v1/customers/{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([
'contact' => [
'email' => 'jsmith@example.com',
'name' => '<string>'
],
'metadata' => [
]
]),
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.sandbox.rails.wayex.com/v1/customers/{id}"
payload := strings.NewReader("{\n \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"metadata\": {}\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.sandbox.rails.wayex.com/v1/customers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/customers/{id}")
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 \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"counterpartyId": "<string>",
"type": "individual",
"contact": {
"email": "jsmith@example.com",
"name": "<string>"
},
"verificationStatus": "in_progress",
"entitlements": [
{
"entitlement": "aud_onramp",
"status": "in_progress"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"externalCustomerId": "<string>",
"businessDetails": {
"companyName": "<string>",
"registrationNumber": "<string>",
"country": "<string>"
},
"individualDetails": {
"firstName": "<string>",
"lastName": "<string>",
"dob": "<string>",
"nationality": "<string>",
"country": "<string>"
},
"metadata": {}
}What this endpoint does
Updates supported fields on an existing customer without replacing the whole record.When to use it
Use it when customer details change and the schema permits that field to be edited.Before you call
Use a secret API key with customer write access and pass a customer ID owned by the same tenant account.Money and balance effect
This changes a resource or configuration but does not directly reserve, debit, credit, or settle wallet money.States and completion
Updates apply immediately and do not re-trigger verification. The customer’s verification state and entitlements are unchanged by this call.Safe retries
PATCH does not use anIdempotency-Key. After an unknown response, read the customer first; retry the identical field update only if the desired values are not present.
Read Customers for the complete workflow.Authorizations
Send the same Wayex API key as Authorization: Bearer <key>.
Path Parameters
Response
The updated customer.
Unique Wayex identifier for this customer.
1The client account (counterparty) this customer belongs to. For API callers this is always your own account id.
1Whether the customer is an individual (natural person) or a business (legal entity).
individual, business Show child attributes
Show child attributes
Current verification state. Value can only move on the customer's behalf once approved.
in_progress, approved, rejected, requires_action The capabilities this customer is cleared for, granted as verification completes.
Show child attributes
Show child attributes
When the customer was created (ISO 8601).
Your own identifier for this customer, echoed back for cross-referencing.
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes

