The merchant customer module is the B2B layer on top of regular customer records. Where a normal customer is a single buyer with a card, a merchant customer is a business account: multiple users buying on behalf of an organisation, with a spending limit, payment terms (NET-30), an invoice cycle, and an outstanding balance. Use it for wholesale, distributor, or trade-account flows.
Account CRUD
/crm/merchant-customers/detailJWT/crm/merchant-customers/detailJWT/crm/merchant-customers/detail/:idJWT/crm/merchant-customers/by-customer/:customerIdJWT/crm/merchant-customers/detail/:idJWT{
"businessName": "Acme Distribution Co.",
"contactCustomerId": "cust-acme-primary",
"spendingLimit": 50000,
"currency": "USD",
"paymentTerms": "NET-30",
"billingCycle": "monthly",
"creditLimit": 100000,
"status": "pending"
}
by-customer returns the merchant account a given customer is attached to — a customer can belong to one merchant.
Lifecycle actions
/crm/merchant-customers/approve/:idJWT/crm/merchant-customers/suspend/:idJWT/crm/merchant-customers/reactivate/:idJWT/crm/merchant-customers/close/:idJWTThe lifecycle is pending → approved → active → (suspended | closed). A suspended account can still log in but cannot place new orders. A closed account is read-only for historical reporting.
Limits and terms
/crm/merchant-customers/spending-limit/:idJWT/crm/merchant-customers/payment-terms/:idJWTSpending limits are enforced at checkout — if a new order would push the account over spendingLimit, the order is rejected with a 402-style response. Limit changes write an audit activity (see Activities and audit).
Users on the account
/crm/merchant-customers/users/:idJWT/crm/merchant-customers/users/:id/:customerIdJWT/crm/merchant-customers/users/:id/:customerIdJWTAdd a customer to the merchant account, change their role (purchaser, approver, viewer), or remove them. When a user logs in and is attached to a merchant, their orders inherit the merchant's payment terms automatically.
Charges and credits
/crm/merchant-customers/charge/:idJWT/crm/merchant-customers/credit/:idJWTManually post a charge or credit against the account balance. Used for fees, adjustments, returns processed outside the normal order flow.
Invoicing
/crm/merchant-customers/invoices/generate/:idJWT/crm/merchant-customers/invoices/send/:id/:invoiceIdJWT/crm/merchant-customers/invoices/generate-allJWT/crm/merchant-customers/invoices/send-allJWT/crm/merchant-customers/invoices/allJWTgenerate rolls up unbilled orders into an invoice for the configured billing cycle. generate-all runs across every merchant — typically scheduled for the first of the month. Once generated, send emails the PDF and posts the invoice ID to the storefront invoice module so the customer can pay it online.
Reminders and statements
/crm/merchant-customers/reminders/:merchantId/:invoiceIdJWT/crm/merchant-customers/reminders/bulkJWT/crm/merchant-customers/statements/:merchantIdJWT/crm/merchant-customers/statements/:merchantId/sendJWTStatements are running summaries of invoices, payments, and balance over a date range. Reminders are dunning emails on overdue invoices.
Reporting
/crm/merchant-customers/dashboardJWT/crm/merchant-customers/transactions/allJWT/crm/merchant-customers/balances/outstandingJWT/crm/merchant-customers/reports/agingJWTThe aging report bucket-counts outstanding invoices (current, 1-30 days, 31-60, 61-90, 90+) — the standard A/R aging view.
Merchant customer balances feed the Finance module for payouts only when a merchant overpays — credits flow back as wallet balance available for refund or future use.