Create a crypto payment customer
curl --request POST \
--url https://api-sandbox.circle.com/v1/payments/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refId": "310c458a-18eb-4cbd-8a9a-586d9448ae69",
"type": "individual",
"address": {
"addressLine1": "123 Main St.",
"city": "Boston",
"postalCode": "02110",
"country": "US",
"addressLine2": "Apt 4B",
"district": "MA"
},
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1990-11-29",
"placeOfBirth": "US",
"governmentIssuedId": "A1234567"
}
'import requests
url = "https://api-sandbox.circle.com/v1/payments/customers"
payload = {
"refId": "310c458a-18eb-4cbd-8a9a-586d9448ae69",
"type": "individual",
"address": {
"addressLine1": "123 Main St.",
"city": "Boston",
"postalCode": "02110",
"country": "US",
"addressLine2": "Apt 4B",
"district": "MA"
},
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1990-11-29",
"placeOfBirth": "US",
"governmentIssuedId": "A1234567"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
refId: '310c458a-18eb-4cbd-8a9a-586d9448ae69',
type: 'individual',
address: {
addressLine1: '123 Main St.',
city: 'Boston',
postalCode: '02110',
country: 'US',
addressLine2: 'Apt 4B',
district: 'MA'
},
firstName: 'John',
lastName: 'Doe',
dateOfBirth: '1990-11-29',
placeOfBirth: 'US',
governmentIssuedId: 'A1234567'
})
};
fetch('https://api-sandbox.circle.com/v1/payments/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.circle.com/v1/payments/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([
'refId' => '310c458a-18eb-4cbd-8a9a-586d9448ae69',
'type' => 'individual',
'address' => [
'addressLine1' => '123 Main St.',
'city' => 'Boston',
'postalCode' => '02110',
'country' => 'US',
'addressLine2' => 'Apt 4B',
'district' => 'MA'
],
'firstName' => 'John',
'lastName' => 'Doe',
'dateOfBirth' => '1990-11-29',
'placeOfBirth' => 'US',
'governmentIssuedId' => 'A1234567'
]),
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.circle.com/v1/payments/customers"
payload := strings.NewReader("{\n \"refId\": \"310c458a-18eb-4cbd-8a9a-586d9448ae69\",\n \"type\": \"individual\",\n \"address\": {\n \"addressLine1\": \"123 Main St.\",\n \"city\": \"Boston\",\n \"postalCode\": \"02110\",\n \"country\": \"US\",\n \"addressLine2\": \"Apt 4B\",\n \"district\": \"MA\"\n },\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-11-29\",\n \"placeOfBirth\": \"US\",\n \"governmentIssuedId\": \"A1234567\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.circle.com/v1/payments/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"refId\": \"310c458a-18eb-4cbd-8a9a-586d9448ae69\",\n \"type\": \"individual\",\n \"address\": {\n \"addressLine1\": \"123 Main St.\",\n \"city\": \"Boston\",\n \"postalCode\": \"02110\",\n \"country\": \"US\",\n \"addressLine2\": \"Apt 4B\",\n \"district\": \"MA\"\n },\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-11-29\",\n \"placeOfBirth\": \"US\",\n \"governmentIssuedId\": \"A1234567\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/payments/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refId\": \"310c458a-18eb-4cbd-8a9a-586d9448ae69\",\n \"type\": \"individual\",\n \"address\": {\n \"addressLine1\": \"123 Main St.\",\n \"city\": \"Boston\",\n \"postalCode\": \"02110\",\n \"country\": \"US\",\n \"addressLine2\": \"Apt 4B\",\n \"district\": \"MA\"\n },\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-11-29\",\n \"placeOfBirth\": \"US\",\n \"governmentIssuedId\": \"A1234567\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "7d4f71c1-7e2e-4a1d-9df3-3a4d8d6d5a11",
"refId": "310c458a-18eb-4cbd-8a9a-586d9448ae69",
"type": "individual",
"status": "pending",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1990-11-29",
"placeOfBirth": "US",
"governmentIssuedId": "A1234567",
"address": {
"addressLine1": "123 Main St.",
"addressLine2": "Apt 4B",
"city": "Boston",
"district": "MA",
"postalCode": "02110",
"country": "US"
}
}
}{
"code": 400,
"message": "Bad request."
}{
"code": 401,
"message": "Malformed authorization."
}{
"code": 3,
"message": "Forbidden"
}{
"code": 409,
"message": "Conflicts with another request."
}{
"code": 500,
"message": "Internal server error."
}Create a crypto payment customer
Creates a Travel Rule customer profile for crypto payment attribution. These APIs are available to eligible Circle Singapore (CIRCLE_SG) merchants.
The customer starts in pending status while screening completes. A customer must be approved before a customer wallet can be created.
POST
/
v1
/
payments
/
customers
Create a crypto payment customer
curl --request POST \
--url https://api-sandbox.circle.com/v1/payments/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refId": "310c458a-18eb-4cbd-8a9a-586d9448ae69",
"type": "individual",
"address": {
"addressLine1": "123 Main St.",
"city": "Boston",
"postalCode": "02110",
"country": "US",
"addressLine2": "Apt 4B",
"district": "MA"
},
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1990-11-29",
"placeOfBirth": "US",
"governmentIssuedId": "A1234567"
}
'import requests
url = "https://api-sandbox.circle.com/v1/payments/customers"
payload = {
"refId": "310c458a-18eb-4cbd-8a9a-586d9448ae69",
"type": "individual",
"address": {
"addressLine1": "123 Main St.",
"city": "Boston",
"postalCode": "02110",
"country": "US",
"addressLine2": "Apt 4B",
"district": "MA"
},
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1990-11-29",
"placeOfBirth": "US",
"governmentIssuedId": "A1234567"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
refId: '310c458a-18eb-4cbd-8a9a-586d9448ae69',
type: 'individual',
address: {
addressLine1: '123 Main St.',
city: 'Boston',
postalCode: '02110',
country: 'US',
addressLine2: 'Apt 4B',
district: 'MA'
},
firstName: 'John',
lastName: 'Doe',
dateOfBirth: '1990-11-29',
placeOfBirth: 'US',
governmentIssuedId: 'A1234567'
})
};
fetch('https://api-sandbox.circle.com/v1/payments/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.circle.com/v1/payments/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([
'refId' => '310c458a-18eb-4cbd-8a9a-586d9448ae69',
'type' => 'individual',
'address' => [
'addressLine1' => '123 Main St.',
'city' => 'Boston',
'postalCode' => '02110',
'country' => 'US',
'addressLine2' => 'Apt 4B',
'district' => 'MA'
],
'firstName' => 'John',
'lastName' => 'Doe',
'dateOfBirth' => '1990-11-29',
'placeOfBirth' => 'US',
'governmentIssuedId' => 'A1234567'
]),
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.circle.com/v1/payments/customers"
payload := strings.NewReader("{\n \"refId\": \"310c458a-18eb-4cbd-8a9a-586d9448ae69\",\n \"type\": \"individual\",\n \"address\": {\n \"addressLine1\": \"123 Main St.\",\n \"city\": \"Boston\",\n \"postalCode\": \"02110\",\n \"country\": \"US\",\n \"addressLine2\": \"Apt 4B\",\n \"district\": \"MA\"\n },\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-11-29\",\n \"placeOfBirth\": \"US\",\n \"governmentIssuedId\": \"A1234567\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.circle.com/v1/payments/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"refId\": \"310c458a-18eb-4cbd-8a9a-586d9448ae69\",\n \"type\": \"individual\",\n \"address\": {\n \"addressLine1\": \"123 Main St.\",\n \"city\": \"Boston\",\n \"postalCode\": \"02110\",\n \"country\": \"US\",\n \"addressLine2\": \"Apt 4B\",\n \"district\": \"MA\"\n },\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-11-29\",\n \"placeOfBirth\": \"US\",\n \"governmentIssuedId\": \"A1234567\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/payments/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"refId\": \"310c458a-18eb-4cbd-8a9a-586d9448ae69\",\n \"type\": \"individual\",\n \"address\": {\n \"addressLine1\": \"123 Main St.\",\n \"city\": \"Boston\",\n \"postalCode\": \"02110\",\n \"country\": \"US\",\n \"addressLine2\": \"Apt 4B\",\n \"district\": \"MA\"\n },\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"dateOfBirth\": \"1990-11-29\",\n \"placeOfBirth\": \"US\",\n \"governmentIssuedId\": \"A1234567\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "7d4f71c1-7e2e-4a1d-9df3-3a4d8d6d5a11",
"refId": "310c458a-18eb-4cbd-8a9a-586d9448ae69",
"type": "individual",
"status": "pending",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1990-11-29",
"placeOfBirth": "US",
"governmentIssuedId": "A1234567",
"address": {
"addressLine1": "123 Main St.",
"addressLine2": "Apt 4B",
"city": "Boston",
"district": "MA",
"postalCode": "02110",
"country": "US"
}
}
}{
"code": 400,
"message": "Bad request."
}{
"code": 401,
"message": "Malformed authorization."
}{
"code": 3,
"message": "Forbidden"
}{
"code": 409,
"message": "Conflicts with another request."
}{
"code": 500,
"message": "Internal server error."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
- Option 1
- Option 2
Merchant-supplied customer reference. Must be a UUID and unique for the merchant.
Example:
"310c458a-18eb-4cbd-8a9a-586d9448ae69"
Available options:
individual Customer address used for Travel Rule review.
Show child attributes
Show child attributes
Maximum string length:
255Example:
"John"
Maximum string length:
255Example:
"Doe"
Date in yyyy-MM-dd format.
Example:
"1990-11-29"
Maximum string length:
255Example:
"US"
Maximum string length:
255Example:
"A1234567"
Response
Customer successfully created.
Travel Rule customer record.
Show child attributes
Show child attributes
Was this page helpful?
⌘I