Skip to main content
Base URL: https://your-domain.com/api

GET /registration/get-default-country-short-name

Returns the platform’s default country short code. Useful for pre-selecting the country flag in registration forms.

Response fields

success
object
curl --request GET \
  --url https://your-domain.com/api/registration/get-default-country-short-name

GET /check-merchant-user-role-existence

Checks whether default merchant and user roles exist. Use this before showing the user-type selector in the registration form.

Response fields

status
number
200 on success.
checkMerchantRole
object
Object with id if a default merchant role exists; null otherwise.
checkUserRole
object
Object with id if a default user role exists; null otherwise.
curl --request GET \
  --url https://your-domain.com/api/check-merchant-user-role-existence

POST /registration/duplicate-email-check

Verifies whether an email address is already registered.

Request parameters

email
string
required
The email address to check.

Response fields

status
boolean
true if the email is already taken, false if available.
fail
string
Error message returned when status is true.
success
string
Success message returned when status is false.
curl --request POST \
  --url https://your-domain.com/api/registration/duplicate-email-check \
  --header 'Content-Type: application/json' \
  --data '{"email": "[email protected]"}'

POST /registration/duplicate-phone-number-check

Verifies whether a phone number is already registered.

Request parameters

phone
string
required
The phone number to check. Spaces and hyphens are stripped automatically.
id
number
When provided, excludes this user ID from the uniqueness check (useful when editing an existing profile).

Response fields

status
boolean
true if the phone is already taken, false if available.
fail
string
Error message when status is true.
success
string
Success message when status is false.
curl --request POST \
  --url https://your-domain.com/api/registration/duplicate-phone-number-check \
  --header 'Content-Type: application/json' \
  --data '{"phone": "+11234567890"}'

POST /registration

Creates a new user account. On success, creates a default wallet, assigns a role, generates a QR code, and — if email verification is enabled — sends a verification email.

Request parameters

first_name
string
required
User’s first name.
last_name
string
required
User’s last name.
email
string
required
A unique, valid email address.
password
string
required
The desired password.
fcm_last_login_device_token
string
Firebase Cloud Messaging device token. Stored on the user record for push notification delivery. Optional — omit if not using the mobile app.
type
string
User role type: user or merchant. Determines which default role is assigned. If omitted, the platform assigns the default user role.
phone
string
Phone number in international format. Must be unique across all users.
formattedPhone
string
Full international phone number including country code prefix (e.g. +11234567890). Used alongside carrierCode.
carrierCode
string
Country dial code without the + prefix (e.g. 1 for US). Used to format the phone number.
defaultCountry
string
ISO country code for the user’s default country (e.g. us).

Response fields

success
object

Error responses

StatusReason
401Validation failed (e.g. duplicate email)
200 with reason: email_verificationAccount created but email must be verified
curl --request POST \
  --url https://your-domain.com/api/registration \
  --header 'Content-Type: application/json' \
  --data '{
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "[email protected]",
    "password": "secret123",
    "type": "user",
    "phone": "+11234567890",
    "formattedPhone": "+11234567890",
    "carrierCode": "1",
    "defaultCountry": "us"
  }'

Build docs developers (and LLMs) love