Commerce Credit
Manage customer credit limits, perform credit checks, process credit applications, and place or release credit holds.
How It Works
- Create credit accounts for customers with limits and risk ratings.
- Run credit checks before order approval.
- Place credit holds on orders that exceed limits or have past-due balances.
- Process credit applications with approval workflow.
- Track credit transactions (charges, payments, adjustments).
- Release holds after payment or approval override.
Usage
- MCP tools:
create_credit_account, get_credit_account, update_credit_account, check_credit, place_credit_hold, release_credit_hold, submit_credit_application, review_credit_application, record_credit_transaction, get_customer_credit_summary.
- Writes require
--apply.
Credit Account Statuses
- Active, Suspended, OnHold, Closed, PendingReview
Risk Ratings
- Low, Medium, High, Critical
Hold Types
- OverLimit: order would exceed credit limit
- PastDue: customer has past-due invoices
- Manual: manually placed by credit manager
- NewCustomer: first-time buyer review
- HighRisk: elevated risk rating
Credit Application Statuses
- Pending -> UnderReview -> Approved/Denied/MoreInfoNeeded (or Withdrawn)
Credit Transaction Types
- Charge, Payment, CreditMemo, Adjustment, WriteOff, LimitChange
Output
{"status":"credit_check","customer_id":"cust_123","approved":true,"credit_limit":10000.00,"available_credit":7500.00,"order_amount":2000.00}
Present Results to User
- Credit check result (approved/denied/requires_approval).
- Current limit, used, and available credit.
- Active holds with reasons.
- Credit application decision and terms.
Troubleshooting
- Order on hold: check hold type; release after payment or manager override.
- Credit check denied: customer over limit or has past-due balance.
- Application stuck: verify all required business information is provided.
References
- references/credit-management.md
- /home/dom/stateset-icommerce/crates/stateset-core/src/models/credit.rs
- /home/dom/stateset-icommerce/crates/stateset-embedded/src/credit.rs
1---2name: commerce-credit3description: Manage customer credit accounts, credit holds, and credit applications. Use when checking credit availability, placing holds on orders, or reviewing credit applications.4---5
6# Commerce Credit
7
8Manage customer credit limits, perform credit checks, process credit applications, and place or release credit holds.
9
10## How It Works
11
121. Create credit accounts for customers with limits and risk ratings.
132. Run credit checks before order approval.
143. Place credit holds on orders that exceed limits or have past-due balances.
154. Process credit applications with approval workflow.
165. Track credit transactions (charges, payments, adjustments).
176. Release holds after payment or approval override.
18
19## Usage
20
21- MCP tools: `create_credit_account`, `get_credit_account`, `update_credit_account`, `check_credit`, `place_credit_hold`, `release_credit_hold`, `submit_credit_application`, `review_credit_application`, `record_credit_transaction`, `get_customer_credit_summary`.
22- Writes require `--apply`.
23
24## Credit Account Statuses
25
26- Active, Suspended, OnHold, Closed, PendingReview
27
28## Risk Ratings
29
30- Low, Medium, High, Critical
31
32## Hold Types
33
34- OverLimit: order would exceed credit limit
35- PastDue: customer has past-due invoices
36- Manual: manually placed by credit manager
37- NewCustomer: first-time buyer review
38- HighRisk: elevated risk rating
39
40## Credit Application Statuses
41
42- Pending -> UnderReview -> Approved/Denied/MoreInfoNeeded (or Withdrawn)
43
44## Credit Transaction Types
45
46- Charge, Payment, CreditMemo, Adjustment, WriteOff, LimitChange
47
48## Output
49
50```json
51{"status":"credit_check","customer_id":"cust_123","approved":true,"credit_limit":10000.00,"available_credit":7500.00,"order_amount":2000.00}
52```
53
54## Present Results to User
55
56- Credit check result (approved/denied/requires_approval).
57- Current limit, used, and available credit.
58- Active holds with reasons.
59- Credit application decision and terms.
60
61## Troubleshooting
62
63- Order on hold: check hold type; release after payment or manager override.
64- Credit check denied: customer over limit or has past-due balance.
65- Application stuck: verify all required business information is provided.
66
67## References
68- references/credit-management.md
69- /home/dom/stateset-icommerce/crates/stateset-core/src/models/credit.rs
70- /home/dom/stateset-icommerce/crates/stateset-embedded/src/credit.rs