Skip to content

API Validations

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.

Note: By default, customer uniqueness is enforced on email — a business cannot create two customers with the same email. On the LRS flow, this can instead be enforced on PAN (tax_identification_number) in place of email, so customers are de-duplicated by PAN even if they use different emails. This is off by default — to enable it for your account, reach out to support@glomopay.com.

Validations for updating customers

Applies to PATCH /customer/{id}. Only email and phone can be updated, and the update is partial — omitted fields are left unchanged.

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.
RequestNeither email nor phone suppliedAt least one field must be provided to update.
EmailSupplied but blank or nullEmail can't be blank.
EmailWrong formatEmail address is not valid.
PhoneSupplied but blank or nullPhone can't be blank.
PhoneNot a valid number for the customer's countryPhone number format is invalid.
Customer Not FoundCustomer ID doesn't exist in your accountCustomer not found.

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.

Validations for declaring dynamic fee splits

Applies to POST /prices/dynamic-splits. List the rules you may declare against with GET /prices/dynamic.

FieldWhat Can Go WrongError Message You'll See
Price IDMissing or blankPrice id can't be blank
Price IDWrong format (must start with price_)Price id must start with 'price_' and contain only alphanumeric characters
Price IDDoes not exist, or belongs to another businessprice_id not found
Price IDThe rule's fee bearer is not dynamicprice_id is not a dynamic-bearer rule
Price IDThe rule does not price a payindynamic splits are only supported for payin
Price IDThe rule does not price transaction feesdynamic splits are only supported for transaction_fees
Price IDThe rule version is not effective yetprice_id is not effective yet
Price IDA newer version of the rule is effectiveprice_id has been superseded by a newer version of the rule
bps / fixed_amountNeither provided, or both providedexactly one of bps or fixed_amount must be provided
bpsMissing on a percentage-priced rulebps is required for a percentage-priced rule
bpsGreater than the rule's own bpsbps cannot exceed the rule's total of 300
fixed_amountMissing on a fixed-priced rulefixed_amount is required for a fixed-priced rule
fixed_amountGreater than the rule's own fees_amountfixed_amount cannot exceed the rule's total
fee_currencyDoes not match a fixed-priced rule's currencyfee_currency must be USD to match the rule
fee_currencyMissing while min_fee or max_fee is declaredfee_currency is required when a bound is declared
min_fee / max_feeDeclared on a fixed-priced rulemin_fee and max_fee are not supported for a fixed-priced rule
min_fee / max_feemin_fee greater than max_feemin_fee must be less than or equal to max_fee
Any amountNot an integer, or negativeBps must be an integer / Bps must be greater than or equal to 0

Note: All amounts are in minor units (cents) and bps is basis points, so 100 is 1%. A bps of 0 is valid and means the customer bears the whole fee. Each rule is held to its own ceiling — a declaration against one rule is never capped by another rule's total.

Validations for using split_ids

Applies to POST /payin, POST /orders, POST /quotes, POST /subscriptions and POST /payment. Messages raised by form validation arrive prefixed with Validation failed: .

FieldWhat Can Go WrongError Message You'll See
split_idsAn id does not exist, belongs to another business, or no longer points at a live dynamic ruleSplit ids are invalid or no longer point at a dynamic rule: psplit_7Kq2mXbTdLp9
split_idsTwo dynamic rules share a dimension and only one is declaredSplit ids must be declared for every dynamic rule on the dimension, missing rules: price_Kd82nvQ1TzAe
split_idsA declared payment method is not enabled for your business (payment links and orders only)Split ids are not valid for any enabled payment method: bank_transfer
split_idsOmitted while your account requires a declarationSplit ids are required when dynamic fee splits are enforced
split_idsSent with a quote_id on a payment link or an orderSplit ids cannot be specified when quote_id is present
split_idsSent on a quote whose resource is not payinsplit_ids is only valid for payin quotes
split_idsSent on a fixed-frequency subscriptionSplit ids are only supported for as_presented subscriptions
split_idsSent on POST /payment for a fixed-frequency subscriptionsplit_ids are only supported for as_presented subscriptions
split_idsOmitted on an auto debit whose subscription declaration no longer resolvesDeclared fee splits on the subscription no longer point at a live dynamic rule: psplit_7Kq2mXbTdLp9. Pass a valid split_id to override.
split_idsDeclared for a payment method a subscription never charges (only card and pay_via_bank are chargeable)Split ids cannot be declared for a payment method a subscription never charges: bank_transfer
split_idsSent on an auto debit for a method other than the one the subscription chargessplit_ids must be declared for card, which this subscription charges, not bank_transfer

Note: A dimension is the combination of payment method, subtype, rail, currency and fee type. When two dynamic rules share one, declare a split for both.

Note: A subscription only ever charges card, or pay_via_bank when SEPA-eligible, so a split declared for any other payment method is rejected both at subscription creation and on an auto debit. An auto-debit override must be declared for the method the subscription actually charges.

Note: split_ids and payment_methods are independent. payment_methods restricts which methods the checkout offers; a split only changes how the fee for its own payment method is priced. One checkout can price one method from a dynamic split and another method from your normal rules.

Note: If a payment link or an order carries a declaration that no longer resolves, opening the checkout returns 400 Bad Request with This payment_link has expired because of expired split_ids. Please create another payin. (or This orders has expired… for an order). The payin is expired and you must issue a new one.

Validations for creating beneficiaries (v2)

FieldWhat Can Go WrongError Message You'll See
CategoryMissing or blankCategory can't be blank
CategoryNot "lrs" or "payout"Category must be one of: lrs, payout
BeneficiaryMissing or blankBeneficiary can't be blank
BeneficiaryNot an objectBeneficiary must be an object
Beneficiary NameMissing or blankBeneficiary name is required
Beneficiary AddressMissing or blankBeneficiary address is required
Bank AccountMissing or blankBank account can't be blank
Bank AccountNot an objectBank account must be an object
Account NumberMissing or blankBank account account_number is required
Bank NameMissing or blankBank account name is required
SWIFT CodeMissing or blankBank account swift_code is required
SWIFT CodeNot 8-11 characters (payout category)Swift code must be 8 to 11 characters long
SWIFT CodeNot exactly 8 characters (LRS category)Swift code must be 8 characters long
SWIFT CodeFirst 6 characters not alphabetsSwift code First 6 characters must be alphabets
SWIFT CodeCountry code doesn't match bank address countrySwift code Country code in BIC does not match selected country
CurrencyMissing or blankBank account currency is required
Bank AddressMissing or blankBank account address is required
Local Routing NumberMissing for LRS categoryLocal routing number can't be blank
Intermediate BankProvided but not an objectBank account intermediate_bank must be an object
Intermediate Bank SWIFT CodeMissing for LRS categoryBank account intermediate_bank swift_code is required for LRS beneficiaries
Duplicate AccountAccount already exists for this businessBusiness already had this Account Number, Account Type and Transfer Method