Platform·QWED UCPv0.3.0
Verify agent checkouts before the money moves.
Verification middleware for the Universal Commerce Protocol. It checks the totals, state and structure of a checkout an agent prepared, before payment.

At a glance
- Version
- 0.3.0
- Status on PyPI
- Alpha
- Install
- pip install qwed-ucp
- Also on
- GitHub Action (QWED-AI/qwed-ucp@v1)
- Model in the check
- None
- Licence
- Apache-2.0
Guards
- MoneyGuard
Totals
Total must equal subtotal minus discount, plus fulfilment, tax and fees.
- StateGuard
Checkout state
The checkout must move through valid states.
- SchemaGuard
Structure
The checkout must match the UCP v1.0 schema.
- LineItemsGuard, DiscountGuard, CurrencyGuard
Line items, discounts, currency
Standalone guards for the parts of a checkout.
- RefundGuard, TipGuard, FeeGuard
Refunds, tips and fees
Standalone guards for money added or returned.
- AttestationGuard
Signed checkouts
JWT verification with replay protection.
Mistakes it is built to catch
QWED returns the decision; your integration acts on it.
Without QWED UCPNobody checked any of itWith QWED UCPEach one checked before it is used
Tax worked out wrongTax of 8.25% on $100 charged as $8.00.MoneyGuardVERIFIED · DENY8.25% of $100 is $8.25, so payment is held.
Items that do not add up$50 + $30 + $20 totalled as $110.00.LineItemsGuardVERIFIED · DENYThe items come to $100.00, so it is held.
A discount in the wrong placeA discount applied after tax instead of before.DiscountGuardVERIFIED · DENYApplied in the wrong order, so it is held.
What is proven correct is admitted, with a record of why.
Good to know
- It is not a cart, a payment processor or a fraud system.
- verify_totals_only() checks totals alone and should not be treated as a final verdict.
- Replay protection is kept in memory only.