Create User
curl --request POST \
--url https://api.stablepay.global/v2/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"mobile": "<string>",
"email": "<string>",
"externalId": "<string>",
"deviceId": "<string>"
}
'import requests
url = "https://api.stablepay.global/v2/users"
payload = {
"name": "<string>",
"mobile": "<string>",
"email": "<string>",
"externalId": "<string>",
"deviceId": "<string>"
}
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({
name: '<string>',
mobile: '<string>',
email: '<string>',
externalId: '<string>',
deviceId: '<string>'
})
};
fetch('https://api.stablepay.global/v2/users', 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.stablepay.global/v2/users",
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([
'name' => '<string>',
'mobile' => '<string>',
'email' => '<string>',
'externalId' => '<string>',
'deviceId' => '<string>'
]),
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.stablepay.global/v2/users"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"deviceId\": \"<string>\"\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.stablepay.global/v2/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"deviceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stablepay.global/v2/users")
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 \"name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"deviceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"userId": "usr_abc123def456",
"depositAddresses": {
"evm": "0x742d35Cc6634C0532925a3b844Bc9e7595f3A123",
"tron": "TN7FbQz9Mwi4pPYkXRmpVMaccut3Fk8BBB"
},
"kycStatus": "pending"
}
}
{
"success": true,
"data": {
"userId": "usr_abc123def456",
"kycStatus": "pending"
}
}
{
"error": "Conflict",
"message": "User with this mobile already exists",
"code": "USER_EXISTS"
}
Users
Create User
Create a new user
POST
/
v2
/
users
Create User
curl --request POST \
--url https://api.stablepay.global/v2/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"mobile": "<string>",
"email": "<string>",
"externalId": "<string>",
"deviceId": "<string>"
}
'import requests
url = "https://api.stablepay.global/v2/users"
payload = {
"name": "<string>",
"mobile": "<string>",
"email": "<string>",
"externalId": "<string>",
"deviceId": "<string>"
}
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({
name: '<string>',
mobile: '<string>',
email: '<string>',
externalId: '<string>',
deviceId: '<string>'
})
};
fetch('https://api.stablepay.global/v2/users', 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.stablepay.global/v2/users",
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([
'name' => '<string>',
'mobile' => '<string>',
'email' => '<string>',
'externalId' => '<string>',
'deviceId' => '<string>'
]),
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.stablepay.global/v2/users"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"deviceId\": \"<string>\"\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.stablepay.global/v2/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"deviceId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stablepay.global/v2/users")
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 \"name\": \"<string>\",\n \"mobile\": \"<string>\",\n \"email\": \"<string>\",\n \"externalId\": \"<string>\",\n \"deviceId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"userId": "usr_abc123def456",
"depositAddresses": {
"evm": "0x742d35Cc6634C0532925a3b844Bc9e7595f3A123",
"tron": "TN7FbQz9Mwi4pPYkXRmpVMaccut3Fk8BBB"
},
"kycStatus": "pending"
}
}
{
"success": true,
"data": {
"userId": "usr_abc123def456",
"kycStatus": "pending"
}
}
{
"error": "Conflict",
"message": "User with this mobile already exists",
"code": "USER_EXISTS"
}
Create User
Creates a new user. Deposit addresses are only generated for accounts withtransactionMode: sell or transactionMode: both.
Full name of the user
Mobile number with country code (e.g., +919876543210)
Email address
Your internal user ID for reference
Device fingerprint or identifier
Request
curl -X POST https://api.stablepay.global/v2/users \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Rahul Kumar",
"mobile": "+919876543210",
"email": "rahul@example.com"
}'
Response
- sell / both
- pool_settlement
Users created under a The
sell or both account receive deposit addresses.{
"success": true,
"data": {
"userId": "usr_abc123def456",
"depositAddresses": {
"evm": "0x742d35Cc6634C0532925a3b844Bc9e7595f3A123",
"tron": "TN7FbQz9Mwi4pPYkXRmpVMaccut3Fk8BBB"
},
"kycStatus": "pending"
}
}
evm address works across Polygon, Ethereum, Arbitrum, and Base. tron is returned when Tron is enabled on your account.Users created under a
pool_settlement account do not receive deposit addresses — funds sweep from your pool wallet, not per-user addresses.{
"success": true,
"data": {
"userId": "usr_abc123def456",
"kycStatus": "pending"
}
}
Next Steps
After creating a user, complete KYC verification so they can transact.Errors
| Code | Description |
|---|---|
USER_EXISTS | Mobile number already registered for this partner |
INVALID_MOBILE | Invalid mobile number format |
{
"success": true,
"data": {
"userId": "usr_abc123def456",
"depositAddresses": {
"evm": "0x742d35Cc6634C0532925a3b844Bc9e7595f3A123",
"tron": "TN7FbQz9Mwi4pPYkXRmpVMaccut3Fk8BBB"
},
"kycStatus": "pending"
}
}
{
"success": true,
"data": {
"userId": "usr_abc123def456",
"kycStatus": "pending"
}
}
{
"error": "Conflict",
"message": "User with this mobile already exists",
"code": "USER_EXISTS"
}
⌘I
