curl --request POST \
--url https://api.example.com/customer \
--header 'Content-Type: application/json' \
--data '
{
"wallets": [
{
"address": "0x1234567890123456789012345678901234567890"
}
],
"type": "INDIVIDUAL",
"countryCode": "US",
"username": "john_doe",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"metadata": {
"userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9"
},
"address": {
"line1": "1234 Main St",
"line2": "Suite 200",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}
}
'import requests
url = "https://api.example.com/customer"
payload = {
"wallets": [{ "address": "0x1234567890123456789012345678901234567890" }],
"type": "INDIVIDUAL",
"countryCode": "US",
"username": "john_doe",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"metadata": { "userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9" },
"address": {
"line1": "1234 Main St",
"line2": "Suite 200",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
wallets: [{address: '0x1234567890123456789012345678901234567890'}],
type: 'INDIVIDUAL',
countryCode: 'US',
username: 'john_doe',
name: 'John Doe',
email: 'john.doe@example.com',
phone: '+1234567890',
metadata: {userId: '2b634b51-7f4a-470b-9bd6-c7a968e665d9'},
address: {
line1: '1234 Main St',
line2: 'Suite 200',
city: 'Anytown',
state: 'CA',
postalCode: '12345'
}
})
};
fetch('https://api.example.com/customer', 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.example.com/customer",
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([
'wallets' => [
[
'address' => '0x1234567890123456789012345678901234567890'
]
],
'type' => 'INDIVIDUAL',
'countryCode' => 'US',
'username' => 'john_doe',
'name' => 'John Doe',
'email' => 'john.doe@example.com',
'phone' => '+1234567890',
'metadata' => [
'userId' => '2b634b51-7f4a-470b-9bd6-c7a968e665d9'
],
'address' => [
'line1' => '1234 Main St',
'line2' => 'Suite 200',
'city' => 'Anytown',
'state' => 'CA',
'postalCode' => '12345'
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/customer"
payload := strings.NewReader("{\n \"wallets\": [\n {\n \"address\": \"0x1234567890123456789012345678901234567890\"\n }\n ],\n \"type\": \"INDIVIDUAL\",\n \"countryCode\": \"US\",\n \"username\": \"john_doe\",\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\",\n \"metadata\": {\n \"userId\": \"2b634b51-7f4a-470b-9bd6-c7a968e665d9\"\n },\n \"address\": {\n \"line1\": \"1234 Main St\",\n \"line2\": \"Suite 200\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"postalCode\": \"12345\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/customer")
.header("Content-Type", "application/json")
.body("{\n \"wallets\": [\n {\n \"address\": \"0x1234567890123456789012345678901234567890\"\n }\n ],\n \"type\": \"INDIVIDUAL\",\n \"countryCode\": \"US\",\n \"username\": \"john_doe\",\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\",\n \"metadata\": {\n \"userId\": \"2b634b51-7f4a-470b-9bd6-c7a968e665d9\"\n },\n \"address\": {\n \"line1\": \"1234 Main St\",\n \"line2\": \"Suite 200\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"postalCode\": \"12345\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/customer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallets\": [\n {\n \"address\": \"0x1234567890123456789012345678901234567890\"\n }\n ],\n \"type\": \"INDIVIDUAL\",\n \"countryCode\": \"US\",\n \"username\": \"john_doe\",\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\",\n \"metadata\": {\n \"userId\": \"2b634b51-7f4a-470b-9bd6-c7a968e665d9\"\n },\n \"address\": {\n \"line1\": \"1234 Main St\",\n \"line2\": \"Suite 200\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"postalCode\": \"12345\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "customer_c7a968e665d9",
"object": "customer",
"verificationStatus": "IN_PROGRESS",
"wallets": [
{
"address": "0x1234567890123456789012345678901234567890",
"object": "wallet",
"balances": {
"token": "0x4dad19801eff64eaaa7c78e466ce3678d0b1fd94",
"total": "1000",
"available": {
"amount": "0"
},
"frozen": {
"amount": "1000"
}
}
}
],
"type": "INDIVIDUAL",
"countryCode": "US",
"hasCompletedMoneriumSetup": true,
"referralCode": "REF123456",
"createdAt": "2023-10-01T12:00:00Z",
"username": "john_doe",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"metadata": {
"userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9"
},
"address": {
"line1": "1234 Main St",
"line2": "Suite 200",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}
}Onboard a customer
Onboard customer
curl --request POST \
--url https://api.example.com/customer \
--header 'Content-Type: application/json' \
--data '
{
"wallets": [
{
"address": "0x1234567890123456789012345678901234567890"
}
],
"type": "INDIVIDUAL",
"countryCode": "US",
"username": "john_doe",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"metadata": {
"userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9"
},
"address": {
"line1": "1234 Main St",
"line2": "Suite 200",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}
}
'import requests
url = "https://api.example.com/customer"
payload = {
"wallets": [{ "address": "0x1234567890123456789012345678901234567890" }],
"type": "INDIVIDUAL",
"countryCode": "US",
"username": "john_doe",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"metadata": { "userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9" },
"address": {
"line1": "1234 Main St",
"line2": "Suite 200",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
wallets: [{address: '0x1234567890123456789012345678901234567890'}],
type: 'INDIVIDUAL',
countryCode: 'US',
username: 'john_doe',
name: 'John Doe',
email: 'john.doe@example.com',
phone: '+1234567890',
metadata: {userId: '2b634b51-7f4a-470b-9bd6-c7a968e665d9'},
address: {
line1: '1234 Main St',
line2: 'Suite 200',
city: 'Anytown',
state: 'CA',
postalCode: '12345'
}
})
};
fetch('https://api.example.com/customer', 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.example.com/customer",
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([
'wallets' => [
[
'address' => '0x1234567890123456789012345678901234567890'
]
],
'type' => 'INDIVIDUAL',
'countryCode' => 'US',
'username' => 'john_doe',
'name' => 'John Doe',
'email' => 'john.doe@example.com',
'phone' => '+1234567890',
'metadata' => [
'userId' => '2b634b51-7f4a-470b-9bd6-c7a968e665d9'
],
'address' => [
'line1' => '1234 Main St',
'line2' => 'Suite 200',
'city' => 'Anytown',
'state' => 'CA',
'postalCode' => '12345'
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/customer"
payload := strings.NewReader("{\n \"wallets\": [\n {\n \"address\": \"0x1234567890123456789012345678901234567890\"\n }\n ],\n \"type\": \"INDIVIDUAL\",\n \"countryCode\": \"US\",\n \"username\": \"john_doe\",\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\",\n \"metadata\": {\n \"userId\": \"2b634b51-7f4a-470b-9bd6-c7a968e665d9\"\n },\n \"address\": {\n \"line1\": \"1234 Main St\",\n \"line2\": \"Suite 200\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"postalCode\": \"12345\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/customer")
.header("Content-Type", "application/json")
.body("{\n \"wallets\": [\n {\n \"address\": \"0x1234567890123456789012345678901234567890\"\n }\n ],\n \"type\": \"INDIVIDUAL\",\n \"countryCode\": \"US\",\n \"username\": \"john_doe\",\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\",\n \"metadata\": {\n \"userId\": \"2b634b51-7f4a-470b-9bd6-c7a968e665d9\"\n },\n \"address\": {\n \"line1\": \"1234 Main St\",\n \"line2\": \"Suite 200\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"postalCode\": \"12345\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/customer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallets\": [\n {\n \"address\": \"0x1234567890123456789012345678901234567890\"\n }\n ],\n \"type\": \"INDIVIDUAL\",\n \"countryCode\": \"US\",\n \"username\": \"john_doe\",\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"+1234567890\",\n \"metadata\": {\n \"userId\": \"2b634b51-7f4a-470b-9bd6-c7a968e665d9\"\n },\n \"address\": {\n \"line1\": \"1234 Main St\",\n \"line2\": \"Suite 200\",\n \"city\": \"Anytown\",\n \"state\": \"CA\",\n \"postalCode\": \"12345\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "customer_c7a968e665d9",
"object": "customer",
"verificationStatus": "IN_PROGRESS",
"wallets": [
{
"address": "0x1234567890123456789012345678901234567890",
"object": "wallet",
"balances": {
"token": "0x4dad19801eff64eaaa7c78e466ce3678d0b1fd94",
"total": "1000",
"available": {
"amount": "0"
},
"frozen": {
"amount": "1000"
}
}
}
],
"type": "INDIVIDUAL",
"countryCode": "US",
"hasCompletedMoneriumSetup": true,
"referralCode": "REF123456",
"createdAt": "2023-10-01T12:00:00Z",
"username": "john_doe",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"metadata": {
"userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9"
},
"address": {
"line1": "1234 Main St",
"line2": "Suite 200",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}
}Body
The wallet associated with the customer
[
{
"address": "0x1234567890123456789012345678901234567890"
}
]
This is the type of the customer
INDIVIDUAL, ORGANIZATION "INDIVIDUAL"
The country code of the address, following the ISO 3166-1 alpha-2 standard
"US"
Username of the customer
"john_doe"
The name of the customer
"John Doe"
The email of the customer
"john.doe@example.com"
The phone number of the customer
"+1234567890"
The metadata of the customer
{
"userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9"
}
The address of the customer
Show child attributes
Show child attributes
{
"line1": "1234 Main St",
"line2": "Suite 200",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}
Response
The customer has been successfully onboarded
Unique identifier for the customer object.
"customer_c7a968e665d9"
A string that specifies the type of the object. All objects of the same type share this value.
"customer"
The verification status of the customer
INCOMPLETE, IN_PROGRESS, COMPLETED "IN_PROGRESS"
The wallet associated with the customer
Show child attributes
Show child attributes
This is the type of the customer
INDIVIDUAL, ORGANIZATION "INDIVIDUAL"
The country code of the address, following the ISO 3166-1 alpha-2 standard
"US"
Indicates whether the customer has completed the Monerium setup
true
The unique referral code associated with the customer
"REF123456"
The date and time when the customer was created
"2023-10-01T12:00:00Z"
The username of the customer
"john_doe"
The name of the customer
"John Doe"
The email of the customer
"john.doe@example.com"
The phone number of the customer
"+1234567890"
The metadata of the customer
{
"userId": "2b634b51-7f4a-470b-9bd6-c7a968e665d9"
}
The address of the customer
Show child attributes
Show child attributes
{
"line1": "1234 Main St",
"line2": "Suite 200",
"city": "Anytown",
"state": "CA",
"postalCode": "12345"
}