skills/vendix-payment-processors/SKILL.md
Payment processor system: strategy registration, store credentials, webhooks, Wompi, and SaaS recurrent charges. Trigger: When adding payment processors, changing payment gateway logic, handling webhooks, or working with Wompi recurrent billing.
npx skillsauth add rzyfront/vendix vendix-payment-processorsInstall 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.
store_payment_methods, credential encryption, masking, or gateway config schemas.apps/backend/src/domains/store/payments/payments.module.tsapps/backend/src/domains/store/payments/services/payment-gateway.service.tsapps/backend/src/domains/store/payments/interfaces/apps/backend/src/domains/store/payments/services/payment-encryption.service.tsapps/backend/src/domains/store/payments/services/store-payment-methods.service.tsapps/backend/src/domains/store/payments/webhook.controller.ts and services/webhook-handler.service.tsapps/backend/src/domains/store/payments/processors/wompi/wompi.processor.tsapps/backend/src/domains/store/subscriptions/services/subscription-payment.service.tssystem_payment_methods is the global catalog. store_payment_methods activates/configures methods per store. PaymentsModule.onModuleInit() registers processor instances in PaymentGatewayService, keyed by system_payment_methods.type.
Currently registered processor types:
cashcard through Stripepaypalbank_transferwompiwalletThe Prisma enum also includes voucher; verify registration/usage before assuming a processor exists.
Every processor extends BasePaymentProcessor and implements:
processPayment(data: PaymentData)refundPayment(...)validatePayment(...)getPaymentStatus(...)validateWebhook(...)Current PaymentData includes required idempotencyKey. storePaymentMethodId is optional because SaaS subscription billing can charge with platform credentials instead of a per-store payment method.
Current PaymentResult may include gatewayReference and errorCode in addition to success/status/transaction fields. Wompi recurrent revocation uses errorCode: 'PAYMENT_SOURCE_REVOKED'.
Store credentials live in store_payment_methods.custom_config.
PaymentEncryptionService when PAYMENT_ENCRYPTION_KEY is configured.iv:authTag:ciphertext.****last4), never raw decrypted config.StorePaymentMethodsService.getDecryptedConfig().Sensitive field map currently includes:
wompi: private_key, events_secret, integrity_secretstripe: secret_key, webhook_secretpaypal: client_secretWebhook controller base path is POST /store/webhooks with routes for stripe, paypal, bank-transfer, and wompi.
Webhook handlers run without normal tenant context. Use prisma.withoutScope() for webhook lookup/update paths, and derive tenant/store from payload/reference where needed.
Wompi specifics:
vendix_{storeId}_{orderId}_{timestamp}.webhook_event_dedup.payments.gateway_reference, then payments.transaction_id, then legacy transaction reference.Do not reuse a Wompi transaction.id as a recurring token. The recurrent/MIT path uses a Wompi payment_source_id and sends transactions with recurrent: true and no payment_method payload.
SaaS subscription charges do not go through PaymentGatewayService; SubscriptionPaymentService calls WompiProcessor directly with platform credentials from PlatformGatewayService.
Current behavior:
provider_payment_source_id.payment_source_id and wompiConfig.INVALID_PAYMENT_SOURCE and not-found-like COF failures map to PAYMENT_SOURCE_REVOKED.consecutive_failures resets to 0, replaced_at is set, an event is emitted, and failover may be attempted.WOMPI_RECURRENT_ENFORCE.WOMPI_CHARGE_PATH path=recurrent|legacy|no_pm|recurrent_failover.apps/backend/src/domains/store/payments/processors/{name}/.BasePaymentProcessor and provider client/types as needed.payments.module.ts and register the type in onModuleInit().system_payment_methods seed data and config schema.payment_methods_type_enum value; load vendix-prisma-migrations first.custom_config secrets in API responses.404 maps to a distinct not-found error; current code treats it as revoked.vendix-prisma-scopes - Scoped and unscoped Prisma usagevendix-prisma-migrations - Safe enum/schema migrationsvendix-multi-tenant-context - Store context resolutionvendix-ecommerce-checkout - Ecommerce Wompi checkout flowvendix-saas-billing - SaaS subscription payment flowsdevelopment
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.