curl --request POST \
--url https://api.sandbox.rails.wayex.com/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"type": "business",
"contact": {
"email": "jsmith@example.com",
"name": "<string>"
},
"businessDetails": {
"companyName": "<string>",
"registrationNumber": "<string>",
"country": "<string>"
},
"externalCustomerId": "<string>",
"requestedEntitlements": [
"payment_route",
"aud_onramp",
"aud_offramp"
],
"metadata": {}
}
'import requests
url = "https://api.sandbox.rails.wayex.com/v1/customers"
payload = {
"type": "business",
"contact": {
"email": "jsmith@example.com",
"name": "<string>"
},
"businessDetails": {
"companyName": "<string>",
"registrationNumber": "<string>",
"country": "<string>"
},
"externalCustomerId": "<string>",
"requestedEntitlements": ["payment_route", "aud_onramp", "aud_offramp"],
"metadata": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'business',
contact: {email: 'jsmith@example.com', name: '<string>'},
businessDetails: {companyName: '<string>', registrationNumber: '<string>', country: '<string>'},
externalCustomerId: '<string>',
requestedEntitlements: ['payment_route', 'aud_onramp', 'aud_offramp'],
metadata: {}
})
};
fetch('https://api.sandbox.rails.wayex.com/v1/customers', 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",
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' => 'business',
'contact' => [
'email' => 'jsmith@example.com',
'name' => '<string>'
],
'businessDetails' => [
'companyName' => '<string>',
'registrationNumber' => '<string>',
'country' => '<string>'
],
'externalCustomerId' => '<string>',
'requestedEntitlements' => [
'payment_route',
'aud_onramp',
'aud_offramp'
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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://api.sandbox.rails.wayex.com/v1/customers"
payload := strings.NewReader("{\n \"type\": \"business\",\n \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"businessDetails\": {\n \"companyName\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"externalCustomerId\": \"<string>\",\n \"requestedEntitlements\": [\n \"payment_route\",\n \"aud_onramp\",\n \"aud_offramp\"\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.sandbox.rails.wayex.com/v1/customers")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"business\",\n \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"businessDetails\": {\n \"companyName\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"externalCustomerId\": \"<string>\",\n \"requestedEntitlements\": [\n \"payment_route\",\n \"aud_onramp\",\n \"aud_offramp\"\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"business\",\n \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"businessDetails\": {\n \"companyName\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"externalCustomerId\": \"<string>\",\n \"requestedEntitlements\": [\n \"payment_route\",\n \"aud_onramp\",\n \"aud_offramp\"\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": {}
}Create a customer
Creates an individual or business customer under the current tenant account.
curl --request POST \
--url https://api.sandbox.rails.wayex.com/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"type": "business",
"contact": {
"email": "jsmith@example.com",
"name": "<string>"
},
"businessDetails": {
"companyName": "<string>",
"registrationNumber": "<string>",
"country": "<string>"
},
"externalCustomerId": "<string>",
"requestedEntitlements": [
"payment_route",
"aud_onramp",
"aud_offramp"
],
"metadata": {}
}
'import requests
url = "https://api.sandbox.rails.wayex.com/v1/customers"
payload = {
"type": "business",
"contact": {
"email": "jsmith@example.com",
"name": "<string>"
},
"businessDetails": {
"companyName": "<string>",
"registrationNumber": "<string>",
"country": "<string>"
},
"externalCustomerId": "<string>",
"requestedEntitlements": ["payment_route", "aud_onramp", "aud_offramp"],
"metadata": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'business',
contact: {email: 'jsmith@example.com', name: '<string>'},
businessDetails: {companyName: '<string>', registrationNumber: '<string>', country: '<string>'},
externalCustomerId: '<string>',
requestedEntitlements: ['payment_route', 'aud_onramp', 'aud_offramp'],
metadata: {}
})
};
fetch('https://api.sandbox.rails.wayex.com/v1/customers', 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",
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' => 'business',
'contact' => [
'email' => 'jsmith@example.com',
'name' => '<string>'
],
'businessDetails' => [
'companyName' => '<string>',
'registrationNumber' => '<string>',
'country' => '<string>'
],
'externalCustomerId' => '<string>',
'requestedEntitlements' => [
'payment_route',
'aud_onramp',
'aud_offramp'
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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://api.sandbox.rails.wayex.com/v1/customers"
payload := strings.NewReader("{\n \"type\": \"business\",\n \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"businessDetails\": {\n \"companyName\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"externalCustomerId\": \"<string>\",\n \"requestedEntitlements\": [\n \"payment_route\",\n \"aud_onramp\",\n \"aud_offramp\"\n ],\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.sandbox.rails.wayex.com/v1/customers")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"business\",\n \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"businessDetails\": {\n \"companyName\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"externalCustomerId\": \"<string>\",\n \"requestedEntitlements\": [\n \"payment_route\",\n \"aud_onramp\",\n \"aud_offramp\"\n ],\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.rails.wayex.com/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"business\",\n \"contact\": {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n },\n \"businessDetails\": {\n \"companyName\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"externalCustomerId\": \"<string>\",\n \"requestedEntitlements\": [\n \"payment_route\",\n \"aud_onramp\",\n \"aud_offramp\"\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
Creates an individual or business customer under the current tenant account.When to use it
Create the customer before issuing verification or customer-owned payment routes.Before you call
Use a secret API key with customer write access. The minimum body is the customer’s email — the customer then self-completes verification via a verification link. To supply identity up front, send the typed shape instead (type plus contact, and businessDetails for businesses). externalCustomerId is optional on every shape and is echoed back for cross-referencing. The optional free-form metadata map reserves one key name, @@wxtype (and any @@wxtype.esc… variant): a bag containing it is refused with 400 invalid_request and nothing is written.
Money and balance effect
This changes a resource or configuration but does not directly reserve, debit, credit, or settle wallet money.States and completion
Creation does not approve the customer. Verification and entitlements progress asynchronously.Safe retries
Send a uniqueIdempotency-Key for the logical action. If the response is lost, retry the same payload with the same key; never create a new key merely because the first response timed out.
Read Customers for the complete workflow.Authorizations
Send the same Wayex API key as Authorization: Bearer <key>.
Headers
A unique key for this logical action. Reuse the same key and identical payload when retrying after an unknown response.
8 - 255Body
- Option 1
- Option 2
- Option 3
business Show child attributes
Show child attributes
Show child attributes
Show child attributes
1aud_onramp, aud_offramp, payment_route, higher_limits Show child attributes
Show child attributes
Response
The created 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

