Skip to content

Glomo APIs apply comprehensive business logic validations to ensure that every request aligns with product rules, regulatory standards, and expected workflows. These validations go beyond simple formatting checks and focus on the correctness, consistency, and legitimacy of the transaction itself. By enforcing these rules, Glomo guarantees that only valid operations are processed, while any invalid request is immediately rejected with a clear and standardized error response.

Validations for creating customers

FieldWhat Can Go WrongError Message You'll See
NameMissing or blankCustomer name cannot be blank.
Customer TypeAnything other than Individual or BusinessCustomer type must be either Individual or Business.
EmailWrong formatEmail address is not valid.
EmailAlready used in your businessThis email address is already registered under your business.
PhoneWrong format (if provided)Phone number format is invalid.
AddressMissingAddress cannot be blank.
CityMissingCity cannot be blank.
StateMissingState cannot be blank.
CountryWrong code (not 3-letter, lowercase, or unsupported)Country code must be a valid 3-letter ISO code (e.g., IND, USA).
PincodeMissing for countries where it is mandatoryPincode is required for the selected country.
NationalityWrong code (not valid 3-letter ISO)Nationality code must be valid 3-letter ISO.
Date of BirthFuture date or wrong formatDate of birth must be in the past.
Duplicate CustomerEmail already exists in the systemA customer with this email already exists.

Validations for creating orders

FieldWhat Can Go WrongError Message You'll See
Customer IDMissing, empty, or wrong format (must start with cust_)Customer ID must start with cust_ and be valid.
AmountZero, negative, or non-integerAmount must be a positive whole number in the smallest currency unit (e.g., cents).
CurrencyNot supported or not uppercase 3-letter codeCurrency code must be valid (USD, EUR, GBP, AED, SGD).
Document IDWrong format (must start with doc_)Document ID must start with doc_ and be valid.
Purpose CodeInvalid or not found in the systemPurpose code is not valid.
Invoice AmountZero or negativeInvoice amount must be greater than 0.
Invoice NumberContains unsupported characters or too long (>50 chars)Invoice number contains invalid characters or is too long.
Invoice DescriptionContains unsupported characters or too long (>512 chars)Invoice description contains invalid characters or is too long.
Product (Name/Description)Name missing, invalid characters, or too longProduct name is required, valid characters only, max 128 chars.
Notes / Reference NumberWrong format (rare)Notes or reference number is invalid.
Duplicate OrderOrder already existsAn order with these details already exists.
Customer Not FoundCustomer ID doesn't exist in your accountCustomer not found.
FieldWhat Can Go WrongError Message You'll See
Customer IDMissing, empty, or wrong format (must start with cust_)Customer ID must start with cust_ and be valid.
AmountZero, negative, or non-integerThe amount must be a positive whole number in the smallest currency unit (e.g., cents).
CurrencyNot supported or not uppercase 3-letter codeCurrency code must be valid (USD, EUR, GBP, AED, SGD).
Purpose CodeInvalid or missingPurpose code is not valid.
Expires AtPast date, wrong format, or more than 6 months aheadExpiry date must be in the future and within 6 months.
Document IDWrong format (must start with doc_)Document ID must start with doc_ and be valid.
Invoice AmountZero or negativeInvoice amount must be greater than 0.
Invoice NumberContains unsupported characters or too long (>50 chars)Invoice number contains invalid characters or is too long.
Invoice DescriptionContains unsupported characters or too long (>512 chars)Invoice description contains invalid characters or is too long.
Reminder FrequencyValue not in [1, 2, 7, 14]Reminder frequency must be 1, 2, 7, or 14 days.
Product (Name/Description)Name missing, invalid characters, or too longProduct name is required, valid characters only, max 128 chars.
Reference NumberWrong format (rare)Reference number is invalid.
Customer Not FoundCustomer ID doesn't exist in your accountCustomer not found.
Document Not FoundDocument ID doesn't exist in your accountDocument not found.
Duplicate Payment LinkLink already existsA payment link with these details already exists.