skills/vendix-ecommerce-checkout/SKILL.md
Checkout flow for STORE_ECOMMERCE: cart, shipping, payment methods, Wompi, WhatsApp checkout, bookings, and stock reservations. Trigger: When implementing or debugging ecommerce checkout, cart checkout, shipping/payment selection, or Wompi checkout.
npx skillsauth add rzyfront/vendix vendix-ecommerce-checkoutInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
apps/backend/src/domains/ecommerce/.apps/frontend/src/app/private/modules/ecommerce/.Checkout controller routes:
GET /ecommerce/checkout/payment-methods?shipping_type=... with JwtAuthGuard.POST /ecommerce/checkout with JwtAuthGuard.POST /ecommerce/checkout/prepare-wompi with JwtAuthGuard.POST /ecommerce/checkout/confirm-wompi-payment/:orderId with JwtAuthGuard.POST /ecommerce/checkout/whatsapp with @OptionalAuth().Cart routes are authenticated: GET /ecommerce/cart, POST /ecommerce/cart/items, PUT /ecommerce/cart/items/:id, DELETE /ecommerce/cart/items/:id, DELETE /ecommerce/cart, and POST /ecommerce/cart/sync.
CheckoutDto supports:
payment_method_id required.shipping_method_id, shipping_rate_id, shipping_address_id, or inline shipping_address.notes.items fallback for cart-less checkout payloads.bookings for bookable service products.WhatsappCheckoutDto supports notes, items, shipping_method_id, and shipping_rate_id.
The backend reads the authenticated user's ecommerce cart through EcommercePrismaService. If the backend cart is empty and DTO items exist, it uses those DTO items as fallback.
Current flow:
product_variant_id.StockValidatorService.PriceResolverService and taxes with TaxesService.channel: 'ecommerce' and state: 'pending_payment'.order.created.StockLevelManager.reserveStock(); checkout does not directly decrement stock.bookings are present; failures are logged and do not fail checkout.order_id, order_number, total, state, and message.GET /ecommerce/checkout/payment-methods filters enabled store payment methods by system_payment_method.processing_mode and shipping type:
pickup: DIRECT, ONLINE.ONLINE, ON_DELIVERY.Frontend reloads payment methods after shipping selection because shipping method type changes eligible payment methods.
Frontend normal checkout creates the order first, then prepares/opens Wompi.
Backend endpoints:
prepare-wompi builds widget config, reuses existing payments.gateway_reference when present, and validates redirect host against domain settings.confirm-wompi-payment/:orderId polls Wompi by transaction_id or gateway_reference, then applies the result through WebhookHandlerService.applyWompiTransaction.Frontend detects Wompi when selected method has type === 'wompi' or provider === 'wompi', opens the Wompi widget via shared WompiService, and confirms approved/declined/error callbacks as a UX fallback.
WhatsApp checkout is separate from normal checkout.
POST /ecommerce/checkout/whatsapp.items from localStorage cart.channel: 'whatsapp' and state: 'created'.Frontend files:
apps/frontend/src/app/private/modules/ecommerce/pages/checkout/checkout.component.tsapps/frontend/src/app/private/modules/ecommerce/services/checkout.service.tsapps/frontend/src/app/private/modules/ecommerce/services/cart.service.tsapps/frontend/src/app/private/modules/ecommerce/pages/cart/cart.component.tsThe normal /checkout route is protected by AuthGuard. Guest purchase is handled through WhatsApp checkout unless store config requires registration.
The checkout component uses signals/computed for core state and takeUntilDestroyed. Some shipping fields are still plain mutable fields in current code; avoid copying that pattern into new code.
Step selection is dynamic:
Shipping estimates are calculated by CartService.getShippingEstimates() through POST /shipping/calculate?store_id=..., not a checkout-owned endpoint.
/ecommerce/cart.vendix_cart./ecommerce/cart/sync, then localStorage is cleared.vendix-customer-auth - Customer login/register and guest boundaryvendix-payment-processors - Wompi and payment processor internalsvendix-inventory-stock - Reservation and stock validation behaviorvendix-multi-tenant-context - Ecommerce store/user contextvendix-zoneless-signals - Frontend signal statedevelopment
Mobile app development rules for Vendix Expo/React Native project. Trigger: When editing, creating, or modifying any file under apps/mobile, or when developing mobile-specific features.
development
Feature gating by store subscription state: global store write guard, AI feature gate, Redis feature resolution, quota consumption, frontend paywall interceptor, banner, and subscription UI states. Trigger: When adding feature gates, paywalls, subscription-based access control, protecting store write operations, AI feature gates, or rollout flags.
testing
SaaS subscription billing for Vendix stores: plan pricing, invoices, Wompi platform payments, manual payments, partner commissions, payouts, proration, and dunning. Trigger: When creating SaaS invoices, working with partner rev-share, margin/surcharge pricing, invoice sequence allocation, partner payout batches, subscription payments, manual payments, or dunning flows.
development
Periodic quota counters with Redis, UTC period keys, Lua-based idempotent AI quota consumption, request-id deduplication, and post-success consumption. Trigger: When building quota counters, enforcing monthly/daily feature caps, or reusing AI quota patterns for uploads, emails, exports, or rate-limited features.