cURL
curl --request POST \
--url https://sandbox.dollarpe.xyz/cms/api/v1/customer/create \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-SIGNATURE: <api-key>' \
--header 'X-TIMESTAMP: <api-key>' \
--data '
{
"full_name": "John Doe",
"email": "john@example.com",
"phone": "9911002211",
"alpha_3_country_code": "IND",
"client_reference_id": "test123",
"non_residence_status": true,
"residence_alpha_3_country_code": "USA"
}
'import requests
url = "https://sandbox.dollarpe.xyz/cms/api/v1/customer/create"
payload = {
"full_name": "John Doe",
"email": "john@example.com",
"phone": "9911002211",
"alpha_3_country_code": "IND",
"client_reference_id": "test123",
"non_residence_status": True,
"residence_alpha_3_country_code": "USA"
}
headers = {
"X-API-KEY": "<api-key>",
"X-TIMESTAMP": "<api-key>",
"X-SIGNATURE": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<api-key>',
'X-TIMESTAMP': '<api-key>',
'X-SIGNATURE': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
full_name: 'John Doe',
email: 'john@example.com',
phone: '9911002211',
alpha_3_country_code: 'IND',
client_reference_id: 'test123',
non_residence_status: true,
residence_alpha_3_country_code: 'USA'
})
};
fetch('https://sandbox.dollarpe.xyz/cms/api/v1/customer/create', 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.dollarpe.xyz/cms/api/v1/customer/create",
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([
'full_name' => 'John Doe',
'email' => 'john@example.com',
'phone' => '9911002211',
'alpha_3_country_code' => 'IND',
'client_reference_id' => 'test123',
'non_residence_status' => true,
'residence_alpha_3_country_code' => 'USA'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-SIGNATURE: <api-key>",
"X-TIMESTAMP: <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.dollarpe.xyz/cms/api/v1/customer/create"
payload := strings.NewReader("{\n \"full_name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"9911002211\",\n \"alpha_3_country_code\": \"IND\",\n \"client_reference_id\": \"test123\",\n \"non_residence_status\": true,\n \"residence_alpha_3_country_code\": \"USA\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-TIMESTAMP", "<api-key>")
req.Header.Add("X-SIGNATURE", "<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.post("https://sandbox.dollarpe.xyz/cms/api/v1/customer/create")
.header("X-API-KEY", "<api-key>")
.header("X-TIMESTAMP", "<api-key>")
.header("X-SIGNATURE", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"9911002211\",\n \"alpha_3_country_code\": \"IND\",\n \"client_reference_id\": \"test123\",\n \"non_residence_status\": true,\n \"residence_alpha_3_country_code\": \"USA\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.dollarpe.xyz/cms/api/v1/customer/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["X-TIMESTAMP"] = '<api-key>'
request["X-SIGNATURE"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"9911002211\",\n \"alpha_3_country_code\": \"IND\",\n \"client_reference_id\": \"test123\",\n \"non_residence_status\": true,\n \"residence_alpha_3_country_code\": \"USA\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"client_reference_id": "test123",
"full_name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"country": "USA",
"type": "INDIVIDUAL",
"status": "UNVERIFIED",
"failure_reason": null,
"document_type": "AADHAAR"
}
}{
"status": false,
"message": "Bad Request",
"err_code": "INPUT_MALFORMED",
"errors": {
"type": [
"type is required"
],
"email": [
"email is required"
]
},
"data": null
}{
"success": false,
"message": "Internal Server Error",
"err_code": "SYS_INTERNAL_ERROR",
"errors": "Unexpected error occurred. Please try again later.",
"data": null
}Customer
Create Customer
Registers a new customer. Email, phone, and client reference ID must each be unique across your organization.
POST
/
customer
/
create
cURL
curl --request POST \
--url https://sandbox.dollarpe.xyz/cms/api/v1/customer/create \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-SIGNATURE: <api-key>' \
--header 'X-TIMESTAMP: <api-key>' \
--data '
{
"full_name": "John Doe",
"email": "john@example.com",
"phone": "9911002211",
"alpha_3_country_code": "IND",
"client_reference_id": "test123",
"non_residence_status": true,
"residence_alpha_3_country_code": "USA"
}
'import requests
url = "https://sandbox.dollarpe.xyz/cms/api/v1/customer/create"
payload = {
"full_name": "John Doe",
"email": "john@example.com",
"phone": "9911002211",
"alpha_3_country_code": "IND",
"client_reference_id": "test123",
"non_residence_status": True,
"residence_alpha_3_country_code": "USA"
}
headers = {
"X-API-KEY": "<api-key>",
"X-TIMESTAMP": "<api-key>",
"X-SIGNATURE": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<api-key>',
'X-TIMESTAMP': '<api-key>',
'X-SIGNATURE': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
full_name: 'John Doe',
email: 'john@example.com',
phone: '9911002211',
alpha_3_country_code: 'IND',
client_reference_id: 'test123',
non_residence_status: true,
residence_alpha_3_country_code: 'USA'
})
};
fetch('https://sandbox.dollarpe.xyz/cms/api/v1/customer/create', 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.dollarpe.xyz/cms/api/v1/customer/create",
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([
'full_name' => 'John Doe',
'email' => 'john@example.com',
'phone' => '9911002211',
'alpha_3_country_code' => 'IND',
'client_reference_id' => 'test123',
'non_residence_status' => true,
'residence_alpha_3_country_code' => 'USA'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-SIGNATURE: <api-key>",
"X-TIMESTAMP: <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.dollarpe.xyz/cms/api/v1/customer/create"
payload := strings.NewReader("{\n \"full_name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"9911002211\",\n \"alpha_3_country_code\": \"IND\",\n \"client_reference_id\": \"test123\",\n \"non_residence_status\": true,\n \"residence_alpha_3_country_code\": \"USA\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-TIMESTAMP", "<api-key>")
req.Header.Add("X-SIGNATURE", "<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.post("https://sandbox.dollarpe.xyz/cms/api/v1/customer/create")
.header("X-API-KEY", "<api-key>")
.header("X-TIMESTAMP", "<api-key>")
.header("X-SIGNATURE", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"9911002211\",\n \"alpha_3_country_code\": \"IND\",\n \"client_reference_id\": \"test123\",\n \"non_residence_status\": true,\n \"residence_alpha_3_country_code\": \"USA\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.dollarpe.xyz/cms/api/v1/customer/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["X-TIMESTAMP"] = '<api-key>'
request["X-SIGNATURE"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"John Doe\",\n \"email\": \"john@example.com\",\n \"phone\": \"9911002211\",\n \"alpha_3_country_code\": \"IND\",\n \"client_reference_id\": \"test123\",\n \"non_residence_status\": true,\n \"residence_alpha_3_country_code\": \"USA\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Success",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"client_reference_id": "test123",
"full_name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"country": "USA",
"type": "INDIVIDUAL",
"status": "UNVERIFIED",
"failure_reason": null,
"document_type": "AADHAAR"
}
}{
"status": false,
"message": "Bad Request",
"err_code": "INPUT_MALFORMED",
"errors": {
"type": [
"type is required"
],
"email": [
"email is required"
]
},
"data": null
}{
"success": false,
"message": "Internal Server Error",
"err_code": "SYS_INTERNAL_ERROR",
"errors": "Unexpected error occurred. Please try again later.",
"data": null
}Create Customer
Error Codes and Messages
| API Status Code | Response | Reason |
|---|---|---|
| 400 | Email already in use | Email already in use |
| 400 | Phone already in use | Phone already in use |
| 400 | Invalid country code | Invalid country code |
| 400 | Client Reference ID already exists | Client Reference ID already exists |
| 500 | Internal Server Error | Internal Server Error |
Authorizations
API Key for authentication
Current timestamp in seconds since epoch
HMAC SHA256 signature of the request encoded in Base64
Body
application/json
Full name of the customer
Example:
"John Doe"
Email address of the customer
Example:
"john@example.com"
Phone number of the customer
Example:
"9911002211"
Country code (based on nationality)
Example:
"IND"
Optional customer reference ID
Example:
"test123"
Boolean to define if the customer is a non-resident
Example:
true
Country code (based on country of residence)
Example:
"USA"
⌘I

