Velocity, discount, and market-eligibility gates for Shopify checkout, B2B, and POS — with audit evidence for every exception.
For: Ecommerce ops and finance at SOC 2-scoped Shopify merchants
Blocks or escalates a transaction above the unvetted ceiling unless the customer reputation is trusted.
Escalates discounts above threshold when contract-value evidence is missing.
Restrains B2B orders routed to a market the customer is not entitled to.
# SOC 2 Shopify Checkout Limits
# Fork: replace thresholds with your own and deploy in shadow mode first.
apiVersion: decionis.dev/v1
kind: PolicyPack
metadata:
name: soc2-shopify-checkout-limits
surface: shopify
standards: [SOC2-CC8.1, SOC2-CC6.1]
defaults:
mode: shadow # shadow | enforce
emit_dossier: true
rules:
- name: transaction_velocity_ceiling
when: "action == 'checkout.commit'"
decision: |
ALLOW IF tx_value < 1000 OR customer.reputation == 'trusted'
ESCALATE IF tx_value < 5000
BLOCK OTHERWISE
reason_code: velocity_ceiling_exceeded
- name: discount_exception_gate
when: "action == 'checkout.apply_discount'"
decision: |
ESCALATE IF discount_pct > 25 AND contract_value_evidence == null
ALLOW OTHERWISE
reason_code: discount_evidence_missing
- name: market_eligibility
when: "order.type == 'b2b'"
decision: |
RESTRAIN IF customer.market not in customer.entitled_markets
ALLOW OTHERWISE
reason_code: market_not_entitled
Fork it, change the thresholds to match your environment, and deploy in shadow mode first — it defaults to listen-only so nothing in your live pipeline changes.
The app evaluates checkouts and order admissions in read-only mode by default — no live behavior changes until you enable enforcement.
1. Install "Decionis Margin Protection" from the Shopify App Store.
2. Pick a starter pack (margin guard / oversell prevention / refund threshold).
3. App is in read-only mode by default — every governed checkout / order
produces a signed Decision Dossier. No shopper-facing change.Ships in shadow mode — every verdict is recorded, nothing is blocked.
This recipe is one step in a path. The same five steps apply to every recipe in the exchange.
Run the policy against a realistic action in the browser. Push it past what the rules allow and watch the verdict come back. No account.
See exactly what was decided and why: the rule that fired, the evidence it read, the policy version in force, and an Ed25519 signature you can verify yourself.
Measure what the policy would have caught on your own traffic without touching the live path. Every recipe defaults to shadow, so the first deployment carries no execution risk.
Point the same policy at the system where the action actually originates — a checkout, an ERP posting, a Zap, an agent's tool call.
Publish the proof: a public verification link, an embeddable badge, a PR comment, or an anonymized shadow-mode finding. This is how the next person discovers Decionis.