Credit Limit Validator
Validates that the customer has sufficient credit to cover credit-based payments in the cart.
Overview
The Credit Limit Validator checks whether the customer has enough available credit to cover payments that require credit. It supports three levels of validation: credit denied, insufficient remaining credit, and exceeded credit limit. Stores can optionally be configured to show a warning instead of blocking the order when credit is insufficient.
Identifier
| Property | Value |
|---|---|
| Connector ID | creditLimitValidator |
| Validation Type | Payment |
Behavior
- Looks up the customer associated with the cart
- Identifies payments that have
RequiresCreditenabled in the payment configuration - Calculates the total credit demand from all credit-based payments
- Checks three conditions in order:
- Credit denied: If the customer's
IsCreditDeniedflag is set, returns an error - Insufficient remaining credit: If
CreditRemainingis less than the total credit demand, returns an error (or a warning if the store hasOnlyWarnOnCreditLimitenabled) - Exceeded credit limit: If
CreditLimitis less than the total credit demand, returns an error
- Credit denied: If the customer's
- If no credit-based payments exist or the customer has sufficient credit, validation passes
Store-level override
If the store has the property OnlyWarnOnCreditLimit set to "true", insufficient credit will produce a warning instead of an error, allowing the order to proceed.
Error messages
| Condition | Translation Key |
|---|---|
| Customer credit is denied | CreditIsDenied |
| Insufficient remaining credit | NotEnoughCredit |
| Exceeds credit limit | ExceedsCreditLimit |
Configuration
No additional properties required.
